summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-07-12 17:13:44 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-07-12 17:13:44 +0200
commit9f5b5e51c099f5166e65cc85678ee9734c48bb32 (patch)
treeadd994d2a0005c9ff5f2e90d67d906a720c71d22
parenta509d2fac7baff28de5a41f40c44f003f50055fd (diff)
downloadruamel.yaml-9f5b5e51c099f5166e65cc85678ee9734c48bb32.tar.gz
HG: *When this change indeed resolves your problem, please **Close** this issue*.
HG: *(You can do so usingthe WorkFlow pull-down (close to the top right of this page)* HG: ####################################################################### HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Leave message empty to abort commit. HG: ####################################################################### HG: user: Anthon van der Neut <anthon@mnt.org> HG: branch 'default' HG: changed .appveyor.yaml HG: changed CHANGES HG: changed README.rst HG: changed __init__.py
-rw-r--r--CHANGES14
-rw-r--r--README.rst11
-rw-r--r--__init__.py4
-rw-r--r--_test/test_api_change.py13
-rw-r--r--constructor.py2
-rw-r--r--setup.py2
-rw-r--r--tox.ini2
7 files changed, 39 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index cc13e6c..6734343 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/README.rst b/README.rst
index 5f5118e..1d92c05 100644
--- a/README.rst
+++ b/README.rst
@@ -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.
""",
]
diff --git a/setup.py b/setup.py
index 9266f8e..c0d00cf 100644
--- a/setup.py
+++ b/setup.py
@@ -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
diff --git a/tox.ini b/tox.ini
index 9057c82..ae8287e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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]