diff options
-rw-r--r-- | CHANGES | 14 | ||||
-rw-r--r-- | README.rst | 11 | ||||
-rw-r--r-- | __init__.py | 4 | ||||
-rw-r--r-- | _test/test_api_change.py | 13 | ||||
-rw-r--r-- | constructor.py | 2 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
7 files changed, 39 insertions, 9 deletions
@@ -1,3 +1,17 @@ +[0, 15, 43]: 2018-07-12 + - merge PR33: Python2.7 on Windows is narrow, but has no + ``sysconfig.get_config_var('Py_UNICODE_SIZE')``. (merge provided by + `Marcel Bargull <https://bitbucket.org/mbargull/>`__) + - ``register_class()`` now returns class (proposed by + `Mike Nerone <https://bitbucket.org/Manganeez/>`__} + +[0, 15, 43]: 2018-07-12 + - merge PR33: Python2.7 on Windows is narrow, but has no + ``sysconfig.get_config_var('Py_UNICODE_SIZE')``. (merge provided by + `Marcel Bargull <https://bitbucket.org/mbargull/>`__) + - ``register_class()`` now returns class (proposed by + `Mike Nerone <https://bitbucket.org/Manganeez/>`__} + [0, 15, 42]: 2018-07-01 - fix regression showing only on narrow Python 2.7 (py27mu) builds (with help from @@ -4,8 +4,8 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.15.42 -:updated: 2018-07-01 +:version: 0.15.43 +:updated: 2018-07-12 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -42,6 +42,13 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.15.43 (2018-07-12): + - merge PR33: Python2.7 on Windows is narrow, but has no + ``sysconfig.get_config_var('Py_UNICODE_SIZE')``. (merge provided by + `Marcel Bargull <https://bitbucket.org/mbargull/>`__) + - ``register_class()`` now returns class (proposed by + `Mike Nerone <https://bitbucket.org/Manganeez/>`__} + 0.15.42 (2018-07-01): - fix regression showing only on narrow Python 2.7 (py27mu) builds (with help from diff --git a/__init__.py b/__init__.py index f4774a8..1939bf1 100644 --- a/__init__.py +++ b/__init__.py @@ -7,8 +7,8 @@ if False: # MYPY _package_data = dict( full_package_name='ruamel.yaml', - version_info=(0, 15, 43, 'dev'), - __version__='0.15.43.dev', + version_info=(0, 15, 43), + __version__='0.15.43', 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/_test/test_api_change.py b/_test/test_api_change.py index c0f492c..b745ee9 100644 --- a/_test/test_api_change.py +++ b/_test/test_api_change.py @@ -9,8 +9,8 @@ testing of anchors and the aliases referring to them import sys import textwrap import pytest -from ruamel.yaml import YAML -from ruamel.yaml.constructor import DuplicateKeyError +from ruamel.yaml import YAML, safe_load +from ruamel.yaml.constructor import DuplicateKeyError, DuplicateKeyFutureWarning from ruamel.std.pathlib import Path @@ -157,3 +157,12 @@ class TestFlowStyle: yaml.dump(data, sys.stdout) out, err = capsys.readouterr() assert out == "b: 1\na:\n- [1, 2]\n- [3, 4]\n" + + +class TestOldAPI: + @pytest.mark.skipif(sys.version_info >= (3, 0), reason="ok on Py3") + @pytest.mark.xfail(strict=True) + def test_duplicate_keys_02(self): + # Issue 165 unicode keys in error/warning + with pytest.warns(DuplicateKeyFutureWarning): + safe_load('type: Doméstica\ntype: International') diff --git a/constructor.py b/constructor.py index 05aeb55..e5126f4 100644 --- a/constructor.py +++ b/constructor.py @@ -255,7 +255,7 @@ class BaseConstructor(object): http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys """, """\ - Duplicate keys will become and error in future releases, and are errors + Duplicate keys will become an error in future releases, and are errors by default when using the new API. """, ] @@ -768,7 +768,7 @@ class NameSpacePackager(object): continue if sys.version_info[:2] == (3, 4) and platform.system() == 'Windows': # this is giving problems on appveyor, so skip - if not 'FORCE_C_BUILD_TEST' in os.environ: + if 'FORCE_C_BUILD_TEST' not in os.environ: self._ext_modules.append(ext) continue # write a temporary .c file to compile @@ -1,5 +1,5 @@ [tox] -toxworkdir = /data1/DATA/tox/ruamel.yaml +toworkdir = /data1/DATA/tox/ruamel.yaml envlist = cs,py36,py27,py35,py34,pypy,py27m [testenv] |