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.
added .copy() mapping representation for round-tripping (CommentedMap) to fix incomplete copies of merged mappings (reported by Will Richards __)
.copy() mapping representation for round-tripping (CommentedMap) to
fix incomplete copies of merged mappings (reported by Will Richards <https://bitbucket.org/will_richards/>__){**merged-mapping} and dict(**merged-mapping) (reported by Filip Matzner <https://bitbucket.org/FloopCZ/>__)Fix method name dumps (were not dotted) and loads (reported by Douglas Raillard __)
Douglas Raillard <https://bitbucket.org/DouglasRaillard/>__)Thomas Guillet <https://bitbucket.org/guillett/>__)Your coding agent can read these notes before it upgrades. Set up the MCP server →
Allow YAML() as a context manager for output, thereby making it much easier to generate multi-documents in a stream.
YAML() as a context manager for output, thereby making it much easier
to generate multi-documents in a stream.load() and dump() (reported
by Jimbo Jim <https://bitbucket.org/jimbo1qaz/>__)|- fix preservation of leading newlines in root level literal style scalar, and preserve comment after literal style indicator (| # some comment) Both
| # some comment)
Both needed for round-tripping multi-doc streams in
ryd <https://pypi.org/project/ryd/>__.|- housekeeping: oitnb for formatting, mypy 0.620 upgrade and conformity
oitnb for formatting, mypy 0.620 upgrade and conformityfix broken 3.6 manylinux1 (result of an unclean build (reported by Roman Sichnyi __)
build (reported by Roman Sichnyi <https://bitbucket.org/rsichnyi-gl/>__)fixed DeprecationWarning for importing from collections on 3.7 (issue 210, reported by Reinoud Elhorst __). It was difficult to find why tox/pytest di…
collections on 3.7 (issue 210,
reported by Reinoud Elhorst <https://bitbucket.org/reinhrst/>). It was
difficult to find why tox/pytest did not report <https://stackoverflow.com/q/51573204/1307905> and as time consuming to
actually fix <https://stackoverflow.com/a/51573205/1307905>__ the tests.After adding failing test for YAML.load_all(Path()), remove StopIteration (PR provided by Zachary Buhman __, also reported by Steven Hiscocks __.
YAML.load_all(Path()), remove StopIteration
(PR provided by Zachary Buhman <https://bitbucket.org/buhman/>, also
reported by Steven Hiscocks <https://bitbucket.org/sdhiscocks/>.Correct loading plain scalars consisting of numerals only and starting with 0, when not explicitly specifying YAML version 1.1. This also fixes the is
0, when not explicitly specifying YAML version 1.1. This also fixes the
issue about dumping string '019' as plain scalars as reported by Min RK <https://bitbucket.org/minrk/>__, that prompted this chance.|- merge PR33: Python2.7 on Windows is narrow, but has no sysconfig.get_config_var('Py_UNICODE_SIZE'). (merge provided by Marcel Bargull __)
sysconfig.get_config_var('Py_UNICODE_SIZE'). (merge provided by
Marcel Bargull <https://bitbucket.org/mbargull/>__)
register_class() now returns class (proposed by
Mike Nerone <https://bitbucket.org/Manganeez/>__}fix regression showing only on narrow Python 2.7 (py27mu) builds (with help from Marcel Bargull __ and Colm O'Connor <>__).
Marcel Bargull <https://bitbucket.org/mbargull/>__ and Colm O'Connor <>__).tox on Python 2.7 wide and narrow, as well as
3.4/3.5/3.6/3.7/pypyadd detection of C-compile failure (investigation prompted by StackOverlow __ by Emmanuel Blot __), which was removed while no longer dependent on lib
StackOverlow <https://stackoverflow.com/a/51057399/1307905>__ by Emmanuel Blot <https://stackoverflow.com/users/8233409/emmanuel-blot>__), which was removed
while no longer dependent on libyaml, C-extensions compilation still needs a
compiler though.added links to landing places as suggested in issue 190 by KostisA __
KostisA <https://bitbucket.org/ankostis/>__Dan Abolafia <https://bitbucket.org/danabo/>__merge PR27 improving package startup time (and loading when regexp not actually used), provided by Marcel Bargull __
Marcel Bargull <https://bitbucket.org/mbargull/>__fix for losing precision when roundtripping floats by Rolf Wojtech __
Rolf Wojtech <https://bitbucket.org/asomov/>__Nuno André <https://bitbucket.org/nu_no/>__Andrey Somov <https://bitbucket.org/asomov/>__again trying to create installable files for 187
allow None as stream when specifying transform parameters to YAML.dump(). This is useful if the transforming function doesn't return a meaningful valu
None as stream when specifying transform parameters to
YAML.dump(). This is useful if the transforming function doesn't return a
meaningful value (inspired by StackOverflow <https://stackoverflow.com/q/47614862/1307905>__ by rsaw <https://stackoverflow.com/users/406281/rsaw>__).fix for issue 157: CDumper not dumping floats (reported by Jan Smitka)
support for "undefined" round-tripping tagged scalar objects (in addition to tagged mapping object). Inspired by a use case presented by Matthew Patto
StackOverflow <https://stackoverflow.com/a/45967047/1307905>__.!!timestamp with an
incorrectly formatted or non-scalar. Reported by FichteFoll.|- allow setting yaml.default_flow_style = None (default: False) for for typ='rt'.
yaml.default_flow_style = None (default: False) for for typ='rt'.ScalarFloat now return float- fix Comment dumping
|- fix for issue with "compact JSON" not parsing: {"in":{},"out":{}} (reported on StackOverflow _ by mjalkio _
{"in":{},"out":{}}
(reported on StackOverflow <https://stackoverflow.com/q/45681626/1307905>_ by
mjalkio <https://stackoverflow.com/users/5130525/mjalkio>_|- fix issue #51: different indents for mappings and sequences (reported by Alex Harvey)
|- fix issue #61: merge of merge cannot be __repr__-ed (reported by Tal Liron)
fix issue 62, YAML 1.2 allows ? and : in plain scalars if non-ambigious (reported by nowox)
? and : in plain scalars if non-ambigious
(reported by nowox)fix for disappearing comment after empty flow sequence (reported by oit-tzhimmash)
fix for problem with dumping (unloaded) floats (reported by eyenseo)
added ScalarFloat which supports roundtripping of 23.1, 23.100, 42.00E+56, 0.0, -0.0 etc. while keeping the format. Underscores in mantissas are not p
Antony Sottile <https://bitbucket.org/asottile/>_), now handling comment between block
mapping key and value correctlyfalse, true) by using:
yaml.boolean_representation = [u'False', u'True']fix for round_tripping integers on 2.7.X > sys.maxint (reported by ccatterina)
fix for round_tripping singe excl. mark tags doubling (reported and fix by Jan Brezina)
fix for writing unicode in new API, https://stackoverflow.com/a/45281922/1307905
wheels for windows including C extensions
added object constructor for rt, decorator yaml_object to replace YAMLObject.
yaml_object to replace
YAMLObject.pure=True only!)missing pure attribute on YAML useful for implementing !include tag constructor for including YAML files in a YAML file _
pure attribute on YAML useful for implementing !include tag
constructor for including YAML files in a YAML file <https://stackoverflow.com/a/44913652/1307905>_support for Unicode supplementary Plane output with allow_unicode (input was already supported, triggered by this _ Stack Overflow Q&A)
this <https://stackoverflow.com/a/44875714/1307905>_ Stack Overflow Q&A)minor typing issues (reported and fix provided by Manvendra Singh _)
Manvendra Singh <https://bitbucket.org/manu-chroma/>_)fix for issue 135, typ='safe' not dumping in Python 2.7 (reported by Andrzej Ostrowski `_)
setup.py: change ModuleNotFoundError to ImportError (reported and fix by Asley Drake)
suppress duplicate key warning on mappings with merge keys (reported by Cameron Sweeney)
remove fatal dependency of setup.py on wheel package (reported by Cameron Sweeney)
fix for issue 130, regression in nested merge keys (reported by David Fee _)
David Fee <https://bitbucket.org/dfee/>_)top level PreservedScalarString not indented if not explicitly asked to
|- fix for issue 127: tagged scalars were always quoted and seperated by a newline when in a block sequence (reported and largely fixed by Tommy Wang
Tommy Wang <https://bitbucket.org/twang817/>_)allow plug-in install via install ruamel.yaml[jinja2]
install ruamel.yaml[jinja2]add plug-in mechanism for load/dump pre resp. post-processing
a set() with duplicate elements now throws error in rt loading
repeat load() on a single YAML() instance would fail.
load() on a single YAML() instance would fail.|- transform parameter on dump that expects a function taking a string and returning a string. This allows transformation of the output before it is w
transform parameter on dump that expects a function taking a
string and returning a string. This allows transformation of the output
before it is written to stream.No longer try to compile C extensions on Windows. Compilation can be forced by setting the environment variable RUAMEL_FORCE_EXT_BUILD to some value b
RUAMEL_FORCE_EXT_BUILD to some value before
starting the pip install.update to conform to mypy 0.511:mypy --strict
Any duplicate keys _ in mappings generate an error (in the old API this change generates a warning until 0.16)
duplicate keys <http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys>_ in mappings
generate an error (in the old API this change generates a warning until 0.16)it is now allowed to pass in a pathlib.Path as "stream" parameter to all load/dump functions
pathlib.Path as "stream" parameter to all
load/dump functionsfix for issue 119, deepcopy not returning subclasses (reported and PR by Constantine Evans )
fix for issue 103 allowing implicit documents after document end marker line (...) in YAML 1.2
...) in YAML 1.2fix problem with emitting using cyaml
remove dependency on typing while still supporting mypy
typing while still supporting mypy
(http://stackoverflow.com/a/43516781/1307905)fix Text not available on 3.5.0 and 3.5.1, now proactively setting version guards on all files (reported by João Paulo Magalhães _)
João Paulo Magalhães <https://bitbucket.org/jpmag/>_)round trip of integers (decimal, octal, hex, binary) now preserve leading zero(s) padding and underscores. Underscores are presumed to be at regular d
0o12_345_67 dumps back as 0o1_23_45_67 as the space from
the last digit to the underscore before that is the determining factor).binary, octal and hex integers are now preserved by default. This was a known deficiency. Working on this was prompted by the issue report (112) from
.replace() on
scalarstring classes.RUAMEL_NO_PIP_INSTALL_CHECK will suppress pip-check.fix issue 109 None not dumping correctly at top level (reported by Andrea Censi)
One column per quarter.