diff options
author | Anthon van der Neut <anthon@mnt.org> | 2016-08-07 23:56:15 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2016-08-07 23:56:15 +0200 |
commit | b0a100914f71d25a39867900964385c79daacd9a (patch) | |
tree | 6aef601cb96b04de4b29b7ec464f7816546e9871 | |
parent | f84a3a2d77fc4a7b1bc9e409686bf9102dc2defb (diff) | |
download | ruamel.yaml-b0a100914f71d25a39867900964385c79daacd9a.tar.gz |
fix for issue 410.11.15
-rw-r--r-- | Dockerfile | 3 | ||||
-rw-r--r-- | README.rst | 6 | ||||
-rw-r--r-- | __init__.py | 2 | ||||
-rw-r--r-- | representer.py | 5 |
4 files changed, 12 insertions, 4 deletions
@@ -3,6 +3,7 @@ FROM quay.io/pypa/manylinux1_x86_64 MAINTAINER Anthon van der Neut <a.van.der.neut@ruamel.eu> RUN echo 'cd /src' > /usr/bin/makewheel +RUN echo 'rm -f /tmp/*.whl' >> /usr/bin/makewheel RUN echo 'for PYBIN in /opt/python/$1*/bin/; do' >> /usr/bin/makewheel RUN echo ' echo "$PYBIN"' >> /usr/bin/makewheel RUN echo ' ${PYBIN}/pip wheel . -w /tmp' >> /usr/bin/makewheel @@ -16,4 +17,4 @@ RUN chmod 755 /usr/bin/makewheel RUN yum install -y libyaml-devel -CMD /usr/bin/makewheel
\ No newline at end of file +CMD /usr/bin/makewheel @@ -18,8 +18,12 @@ ChangeLog :: + 0.11.15 (2016-XX-XX): + - Change to prevent FutureWarning in NumPy, as reported by tgehring + ("comparison to None will result in an elementwise object comparison in the future") + 0.11.14 (2016-07-06): - - fix preserve_quotes missing on original Loaders (as reported + - fix preserve_quotes missing on original Loaders (as reported by Leynos, bitbucket issue 38) 0.11.13 (2016-07-06): diff --git a/__init__.py b/__init__.py index 1ff3424..b77032f 100644 --- a/__init__.py +++ b/__init__.py @@ -9,7 +9,7 @@ from __future__ import absolute_import _package_data = dict( full_package_name="ruamel.yaml", - version_info=(0, 11, 14), + version_info=(0, 11, 15), 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/representer.py b/representer.py index 7498443..b4625bf 100644 --- a/representer.py +++ b/representer.py @@ -199,7 +199,10 @@ class BaseRepresenter(object): class SafeRepresenter(BaseRepresenter): def ignore_aliases(self, data): - if data in [None, ()]: + # https://docs.python.org/3/reference/expressions.html#parenthesized-forms : + # "i.e. two occurrences of the empty tuple may or may not yield the same object" + # so "data is ()" should not be used + if data is None or data == (): return True if isinstance(data, (binary_type, text_type, bool, int, float)): return True |