diff options
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | README.rst | 14 | ||||
-rw-r--r-- | __init__.py | 4 | ||||
-rw-r--r-- | _doc/_static/pypi.svg | 2 | ||||
-rw-r--r-- | _test/test_int.py | 1 | ||||
-rw-r--r-- | _test/test_issues.py | 3 | ||||
-rw-r--r-- | emitter.py | 3 |
7 files changed, 25 insertions, 9 deletions
@@ -1,3 +1,10 @@ +[0, 15, 53]: 2018-08-12 + - fix issue with flow style mapping with comments gobbled newline (reported + by `Christopher Lambert <https://bitbucket.org/XN137/>`__) + - fix issue where single '+' under YAML 1.2 was interpreted as + integer, erroring out (reported by `Jethro Yu + <https://bitbucket.org/jcppkkk/>`__) + [0, 15, 52]: 2018-08-09 - added `.copy()` mapping representation for round-tripping (``CommentedMap``) to fix incomplete copies of merged mappings @@ -4,8 +4,8 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.15.52 -:updated: 2018-08-09 +:version: 0.15.53 +:updated: 2018-08-12 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -54,13 +54,21 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.15.53 (2018-08-12): + - fix issue with flow style mapping with comments gobbled newline (reported + by `Christopher Lambert <https://bitbucket.org/XN137/>`__) + - fix issue where single '+' under YAML 1.2 was interpreted as + integer, erroring out (reported by `Jethro Yu + <https://bitbucket.org/jcppkkk/>`__) + 0.15.52 (2018-08-09): - added `.copy()` mapping representation for round-tripping (``CommentedMap``) to fix incomplete copies of merged mappings (reported by `Will Richards <https://bitbucket.org/will_richards/>`__) - Also unmade that class a subclass of ordereddict to solve incorrect behaviour - for ``{**merged-mapping}`` and ``dict(**merged-mapping)`` (reported by + for ``{**merged-mapping}`` and ``dict(**merged-mapping)`` (reported independently by + `Tim Olsson <https://bitbucket.org/tgolsson/>`__ and `Filip Matzner <https://bitbucket.org/FloopCZ/>`__) 0.15.51 (2018-08-08): diff --git a/__init__.py b/__init__.py index ffd84c2..1af5ab8 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, 52), - __version__='0.15.52', + version_info=(0, 15, 53), + __version__='0.15.53', 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 253e2c2..b218d84 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.52</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.52</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.53</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.53</text></g> </svg> diff --git a/_test/test_int.py b/_test/test_int.py index ab53055..22ac3bc 100644 --- a/_test/test_int.py +++ b/_test/test_int.py @@ -108,6 +108,7 @@ class TestBinHexOct: assert d[0] == 2147483647 assert d[1] == 9223372036854775808 + class TestIntIssues: def test_issue_218_single_plus_sign_is_not_int(self): d = round_trip_load("""\ diff --git a/_test/test_issues.py b/_test/test_issues.py index a909b0e..e73dc06 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -31,10 +31,9 @@ class TestIssues: root: # a comment - {some_key: "value"} - + foo: 32 bar: 32 """) x = round_trip(s, block_seq_indent=4, preserve_quotes=True) assert x['bar'] == 32 - @@ -579,10 +579,11 @@ class Emitter(object): # type: (bool) -> None if not first and isinstance(self.event, SequenceEndEvent): if self.event.comment and self.event.comment[1]: - # final comments from a doc + # final comments on a block list e.g. empty line self.write_pre_comment(self.event) self.indent = self.indents.pop() self.state = self.states.pop() + self.no_newline = False else: if self.event.comment and self.event.comment[1]: self.write_pre_comment(self.event) |