diff options
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | README.rst | 29 | ||||
-rw-r--r-- | __init__.py | 4 | ||||
-rw-r--r-- | _doc/_static/pypi.svg | 2 | ||||
-rw-r--r-- | constructor.py | 2 | ||||
-rw-r--r-- | reader.py | 2 | ||||
-rw-r--r-- | setup.py | 9 | ||||
-rwxr-xr-x | tox.ini | 9 |
8 files changed, 41 insertions, 22 deletions
@@ -1,3 +1,9 @@ +[0, 17, 11]: 2021-08-19 + - fix error baseclass for ``DuplicateKeyErorr`` (reported by `Łukasz Rogalski + <https://sourceforge.net/u/lrogalski/>`__) + - fix typo in reader error message, causing `KeyError` during reader error + (reported by `MTU <https://sourceforge.net/u/mtu/>`__) + [0, 17, 10]: 2021-06-24 - fix issue 388, token with old comment structure != two elements (reported by `Dimitrios Bariamis <https://sourceforge.net/u/dbdbc/>`__) @@ -4,8 +4,8 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.17.10 -:updated: 2021-06-24 +:version: 0.17.11 +:updated: 2021-08-19 :documentation: http://yaml.readthedocs.io :repository: https://sourceforge.net/projects/ruamel-yaml/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -23,11 +23,18 @@ it might even be necessary for documented methods that handle comments.* Starting with version 0.15.0 the way YAML files are loaded and dumped -is changing. See the API doc for details. Currently existing +has been changing, see the API doc for details. Currently existing functionality will throw a warning before being changed/removed. -**For production systems you should pin the version being used with -``ruamel.yaml<=0.15``**. There might be bug fixes in the 0.14 series, -but new functionality is likely only to be available via the new API. +**For production systems already using a pre 0.16 version, you should +pin the version being used with ``ruamel.yaml<=0.15``** if you cannot +fully test upgrading to a newer version. For new usage +pin to the minor version tested ( ``ruamel.yaml<=0.17``) or even to the +exact version used. + +New functionality is usually only available via the new API, so +make sure you use it and stop using the `ruamel.yaml.safe_load()`, +`ruamel.yaml.round_trip_load()` and `ruamel.yaml.load()` functions +(and their `....dump()` counterparts). If your package uses ``ruamel.yaml`` and is not listed on PyPI, drop me an email, preferably with some information on how you use the @@ -65,13 +72,19 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.17.11 (2021-08-19): + - fix error baseclass for ``DuplicateKeyErorr`` (reported by `Łukasz Rogalski + <https://sourceforge.net/u/lrogalski/>`__) + - fix typo in reader error message, causing `KeyError` during reader error + (reported by `MTU <https://sourceforge.net/u/mtu/>`__) + 0.17.10 (2021-06-24): - fix issue 388, token with old comment structure != two elements (reported by `Dimitrios Bariamis <https://sourceforge.net/u/dbdbc/>`__) 0.17.9 (2021-06-10): - fix issue with updating CommentedMap (reported by sri on - `StackOverlow <https://stackoverflow.com/q/67911659/1307905>`__) + `StackOverflow <https://stackoverflow.com/q/67911659/1307905>`__) 0.17.8 (2021-06-09): - fix for issue 387 where templated anchors on tagged object did get set @@ -144,7 +157,7 @@ ChangeLog (reported by `eulores <https://sourceforge.net/u/eulores/>`__) - a None value in a flow-style sequence is now dumped as `null` instead of `!!null ''` (reported by mcarans on - `StackOverlow <https://stackoverflow.com/a/66489600/1307905>`__) + `StackOverflow <https://stackoverflow.com/a/66489600/1307905>`__) 0.16.12 (2020-09-04): - update links in doc diff --git a/__init__.py b/__init__.py index e158068..4ecaef9 100644 --- a/__init__.py +++ b/__init__.py @@ -5,8 +5,8 @@ if False: # MYPY _package_data = dict( full_package_name='ruamel.yaml', - version_info=(0, 17, 10), - __version__='0.17.10', + version_info=(0, 17, 11), + __version__='0.17.11', 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 2b0228f..3364900 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.10</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.17.10</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.11</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.17.11</text></g> </svg> diff --git a/constructor.py b/constructor.py index 7392855..563f07b 100644 --- a/constructor.py +++ b/constructor.py @@ -51,7 +51,7 @@ class DuplicateKeyFutureWarning(MarkedYAMLFutureWarning): pass -class DuplicateKeyError(MarkedYAMLFutureWarning): +class DuplicateKeyError(MarkedYAMLError): pass @@ -56,7 +56,7 @@ class ReaderError(YAMLError): ) else: return _F( - 'unacceptable character #x{self_character:04x}: {self._reason!s}\n' + 'unacceptable character #x{self_character:04x}: {self_reason!s}\n' ' in "{self_name!s}", position {self_position:d}', self_character=self.character, self_reason=self.reason, @@ -50,10 +50,6 @@ if sys.version_info < (3, 4): pass -if sys.version_info >= (3, 8): - from ast import Str, Num, Bytes, NameConstant # NOQA - - if sys.version_info < (3,): open_kw = dict() else: @@ -81,6 +77,9 @@ else: print('{:%Y-%d-%mT%H:%M:%S}'.format(datetime.datetime.now()), file=fp, end=' ') print(*args, **kw1) +if sys.version_info >= (3, 8): + from ast import Str, Num, Bytes, NameConstant # NOQA + def literal_eval(node_or_string): """ @@ -856,7 +855,7 @@ class NameSpacePackager(object): return False with open(file_name, 'w') as fp: if os.path.exists('LICENSE'): - fp.write('[metadata]\nlicense-file = LICENSE\n') + fp.write('[metadata]\nlicense_file = LICENSE\n') else: print('\n\n>>>>>> LICENSE file not found <<<<<\n\n') if self._pkg_data.get('universal'): @@ -3,24 +3,25 @@ envlist = cs,py39,py38,py37,py36,py35 [testenv] +install_command = pip install --disable-pip-version-check {opts} {packages} commands = /bin/bash -c 'pytest _test/test_*.py' deps = pytest [testenv:cs] -basepython = python3.6 +basepython = python3.8 deps = flake8 - flake8-bugbear;python_version>="3.5" + flake8-bugbear;python_version>="3.8" commands = flake8 []{posargs} [testenv:pep8] -basepython = python3.6 +basepython = python3.8 deps = flake8 - flake8-bugbear;python_version>="3.5" + flake8-bugbear;python_version>="3.8" commands = flake8 []{posargs} |