Hello community,

here is the log from the commit of package python-snuggs for openSUSE:Factory 
checked in at 2019-09-20 14:52:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-snuggs (Old)
 and      /work/SRC/openSUSE:Factory/.python-snuggs.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-snuggs"

Fri Sep 20 14:52:45 2019 rev:2 rq:731859 version:1.4.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-snuggs/python-snuggs.changes      
2019-03-28 22:47:53.891063311 +0100
+++ /work/SRC/openSUSE:Factory/.python-snuggs.new.7948/python-snuggs.changes    
2019-09-20 14:52:52.942886363 +0200
@@ -1,0 +2,22 @@
+Thu Sep 19 06:34:56 UTC 2019 - Bruno Friedmann <[email protected]>
+
+- Update to 1.4.7
+  The snuggs tests of syntax errors no longer assert a specific pyparsing
+  exception message as the format of these messages is not stable (#15).
+  Previous versions of snuggs had no other issues with pyparsing 2.3 or 2.4. 
+  + 1.4.6 (2019-05-15)
+    * Tests were failing on Python 2.7 (#20, #21) due to loss of precision in
+    str(num). This has been fixed by using repr(num).
+  + 1.4.5 (2019-05-14)
+    + Replace custom integer and real parsers with pyparsing_common's number 
(#19).
+  + 1.4.4 (2019-05-14)
+    + Fix for a reported bug in parsing negative real numbers (#16) and for an
+    unreported bug in parsing numbers in exponential notation (thank you,
+    hypothesis!).
+    + Add a "test" dependency on hypothesis.
+- Packaging
+  + Add hypothesis buildrequire
+  + spec-cleaner minimal
+  + Fix build errors on TW
+
+-------------------------------------------------------------------

Old:
----
  snuggs-1.4.3.tar.gz

New:
----
  snuggs-1.4.7.tar.gz

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

Other differences:
------------------
++++++ python-snuggs.spec ++++++
--- /var/tmp/diff_new_pack.3TZvjU/_old  2019-09-20 14:52:54.578886037 +0200
+++ /var/tmp/diff_new_pack.3TZvjU/_new  2019-09-20 14:52:54.582886036 +0200
@@ -12,30 +12,31 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-snuggs
-Version:        1.4.3
+Version:        1.4.7
 Release:        0
-License:        MIT
 Summary:        S-expressions tool for Numpy
-Url:            https://github.com/mapbox/snuggs
+License:        MIT
 Group:          Development/Languages/Python
+URL:            https://github.com/mapbox/snuggs
 Source:         
https://files.pythonhosted.org/packages/source/s/snuggs/snuggs-%{version}.tar.gz
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+Requires:       python-numpy
+Requires:       python-pyparsing
+BuildArch:      noarch
 # SECTION test requirements
+BuildRequires:  %{python_module hypothesis}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module pyparsing}
 BuildRequires:  %{python_module pytest}
 # /SECTION
-BuildRequires:  fdupes
-Requires:       python-numpy
-Requires:       python-pyparsing
-BuildArch:      noarch
-
 %python_subpackages
 
 %description

++++++ snuggs-1.4.3.tar.gz -> snuggs-1.4.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/CHANGES.txt new/snuggs-1.4.7/CHANGES.txt
--- old/snuggs-1.4.3/CHANGES.txt        2019-02-25 18:15:49.000000000 +0100
+++ new/snuggs-1.4.7/CHANGES.txt        2019-09-18 20:54:25.000000000 +0200
@@ -1,6 +1,28 @@
 Changes
 =======
 
+1.4.7 (2019-09-18)
+------------------
+- The snuggs tests of syntax errors no longer assert a specific pyparsing
+  exception message as the format of these messages is not stable (#15).
+  Previous versions of snuggs had no other issues with pyparsing 2.3 or 2.4.
+
+1.4.6 (2019-05-15)
+------------------
+- Tests were failing on Python 2.7 (#20, #21) due to loss of precision in
+  str(num). This has been fixed by using repr(num).
+
+1.4.5 (2019-05-14)
+------------------
+- Replace custom integer and real parsers with pyparsing_common's number (#19).
+
+1.4.4 (2019-05-14)
+------------------
+- Fix for a reported bug in parsing negative real numbers (#16) and for an
+  unreported bug in parsing numbers in exponential notation (thank you,
+  hypothesis!).
+- Add a "test" dependency on hypothesis.
+
 1.4.3 (2019-02-25)
 ------------------
 - Add LICENSE to distributions (#11).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/PKG-INFO new/snuggs-1.4.7/PKG-INFO
--- old/snuggs-1.4.3/PKG-INFO   2019-02-25 18:16:15.000000000 +0100
+++ new/snuggs-1.4.7/PKG-INFO   2019-09-18 20:54:49.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: snuggs
-Version: 1.4.3
+Version: 1.4.7
 Summary: Snuggs are s-expressions for Numpy
 Home-page: https://github.com/mapbox/snuggs
 Author: Sean Gillies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/setup.py new/snuggs-1.4.7/setup.py
--- old/snuggs-1.4.3/setup.py   2019-02-25 18:15:49.000000000 +0100
+++ new/snuggs-1.4.7/setup.py   2019-09-18 20:54:25.000000000 +0200
@@ -29,6 +29,6 @@
     packages=find_packages(exclude=["ez_setup", "examples", "tests"]),
     include_package_data=True,
     zip_safe=False,
-    install_requires=["numpy", "pyparsing"],
-    extras_require={"test": ["pytest"]},
+    install_requires=["numpy", "pyparsing>=2.1.6"],
+    extras_require={"test": ["pytest", "hypothesis"]},
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/snuggs/__init__.py 
new/snuggs-1.4.7/snuggs/__init__.py
--- old/snuggs-1.4.3/snuggs/__init__.py 2019-02-25 18:15:49.000000000 +0100
+++ new/snuggs-1.4.7/snuggs/__init__.py 2019-09-18 20:54:25.000000000 +0200
@@ -16,7 +16,7 @@
 
 
 __all__ = ['eval']
-__version__ = "1.4.3"
+__version__ = "1.4.7"
 
 # Python 2-3 compatibility
 string_types = (str,) if sys.version_info[0] >= 3 else (basestring,)  # 
flake8: noqa
@@ -121,15 +121,6 @@
 
 var = name.setParseAction(resolve_var)
 
-integer = Combine(
-    Optional(sign) +
-    number).setParseAction(lambda s, l, t: int(t[0]))
-
-real = Combine(
-    integer +
-    decimal + Optional(number) +
-    Optional(e + integer)).setParseAction(lambda s, l, t: float(t[0]))
-
 string = QuotedString("'") | QuotedString('"')
 
 lparen = Literal('(').suppress()
@@ -159,7 +150,7 @@
 higher_func_expr = Forward()
 expr = higher_func_expr | func_expr
 
-operand = higher_func_expr | func_expr | nil | var | real | integer | string
+operand = higher_func_expr | func_expr | nil | var | pyparsing_common.number | 
string
 
 func_expr << Group(
     lparen +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/snuggs.egg-info/PKG-INFO 
new/snuggs-1.4.7/snuggs.egg-info/PKG-INFO
--- old/snuggs-1.4.3/snuggs.egg-info/PKG-INFO   2019-02-25 18:16:15.000000000 
+0100
+++ new/snuggs-1.4.7/snuggs.egg-info/PKG-INFO   2019-09-18 20:54:48.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: snuggs
-Version: 1.4.3
+Version: 1.4.7
 Summary: Snuggs are s-expressions for Numpy
 Home-page: https://github.com/mapbox/snuggs
 Author: Sean Gillies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/snuggs.egg-info/requires.txt 
new/snuggs-1.4.7/snuggs.egg-info/requires.txt
--- old/snuggs-1.4.3/snuggs.egg-info/requires.txt       2019-02-25 
18:16:15.000000000 +0100
+++ new/snuggs-1.4.7/snuggs.egg-info/requires.txt       2019-09-18 
20:54:48.000000000 +0200
@@ -1,5 +1,6 @@
 numpy
-pyparsing
+pyparsing>=2.1.6
 
 [test]
 pytest
+hypothesis
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/snuggs-1.4.3/test_snuggs.py 
new/snuggs-1.4.7/test_snuggs.py
--- old/snuggs-1.4.3/test_snuggs.py     2019-02-25 18:15:49.000000000 +0100
+++ new/snuggs-1.4.7/test_snuggs.py     2019-09-18 20:54:25.000000000 +0200
@@ -1,19 +1,36 @@
 from collections import OrderedDict
 
+from hypothesis import given
+from hypothesis.strategies import floats, integers
 import numpy
 import pytest
 
 import snuggs
 
-# Fixtures follow the tests. See the end of the file.
+
[email protected]
+def ones():
+    return numpy.ones((2, 2))
+
+
[email protected]
+def truetrue():
+    return numpy.array([True, True])
+
+
[email protected]
+def truefalse():
+    return numpy.array([True, False])
 
 
-def test_integer():
-    assert list(snuggs.integer.parseString('1')) == [1]
+@given(integers())
+def test_integer_operand(num):
+    assert list(snuggs.operand.parseString(repr(num))) == [num]
 
 
-def test_real():
-    assert list(snuggs.real.parseString('1.1')) == [1.1]
+@given(floats(allow_infinity=False, allow_nan=False))
+def test_real_operand(num):
+    assert list(snuggs.operand.parseString(repr(num))) == [num]
 
 
 def test_int_expr():
@@ -179,9 +196,6 @@
         snuggs.eval("(+ 1 2")
     assert excinfo.value.lineno == 1
     assert excinfo.value.offset == 7
-    exception_options = ['expected a function or operator',
-                         'Expected {Forward: ... | Forward: ...}']
-    assert str(excinfo.value) in exception_options
 
 
 def test_missing_func():
@@ -197,9 +211,6 @@
         snuggs.eval("(# 1 2)")
     assert excinfo.value.lineno == 1
     assert excinfo.value.offset == 2
-    exception_options = ['expected a function or operator',
-                         'Expected {Forward: ... | Forward: ...}']
-    assert str(excinfo.value) in exception_options
 
 
 def test_undefined_var():
@@ -215,9 +226,6 @@
         snuggs.eval("((bogus * 2) 2)")
     assert excinfo.value.lineno == 1
     assert excinfo.value.offset == 3
-    exception_options = ['expected a function or operator',
-                         'Expected {Forward: ... | Forward: ...}']
-    assert str(excinfo.value) in exception_options
 
 
 def test_type_error():
@@ -225,17 +233,6 @@
         snuggs.eval("(+ 1 'bogus')")
 
 
-# Fixtures.
[email protected]
-def ones():
-    return numpy.ones((2, 2))
-
-
[email protected]
-def truetrue():
-    return numpy.array([True, True])
-
-
[email protected]
-def truefalse():
-    return numpy.array([True, False])
+def test_negative_decimal():
+    """Negative decimals parse correctly"""
+    assert snuggs.eval("(< -0.9 0)")


Reply via email to