Hello community,

here is the log from the commit of package python-pytoml for openSUSE:Factory 
checked in at 2019-08-15 15:43:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytoml (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytoml.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytoml"

Thu Aug 15 15:43:09 2019 rev:4 rq:722007 version:0.1.21

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytoml/python-pytoml.changes      
2019-03-10 09:33:46.684199192 +0100
+++ /work/SRC/openSUSE:Factory/.python-pytoml.new.9556/python-pytoml.changes    
2019-08-15 15:43:10.551198563 +0200
@@ -1,0 +2,7 @@
+Fri Aug  9 13:30:32 UTC 2019 - Ondřej Súkup <mimi...@gmail.com>
+
+- update to 0.1.21
+- add "deprecation notice" to summary
+ * Fix incorrectly stripped new-lines at the beginning of strings
+
+-------------------------------------------------------------------

Old:
----
  pytoml-0.1.20.tar.gz

New:
----
  pytoml-0.1.21.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytoml.spec ++++++
--- /var/tmp/diff_new_pack.y9ODIw/_old  2019-08-15 15:43:12.311198155 +0200
+++ /var/tmp/diff_new_pack.y9ODIw/_new  2019-08-15 15:43:12.315198154 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytoml
-Version:        0.1.20
+Version:        0.1.21
 Release:        0
 Summary:        TOML-0.4.0 parser/writer for Python
 License:        MIT
@@ -38,6 +38,9 @@
 A specs-conforming and strict parser and writer for TOML files.
 The library currently supports version 0.4.0 of the specs.
 
+The pytoml project is no longer being actively maintained.
+Consider using the toml package instead.
+
 %prep
 %setup -q -n pytoml-%{version}
 tar -C test -xzf%{SOURCE1}

++++++ pytoml-0.1.20.tar.gz -> pytoml-0.1.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/PKG-INFO new/pytoml-0.1.21/PKG-INFO
--- old/pytoml-0.1.20/PKG-INFO  2018-10-28 15:22:09.000000000 +0100
+++ new/pytoml-0.1.21/PKG-INFO  2019-07-21 19:58:09.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytoml
-Version: 0.1.20
+Version: 0.1.21
 Summary: A parser for TOML-0.4.0
 Home-page: https://github.com/avakar/pytoml
 Author: Martin Vejnár
@@ -9,6 +9,11 @@
 Description: 
[![PyPI](https://img.shields.io/pypi/v/pytoml.svg)](https://pypi.python.org/pypi/pytoml)
         [![Build 
Status](https://travis-ci.org/avakar/pytoml.svg?branch=master)](https://travis-ci.org/avakar/pytoml)
         
+        # Deprecated
+        
+        The pytoml project is no longer being actively maintained. Consider 
using the
+        [toml](https://github.com/uiri/toml) package instead.
+        
         # pytoml
         
         This project aims at being a specs-conforming and strict parser and 
writer for [TOML][1] files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/README.md new/pytoml-0.1.21/README.md
--- old/pytoml-0.1.20/README.md 2018-10-27 21:21:13.000000000 +0200
+++ new/pytoml-0.1.21/README.md 2019-07-21 18:49:01.000000000 +0200
@@ -1,6 +1,11 @@
 
[![PyPI](https://img.shields.io/pypi/v/pytoml.svg)](https://pypi.python.org/pypi/pytoml)
 [![Build 
Status](https://travis-ci.org/avakar/pytoml.svg?branch=master)](https://travis-ci.org/avakar/pytoml)
 
+# Deprecated
+
+The pytoml project is no longer being actively maintained. Consider using the
+[toml](https://github.com/uiri/toml) package instead.
+
 # pytoml
 
 This project aims at being a specs-conforming and strict parser and writer for 
[TOML][1] files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/pytoml/parser.py 
new/pytoml-0.1.21/pytoml/parser.py
--- old/pytoml-0.1.20/pytoml/parser.py  2018-10-28 14:40:08.000000000 +0100
+++ new/pytoml-0.1.21/pytoml/parser.py  2019-07-21 19:48:58.000000000 +0200
@@ -1,4 +1,4 @@
-import string, re, sys, datetime
+import re, sys
 from .core import TomlError
 from .utils import rfc3339_re, parse_rfc3339_re
 
@@ -28,8 +28,6 @@
 
     def process_value(v, object_pairs_hook):
         kind, text, value, pos = v
-        if kind == 'str' and value.startswith('\n'):
-            value = value[1:]
         if kind == 'array':
             if value and any(k != value[0][0] for k, t, v, p in value[1:]):
                 error('array-type-mismatch')
@@ -215,6 +213,7 @@
         return r
     if s.consume('\''):
         if s.consume('\'\''):
+            s.consume('\n')
             r = s.expect_re(_litstr_ml_re).group(0)
             s.expect('\'\'\'')
         else:
@@ -238,6 +237,7 @@
 
     if s.consume('"'):
         if s.consume('""'):
+            s.consume('\n')
             r = _p_basicstr_content(s, _basicstr_ml_re)
             s.expect('"""')
         else:
@@ -247,6 +247,7 @@
 
     if s.consume('\''):
         if s.consume('\'\''):
+            s.consume('\n')
             r = s.expect_re(_litstr_ml_re).group(0)
             s.expect('\'\'\'')
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/pytoml/writer.py 
new/pytoml-0.1.21/pytoml/writer.py
--- old/pytoml-0.1.20/pytoml/writer.py  2018-10-28 15:14:35.000000000 +0100
+++ new/pytoml-0.1.21/pytoml/writer.py  2019-07-21 18:49:01.000000000 +0200
@@ -3,6 +3,12 @@
 
 from .utils import format_rfc3339
 
+try:
+    from pathlib import PurePath as _path_types
+except ImportError:
+    _path_types = ()
+
+
 if sys.version_info[0] == 3:
     long = int
     unicode = str
@@ -66,6 +72,8 @@
         return '[{0}]'.format(', '.join(_format_value(obj) for obj in v))
     elif isinstance(v, dict):
         return '{{{0}}}'.format(', '.join('{} = {}'.format(_escape_id(k), 
_format_value(obj)) for k, obj in v.items()))
+    elif isinstance(v, _path_types):
+        return _escape_string(str(v))
     else:
         raise RuntimeError(v)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/pytoml.egg-info/PKG-INFO 
new/pytoml-0.1.21/pytoml.egg-info/PKG-INFO
--- old/pytoml-0.1.20/pytoml.egg-info/PKG-INFO  2018-10-28 15:22:09.000000000 
+0100
+++ new/pytoml-0.1.21/pytoml.egg-info/PKG-INFO  2019-07-21 19:58:09.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytoml
-Version: 0.1.20
+Version: 0.1.21
 Summary: A parser for TOML-0.4.0
 Home-page: https://github.com/avakar/pytoml
 Author: Martin Vejnár
@@ -9,6 +9,11 @@
 Description: 
[![PyPI](https://img.shields.io/pypi/v/pytoml.svg)](https://pypi.python.org/pypi/pytoml)
         [![Build 
Status](https://travis-ci.org/avakar/pytoml.svg?branch=master)](https://travis-ci.org/avakar/pytoml)
         
+        # Deprecated
+        
+        The pytoml project is no longer being actively maintained. Consider 
using the
+        [toml](https://github.com/uiri/toml) package instead.
+        
         # pytoml
         
         This project aims at being a specs-conforming and strict parser and 
writer for [TOML][1] files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/pytoml.egg-info/SOURCES.txt 
new/pytoml-0.1.21/pytoml.egg-info/SOURCES.txt
--- old/pytoml-0.1.20/pytoml.egg-info/SOURCES.txt       2018-10-28 
15:22:09.000000000 +0100
+++ new/pytoml-0.1.21/pytoml.egg-info/SOURCES.txt       2019-07-21 
19:58:09.000000000 +0200
@@ -1,6 +1,7 @@
 LICENSE
 MANIFEST.in
 README.md
+setup.cfg
 setup.py
 pytoml/__init__.py
 pytoml/core.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/setup.cfg new/pytoml-0.1.21/setup.cfg
--- old/pytoml-0.1.20/setup.cfg 2018-10-28 15:22:09.000000000 +0100
+++ new/pytoml-0.1.21/setup.cfg 2019-07-21 19:58:09.000000000 +0200
@@ -1,3 +1,9 @@
+[bdist_wheel]
+universal = 1
+
+[metadata]
+license_file = LICENSE
+
 [egg_info]
 tag_build = 
 tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/setup.py new/pytoml-0.1.21/setup.py
--- old/pytoml-0.1.20/setup.py  2018-10-28 15:21:35.000000000 +0100
+++ new/pytoml-0.1.21/setup.py  2019-07-21 19:53:32.000000000 +0200
@@ -8,7 +8,7 @@
 
 setup(
     name='pytoml',
-    version='0.1.20',
+    version='0.1.21',
 
     description='A parser for TOML-0.4.0',
     long_description=long_description,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytoml-0.1.20/test/test_writer.py 
new/pytoml-0.1.21/test/test_writer.py
--- old/pytoml-0.1.20/test/test_writer.py       2018-10-27 21:21:13.000000000 
+0200
+++ new/pytoml-0.1.21/test/test_writer.py       2019-07-21 18:49:01.000000000 
+0200
@@ -13,3 +13,21 @@
 def test_attempting_to_write_non_number_floats_raises_error(value):
     error = pytest.raises(ValueError, lambda: toml.dumps({"value": value}))
     assert str(error.value) == "{0} is not a valid TOML value".format(value)
+
+
+def test_pathlib_path_objects_are_written_as_strings():
+    pathlib = pytest.importorskip("pathlib")
+    path_value = toml.dumps({"value": pathlib.Path("test-path")})
+    assert path_value == 'value = "test-path"\n'
+
+
+def test_pathlib_purepath_objects_are_written_as_strings():
+    pathlib = pytest.importorskip("pathlib")
+    path_value = toml.dumps({"value": pathlib.PurePath("test-path")})
+    assert path_value == 'value = "test-path"\n'
+
+
+def test_pathlib_purepath_objects_contents_are_escaped():
+    pathlib = pytest.importorskip("pathlib")
+    path_value = toml.dumps({"value": pathlib.PurePath('C:\\Escape\"this 
string"')})
+    assert path_value == 'value = "C:\\\\Escape\\"this string\\""\n'


Reply via email to