NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #188 most downloaded on PyPI
ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
Latest stable
0.19.1
Last release 11 months ago
02 Jan 2026
Release timing varies
gaps range from 1 weeks to 11 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
12 years old
273 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
- fix readme
fix for 0o52 not being a string in YAML 1.1 (reported on StackOverflow Q&A 43138503> _ by Frank D _
StackOverflow Q&A 43138503><http://stackoverflow.com/a/43138503/1307905>_ by Frank D <http://stackoverflow.com/users/7796630/frank-d>_fix for old default pip on Ubuntu 14.04 (reported by Sébastien Maccagnoni-Munch)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
fix Text not available on 3.5.0 and 3.5.1 (reported by Charles Bouchard-Légaré)
Usage of .serialize() outside of Serializer will be deprecated soon
fix for issue 97, clipped block scalar followed by empty lines and comment would result in two CommentTokens of which the first was dropped. (reported
fix for issue 96, prevent insertion of extra empty line if indented mapping entries are separated by an empty line (reported by Derrick Sawyer)
allow ':' in flow style scalars if not followed by space. Also don't quote such scalar as this is no longer necessary.
fix for issue 93, insert spurious blank line before single line comment between indented sequence elements (reported by Alex)
fix for issue 92, wrong import name reported by the-corinthian
fix for issue 91, when a compiler is unavailable reported by Maximilian Hils
StackOverflow Q&A <http://stackoverflow.com/a/41577841/1307905>_ by
Quuxplusone <http://stackoverflow.com/users/1424877/quuxplusone>_fix for issue 85, constructor.py importing unicode_literals caused mypy to fail on 2.7 (reported by Peter Amstutz)
fix for issue 83, collections.OrderedDict not representable by SafeRepresenter (reported by Frazer McLean)
fix for issue 84, deepcopy not properly working (reported by Peter Amstutz)
another fix for issue 82, change to non-global resolver data broke implicit type specification
fix for issue 82, deepcopy not working (reported by code monk)
fix for comments after empty (null) values (reported by dsw2127 and cokelaer)
optimisations on memory usage when loading YAML from large files (py3 -50%, py2 -85%)
if load() or load_all() is called with only a single argument (stream or string) a UnsafeLoaderWarning will be issued once. If appropriate you can sur
load() or load_all() is called with only a single argument (stream or
string) a UnsafeLoaderWarning will be issued once. If appropriate you can
surpress this warning by filtering it. Explicitly supplying the
Loader=ruamel.yaml.Loader argument, will also prevent it from being issued.
You should however consider using safe_load(), safe_load_all() if your
YAML input does not use tags.StackOveflow Q&A <http://stackoverflow.com/a/40705671/1307905>_ by msinn <http://stackoverflow.com/users/7185467/msinn>_)another fix for numpy (re-reported independently by PaulG & Nathanial Burdic)
only the RoundTripLoader included the Resolver that supports YAML 1.2 now all loaders do (reported by mixmastamyk)
allow dot char (and many others) in anchor name Fix issue 72 (reported by Shalon Wood)
allow dot char (and many others) in anchor name Fix issue 72 (reported by Shalon Wood)
|- Slightly smarter behaviour dumping strings when no style is specified. Single string scalars that start with single quotes or have newlines now are dumped double quoted "'abc\nklm'" instead of
'''abc
klm'''
Nothing published for this version
preserve round-trip sequences that are mapping keys (prompted by stackoverflow question 39595807 from Nowox)
|- Fix for issue #60 representation of CommentedMap with merge keys incorrect (reported by Tal Liron)
Nothing published for this version
Fix issue 58 endless loop in scanning tokens (reported by Christopher Lambert)
Make previous fix depend on unicode char width (32 bit unicode support is a problem on MacOS reported by David Tagatac)
Nothing published for this version
To be ignored Unicode characters were not properly regex matched (no specific tests, PR by Haraguroicha Hsu)
fixing issue 54 empty lines with spaces (reported by Alex Harvey)
fixing issue 46 empty lines between top-level keys were gobbled (but not between sequence elements, nor between keys in netsted mappings (reported by
|- fixing issue 45 preserving datetime formatting (submitted by altuin) Several formatting parameters are preserved with some normalisation:
|- Fix for issue 44: missing preserve_quotes keyword argument (reported by M. Crusoe)
correct 'in' operation for merged CommentedMaps in round-trip mode (implementation inspired by J.Ngo, but original not working for merges)
import warnings
from ruamel.yaml.error import ReusedAnchorWarning
warnings.simplefilter("ignore", ReusedAnchorWarning)
minor improvements based on feedback from M. Crusoe https://bitbucket.org/ruamel/yaml/issues/42/
Nothing published for this version
include initial Type information (inspired by M. Crusoe)
Change to prevent FutureWarning in NumPy, as reported by tgehring ("comparison to None will result in an elementwise object comparison in the future")
fix preserve_quotes missing on original Loaders (as reported by Leynos, bitbucket issue 38)
Nothing published for this version
added .insert(pos, key, value, comment=None) to CommentedMap
.insert(pos, key, value, comment=None) to CommentedMapNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
RoundTripLoader loads 1.2 by default (no sexagesimals, 012 octals nor yes/no/on/off booleans
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.