METADATA 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. Metadata-Version: 2.1
  2. Name: ruamel.yaml
  3. Version: 0.17.40
  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. Classifier: Development Status :: 4 - Beta
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Operating System :: OS Independent
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 3 :: Only
  16. Classifier: Programming Language :: Python :: 3.10
  17. Classifier: Programming Language :: Python :: 3.11
  18. Classifier: Programming Language :: Python :: 3.12
  19. Classifier: Programming Language :: Python :: 3.7
  20. Classifier: Programming Language :: Python :: 3.8
  21. Classifier: Programming Language :: Python :: 3.9
  22. Classifier: Programming Language :: Python :: Implementation :: CPython
  23. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  24. Classifier: Topic :: Text Processing :: Markup
  25. Classifier: Typing :: Typed
  26. Requires-Python: >=3
  27. Description-Content-Type: text/markdown; charset=UTF-8; variant=CommonMark
  28. License-File: LICENSE
  29. Requires-Dist: ruamel.yaml.clib >=0.2.7 ; platform_python_implementation=="CPython" and python_version<"3.13"
  30. Provides-Extra: docs
  31. Requires-Dist: ryd ; extra == 'docs'
  32. Requires-Dist: mercurial >5.7 ; extra == 'docs'
  33. Provides-Extra: jinja2
  34. Requires-Dist: ruamel.yaml.jinja2 >=0.2 ; extra == 'jinja2'
  35. # ruamel.yaml
  36. `ruamel.yaml` is a YAML 1.2 loader/dumper package for Python.
  37. <table class="docutils">
  38. <tr> <td>version</td>
  39. <td>0.17.40</td>
  40. </tr>
  41. <tr> <td>updated</td>
  42. <td>2023-10-20</td>
  43. </tr>
  44. <tr> <td>documentation</td>
  45. <td><a href="http://yaml.readthedocs.io">http://yaml.readthedocs.io</a></td>
  46. </tr>
  47. <tr> <td>repository</td>
  48. <td><a href="https://sourceforge.net/projects/ruamel-yaml">https://sourceforge.net/projects/ruamel-yaml</a></td>
  49. </tr>
  50. <tr> <td>pypi</td>
  51. <td><a href="https://pypi.org/project/ruamel.yaml">https://pypi.org/project/ruamel.yaml</a></td>
  52. </tr>
  53. </table>
  54. *Starting with 0.17.22 only Python 3.7+ is supported. The 0.17 series is
  55. also the last to support old PyYAML functions, replace it by creating a*
  56. `YAML()` *instance and use its* `.load()` *and* `.dump()` *methods.*
  57. **New(er) functionality is usually only available via the new API.**
  58. The 0.17.21 was the last one tested to be working on Python 3.5 and 3.6
  59. (the latter was not tested, because tox/virtualenv stopped supporting
  60. that EOL version). The 0.16.13 release was the last that was tested to
  61. be working on Python 2.7.
  62. *Please adjust/pin your dependencies accordingly if necessary.*
  63. (`ruamel.yaml<0.18`)
  64. There are now two extra plug-in packages
  65. (`ruamel.yaml.bytes` and `ruamel.yaml.string`)
  66. for those not wanting to do the streaming to a
  67. `io.BytesIO/StringIO` buffer themselves.
  68. If your package uses `ruamel.yaml` and is not listed on PyPI, drop me an
  69. email, preferably with some information on how you use the package (or a
  70. link to the repository) and I'll keep you informed when the status of
  71. the API is stable enough to make the transition.
  72. - [Overview](http://yaml.readthedocs.io/en/latest/overview/)
  73. - [Installing](http://yaml.readthedocs.io/en/latest/install/)
  74. - [Basic Usage](http://yaml.readthedocs.io/en/latest/basicuse/)
  75. - [Details](http://yaml.readthedocs.io/en/latest/detail/)
  76. - [Examples](http://yaml.readthedocs.io/en/latest/example/)
  77. - [API](http://yaml.readthedocs.io/en/latest/api/)
  78. - [Differences with
  79. PyYAML](http://yaml.readthedocs.io/en/latest/pyyaml/)
  80. [![image](https://readthedocs.org/projects/yaml/badge/?version=latest)](https://yaml.readthedocs.org/en/latest?badge=latest)[![image](https://bestpractices.coreinfrastructure.org/projects/1128/badge)](https://bestpractices.coreinfrastructure.org/projects/1128)
  81. [![image](https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/license.svg?format=raw)](https://opensource.org/licenses/MIT)
  82. [![image](https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/pypi.svg?format=raw)](https://pypi.org/project/ruamel.yaml/)
  83. [![image](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://pypi.org/project/oitnb/)
  84. [![image](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  85. # ChangeLog
  86. 0.17.40 (2023-10-20):
  87. - flow style sets are now preserved ( `!!set {a, b, c} )`. Any values specified when loading are dropped, including `!!null ""`.
  88. - potential workaround for issue 484: the long_description_content_type including the variant specification `CommonMark`
  89. can result in problems on Azure. If you can install from `.tar.gz` using
  90. `RUAMEL_NO_LONG_DESCRIPTION=1 pip install ruamel.yaml --no-binary :all:` then the long description, and its
  91. offending type, are nog included (in the METADATA).
  92. (Reported by [Coury Ditch](https://sourceforge.net/u/cmditch/profile/))
  93. - links in documentation update (reported by [David Hoese](https://sourceforge.net/u/daveydave400/profile/))
  94. - Added some `__repr__` for internally used classes
  95. 0.17.39 (2023-10-19):
  96. - update README generation, no code changes
  97. 0.17.36 (2023-10-19):
  98. - fixed issue 480, dumping of a loaded empty flow-style mapping with comment failed (Reported by [Stéphane Brunner](https://sourceforge.net/u/stbrunner/profile/))
  99. - fixed issue 482, caused by DEFAULT_MAPPING_TAG having changes to being a `Tag()` instance, not a string (reported by [yan12125](https://sourceforge.net/u/yan12125/profile/))
  100. - updated documentation to use mkdocs
  101. 0.17.35 (2023-10-04):
  102. - support for loading dataclasses with `InitVar` variables (some special coding was necessary to get the, unexecpected, default value in the corresponding instance attribute ( example of usage in [this question](https://stackoverflow.com/q/77228378/1307905))
  103. 0.17.34 (2023-10-03):
  104. - Python 3.12 also loads C version when using `typ='safe'`
  105. - initial support for loading invoking
  106. `__post_init__()` on dataclasses that have that
  107. method after loading a registered dataclass.
  108. (Originally
  109. [asked](https://stackoverflow.com/q/51529458/1307905) on
  110. Stackoverflow by
  111. [nyanpasu64](https://stackoverflow.com/users/2683842/nyanpasu64)
  112. and as
  113. [ticket](https://sourceforge.net/p/ruamel-yaml/tickets/355/) by
  114. [Patrick Lehmann](https://sourceforge.net/u/paebbels/profile/))
  115. ```
  116. @yaml.register_class
  117. @dataclass
  118. class ...
  119. ```
  120. 0.17.33 (2023-09-28):
  121. - 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 style output can more easily be influenced (based on [this answer](https://stackoverflow.com/a/76547814/1307905) on a StackOverflow question by [Huw Walters](https://stackoverflow.com/users/291033/huw-walters)).
  122. 0.17.32 (2023-06-17):
  123. - fix issue with scanner getting stuck in infinite loop
  124. 0.17.31 (2023-05-31):
  125. - added tag.setter on `ScalarEvent` and on `Node`, that takes either a `Tag` instance, or a str (reported by [Sorin Sbarnea](https://sourceforge.net/u/ssbarnea/profile/))
  126. 0.17.30 (2023-05-30):
  127. - fix issue 467, caused by Tag instances not being hashable (reported by [Douglas Raillard](https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/))
  128. 0.17.29 (2023-05-30):
  129. - 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 in better results using documents with %TAG directives, as well as preserving URI escapes in tag suffixes.
  130. 0.17.28 (2023-05-26):
  131. - fix for issue 464: documents ending with document end marker
  132. without final newline fail to load (reported by [Mariusz
  133. Rusiniak](https://sourceforge.net/u/r2dan/profile/))
  134. 0.17.27 (2023-05-25):
  135. - fix issue with inline mappings as value for merge keys (reported by Sirish on [StackOverflow](https://stackoverflow.com/q/76331049/1307905))
  136. - fix for 468, error inserting after accessing merge attribute on `CommentedMap` (reported by [Bastien gerard](https://sourceforge.net/u/bagerard/))
  137. - fix for issue 461 pop + insert on same `CommentedMap` key throwing error (reported by [John Thorvald Wodder II](https://sourceforge.net/u/jwodder/profile/))
  138. 0.17.26 (2023-05-09):
  139. - fix for error on edge cage for issue 459
  140. 0.17.25 (2023-05-09):
  141. - fix for regression while dumping wrapped strings with too many backslashes removed (issue 459, reported by [Lele Gaifax](https://sourceforge.net/u/lele/profile/))
  142. 0.17.24 (2023-05-06):
  143. - 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 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](https://sourceforge.net/u/millerdevel/profile/)). 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).
  144. - fix (in the pure Python implementation including default) for issue 447. (reported by [Jack Cherng](https://sourceforge.net/u/jfcherng/profile/), also brought up by brent on [StackOverflow](https://stackoverflow.com/q/40072485/1307905))
  145. 0.17.23 (2023-05-05):
  146. - fix 458, error on plain scalars starting with word longer than width. (reported by [Kyle Larose](https://sourceforge.net/u/klarose/profile/))
  147. - fix for `.update()` no longer correctly handling keyword arguments (reported by John Lin on [StackOverflow]( https://stackoverflow.com/q/76089100/1307905))
  148. - fix issue 454: high Unicode (emojis) in quoted strings always
  149. escaped (reported by [Michal
  150. Čihař](https://sourceforge.net/u/nijel/profile/) based on a
  151. question on StackOverflow).
  152. - fix issue with emitter conservatively inserting extra backslashes in wrapped quoted strings (reported by thebenman on [StackOverflow](https://stackoverflow.com/q/75631454/1307905))
  153. 0.17.22 (2023-05-02):
  154. - fix issue 449 where the second exclamation marks got URL encoded (reported and fixing PR provided by [John Stark](https://sourceforge.net/u/jods/profile/))
  155. - fix issue with indent != 2 and literal scalars with empty first line (reported by wrdis on [StackOverflow](https://stackoverflow.com/q/75584262/1307905))
  156. - updated `__repr__` of CommentedMap, now that Python's dict is ordered -> no more `ordereddict(list-of-tuples)`
  157. - merge MR 4, handling OctalInt in YAML 1.1 (provided by [Jacob Floyd](https://sourceforge.net/u/cognifloyd/profile/))
  158. - fix loading of `!!float 42` (reported by Eric on [Stack overflow](https://stackoverflow.com/a/71555107/1307905))
  159. - line numbers are now set on `CommentedKeySeq` and `CommentedKeyMap` (which are created if you have a sequence resp. mapping as the key in a mapping)
  160. - plain scalars: put single words longer than width on a line of
  161. their own, instead of after the previous line (issue 427, reported
  162. by [Antoine
  163. Cotten](https://sourceforge.net/u/antoineco/profile/)). Caveat:
  164. this currently results in a space ending the previous line.
  165. - fix for folded scalar part of 421: comments after ">" on first
  166. line of folded scalars are now preserved (as were those in the
  167. same position on literal scalars). Issue reported by Jacob Floyd.
  168. - added stacklevel to warnings
  169. - typing changed from Py2 compatible comments to Py3, removed various Py2-isms
  170. 0.17.21 (2022-02-12):
  171. - fix bug in calling `.compose()` method with `pathlib.Path` instance.
  172. 0.17.20 (2022-01-03):
  173. - fix error in microseconds while rounding datetime fractions >= 9999995 (reported by [Luis Ferreira](https://sourceforge.net/u/ljmf00/))
  174. 0.17.19 (2021-12-26):
  175. - fix mypy problems (reported by [Arun](https://sourceforge.net/u/arunppsg/profile/))
  176. 0.17.18 (2021-12-24):
  177. - copy-paste error in folded scalar comment attachment (reported by [Stephan Geulette](https://sourceforge.net/u/sgeulette/profile/))
  178. - fix 411, indent error comment between key empty seq value (reported by [Guillermo Julián](https://sourceforge.net/u/gjulianm/profile/))
  179. 0.17.17 (2021-10-31):
  180. - extract timestamp matching/creation to util
  181. 0.17.16 (2021-08-28):
  182. - 398 also handle issue 397 when comment is newline
  183. 0.17.15 (2021-08-28):
  184. - fix issue 397, insert comment before key when a comment between key and value exists (reported by [Bastien gerard](https://sourceforge.net/u/bagerard/))
  185. 0.17.14 (2021-08-25):
  186. - fix issue 396, inserting key/val in merged-in dictionary (reported by [Bastien gerard](https://sourceforge.net/u/bagerard/))
  187. 0.17.13 (2021-08-21):
  188. - minor fix in attr handling
  189. 0.17.12 (2021-08-21):
  190. - fix issue with anchor on registered class not preserved and those classes using package attrs with `@attr.s()` (both reported by [ssph](https://sourceforge.net/u/sph/))
  191. 0.17.11 (2021-08-19):
  192. - fix error baseclass for `DuplicateKeyError` (reported by [Łukasz Rogalski](https://sourceforge.net/u/lrogalski/))
  193. - fix typo in reader error message, causing `KeyError` during reader error (reported by [MTU](https://sourceforge.net/u/mtu/))
  194. 0.17.10 (2021-06-24):
  195. - fix issue 388, token with old comment structure != two elements (reported by [Dimitrios Bariamis](https://sourceforge.net/u/dbdbc/))
  196. 0.17.9 (2021-06-10):
  197. - fix issue with updating CommentedMap (reported by sri on [StackOverflow](https://stackoverflow.com/q/67911659/1307905))
  198. 0.17.8 (2021-06-09):
  199. - fix for issue 387 where templated anchors on tagged object did get set resulting in potential id reuse. (reported by [Artem Ploujnikov](https://sourceforge.net/u/flexthink/))
  200. 0.17.7 (2021-05-31):
  201. - issue 385 also affected other deprecated loaders (reported via email by Oren Watson)
  202. 0.17.6 (2021-05-31):
  203. - merged type annotations update provided by [Jochen Sprickerhof](https://sourceforge.net/u/jspricke/)
  204. - fix for issue 385: deprecated round_trip_loader function not
  205. working (reported by [Mike
  206. Gouline](https://sourceforge.net/u/gouline/))
  207. - wasted a few hours getting rid of mypy warnings/errors
  208. 0.17.5 (2021-05-30):
  209. - fix for issue 384 `!!set` with aliased entry resulting in broken YAML on rt reported by [William Kimball](https://sourceforge.net/u/william303/))
  210. 0.17.4 (2021-04-07):
  211. - prevent (empty) comments from throwing assertion error (issue 351 reported by [William Kimball](https://sourceforge.net/u/william303/)) comments (or empty line) will be dropped
  212. 0.17.3 (2021-04-07):
  213. - fix for issue 382 caused by an error in a format string (reported by [William Kimball](https://sourceforge.net/u/william303/))
  214. - allow expansion of aliases by setting `yaml.composer.return_alias = lambda s: copy.deepcopy(s)`
  215. (as per [Stackoverflow answer](https://stackoverflow.com/a/66983530/1307905))
  216. 0.17.2 (2021-03-29):
  217. - change -py2.py3-none-any.whl to -py3-none-any.whl, and remove 0.17.1
  218. 0.17.1 (2021-03-29):
  219. - added 'Programming Language :: Python :: 3 :: Only', and
  220. removing 0.17.0 from PyPI (reported by [Alasdair
  221. Nicol](https://sourceforge.net/u/alasdairnicol/))
  222. 0.17.0 (2021-03-26):
  223. - removed because of incomplete classifiers
  224. - this release no longer supports Python 2.7, most if not all Python 2 specific code is removed. The 0.17.x series is the last to support Python 3.5 (this also allowed for removal of the dependency on `ruamel.std.pathlib`)
  225. - remove Python2 specific code branches and adaptations (u-strings)
  226. - prepare % code for f-strings using `_F`
  227. - allow PyOxidisation ([issue 324](https://sourceforge.net/p/ruamel-yaml/tickets/324/) resp. [issue 171](https://github.com/indygreg/PyOxidizer/issues/171))
  228. - replaced Python 2 compatible enforcement of keyword arguments with '*'
  229. - the old top level *functions* `load`, `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.
  230. - fix for issue 376: indentation changes could put literal/folded
  231. scalar to start before the `#` column of a following comment.
  232. Effectively making the comment part of the scalar in the output.
  233. (reported by [Bence Nagy](https://sourceforge.net/u/underyx/))
  234. 0.16.13 (2021-03-05):
  235. - fix for issue 359: could not update() CommentedMap with keyword
  236. arguments (reported by [Steve
  237. Franchak](https://sourceforge.net/u/binaryadder/))
  238. - fix for issue 365: unable to dump mutated TimeStamp objects
  239. (reported by [Anton Akmerov](https://sourceforge.net/u/akhmerov))
  240. - fix for issue 371: unable to add comment without starting space
  241. (reported by [Mark Grandi](https://sourceforge.net/u/mgrandi))
  242. - fix for issue 373: recursive call to walk_tree not preserving
  243. all params (reported by [eulores](https://sourceforge.net/u/eulores/))
  244. - a None value in a flow-style sequence is now dumped as `null` instead of `!!null ''` (reported by mcarans on [StackOverflow](https://stackoverflow.com/a/66489600/1307905))
  245. 0.16.12 (2020-09-04):
  246. - update links in doc
  247. 0.16.11 (2020-09-03):
  248. - workaround issue with setuptools 0.50 and importing pip (fix by [jaraco](https://github.com/pypa/setuptools/issues/2355#issuecomment-685159580)
  249. 0.16.10 (2020-02-12):
  250. - (auto) updated image references in README to sourceforge
  251. 0.16.9 (2020-02-11):
  252. - update CHANGES
  253. 0.16.8 (2020-02-11):
  254. - update requirements so that ruamel.yaml.clib is installed for 3.8, as it has become available (via manylinux builds)
  255. 0.16.7 (2020-01-30):
  256. - fix typchecking issue on TaggedScalar (reported by Jens Nielsen)
  257. - fix error in dumping literal scalar in sequence with comments before element (reported by [EJ Etherington](https://sourceforge.net/u/ejether/))
  258. 0.16.6 (2020-01-20):
  259. - fix empty string mapping key roundtripping with preservation of quotes as `? ''` (reported via email by Tomer Aharoni).
  260. - fix incorrect state setting in class constructor (reported by [Douglas Raillard](https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/))
  261. - adjust deprecation warning test for Hashable, as that no longer warns (reported by [Jason Montleon](https://bitbucket.org/%7B8f377d12-8d5b-4069-a662-00a2674fee4e%7D/))
  262. 0.16.5 (2019-08-18):
  263. - allow for `YAML(typ=['unsafe', 'pytypes'])`
  264. 0.16.4 (2019-08-16):
  265. - fix output of TAG directives with `#` (reported by [Thomas Smith](https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/))
  266. 0.16.3 (2019-08-15):
  267. - split construct_object
  268. - change stuff back to keep mypy happy
  269. - move setting of version based on YAML directive to scanner, allowing to check for file version during TAG directive scanning
  270. 0.16.2 (2019-08-15):
  271. - preserve YAML and TAG directives on roundtrip, correctly output `#` in URL for YAML 1.2 (both reported by [Thomas Smith](https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/))
  272. 0.16.1 (2019-08-08):
  273. - Force the use of new version of ruamel.yaml.clib (reported by [Alex Joz](https://bitbucket.org/%7B9af55900-2534-4212-976c-61339b6ffe14%7D/))
  274. - Allow `#` in tag URI as these are allowed in YAML 1.2 (reported by [Thomas Smith](https://bitbucket.org/%7Bd4c57a72-f041-4843-8217-b4d48b6ece2f%7D/))
  275. 0.16.0 (2019-07-25):
  276. - split of C source that generates `.so` file to [ruamel.yaml.clib]( https://pypi.org/project/ruamel.yaml.clib/)
  277. - duplicate keys are now an error when working with the old API as well
  278. ------------------------------------------------------------------------
  279. For older changes see the file
  280. [CHANGES](https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/CHANGES)