diff options
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | README.rst | 9 | ||||
-rw-r--r-- | __init__.py | 4 | ||||
-rw-r--r-- | _test/test_indentation.py | 3 | ||||
-rw-r--r-- | _test/test_version.py | 6 | ||||
-rw-r--r-- | scanner.py | 2 |
6 files changed, 21 insertions, 8 deletions
@@ -1,3 +1,8 @@ +[0, 15, 30]: 2017-08-14 + - fix for issue with "compact JSON" not parsing: ``{"in":{},"out":{}}`` + (reported on `StackOverflow <https://stackoverflow.com/q/45681626/1307905>`_ by + `mjalkio <https://stackoverflow.com/users/5130525/mjalkio>`_ + [0, 15, 29]: 2017-08-14 - fix issue #51: different indents for mappings and sequences (reported by Alex Harvey) @@ -35,10 +35,15 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key +0.15.30 (2017-08-14): + - fix for issue with "compact JSON" not parsing: ``{"in":{},"out":{}}`` + (reported on `StackOverflow <https://stackoverflow.com/q/45681626/1307905>`_ by + `mjalkio <https://stackoverflow.com/users/5130525/mjalkio>`_ + 0.15.29 (2017-08-14): - - fix issue #51: different indents for mappings and sequences (reported by + - fix issue #51: different indents for mappings and sequences (reported by Alex Harvey) - - fix for flow sequence/mapping as element/value of block sequence with + - fix for flow sequence/mapping as element/value of block sequence with sequence-indent minus dash-offset not equal two. 0.15.28 (2017-08-13): diff --git a/__init__.py b/__init__.py index 88730b4..8fd81f8 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, 29), - __version__='0.15.29', + version_info=(0, 15, 30), + __version__='0.15.30', 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/_test/test_indentation.py b/_test/test_indentation.py index 4e991fd..014f89b 100644 --- a/_test/test_indentation.py +++ b/_test/test_indentation.py @@ -298,8 +298,7 @@ class TestSeparateMapSeqIndents: def test_issue_51(self): yaml = YAML() # yaml.map_indent = 2 # the default - yaml.sequence_indent = 4 - yaml.sequence_dash_offset = 2 + yaml.indent(sequence=4, offset=2) yaml.preserve_quotes = True yaml.round_trip(""" role::startup::author::rsyslog_inputs: diff --git a/_test/test_version.py b/_test/test_version.py index 795c242..0c270d7 100644 --- a/_test/test_version.py +++ b/_test/test_version.py @@ -3,7 +3,7 @@ import pytest # NOQA import ruamel.yaml -from roundtrip import dedent, round_trip +from roundtrip import dedent, round_trip, round_trip_load def load(s, version=None): @@ -149,3 +149,7 @@ class TestIssue62: round_trip(s.format(''), preserve_quotes=True) # note the flow seq on the --- line! round_trip(s.format('%YAML 1.2\n--- '), preserve_quotes=True, version="1.2") + + def test_so_45681626(self): + # was not properly parsing + round_trip_load('{"in":{},"out":{}}') @@ -765,7 +765,7 @@ class Scanner(object): if bool(self.flow_level): return True else: - if bool(self.flow_level) and self.reader.peek(1) in '\'"': + if bool(self.flow_level) and self.reader.peek(1) in '\'"{[]}': return True # VALUE(block context): ':' (' '|'\n') return self.reader.peek(1) in _THE_END_SPACE_TAB |