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.
Nothing published for this version
removed dependency on ruamel.yaml.clibz
ruamel.yaml.clibztry to load C functions from _ruamel_yaml_clibz first.
_ruamel_yaml_clibz first.Your coding agent can read these notes before it upgrades. Set up the MCP server →
root level block style scalars that started with a directives-end marker or a document-end marker, are now indented 2 spaces.
duplicate merge keys are never allowed (not even with .allow_duplicate_keys = True
Fix issue with constructing dataclasses that have a default factoryi attribute, but were missing a mapping value for that attribute. Reported by Victo
Fix line wrapping on plain scalars not observing width correctly. Issue 529, reported by Sebastien Vermeille
fix additional issue with extra space in double quoted string. Reported by Saugat Pachhai
function load_yaml_guess_indent now takes an option yaml argument so you can provide an already created/configured YAML instance
load_yaml_guess_indent now takes an option yaml argument so you
can provide an already created/configured YAML instanceNotImplementedError. Reported by Karsten
Tessarzik.implemented changes to the setup.py for Python 3.14 as suggested by Miro Hrončok in merge requests (MR not merged as those files are copied in from de
develop config)fix issue with roundtripping 0 in YAML 1.1 reported by Peter Law
added warning to README.md that PyPI might block updates due to breaking changes
fixes for README (reported by Kees Bakker)
0 (issue reported by (Mor
Peled)[https://sourceforge.net/u/morp/profile/] and also in a question by
Ravi on
Stackoverflow)fixed an issue with dataclass loading when the fields were collections (bug found as a result of a question by FibroMyAlgebra on StackOverflow)
InitVar fields when from __future__ import annotations was used to delay evaluation of typing.there is some indication that dependent packages have been pinned to use specific (tested) and just install the latest even in Python versions that ha
fix issue with spurious newline on first item after comment + nested block sequence
calling the deprecated functions now raises an AttributeError with the, somewhat more informative, orginal warning message. Instead of calling sys.exi…
AttributeError with the,
somewhat more informative, orginal warning message. Instead of calling
sys.exit(1)calling the deprecated functions now always displays the warning message. (reported by Trend Lloyd)
the functions scan, parse, compose, load, emit, serialize, dump and their variants (_all, safe_, round_trip_, etc) have been deprecated (the same name…
scan, parse, compose, load, emit, serialize,
dump and their variants (_all, safe_, round_trip_, etc) have been
deprecated (the same named methods on YAML() instances are, of course,
still there.YAML(typ='unsafe') now issues a PendingDeprecationWarning. This will become deprecated in the 0.18 series
(probably before the end of 2023).
You can use YAML(typ='full') to dump unregistered Python classes/functions.
For loading you'll have to register your classes/functions
if you want the old, unsafe, functionality. You can still load any tag, like `!!python/name:posix.system', safely
with the (default) round-trip parser.bytes-like object is required not 'str' while dumping binary streams. This was reported, analysed and a fix provided by Vit
Zikmundflow style sets are now preserved ( !!set {a, b, c} ). Any values specified when loading are dropped, including !!null "".
!!set {a, b, c} ). Any values specified
when loading are dropped, including !!null "".CommonMark
can result in problems on Azure. If you can install from .tar.gz using
RUAMEL_NO_LONG_DESCRIPTION=1 pip install ruamel.yaml --no-binary :all: then the long description, and its
offending type, are nog included (in the METADATA).
(Reported by Coury Ditch)__repr__ for internally used classesupdate README generation, no code changes
Nothing published for this version
fixed issue 480, dumping of a loaded empty flow-style mapping with comment failed (Reported by Stéphane Brunner)
Tag() instance, not a string (reported by
yan12125)support for loading dataclasses with InitVar variables (some special coding was necessary to get the, unexecpected, default value in the corresponding
InitVar variables (some special coding
was necessary to get the, unexecpected, default value in the corresponding
instance attribute ( example of usage in this
question)Python 3.12 also loads C version when using typ='safe'
Python 3.12 also loads C version when using typ='safe'
|-
initial support for loading invoking
__post_init__() on dataclasses that have that
method after loading a registered dataclass.
(Originally
asked on
Stackoverflow by
nyanpasu64
and as
ticket by
Patrick Lehmann)
@yaml.register_class
@dataclass
class ...
added flow_seq_start, flow_seq_end, flow_seq_separator, flow_map_start, flow_map_end, flow_map_separator class attributes to the Emitter class so flow
flow_seq_start, flow_seq_end, flow_seq_separator,
flow_map_start, flow_map_end, flow_map_separator class attributes to
the Emitter class so flow style output can more easily be influenced (based
on this answer on a
StackOverflow question by Huw
Walters).fix issue with scanner getting stuck in infinite loop
added tag.setter on ScalarEvent and on Node, that takes either a Tag instance, or a str (reported by Sorin Sbarnea)
ScalarEvent and on Node, that takes either a Tag
instance, or a str (reported by Sorin
Sbarnea)fix issue 467, caused by Tag instances not being hashable (reported by Douglas Raillard)
changed the internals of the tag property from a string to a class which allows for preservation of the original handle and suffix. This should result
|- fix for issue 464: documents ending with document end marker without final newline fail to load (reported by Mariusz Rusiniak)
fix issue with inline mappings as value for merge keys (reported by Sirish on StackOverflow)
CommentedMap
(reported by Bastien gerard)CommentedMap key throwing error
(reported by John Thorvald Wodder
II)fix for error on edge cage for issue 459
fix for regression while dumping wrapped strings with too many backslashes removed (issue 459, reported by Lele Gaifax)
rewrite of CommentedMap.insert(). If you have a merge key in the YAML document for the mapping you insert to, the position value should be the one as
CommentedMap.insert(). If you have a merge key in the YAML
document for the mapping you insert to, the position value should be the one
as you look at the YAML input. This fixes issue 453 where other keys of a
merged in mapping would show up after an insert (reported by Alex
Miller). It also fixes a call
to .insert() resulting into the merge key to move to be the first key if it
wasn't already and it is also now possible to insert a key before a merge key
(even if the fist key in the mapping).fix 458, error on plain scalars starting with word longer than width. (reported by Kyle Larose)
.update() no longer correctly handling keyword arguments (reported
by John Lin on StackOverflow)fix issue 449 where the second exclamation marks got URL encoded (reported and fixing PR provided by John Stark)
__repr__ of CommentedMap, now that Python's dict is ordered -> no
more ordereddict(list-of-tuples)!!float 42 (reported by Eric on Stack
overflow)CommentedKeySeq and CommentedKeyMap (which are
created if you have a sequence resp. mapping as the key in a mapping)fix bug in calling .compose() method with pathlib.Path instance.
.compose() method with pathlib.Path instance.fix error in microseconds while rounding datetime fractions >= 9999995 (reported by Luis Ferreira)
fix mypy problems (reported by Arun)
copy-paste error in folded scalar comment attachment (reported by Stephan Geulette)
extract timestamp matching/creation to util
398 also handle issue 397 when comment is newline
fix issue 397, insert comment before key when a comment between key and value exists (reported by Bastien gerard)
fix issue 396, inserting key/val in merged-in dictionary (reported by Bastien gerard)
- minor fix in attr handling
fix issue with anchor on registered class not preserved and those classes using package attrs with @attr.s() (both reported by ssph)
@attr.s() (both reported by
ssph)fix error baseclass for DuplicateKeyError (reported by Łukasz Rogalski)
DuplicateKeyError (reported by Łukasz
Rogalski)KeyError during reader error
(reported by MTU)fix issue 388, token with old comment structure != two elements (reported by Dimitrios Bariamis)
fix issue with updating CommentedMap (reported by sri on StackOverflow)
fix for issue 387 where templated anchors on tagged object did get set resulting in potential id reuse. (reported by Artem Ploujnikov)
issue 385 also affected other deprecated loaders (reported via email by Oren Watson)
|- fix for issue 385: deprecated round_trip_loader function not working (reported by Mike Gouline)
fix for issue 384 !!set with aliased entry resulting in broken YAML on rt reported by William Kimball)
!!set with aliased entry resulting in broken YAML on rt
reported by William Kimball)prevent (empty) comments from throwing assertion error (issue 351 reported by William Kimball) comments (or empty line) will be dropped
fix for issue 382 caused by an error in a format string (reported by William Kimball)
yaml.composer.return_alias = lambda s: copy.deepcopy(s)
(as per Stackoverflow answer)change -py2.py3-none-any.whl to -py3-none-any.whl, and remove 0.17.1
|- added 'Programming Language :: Python :: 3 :: Only', and removing 0.17.0 from PyPI (reported by Alasdair Nicol)
…for multi-document streams, now issue a PendingDeprecationning (e.g. when run from pytest, but also Python is started with -Wd). Use the methods on YA…
ruamel.std.pathlib)_Fload, safe_load, round_trip_load, dump,
safe_dump, round_trip_dump, scan, parse, compose, emit,
serialize as well as their _all variants for multi-document streams, now
issue a PendingDeprecationning (e.g. when run from pytest, but also Python
is started with -Wd). Use the methods on YAML(), which have been extended.# column of a following comment.
Effectively making the comment part of the scalar in the output.
(reported by Bence Nagy)|- fix for issue 359: could not update() CommentedMap with keyword arguments (reported by Steve Franchak)
null instead of
!!null '' (reported by mcarans on
StackOverflow)One column per quarter.