summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES16
-rw-r--r--README.rst12
-rw-r--r--__init__.py4
-rw-r--r--_doc/_static/pypi.svg2
-rw-r--r--_test/test_anchor.py2
-rw-r--r--constructor.py4
-rw-r--r--emitter.py2
7 files changed, 34 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index cd4b14f..51b6be3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,19 @@
+[0, 15, 75]: 2018-10-27
+ - fix issue with single '?' scalar (reported by `Terrance
+ <https://bitbucket.org/OllieTerrance/>`__)
+ - fix issue with duplicate merge keys (prompted by `answering
+ <https://stackoverflow.com/a/52852106/1307905>`__ a
+ `StackOverflow question <https://stackoverflow.com/q/52851168/1307905>`__
+ by `math <https://stackoverflow.com/users/1355634/math>`__)
+
+[0, 15, 75]: 2018-10-27
+ - fix issue with single '?' scalar (reported by `Terrance
+ <https://bitbucket.org/OllieTerrance/>`__)
+ - fix issue with duplicate merge keys (prompted by `answering
+ <https://stackoverflow.com/a/52852106/1307905>`__ a
+ `StackOverflow question <https://stackoverflow.com/q/52851168/1307905>`__
+ by `math <https://stackoverflow.com/users/1355634/math>`__)
+
[0, 15, 74]: 2018-10-17
- fix dropping of comment on rt before sequence item that is sequence item
(reported by `Thorsten Kampe <https://bitbucket.org/thorstenkampe/>`__)
diff --git a/README.rst b/README.rst
index c82ad08..a05eb5f 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.74
-:updated: 2018-10-17
+:version: 0.15.75
+:updated: 2018-10-27
:documentation: http://yaml.readthedocs.io
:repository: https://bitbucket.org/ruamel/
:pypi: https://pypi.org/project/ruamel.yaml/
@@ -54,6 +54,14 @@ ChangeLog
.. should insert NEXT: at the beginning of line for next key (with empty line)
+0.15.75 (2018-10-27):
+ - fix issue with single '?' scalar (reported by `Terrance
+ <https://bitbucket.org/OllieTerrance/>`__)
+ - fix issue with duplicate merge keys (prompted by `answering
+ <https://stackoverflow.com/a/52852106/1307905>`__ a
+ `StackOverflow question <https://stackoverflow.com/q/52851168/1307905>`__
+ by `math <https://stackoverflow.com/users/1355634/math>`__)
+
0.15.74 (2018-10-17):
- fix dropping of comment on rt before sequence item that is sequence item
(reported by `Thorsten Kampe <https://bitbucket.org/thorstenkampe/>`__)
diff --git a/__init__.py b/__init__.py
index 06c70a0..764755b 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, 74),
- __version__='0.15.74',
+ version_info=(0, 15, 75),
+ __version__='0.15.75',
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 389f958..2aa33a3 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.15.74</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.74</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.15.75</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.75</text></g> </svg>
diff --git a/_test/test_anchor.py b/_test/test_anchor.py
index 4c7a9f2..dec1261 100644
--- a/_test/test_anchor.py
+++ b/_test/test_anchor.py
@@ -493,7 +493,7 @@ class TestDuplicateKeyThroughAnchor:
def test_duplicate_key_01(self):
# so issue https://stackoverflow.com/a/52852106/1307905
from ruamel.yaml import version_info
- from ruamel.yaml.constructor import DuplicateKeyFutureWarning, DuplicateKeyError
+ from ruamel.yaml.constructor import DuplicateKeyError
s = dedent("""\
- &name-name
diff --git a/constructor.py b/constructor.py
index 8600c9f..05fbb34 100644
--- a/constructor.py
+++ b/constructor.py
@@ -839,14 +839,14 @@ class Constructor(SafeConstructor):
__import__(module_name)
# object_name = '.'.join(object_name)
break
- except ImportError as exc:
+ except ImportError:
continue
else:
module_name = builtins_module
lobject_name = [name]
try:
__import__(module_name)
- except ImportError as exc:
+ except ImportError:
raise ConstructorError(
'while constructing a Python object',
mark,
diff --git a/emitter.py b/emitter.py
index 942eced..c410f2e 100644
--- a/emitter.py
+++ b/emitter.py
@@ -1024,6 +1024,8 @@ class Emitter(object):
if ch in u'?:': # ToDo
if self.serializer.use_version == (1, 1):
flow_indicators = True
+ elif len(scalar) == 1: # single character
+ flow_indicators = True
if followed_by_whitespace:
block_indicators = True
if ch == u'-' and followed_by_whitespace: