diff options
author | Anthon van der Neut <anthon@mnt.org> | 2023-05-09 22:00:30 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2023-05-09 22:00:30 +0200 |
commit | 67d9d159adfaf182dc65d7553c0837483d69efa0 (patch) | |
tree | c1c9a8044914e9eb98f33a01f4f8a3944fb5bf42 | |
parent | 4a04b2293b3bd3068a70bdfa61c2bdb175e614e0 (diff) | |
download | ruamel.yaml-67d9d159adfaf182dc65d7553c0837483d69efa0.tar.gz |
edge case for 4590.17.26
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | README.rst | 5 | ||||
-rw-r--r-- | __init__.py | 6 | ||||
-rw-r--r-- | _doc/_static/pypi.svg | 2 | ||||
-rw-r--r-- | emitter.py | 4 |
5 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,6 @@ +[0, 17, 26]: 2023-05-09 + - Fix for error on edge cage for issue 459 + [0, 17, 25]: 2023-05-09 - fix for regression while dumping wrapped strings with too many backslashes removed (issue 459, reported by `Lele Gaifax <https://sourceforge.net/u/lele/profile/>`__) @@ -4,7 +4,7 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.17.25 +:version: 0.17.26 :updated: 2023-05-09 :documentation: http://yaml.readthedocs.io :repository: https://sourceforge.net/projects/ruamel-yaml/ @@ -61,6 +61,9 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.17.26 (2023-05-09): + - Fix for error on edge cage for issue 459 + 0.17.25 (2023-05-09): - fix for regression while dumping wrapped strings with too many backslashes removed (issue 459, reported by `Lele Gaifax <https://sourceforge.net/u/lele/profile/>`__) diff --git a/__init__.py b/__init__.py index c676d16..210337f 100644 --- a/__init__.py +++ b/__init__.py @@ -5,9 +5,9 @@ if False: # MYPY _package_data = dict( full_package_name='ruamel.yaml', - version_info=(0, 17, 25), - __version__='0.17.25', - version_timestamp='2023-05-09 19:56:50', + version_info=(0, 17, 26), + __version__='0.17.26', + version_timestamp='2023-05-09 21:59:45', author='Anthon van der Neut', author_email='a.van.der.neut@ruamel.eu', description='ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order', # NOQA diff --git a/_doc/_static/pypi.svg b/_doc/_static/pypi.svg index b5c8870..0790f1e 100644 --- a/_doc/_static/pypi.svg +++ b/_doc/_static/pypi.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="86" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h33v20H0z"/><path fill="#007ec6" d="M33 0h53v20H33z"/><path fill="url(#b)" d="M0 0h86v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="230">pypi</text><text x="175" y="140" transform="scale(.1)" textLength="230">pypi</text><text x="585" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">0.17.25</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.17.25</text></g> </svg> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="86" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h33v20H0z"/><path fill="#007ec6" d="M33 0h53v20H33z"/><path fill="url(#b)" d="M0 0h86v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="230">pypi</text><text x="175" y="140" transform="scale(.1)" textLength="230">pypi</text><text x="585" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">0.17.26</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.17.26</text></g> </svg> @@ -1402,8 +1402,8 @@ class Emitter: # data = text[start:end] + u'\\' # <<< replaced with following six lines need_backquote = True if len(text) > end: - space_pos = text.index(' ', end) try: + space_pos = text.index(' ', end) if ( '"' not in text[end:space_pos] and "'" not in text[end:space_pos] @@ -1411,7 +1411,7 @@ class Emitter: and text[end - 1 : end + 1] != ' ' ): need_backquote = False - except IndexError: + except (ValueError, IndexError): pass data = text[start:end] + ('\\' if need_backquote else '') if start < end: |