diff options
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | README.rst | 11 | ||||
-rw-r--r-- | __init__.py | 4 | ||||
-rw-r--r-- | _doc/_static/pypi.svg | 2 | ||||
-rw-r--r-- | _test/test_issues.py | 12 | ||||
-rw-r--r-- | nodes.py | 3 | ||||
-rw-r--r-- | scanner.py | 3 |
7 files changed, 30 insertions, 10 deletions
@@ -1,3 +1,8 @@ +[0, 15, 60]: 2018-08-18 + - cleanup for mypy + - spurious print in library (reported by + `Lele Gaifax <https://bitbucket.org/lele/>`__), now automatically checked + [0, 15, 59]: 2018-08-17 - issue with C based loader and leading zeros (reported by `Tom Hamilton Stubber <https://bitbucket.org/TomHamiltonStubber/>`__) @@ -4,8 +4,8 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.15.59 -:updated: 2018-08-17 +:version: 0.15.60 +:updated: 2018-08-18 :documentation: http://yaml.readthedocs.io :repository: https://bitbucket.org/ruamel/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -54,6 +54,13 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.15.60 (2018-08-18): + - again allow single entry map in flow sequence context (reported by + `Lee Goolsbee <https://bitbucket.org/lgoolsbee/>`__) + - cleanup for mypy + - spurious print in library (reported by + `Lele Gaifax <https://bitbucket.org/lele/>`__), now automatically checked + 0.15.59 (2018-08-17): - issue with C based loader and leading zeros (reported by `Tom Hamilton Stubber <https://bitbucket.org/TomHamiltonStubber/>`__) diff --git a/__init__.py b/__init__.py index c513dec..71164d9 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, 59), - __version__='0.15.59', + version_info=(0, 15, 60), + __version__='0.15.60', 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 fbf4350..15dd630 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.59</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.59</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.60</text><text x="585" y="140" transform="scale(.1)" textLength="430">0.15.60</text></g> </svg> diff --git a/_test/test_issues.py b/_test/test_issues.py index 0d1f0ca..ec793ea 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -233,13 +233,19 @@ class TestIssues: d.yaml_add_eol_comment('test1', 'bar') assert round_trip_dump(d) == yaml_str + 'bar: foo # test1\n' - @pytest.mark.xfail(strict=True) def test_issue_219(self): yaml_str = dedent("""\ [StackName: AWS::StackName] """) - d = round_trip_load(yaml_str) - + d = round_trip_load(yaml_str) # NOQA + + def test_issue_219a(self): + yaml_str = dedent("""\ + [StackName: + AWS::StackName] + """) + d = round_trip_load(yaml_str) # NOQA + def test_issue_220(self, tmpdir): program_src = r''' from ruamel.yaml import YAML @@ -51,7 +51,8 @@ class Node(object): sys.stdout.write(' {}comment: {})\n'.format(' ' * indent, self.comment)) return sys.stdout.write( - '{}{}(tag={!r})\n'.format(' ' * indent, self.__class__.__name__, self.tag)) + '{}{}(tag={!r})\n'.format(' ' * indent, self.__class__.__name__, self.tag) + ) if self.comment: sys.stdout.write(' {}comment: {})\n'.format(' ' * indent, self.comment)) for v in self.value: @@ -786,7 +786,8 @@ class Scanner(object): else: if bool(self.flow_level): if self.flow_context[-1] == '[': - return False + if self.reader.peek(1) not in _THE_END_SPACE_TAB: + return False # if self.reader.peek(1) in '\'"{[]}': return True # VALUE(block context): ':' (' '|'\n') |