summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2020-01-20 19:45:23 +0100
committerAnthon van der Neut <anthon@mnt.org>2020-01-20 19:45:23 +0100
commit095d64ed47887b12a59936e1a11b27641bcaf63c (patch)
tree0f37287b88b31d7b68b85767874444eaf0015831
parent245f5a1667033634d4069ee48b7d6915489148fd (diff)
downloadruamel.yaml-095d64ed47887b12a59936e1a11b27641bcaf63c.tar.gz
correct empty string mapping key rt0.16.6
-rw-r--r--CHANGES16
-rw-r--r--LICENSE2
-rw-r--r--README.rst10
-rw-r--r--__init__.py4
-rw-r--r--_doc/_static/pypi.svg2
-rw-r--r--_test/test_deprecation.py3
-rw-r--r--constructor.py2
-rw-r--r--representer.py2
-rwxr-xr-xtox.ini2
9 files changed, 33 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 190bc41..e6d6d0c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,19 @@
+[0, 16, 6]: 2020-01-20
+ - fix empty string mapping key roundtripping with preservation of quotes as `? ''`
+ (reported via email by Tomer Aharoni).
+ - fix incorrect state setting in class constructor (reported by `Douglas Raillard
+ <https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/>`__)
+ - adjust deprecation warning test for Hashable, as that no longer warns (reported
+ by `Jason Montleon <https://bitbucket.org/%7B8f377d12-8d5b-4069-a662-00a2674fee4e%7D/>`__)
+
+[0, 16, 6]: 2020-01-20
+ - fix empty string mapping key roundtripping with preservation of quotes as `? ''`
+ (reported via email by Tomer Aharoni).
+ - fix incorrect state setting in class constructor (reported by `Douglas Raillard
+ <https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/>`__)
+ - adjust deprecation warning test for Hashable, as that no longer warns (reported
+ by `Jason Montleon <https://bitbucket.org/%7B8f377d12-8d5b-4069-a662-00a2674fee4e%7D/>`__)
+
[0, 16, 5]: 2019-08-18
- allow for ``YAML(typ=['unsafe', 'pytypes'])``
diff --git a/LICENSE b/LICENSE
index 787621c..5b863d3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
- Copyright (c) 2014-2019 Anthon van der Neut, Ruamel bvba
+ Copyright (c) 2014-2020 Anthon van der Neut, Ruamel bvba
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.rst b/README.rst
index 58403df..c569060 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.16.5
-:updated: 2019-08-18
+:version: 0.16.6
+:updated: 2020-01-20
:documentation: http://yaml.readthedocs.io
:repository: https://bitbucket.org/ruamel/yaml
:pypi: https://pypi.org/project/ruamel.yaml/
@@ -54,9 +54,13 @@ ChangeLog
.. should insert NEXT: at the beginning of line for next key (with empty line)
-NEXT:
+0.16.6 (2020-01-20):
- fix empty string mapping key roundtripping with preservation of quotes as `? ''`
(reported via email by Tomer Aharoni).
+ - fix incorrect state setting in class constructor (reported by `Douglas Raillard
+ <https://bitbucket.org/%7Bcf052d92-a278-4339-9aa8-de41923bb556%7D/>`__)
+ - adjust deprecation warning test for Hashable, as that no longer warns (reported
+ by `Jason Montleon <https://bitbucket.org/%7B8f377d12-8d5b-4069-a662-00a2674fee4e%7D/>`__)
0.16.5 (2019-08-18):
- allow for ``YAML(typ=['unsafe', 'pytypes'])``
diff --git a/__init__.py b/__init__.py
index 74a042d..00a27a3 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, 16, 5),
- __version__='0.16.5',
+ version_info=(0, 16, 6),
+ __version__='0.16.6',
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 876b664..2de7091 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.16.5</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.16.5</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.16.6</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.16.6</text></g> </svg>
diff --git a/_test/test_deprecation.py b/_test/test_deprecation.py
index 35cb095..14acd71 100644
--- a/_test/test_deprecation.py
+++ b/_test/test_deprecation.py
@@ -6,7 +6,8 @@ import sys
import pytest # NOQA
-@pytest.mark.skipif(sys.version_info < (3, 7), reason='collections not available?')
+@pytest.mark.skipif(sys.version_info < (3, 7) or sys.version_info >= (3, 9),
+ reason='collections not available?')
def test_collections_deprecation():
with pytest.warns(DeprecationWarning):
from collections import Hashable # NOQA
diff --git a/constructor.py b/constructor.py
index 758daca..2280d4f 100644
--- a/constructor.py
+++ b/constructor.py
@@ -959,7 +959,7 @@ class Constructor(SafeConstructor):
elif state:
slotstate.update(state)
for key, value in slotstate.items():
- setattr(object, key, value)
+ setattr(instance, key, value)
def construct_python_object(self, suffix, node):
# type: (Any, Any) -> Any
diff --git a/representer.py b/representer.py
index a0078f2..f0ad89f 100644
--- a/representer.py
+++ b/representer.py
@@ -1243,6 +1243,8 @@ RoundTripRepresenter.add_representer(
PlainScalarString, RoundTripRepresenter.represent_plain_scalarstring
)
+# RoundTripRepresenter.add_representer(tuple, Representer.represent_tuple)
+
RoundTripRepresenter.add_representer(ScalarInt, RoundTripRepresenter.represent_scalar_int)
RoundTripRepresenter.add_representer(BinaryInt, RoundTripRepresenter.represent_binary_int)
diff --git a/tox.ini b/tox.ini
index 56fb982..c1c3644 100755
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
# toxworkdir = /data1/DATA/tox/ruamel.yaml
-envlist = cs,py37,py27,py36,py35,py38,pypy,py27m
+envlist = cs,py37,py27,py36,py35,py38,py39,pypy,py27m
[testenv]
commands =