METADATA 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. Metadata-Version: 2.1
  2. Name: ruamel.yaml
  3. Version: 0.16.13
  4. Summary: ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
  5. Home-page: https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree
  6. Author: Anthon van der Neut
  7. Author-email: a.van.der.neut@ruamel.eu
  8. License: MIT license
  9. Keywords: yaml 1.2 parser round-trip preserve quotes order config
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 4 - Beta
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python
  16. Classifier: Programming Language :: Python :: 2.7
  17. Classifier: Programming Language :: Python :: 3.5
  18. Classifier: Programming Language :: Python :: 3.6
  19. Classifier: Programming Language :: Python :: 3.7
  20. Classifier: Programming Language :: Python :: 3.8
  21. Classifier: Programming Language :: Python :: Implementation :: CPython
  22. Classifier: Programming Language :: Python :: Implementation :: Jython
  23. Classifier: Programming Language :: Python :: Implementation :: PyPy
  24. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  25. Classifier: Topic :: Text Processing :: Markup
  26. Classifier: Typing :: Typed
  27. Description-Content-Type: text/x-rst
  28. Requires-Dist: ruamel.yaml.clib (>=0.1.2) ; platform_python_implementation=="CPython" and python_version<"3.10"
  29. Requires-Dist: ruamel.ordereddict ; platform_python_implementation=="CPython" and python_version<="2.7"
  30. Provides-Extra: docs
  31. Requires-Dist: ryd ; extra == 'docs'
  32. Provides-Extra: jinja2
  33. Requires-Dist: ruamel.yaml.jinja2 (>=0.2) ; extra == 'jinja2'
  34. ruamel.yaml
  35. ===========
  36. ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python.
  37. :version: 0.16.13
  38. :updated: 2021-03-05
  39. :documentation: http://yaml.readthedocs.io
  40. :repository: https://sourceforge.net/projects/ruamel-yaml/
  41. :pypi: https://pypi.org/project/ruamel.yaml/
  42. *The 0.16.13 release is the last that will tested to be working on Python 2.7.
  43. The 0.17 series will still be tested on Python 3.5, but the 0.18 will not. The
  44. 0.17 series will also stop support for the old PyYAML functions, so a `YAML()` instance
  45. will need to be created.*
  46. *Please adjust your dependencies accordingly if necessary.*
  47. Starting with version 0.15.0 the way YAML files are loaded and dumped
  48. is changing. See the API doc for details. Currently existing
  49. functionality will throw a warning before being changed/removed.
  50. **For production systems you should pin the version being used with
  51. ``ruamel.yaml<=0.15``**. There might be bug fixes in the 0.14 series,
  52. but new functionality is likely only to be available via the new API.
  53. If your package uses ``ruamel.yaml`` and is not listed on PyPI, drop
  54. me an email, preferably with some information on how you use the
  55. package (or a link to bitbucket/github) and I'll keep you informed
  56. when the status of the API is stable enough to make the transition.
  57. * `Overview <http://yaml.readthedocs.org/en/latest/overview.html>`_
  58. * `Installing <http://yaml.readthedocs.org/en/latest/install.html>`_
  59. * `Basic Usage <http://yaml.readthedocs.org/en/latest/basicuse.html>`_
  60. * `Details <http://yaml.readthedocs.org/en/latest/detail.html>`_
  61. * `Examples <http://yaml.readthedocs.org/en/latest/example.html>`_
  62. * `API <http://yaml.readthedocs.org/en/latest/api.html>`_
  63. * `Differences with PyYAML <http://yaml.readthedocs.org/en/latest/pyyaml.html>`_
  64. .. image:: https://readthedocs.org/projects/yaml/badge/?version=stable
  65. :target: https://yaml.readthedocs.org/en/stable
  66. .. image:: https://bestpractices.coreinfrastructure.org/projects/1128/badge
  67. :target: https://bestpractices.coreinfrastructure.org/projects/1128
  68. .. image:: https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/license.svg?format=raw
  69. :target: https://opensource.org/licenses/MIT
  70. .. image:: https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/pypi.svg?format=raw
  71. :target: https://pypi.org/project/ruamel.yaml/
  72. .. image:: https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw
  73. :target: https://pypi.org/project/oitnb/
  74. .. image:: http://www.mypy-lang.org/static/mypy_badge.svg
  75. :target: http://mypy-lang.org/
  76. ChangeLog
  77. =========
  78. .. should insert NEXT: at the beginning of line for next key (with empty line)
  79. 0.16.13 (2021-03-05):
  80. - fix for issue 359: could not update() CommentedMap with keyword arguments
  81. (reported by `Steve Franchak <https://sourceforge.net/u/binaryadder/>`__)
  82. - fix for issue 365: unable to dump mutated TimeStamp objects
  83. (reported by Anton Akmerov <https://sourceforge.net/u/akhmerov/>`__)
  84. - fix for issue 371: unable to addd comment without starting space
  85. (reported by 'Mark Grandi <https://sourceforge.net/u/mgrandi>`__)
  86. - fix for issue 373: recursive call to walk_tree not preserving all params
  87. (reported by `eulores <https://sourceforge.net/u/eulores/>`__)
  88. - a None value in a flow-style sequence is now dumped as `null` instead
  89. of `!!null ''` (reported by mcarans on
  90. `StackOverlow <https://stackoverflow.com/a/66489600/1307905>`__)
  91. 0.16.12 (2020-09-04):
  92. - update links in doc
  93. 0.16.11 (2020-09-03):
  94. - workaround issue with setuptools 0.50 and importing pip ( fix by jaraco
  95. https://github.com/pypa/setuptools/issues/2355#issuecomment-685159580 )
  96. 0.16.10 (2020-02-12):
  97. - (auto) updated image references in README to sourceforge
  98. 0.16.9 (2020-02-11):
  99. - update CHANGES
  100. 0.16.8 (2020-02-11):
  101. - update requirements so that ruamel.yaml.clib is installed for 3.8,
  102. as it has become available (via manylinux builds)
  103. 0.16.7 (2020-01-30):
  104. - fix typchecking issue on TaggedScalar (reported by Jens Nielsen)
  105. - fix error in dumping literal scalar in sequence with comments before element
  106. (reported by `EJ Etherington <https://sourceforge.net/u/ejether/>`__)
  107. 0.16.6 (2020-01-20):
  108. - fix empty string mapping key roundtripping with preservation of quotes as `? ''`
  109. (reported via email by Tomer Aharoni).
  110. - fix incorrect state setting in class constructor (reported by `Douglas Raillard
  111. <https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/>`__)
  112. - adjust deprecation warning test for Hashable, as that no longer warns (reported
  113. by `Jason Montleon <https://bitbucket.org/%7B8f377d12-8d5b-4069-a662-00a2674fee4e%7D/>`__)
  114. 0.16.5 (2019-08-18):
  115. - allow for ``YAML(typ=['unsafe', 'pytypes'])``
  116. 0.16.4 (2019-08-16):
  117. - fix output of TAG directives with # (reported by `Thomas Smith
  118. <https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/>`__)
  119. 0.16.3 (2019-08-15):
  120. - split construct_object
  121. - change stuff back to keep mypy happy
  122. - move setting of version based on YAML directive to scanner, allowing to
  123. check for file version during TAG directive scanning
  124. 0.16.2 (2019-08-15):
  125. - preserve YAML and TAG directives on roundtrip, correctly output #
  126. in URL for YAML 1.2 (both reported by `Thomas Smith
  127. <https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/>`__)
  128. 0.16.1 (2019-08-08):
  129. - Force the use of new version of ruamel.yaml.clib (reported by `Alex Joz
  130. <https://bitbucket.org/%7B9af55900-2534-4212-976c-61339b6ffe14%7D/>`__)
  131. - Allow '#' in tag URI as these are allowed in YAML 1.2 (reported by
  132. `Thomas Smith
  133. <https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/>`__)
  134. 0.16.0 (2019-07-25):
  135. - split of C source that generates .so file to ruamel.yaml.clib
  136. - duplicate keys are now an error when working with the old API as well
  137. 0.15.100 (2019-07-17):
  138. - fixing issue with dumping deep-copied data from commented YAML, by
  139. providing both the memo parameter to __deepcopy__, and by allowing
  140. startmarks to be compared on their content (reported by `Theofilos
  141. Petsios
  142. <https://bitbucket.org/%7Be550bc5d-403d-4fda-820b-bebbe71796d3%7D/>`__)
  143. 0.15.99 (2019-07-12):
  144. - add `py.typed` to distribution, based on a PR submitted by
  145. `Michael Crusoe
  146. <https://bitbucket.org/%7Bc9fbde69-e746-48f5-900d-34992b7860c8%7D/>`__
  147. - merge PR 40 (also by Michael Crusoe) to more accurately specify
  148. repository in the README (also reported in a misunderstood issue
  149. some time ago)
  150. 0.15.98 (2019-07-09):
  151. - regenerate ext/_ruamel_yaml.c with Cython version 0.29.12, needed
  152. for Python 3.8.0b2 (reported by `John Vandenberg
  153. <https://bitbucket.org/%7B6d4e8487-3c97-4dab-a060-088ec50c682c%7D/>`__)
  154. 0.15.97 (2019-06-06):
  155. - regenerate ext/_ruamel_yaml.c with Cython version 0.29.10, needed for
  156. Python 3.8.0b1
  157. - regenerate ext/_ruamel_yaml.c with Cython version 0.29.9, needed for
  158. Python 3.8.0a4 (reported by `Anthony Sottile
  159. <https://bitbucket.org/%7B569cc8ea-0d9e-41cb-94a4-19ea517324df%7D/>`__)
  160. 0.15.96 (2019-05-16):
  161. - fix failure to indent comments on round-trip anchored block style
  162. scalars in block sequence (reported by `William Kimball
  163. <https://bitbucket.org/%7Bba35ed20-4bb0-46f8-bb5d-c29871e86a22%7D/>`__)
  164. 0.15.95 (2019-05-16):
  165. - fix failure to round-trip anchored scalars in block sequence
  166. (reported by `William Kimball
  167. <https://bitbucket.org/%7Bba35ed20-4bb0-46f8-bb5d-c29871e86a22%7D/>`__)
  168. - wheel files for Python 3.4 no longer provided (`Python 3.4 EOL 2019-03-18
  169. <https://www.python.org/dev/peps/pep-0429/>`__)
  170. 0.15.94 (2019-04-23):
  171. - fix missing line-break after end-of-file comments not ending in
  172. line-break (reported by `Philip Thompson
  173. <https://bitbucket.org/%7Be42ba205-0876-4151-bcbe-ccaea5bd13ce%7D/>`__)
  174. 0.15.93 (2019-04-21):
  175. - fix failure to parse empty implicit flow mapping key
  176. - in YAML 1.1 plains scalars `y`, 'n', `Y`, and 'N' are now
  177. correctly recognised as booleans and such strings dumped quoted
  178. (reported by `Marcel Bollmann
  179. <https://bitbucket.org/%7Bd8850921-9145-4ad0-ac30-64c3bd9b036d%7D/>`__)
  180. 0.15.92 (2019-04-16):
  181. - fix failure to parse empty implicit block mapping key (reported by
  182. `Nolan W <https://bitbucket.org/i2labs/>`__)
  183. 0.15.91 (2019-04-05):
  184. - allowing duplicate keys would not work for merge keys (reported by mamacdon on
  185. `StackOverflow <https://stackoverflow.com/questions/55540686/>`__
  186. 0.15.90 (2019-04-04):
  187. - fix issue with updating `CommentedMap` from list of tuples (reported by
  188. `Peter Henry <https://bitbucket.org/mosbasik/>`__)
  189. 0.15.89 (2019-02-27):
  190. - fix for items with flow-mapping in block sequence output on single line
  191. (reported by `Zahari Dim <https://bitbucket.org/zahari_dim/>`__)
  192. - fix for safe dumping erroring in creation of representereror when dumping namedtuple
  193. (reported and solution by `Jaakko Kantojärvi <https://bitbucket.org/raphendyr/>`__)
  194. 0.15.88 (2019-02-12):
  195. - fix inclusing of python code from the subpackage data (containing extra tests,
  196. reported by `Florian Apolloner <https://bitbucket.org/apollo13/>`__)
  197. 0.15.87 (2019-01-22):
  198. - fix problem with empty lists and the code to reinsert merge keys (reported via email
  199. by Zaloo)
  200. 0.15.86 (2019-01-16):
  201. - reinsert merge key in its old position (reported by grumbler on
  202. `StackOverflow <https://stackoverflow.com/a/54206512/1307905>`__)
  203. - fix for issue with non-ASCII anchor names (reported and fix
  204. provided by Dandaleon Flux via email)
  205. - fix for issue when parsing flow mapping value starting with colon (in pure Python only)
  206. (reported by `FichteFoll <https://bitbucket.org/FichteFoll/>`__)
  207. 0.15.85 (2019-01-08):
  208. - the types used by ``SafeConstructor`` for mappings and sequences can
  209. now by set by assigning to ``XXXConstructor.yaml_base_dict_type``
  210. (and ``..._list_type``), preventing the need to copy two methods
  211. with 50+ lines that had ``var = {}`` hardcoded. (Implemented to
  212. help solve an feature request by `Anthony Sottile
  213. <https://bitbucket.org/asottile/>`__ in an easier way)
  214. 0.15.84 (2019-01-07):
  215. - fix for ``CommentedMap.copy()`` not returning ``CommentedMap``, let alone copying comments etc.
  216. (reported by `Anthony Sottile <https://bitbucket.org/asottile/>`__)
  217. 0.15.83 (2019-01-02):
  218. - fix for bug in roundtripping aliases used as key (reported via email by Zaloo)
  219. 0.15.82 (2018-12-28):
  220. - anchors and aliases on scalar int, float, string and bool are now preserved. Anchors
  221. do not need a referring alias for these (reported by
  222. `Alex Harvey <https://bitbucket.org/alexharv074/>`__)
  223. - anchors no longer lost on tagged objects when roundtripping (reported by `Zaloo
  224. <https://bitbucket.org/zaloo/>`__)
  225. 0.15.81 (2018-12-06):
  226. - fix issue dumping methods of metaclass derived classes (reported and fix provided
  227. by `Douglas Raillard <https://bitbucket.org/DouglasRaillard/>`__)
  228. 0.15.80 (2018-11-26):
  229. - fix issue emitting BEL character when round-tripping invalid folded input
  230. (reported by Isaac on `StackOverflow <https://stackoverflow.com/a/53471217/1307905>`__)
  231. 0.15.79 (2018-11-21):
  232. - fix issue with anchors nested deeper than alias (reported by gaFF on
  233. `StackOverflow <https://stackoverflow.com/a/53397781/1307905>`__)
  234. 0.15.78 (2018-11-15):
  235. - fix setup issue for 3.8 (reported by `Sidney Kuyateh
  236. <https://bitbucket.org/autinerd/>`__)
  237. 0.15.77 (2018-11-09):
  238. - setting `yaml.sort_base_mapping_type_on_output = False`, will prevent
  239. explicit sorting by keys in the base representer of mappings. Roundtrip
  240. already did not do this. Usage only makes real sense for Python 3.6+
  241. (feature request by `Sebastian Gerber <https://bitbucket.org/spacemanspiff2007/>`__).
  242. - implement Python version check in YAML metadata in ``_test/test_z_data.py``
  243. 0.15.76 (2018-11-01):
  244. - fix issue with empty mapping and sequence loaded as flow-style
  245. (mapping reported by `Min RK <https://bitbucket.org/minrk/>`__, sequence
  246. by `Maged Ahmed <https://bitbucket.org/maged2/>`__)
  247. 0.15.75 (2018-10-27):
  248. - fix issue with single '?' scalar (reported by `Terrance
  249. <https://bitbucket.org/OllieTerrance/>`__)
  250. - fix issue with duplicate merge keys (prompted by `answering
  251. <https://stackoverflow.com/a/52852106/1307905>`__ a
  252. `StackOverflow question <https://stackoverflow.com/q/52851168/1307905>`__
  253. by `math <https://stackoverflow.com/users/1355634/math>`__)
  254. 0.15.74 (2018-10-17):
  255. - fix dropping of comment on rt before sequence item that is sequence item
  256. (reported by `Thorsten Kampe <https://bitbucket.org/thorstenkampe/>`__)
  257. 0.15.73 (2018-10-16):
  258. - fix irregular output on pre-comment in sequence within sequence (reported
  259. by `Thorsten Kampe <https://bitbucket.org/thorstenkampe/>`__)
  260. - allow non-compact (i.e. next line) dumping sequence/mapping within sequence.
  261. 0.15.72 (2018-10-06):
  262. - fix regression on explicit 1.1 loading with the C based scanner/parser
  263. (reported by `Tomas Vavra <https://bitbucket.org/xtomik/>`__)
  264. 0.15.71 (2018-09-26):
  265. - some of the tests now live in YAML files in the
  266. `yaml.data <https://bitbucket.org/ruamel/yaml.data>`__ repository.
  267. ``_test/test_z_data.py`` processes these.
  268. - fix regression where handcrafted CommentedMaps could not be initiated (reported by
  269. `Dan Helfman <https://bitbucket.org/dhelfman/>`__)
  270. - fix regression with non-root literal scalars that needed indent indicator
  271. (reported by `Clark Breyman <https://bitbucket.org/clarkbreyman/>`__)
  272. - tag:yaml.org,2002:python/object/apply now also uses __qualname__ on PY3
  273. (reported by `Douglas RAILLARD <https://bitbucket.org/DouglasRaillard/>`__)
  274. - issue with self-referring object creation
  275. (reported and fix by `Douglas RAILLARD <https://bitbucket.org/DouglasRaillard/>`__)
  276. 0.15.70 (2018-09-21):
  277. - reverted CommentedMap and CommentedSeq to subclass ordereddict resp. list,
  278. reimplemented merge maps so that both ``dict(**commented_map_instance)`` and JSON
  279. dumping works. This also allows checking with ``isinstance()`` on ``dict`` resp. ``list``.
  280. (Proposed by `Stuart Berg <https://bitbucket.org/stuarteberg/>`__, with feedback
  281. from `blhsing <https://stackoverflow.com/users/6890912/blhsing>`__ on
  282. `StackOverflow <https://stackoverflow.com/q/52314186/1307905>`__)
  283. 0.15.69 (2018-09-20):
  284. - fix issue with dump_all gobbling end-of-document comments on parsing
  285. (reported by `Pierre B. <https://bitbucket.org/octplane/>`__)
  286. 0.15.68 (2018-09-20):
  287. - fix issue with parsabel, but incorrect output with nested flow-style sequences
  288. (reported by `Dougal Seeley <https://bitbucket.org/dseeley/>`__)
  289. - fix issue with loading Python objects that have __setstate__ and recursion in parameters
  290. (reported by `Douglas RAILLARD <https://bitbucket.org/DouglasRaillard/>`__)
  291. 0.15.67 (2018-09-19):
  292. - fix issue with extra space inserted with non-root literal strings
  293. (Issue reported and PR with fix provided by
  294. `Naomi Seyfer <https://bitbucket.org/sixolet/>`__.)
  295. 0.15.66 (2018-09-07):
  296. - fix issue with fold indicating characters inserted in safe_load-ed folded strings
  297. (reported by `Maximilian Hils <https://bitbucket.org/mhils/>`__).
  298. 0.15.65 (2018-09-07):
  299. - fix issue #232 revert to throw ParserError for unexcpected ``]``
  300. and ``}`` instead of IndexError. (Issue reported and PR with fix
  301. provided by `Naomi Seyfer <https://bitbucket.org/sixolet/>`__.)
  302. - added ``key`` and ``reverse`` parameter (suggested by Jannik Klemm via email)
  303. - indent root level literal scalars that have directive or document end markers
  304. at the beginning of a line
  305. 0.15.64 (2018-08-30):
  306. - support round-trip of tagged sequences: ``!Arg [a, {b: 1}]``
  307. - single entry mappings in flow sequences now written by default without braces,
  308. set ``yaml.brace_single_entry_mapping_in_flow_sequence=True`` to force
  309. getting ``[a, {b: 1}, {c: {d: 2}}]`` instead of the default ``[a, b: 1, c: {d: 2}]``
  310. - fix issue when roundtripping floats starting with a dot such as ``.5``
  311. (reported by `Harrison Gregg <https://bitbucket.org/HarrisonGregg/>`__)
  312. 0.15.63 (2018-08-29):
  313. - small fix only necessary for Windows users that don't use wheels.
  314. 0.15.62 (2018-08-29):
  315. - C based reader/scanner & emitter now allow setting of 1.2 as YAML version.
  316. ** The loading/dumping is still YAML 1.1 code**, so use the common subset of
  317. YAML 1.2 and 1.1 (reported by `Ge Yang <https://bitbucket.org/yangge/>`__)
  318. 0.15.61 (2018-08-23):
  319. - support for round-tripping folded style scalars (initially requested
  320. by `Johnathan Viduchinsky <https://bitbucket.org/johnathanvidu/>`__)
  321. - update of C code
  322. - speed up of scanning (~30% depending on the input)
  323. 0.15.60 (2018-08-18):
  324. - again allow single entry map in flow sequence context (reported by
  325. `Lee Goolsbee <https://bitbucket.org/lgoolsbee/>`__)
  326. - cleanup for mypy
  327. - spurious print in library (reported by
  328. `Lele Gaifax <https://bitbucket.org/lele/>`__), now automatically checked
  329. 0.15.59 (2018-08-17):
  330. - issue with C based loader and leading zeros (reported by
  331. `Tom Hamilton Stubber <https://bitbucket.org/TomHamiltonStubber/>`__)
  332. 0.15.58 (2018-08-17):
  333. - simple mappings can now be used as keys when round-tripping::
  334. {a: 1, b: 2}: hello world
  335. although using the obvious operations (del, popitem) on the key will
  336. fail, you can mutilate it by going through its attributes. If you load the
  337. above YAML in `d`, then changing the value is cumbersome:
  338. d = {CommentedKeyMap([('a', 1), ('b', 2)]): "goodbye"}
  339. and changing the key even more so:
  340. d[CommentedKeyMap([('b', 1), ('a', 2)])] = d.pop(
  341. CommentedKeyMap([('a', 1), ('b', 2)]))
  342. (you can use a `dict` instead of a list of tuples (or ordereddict), but that might result
  343. in a different order, of the keys of the key, in the output)
  344. - check integers to dump with 1.2 patterns instead of 1.1 (reported by
  345. `Lele Gaifax <https://bitbucket.org/lele/>`__)
  346. 0.15.57 (2018-08-15):
  347. - Fix that CommentedSeq could no longer be used in adding or do a sort
  348. (reported by `Christopher Wright <https://bitbucket.org/CJ-Wright4242/>`__)
  349. 0.15.56 (2018-08-15):
  350. - fix issue with ``python -O`` optimizing away code (reported, and detailed cause
  351. pinpointed, by `Alex Grönholm <https://bitbucket.org/agronholm/>`__)
  352. 0.15.55 (2018-08-14):
  353. - unmade ``CommentedSeq`` a subclass of ``list``. It is now
  354. indirectly a subclass of the standard
  355. ``collections.abc.MutableSequence`` (without .abc if you are
  356. still on Python2.7). If you do ``isinstance(yaml.load('[1, 2]'),
  357. list)``) anywhere in your code replace ``list`` with
  358. ``MutableSequence``. Directly, ``CommentedSeq`` is a subclass of
  359. the abstract baseclass ``ruamel.yaml.compat.MutableScliceableSequence``,
  360. with the result that *(extended) slicing is supported on
  361. ``CommentedSeq``*.
  362. (reported by `Stuart Berg <https://bitbucket.org/stuarteberg/>`__)
  363. - duplicate keys (or their values) with non-ascii now correctly
  364. report in Python2, instead of raising a Unicode error.
  365. (Reported by `Jonathan Pyle <https://bitbucket.org/jonathan_pyle/>`__)
  366. 0.15.54 (2018-08-13):
  367. - fix issue where a comment could pop-up twice in the output (reported by
  368. `Mike Kazantsev <https://bitbucket.org/mk_fg/>`__ and by
  369. `Nate Peterson <https://bitbucket.org/ndpete21/>`__)
  370. - fix issue where JSON object (mapping) without spaces was not parsed
  371. properly (reported by `Marc Schmidt <https://bitbucket.org/marcj/>`__)
  372. - fix issue where comments after empty flow-style mappings were not emitted
  373. (reported by `Qinfench Chen <https://bitbucket.org/flyin5ish/>`__)
  374. 0.15.53 (2018-08-12):
  375. - fix issue with flow style mapping with comments gobbled newline (reported
  376. by `Christopher Lambert <https://bitbucket.org/XN137/>`__)
  377. - fix issue where single '+' under YAML 1.2 was interpreted as
  378. integer, erroring out (reported by `Jethro Yu
  379. <https://bitbucket.org/jcppkkk/>`__)
  380. 0.15.52 (2018-08-09):
  381. - added `.copy()` mapping representation for round-tripping
  382. (``CommentedMap``) to fix incomplete copies of merged mappings
  383. (reported by `Will Richards
  384. <https://bitbucket.org/will_richards/>`__)
  385. - Also unmade that class a subclass of ordereddict to solve incorrect behaviour
  386. for ``{**merged-mapping}`` and ``dict(**merged-mapping)`` (reported independently by
  387. `Tim Olsson <https://bitbucket.org/tgolsson/>`__ and
  388. `Filip Matzner <https://bitbucket.org/FloopCZ/>`__)
  389. 0.15.51 (2018-08-08):
  390. - Fix method name dumps (were not dotted) and loads (reported by `Douglas Raillard
  391. <https://bitbucket.org/DouglasRaillard/>`__)
  392. - Fix spurious trailing white-space caused when the comment start
  393. column was no longer reached and there was no actual EOL comment
  394. (e.g. following empty line) and doing substitutions, or when
  395. quotes around scalars got dropped. (reported by `Thomas Guillet
  396. <https://bitbucket.org/guillett/>`__)
  397. 0.15.50 (2018-08-05):
  398. - Allow ``YAML()`` as a context manager for output, thereby making it much easier
  399. to generate multi-documents in a stream.
  400. - Fix issue with incorrect type information for `load()` and `dump()` (reported
  401. by `Jimbo Jim <https://bitbucket.org/jimbo1qaz/>`__)
  402. 0.15.49 (2018-08-05):
  403. - fix preservation of leading newlines in root level literal style scalar,
  404. and preserve comment after literal style indicator (``| # some comment``)
  405. Both needed for round-tripping multi-doc streams in
  406. `ryd <https://pypi.org/project/ryd/>`__.
  407. 0.15.48 (2018-08-03):
  408. - housekeeping: ``oitnb`` for formatting, mypy 0.620 upgrade and conformity
  409. 0.15.47 (2018-07-31):
  410. - fix broken 3.6 manylinux1, the result of an unclean ``build`` (reported by
  411. `Roman Sichnyi <https://bitbucket.org/rsichnyi-gl/>`__)
  412. 0.15.46 (2018-07-29):
  413. - fixed DeprecationWarning for importing from ``collections`` on 3.7
  414. (issue 210, reported by `Reinoud Elhorst
  415. <https://bitbucket.org/reinhrst/>`__). It was `difficult to find
  416. why tox/pytest did not report
  417. <https://stackoverflow.com/q/51573204/1307905>`__ and as time
  418. consuming to actually `fix
  419. <https://stackoverflow.com/a/51573205/1307905>`__ the tests.
  420. 0.15.45 (2018-07-26):
  421. - After adding failing test for ``YAML.load_all(Path())``, remove StopIteration
  422. (PR provided by `Zachary Buhman <https://bitbucket.org/buhman/>`__,
  423. also reported by `Steven Hiscocks <https://bitbucket.org/sdhiscocks/>`__.
  424. 0.15.44 (2018-07-14):
  425. - Correct loading plain scalars consisting of numerals only and
  426. starting with `0`, when not explicitly specifying YAML version
  427. 1.1. This also fixes the issue about dumping string `'019'` as
  428. plain scalars as reported by `Min RK
  429. <https://bitbucket.org/minrk/>`__, that prompted this chance.
  430. 0.15.43 (2018-07-12):
  431. - merge PR33: Python2.7 on Windows is narrow, but has no
  432. ``sysconfig.get_config_var('Py_UNICODE_SIZE')``. (merge provided by
  433. `Marcel Bargull <https://bitbucket.org/mbargull/>`__)
  434. - ``register_class()`` now returns class (proposed by
  435. `Mike Nerone <https://bitbucket.org/Manganeez/>`__}
  436. 0.15.42 (2018-07-01):
  437. - fix regression showing only on narrow Python 2.7 (py27mu) builds
  438. (with help from
  439. `Marcel Bargull <https://bitbucket.org/mbargull/>`__ and
  440. `Colm O'Connor <https://bitbucket.org/colmoconnorgithub/>`__).
  441. - run pre-commit ``tox`` on Python 2.7 wide and narrow, as well as
  442. 3.4/3.5/3.6/3.7/pypy
  443. 0.15.41 (2018-06-27):
  444. - add detection of C-compile failure (investigation prompted by
  445. `StackOverlow <https://stackoverflow.com/a/51057399/1307905>`__ by
  446. `Emmanuel Blot <https://stackoverflow.com/users/8233409/emmanuel-blot>`__),
  447. which was removed while no longer dependent on ``libyaml``, C-extensions
  448. compilation still needs a compiler though.
  449. 0.15.40 (2018-06-18):
  450. - added links to landing places as suggested in issue 190 by
  451. `KostisA <https://bitbucket.org/ankostis/>`__
  452. - fixes issue #201: decoding unicode escaped tags on Python2, reported
  453. by `Dan Abolafia <https://bitbucket.org/danabo/>`__
  454. 0.15.39 (2018-06-17):
  455. - merge PR27 improving package startup time (and loading when regexp not
  456. actually used), provided by
  457. `Marcel Bargull <https://bitbucket.org/mbargull/>`__
  458. 0.15.38 (2018-06-13):
  459. - fix for losing precision when roundtripping floats by
  460. `Rolf Wojtech <https://bitbucket.org/asomov/>`__
  461. - fix for hardcoded dir separator not working for Windows by
  462. `Nuno André <https://bitbucket.org/nu_no/>`__
  463. - typo fix by `Andrey Somov <https://bitbucket.org/asomov/>`__
  464. 0.15.37 (2018-03-21):
  465. - again trying to create installable files for 187
  466. 0.15.36 (2018-02-07):
  467. - fix issue 187, incompatibility of C extension with 3.7 (reported by
  468. Daniel Blanchard)
  469. 0.15.35 (2017-12-03):
  470. - allow ``None`` as stream when specifying ``transform`` parameters to
  471. ``YAML.dump()``.
  472. This is useful if the transforming function doesn't return a meaningful value
  473. (inspired by `StackOverflow <https://stackoverflow.com/q/47614862/1307905>`__ by
  474. `rsaw <https://stackoverflow.com/users/406281/rsaw>`__).
  475. 0.15.34 (2017-09-17):
  476. - fix for issue 157: CDumper not dumping floats (reported by Jan Smitka)
  477. 0.15.33 (2017-08-31):
  478. - support for "undefined" round-tripping tagged scalar objects (in addition to
  479. tagged mapping object). Inspired by a use case presented by Matthew Patton
  480. on `StackOverflow <https://stackoverflow.com/a/45967047/1307905>`__.
  481. - fix issue 148: replace cryptic error message when using !!timestamp with an
  482. incorrectly formatted or non- scalar. Reported by FichteFoll.
  483. 0.15.32 (2017-08-21):
  484. - allow setting ``yaml.default_flow_style = None`` (default: ``False``) for
  485. for ``typ='rt'``.
  486. - fix for issue 149: multiplications on ``ScalarFloat`` now return ``float``
  487. (reported by jan.brezina@tul.cz)
  488. 0.15.31 (2017-08-15):
  489. - fix Comment dumping
  490. 0.15.30 (2017-08-14):
  491. - fix for issue with "compact JSON" not parsing: ``{"in":{},"out":{}}``
  492. (reported on `StackOverflow <https://stackoverflow.com/q/45681626/1307905>`__ by
  493. `mjalkio <https://stackoverflow.com/users/5130525/mjalkio>`_
  494. 0.15.29 (2017-08-14):
  495. - fix issue #51: different indents for mappings and sequences (reported by
  496. Alex Harvey)
  497. - fix for flow sequence/mapping as element/value of block sequence with
  498. sequence-indent minus dash-offset not equal two.
  499. 0.15.28 (2017-08-13):
  500. - fix issue #61: merge of merge cannot be __repr__-ed (reported by Tal Liron)
  501. 0.15.27 (2017-08-13):
  502. - fix issue 62, YAML 1.2 allows ``?`` and ``:`` in plain scalars if non-ambigious
  503. (reported by nowox)
  504. - fix lists within lists which would make comments disappear
  505. 0.15.26 (2017-08-10):
  506. - fix for disappearing comment after empty flow sequence (reported by
  507. oit-tzhimmash)
  508. 0.15.25 (2017-08-09):
  509. - fix for problem with dumping (unloaded) floats (reported by eyenseo)
  510. 0.15.24 (2017-08-09):
  511. - added ScalarFloat which supports roundtripping of 23.1, 23.100,
  512. 42.00E+56, 0.0, -0.0 etc. while keeping the format. Underscores in mantissas
  513. are not preserved/supported (yet, is anybody using that?).
  514. - (finally) fixed longstanding issue 23 (reported by `Antony Sottile
  515. <https://bitbucket.org/asottile/>`__), now handling comment between block
  516. mapping key and value correctly
  517. - warn on YAML 1.1 float input that is incorrect (triggered by invalid YAML
  518. provided by Cecil Curry)
  519. - allow setting of boolean representation (`false`, `true`) by using:
  520. ``yaml.boolean_representation = [u'False', u'True']``
  521. 0.15.23 (2017-08-01):
  522. - fix for round_tripping integers on 2.7.X > sys.maxint (reported by ccatterina)
  523. 0.15.22 (2017-07-28):
  524. - fix for round_tripping singe excl. mark tags doubling (reported and fix by Jan Brezina)
  525. 0.15.21 (2017-07-25):
  526. - fix for writing unicode in new API, (reported on
  527. `StackOverflow <https://stackoverflow.com/a/45281922/1307905>`__
  528. 0.15.20 (2017-07-23):
  529. - wheels for windows including C extensions
  530. 0.15.19 (2017-07-13):
  531. - added object constructor for rt, decorator ``yaml_object`` to replace YAMLObject.
  532. - fix for problem using load_all with Path() instance
  533. - fix for load_all in combination with zero indent block style literal
  534. (``pure=True`` only!)
  535. 0.15.18 (2017-07-04):
  536. - missing ``pure`` attribute on ``YAML`` useful for implementing `!include` tag
  537. constructor for `including YAML files in a YAML file
  538. <https://stackoverflow.com/a/44913652/1307905>`__
  539. - some documentation improvements
  540. - trigger of doc build on new revision
  541. 0.15.17 (2017-07-03):
  542. - support for Unicode supplementary Plane **output**
  543. (input was already supported, triggered by
  544. `this <https://stackoverflow.com/a/44875714/1307905>`__ Stack Overflow Q&A)
  545. 0.15.16 (2017-07-01):
  546. - minor typing issues (reported and fix provided by
  547. `Manvendra Singh <https://bitbucket.org/manu-chroma/>`__
  548. - small doc improvements
  549. 0.15.15 (2017-06-27):
  550. - fix for issue 135, typ='safe' not dumping in Python 2.7
  551. (reported by Andrzej Ostrowski <https://bitbucket.org/aostr123/>`__)
  552. 0.15.14 (2017-06-25):
  553. - fix for issue 133, in setup.py: change ModuleNotFoundError to
  554. ImportError (reported and fix by
  555. `Asley Drake <https://github.com/aldraco>`__)
  556. 0.15.13 (2017-06-24):
  557. - suppress duplicate key warning on mappings with merge keys (reported by
  558. Cameron Sweeney)
  559. 0.15.12 (2017-06-24):
  560. - remove fatal dependency of setup.py on wheel package (reported by
  561. Cameron Sweeney)
  562. 0.15.11 (2017-06-24):
  563. - fix for issue 130, regression in nested merge keys (reported by
  564. `David Fee <https://bitbucket.org/dfee/>`__)
  565. 0.15.10 (2017-06-23):
  566. - top level PreservedScalarString not indented if not explicitly asked to
  567. - remove Makefile (not very useful anyway)
  568. - some mypy additions
  569. 0.15.9 (2017-06-16):
  570. - fix for issue 127: tagged scalars were always quoted and seperated
  571. by a newline when in a block sequence (reported and largely fixed by
  572. `Tommy Wang <https://bitbucket.org/twang817/>`__)
  573. 0.15.8 (2017-06-15):
  574. - allow plug-in install via ``install ruamel.yaml[jinja2]``
  575. 0.15.7 (2017-06-14):
  576. - add plug-in mechanism for load/dump pre resp. post-processing
  577. 0.15.6 (2017-06-10):
  578. - a set() with duplicate elements now throws error in rt loading
  579. - support for toplevel column zero literal/folded scalar in explicit documents
  580. 0.15.5 (2017-06-08):
  581. - repeat `load()` on a single `YAML()` instance would fail.
  582. 0.15.4 (2017-06-08):
  583. - `transform` parameter on dump that expects a function taking a
  584. string and returning a string. This allows transformation of the output
  585. before it is written to stream. This forces creation of the complete output in memory!
  586. - some updates to the docs
  587. 0.15.3 (2017-06-07):
  588. - No longer try to compile C extensions on Windows. Compilation can be forced by setting
  589. the environment variable `RUAMEL_FORCE_EXT_BUILD` to some value
  590. before starting the `pip install`.
  591. 0.15.2 (2017-06-07):
  592. - update to conform to mypy 0.511: mypy --strict
  593. 0.15.1 (2017-06-07):
  594. - `duplicate keys <http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys>`__
  595. in mappings generate an error (in the old API this change generates a warning until 0.16)
  596. - dependecy on ruamel.ordereddict for 2.7 now via extras_require
  597. 0.15.0 (2017-06-04):
  598. - it is now allowed to pass in a ``pathlib.Path`` as "stream" parameter to all
  599. load/dump functions
  600. - passing in a non-supported object (e.g. a string) as "stream" will result in a
  601. much more meaningful YAMLStreamError.
  602. - assigning a normal string value to an existing CommentedMap key or CommentedSeq
  603. element will result in a value cast to the previous value's type if possible.
  604. - added ``YAML`` class for new API
  605. 0.14.12 (2017-05-14):
  606. - fix for issue 119, deepcopy not returning subclasses (reported and PR by
  607. Constantine Evans <cevans@evanslabs.org>)
  608. 0.14.11 (2017-05-01):
  609. - fix for issue 103 allowing implicit documents after document end marker line (``...``)
  610. in YAML 1.2
  611. 0.14.10 (2017-04-26):
  612. - fix problem with emitting using cyaml
  613. 0.14.9 (2017-04-22):
  614. - remove dependency on ``typing`` while still supporting ``mypy``
  615. (http://stackoverflow.com/a/43516781/1307905)
  616. - fix unclarity in doc that stated 2.6 is supported (reported by feetdust)
  617. 0.14.8 (2017-04-19):
  618. - fix Text not available on 3.5.0 and 3.5.1, now proactively setting version guards
  619. on all files (reported by `João Paulo Magalhães <https://bitbucket.org/jpmag/>`__)
  620. 0.14.7 (2017-04-18):
  621. - round trip of integers (decimal, octal, hex, binary) now preserve
  622. leading zero(s) padding and underscores. Underscores are presumed
  623. to be at regular distances (i.e. ``0o12_345_67`` dumps back as
  624. ``0o1_23_45_67`` as the space from the last digit to the
  625. underscore before that is the determining factor).
  626. 0.14.6 (2017-04-14):
  627. - binary, octal and hex integers are now preserved by default. This
  628. was a known deficiency. Working on this was prompted by the issue report (112)
  629. from devnoname120, as well as the additional experience with `.replace()`
  630. on `scalarstring` classes.
  631. - fix issues 114: cannot install on Buildozer (reported by mixmastamyk).
  632. Setting env. var ``RUAMEL_NO_PIP_INSTALL_CHECK`` will suppress ``pip``-check.
  633. 0.14.5 (2017-04-04):
  634. - fix issue 109: None not dumping correctly at top level (reported by Andrea Censi)
  635. - fix issue 110: .replace on Preserved/DoubleQuoted/SingleQuoted ScalarString
  636. would give back "normal" string (reported by sandres23)
  637. 0.14.4 (2017-03-31):
  638. - fix readme
  639. 0.14.3 (2017-03-31):
  640. - fix for 0o52 not being a string in YAML 1.1 (reported on
  641. `StackOverflow Q&A 43138503 <http://stackoverflow.com/a/43138503/1307905>`__ by
  642. `Frank D <http://stackoverflow.com/users/7796630/frank-d>`__)
  643. 0.14.2 (2017-03-23):
  644. - fix for old default pip on Ubuntu 14.04 (reported by Sébastien Maccagnoni-Munch)
  645. 0.14.1 (2017-03-22):
  646. - fix Text not available on 3.5.0 and 3.5.1 (reported by Charles Bouchard-Légaré)
  647. 0.14.0 (2017-03-21):
  648. - updates for mypy --strict
  649. - preparation for moving away from inheritance in Loader and Dumper, calls from e.g.
  650. the Representer to the Serializer.serialize() are now done via the attribute
  651. .serializer.serialize(). Usage of .serialize() outside of Serializer will be
  652. deprecated soon
  653. - some extra tests on main.py functions
  654. ----
  655. For older changes see the file
  656. `CHANGES <https://bitbucket.org/ruamel/yaml/src/default/CHANGES>`_