Hello community,

here is the log from the commit of package python-pyrsistent for 
openSUSE:Factory checked in at 2020-03-08 22:21:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyrsistent (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyrsistent.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyrsistent"

Sun Mar  8 22:21:45 2020 rev:6 rq:780400 version:0.15.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyrsistent/python-pyrsistent.changes      
2019-07-30 13:06:57.086363533 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pyrsistent.new.26092/python-pyrsistent.changes
   2020-03-08 22:21:46.251989848 +0100
@@ -1,0 +2,10 @@
+Fri Feb 28 22:03:26 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 0.15.7:
+   * Fix #186, type errors with more recent versions of MyPy. Thanks @qhesz 
for this!
+   * Build and test on ARM during CI. Thanks @ossdev07 for this!
+   * Set absolute imports for python2 compatibility. Thanks @michalvi for this!
+   * Fix #182 moduleinit name clash.
+   * Fix #179 Fixed 'ignore_extra' factory parameter for pvector. Thanks @ss18 
for this!
+
+-------------------------------------------------------------------

Old:
----
  pyrsistent-0.15.4.tar.gz

New:
----
  pyrsistent-0.15.7.tar.gz

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

Other differences:
------------------
++++++ python-pyrsistent.spec ++++++
--- /var/tmp/diff_new_pack.VRDPEw/_old  2020-03-08 22:21:46.891990242 +0100
+++ /var/tmp/diff_new_pack.VRDPEw/_new  2020-03-08 22:21:46.891990242 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyrsistent
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pyrsistent
-Version:        0.15.4
+Version:        0.15.7
 Release:        0
 Summary:        Persistent, Functional, Immutable data structures
 License:        MIT

++++++ pyrsistent-0.15.4.tar.gz -> pyrsistent-0.15.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/CHANGES.txt 
new/pyrsistent-0.15.7/CHANGES.txt
--- old/pyrsistent-0.15.4/CHANGES.txt   2019-07-27 21:04:15.000000000 +0200
+++ new/pyrsistent-0.15.7/CHANGES.txt   2020-01-07 21:02:19.000000000 +0100
@@ -1,5 +1,17 @@
 Revision history
 ----------------
+0.15.7, 2020-01-07
+ * NOTE! This is the last version of Pyrsistent that officially supports 
Python 2.X!
+ * Fix #186, type errors with more recent versions of MyPy. Thanks @qhesz for 
this!
+ * Build and test on ARM during CI. Thanks @ossdev07 for this!
+ * Set absolute imports for python2 compatibility. Thanks @michalvi for this!
+
+0.15.6, 2019-11-23
+ * Fix #182 moduleinit name clash.
+
+0.15.5, 2019-10-27
+ * Fix #179 Fixed 'ignore_extra' factory parameter for pvector. Thanks @ss18 
for this!
+
 0.15.4, 2019-07-27
  * Fix #174, fix a GC traversal bug in pvector evolver C extension. Thanks 
@till-varoquaux for finding and fixing this!
  * Fix #175, pytest 5 compatibility, this is a quick fix, some more work is 
needed to get coverage working etc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/PKG-INFO 
new/pyrsistent-0.15.7/PKG-INFO
--- old/pyrsistent-0.15.4/PKG-INFO      2019-07-27 21:05:36.000000000 +0200
+++ new/pyrsistent-0.15.7/PKG-INFO      2020-01-07 21:02:38.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyrsistent
-Version: 0.15.4
+Version: 0.15.7
 Summary: Persistent/Functional/Immutable data structures
 Home-page: http://github.com/tobgu/pyrsistent/
 Author: Tobias Gustafsson
@@ -684,6 +684,12 @@
         
         Till Varoquaux  https://github.com/till-varoquaux
         
+        Michal Kowalik https://github.com/michalvi
+        
+        ossdev07 https://github.com/ossdev07
+        
+        Kerry Olesen https://github.com/qhesz
+        
         Contributing
         ------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/README new/pyrsistent-0.15.7/README
--- old/pyrsistent-0.15.4/README        2019-07-27 21:04:15.000000000 +0200
+++ new/pyrsistent-0.15.7/README        2020-01-07 20:54:03.000000000 +0100
@@ -676,6 +676,12 @@
 
 Till Varoquaux  https://github.com/till-varoquaux
 
+Michal Kowalik https://github.com/michalvi
+
+ossdev07 https://github.com/ossdev07
+
+Kerry Olesen https://github.com/qhesz
+
 Contributing
 ------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/README.rst 
new/pyrsistent-0.15.7/README.rst
--- old/pyrsistent-0.15.4/README.rst    2019-07-27 21:04:15.000000000 +0200
+++ new/pyrsistent-0.15.7/README.rst    2020-01-07 20:54:03.000000000 +0100
@@ -676,6 +676,12 @@
 
 Till Varoquaux  https://github.com/till-varoquaux
 
+Michal Kowalik https://github.com/michalvi
+
+ossdev07 https://github.com/ossdev07
+
+Kerry Olesen https://github.com/qhesz
+
 Contributing
 ------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/_pyrsistent_version.py 
new/pyrsistent-0.15.7/_pyrsistent_version.py
--- old/pyrsistent-0.15.4/_pyrsistent_version.py        2019-07-27 
21:04:15.000000000 +0200
+++ new/pyrsistent-0.15.7/_pyrsistent_version.py        2020-01-07 
20:56:59.000000000 +0100
@@ -1 +1 @@
-__version__ = '0.15.4'
+__version__ = '0.15.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pvectorcmodule.c 
new/pyrsistent-0.15.7/pvectorcmodule.c
--- old/pyrsistent-0.15.4/pvectorcmodule.c      2019-07-27 20:51:01.000000000 
+0200
+++ new/pyrsistent-0.15.7/pvectorcmodule.c      2019-11-23 08:44:55.000000000 
+0100
@@ -1591,7 +1591,7 @@
   };
 #endif
 
-PyObject* moduleinit(void) {
+static PyObject* pyrsistent_pvectorc_moduleinit(void) {
   PyObject* m;
   
   // Only allow creation/initialization through factory method pvec
@@ -1633,10 +1633,10 @@
 
 #if PY_MAJOR_VERSION >= 3
 PyMODINIT_FUNC PyInit_pvectorc(void) {
-  return moduleinit();
+  return pyrsistent_pvectorc_moduleinit();
 }
 #else
 PyMODINIT_FUNC initpvectorc(void) {
-  moduleinit();
+  pyrsistent_pvectorc_moduleinit();
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent/__init__.pyi 
new/pyrsistent-0.15.7/pyrsistent/__init__.pyi
--- old/pyrsistent-0.15.4/pyrsistent/__init__.pyi       2019-05-11 
06:41:48.000000000 +0200
+++ new/pyrsistent-0.15.7/pyrsistent/__init__.pyi       2020-01-07 
20:45:00.000000000 +0100
@@ -153,7 +153,6 @@
     # This is OK because T_PRecord is a concrete type
     def discard(self: T_PRecord, key: KT) -> T_PRecord: ...
     def remove(self: T_PRecord, key: KT) -> T_PRecord: ...
-    def set(self: T_PRecord, key: KT, val: VT) -> T_PRecord: ...
 
     def serialize(self, format: Optional[Any] = ...) -> MutableMapping: ...
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent/_checked_types.py 
new/pyrsistent-0.15.7/pyrsistent/_checked_types.py
--- old/pyrsistent-0.15.4/pyrsistent/_checked_types.py  2019-07-02 
21:31:43.000000000 +0200
+++ new/pyrsistent-0.15.7/pyrsistent/_checked_types.py  2019-10-27 
21:31:27.000000000 +0100
@@ -253,7 +253,7 @@
     return tuple(typs) + (type(None),)
 
 
-def _checked_type_create(cls, source_data, _factory_fields=None):
+def _checked_type_create(cls, source_data, _factory_fields=None, 
ignore_extra=False):
     if isinstance(source_data, cls):
         return source_data
 
@@ -262,7 +262,7 @@
     types = get_types(cls._checked_types)
     checked_type = next((t for t in types if issubclass(t, CheckedType)), None)
     if checked_type:
-        return cls([checked_type.create(data)
+        return cls([checked_type.create(data, ignore_extra=ignore_extra)
                     if not any(isinstance(data, t) for t in types) else data
                     for data in source_data])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent/_field_common.py 
new/pyrsistent-0.15.7/pyrsistent/_field_common.py
--- old/pyrsistent-0.15.4/pyrsistent/_field_common.py   2019-05-12 
14:07:03.000000000 +0200
+++ new/pyrsistent-0.15.7/pyrsistent/_field_common.py   2019-10-27 
21:31:27.000000000 +0100
@@ -1,4 +1,5 @@
 import six
+import sys
 
 from pyrsistent._checked_types import (
     CheckedPMap,
@@ -15,6 +16,8 @@
 from pyrsistent._checked_types import wrap_invariant
 import inspect
 
+PY2 = sys.version_info[0] < 3
+
 
 def set_fields(dct, bases, name):
     dct[name] = dict(sum([list(b.__dict__.get(name, {}).items()) for b in 
bases], []))
@@ -47,6 +50,8 @@
 
 
 def is_type_cls(type_cls, field_type):
+    if type(field_type) is set:
+        return True
     types = tuple(field_type)
     if len(types) == 0:
         return False
@@ -61,7 +66,11 @@
     if not is_type_cls(type_cls, field.type):
         return False
 
-    return 'ignore_extra' in inspect.getargspec(field.factory).args
+    if PY2:
+        return 'ignore_extra' in inspect.getargspec(field.factory).args
+    else:
+        return 'ignore_extra' in inspect.signature(field.factory).parameters
+
 
 
 class _PField(object):
@@ -90,7 +99,7 @@
 PFIELD_NO_FACTORY = lambda x: x
 PFIELD_NO_INITIAL = object()
 PFIELD_NO_SERIALIZER = lambda _, value: value
-PFIELD_NO_SERIALIZER = lambda _, value: value
+
 
 def field(type=PFIELD_NO_TYPE, invariant=PFIELD_NO_INVARIANT, 
initial=PFIELD_NO_INITIAL,
           mandatory=False, factory=PFIELD_NO_FACTORY, 
serializer=PFIELD_NO_SERIALIZER):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent/typing.py 
new/pyrsistent-0.15.7/pyrsistent/typing.py
--- old/pyrsistent-0.15.4/pyrsistent/typing.py  2019-04-25 21:49:19.000000000 
+0200
+++ new/pyrsistent-0.15.7/pyrsistent/typing.py  2020-01-07 20:45:00.000000000 
+0100
@@ -11,6 +11,7 @@
     myvector: PVector[str] = pvector(['a', 'b', 'c'])
 
 """
+from __future__ import absolute_import
 
 try:
     from typing import Container
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent/typing.pyi 
new/pyrsistent-0.15.7/pyrsistent/typing.pyi
--- old/pyrsistent-0.15.4/pyrsistent/typing.pyi 2019-07-04 22:22:31.000000000 
+0200
+++ new/pyrsistent-0.15.7/pyrsistent/typing.pyi 2020-01-07 20:45:00.000000000 
+0100
@@ -221,7 +221,7 @@
 class CheckedPMap(PMap[KT, VT]):
     __key_type__: Type[KT]
     __value_type__: Type[VT]
-    def __new__(cls, source: Mapping[KT, VT] = ..., size: int = ...) -> None: 
...
+    def __new__(cls, source: Mapping[KT, VT] = ..., size: int = ...) -> 
CheckedPMap: ...
     @classmethod
     def create(cls, source_data: Mapping[KT, VT], _factory_fields: Any = ...) 
-> CheckedPMap[KT, VT]: ...
     def serialize(self, format: Optional[Any] = ...) -> Dict[KT, VT]: ...
@@ -229,7 +229,7 @@
 
 class CheckedPVector(PVector[T]):
     __type__: Type[T]
-    def __new__(self, initial: Iterable[T] = ...) -> None: ...
+    def __new__(self, initial: Iterable[T] = ...) -> CheckedPVector: ...
     @classmethod
     def create(cls, source_data: Iterable[T], _factory_fields: Any = ...) -> 
CheckedPVector[T]: ...
     def serialize(self, format: Optional[Any] = ...) -> List[T]: ...
@@ -237,7 +237,7 @@
 
 class CheckedPSet(PSet[T]):
     __type__: Type[T]
-    def __new__(cls, initial: Iterable[T] = ...) -> None: ...
+    def __new__(cls, initial: Iterable[T] = ...) -> CheckedPSet: ...
     @classmethod
     def create(cls, source_data: Iterable[T], _factory_fields: Any = ...) -> 
CheckedPSet[T]: ...
     def serialize(self, format: Optional[Any] = ...) -> Set[T]: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/pyrsistent.egg-info/PKG-INFO 
new/pyrsistent-0.15.7/pyrsistent.egg-info/PKG-INFO
--- old/pyrsistent-0.15.4/pyrsistent.egg-info/PKG-INFO  2019-07-27 
21:05:36.000000000 +0200
+++ new/pyrsistent-0.15.7/pyrsistent.egg-info/PKG-INFO  2020-01-07 
21:02:38.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyrsistent
-Version: 0.15.4
+Version: 0.15.7
 Summary: Persistent/Functional/Immutable data structures
 Home-page: http://github.com/tobgu/pyrsistent/
 Author: Tobias Gustafsson
@@ -684,6 +684,12 @@
         
         Till Varoquaux  https://github.com/till-varoquaux
         
+        Michal Kowalik https://github.com/michalvi
+        
+        ossdev07 https://github.com/ossdev07
+        
+        Kerry Olesen https://github.com/qhesz
+        
         Contributing
         ------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyrsistent-0.15.4/tests/record_test.py 
new/pyrsistent-0.15.7/tests/record_test.py
--- old/pyrsistent-0.15.4/tests/record_test.py  2019-05-12 14:07:03.000000000 
+0200
+++ new/pyrsistent-0.15.7/tests/record_test.py  2019-10-27 21:31:27.000000000 
+0100
@@ -17,6 +17,7 @@
 class Hierarchy(PRecord):
     point1 = field(ARecord)
     point2 = field(ARecord)
+    points = pvector_field(ARecord)
 
 
 class RecordContainingContainers(PRecord):
@@ -44,6 +45,19 @@
     )
     assert h
 
+
+def test_create_ignore_extra_true_sequence_hierarchy():
+    h = Hierarchy.create(
+        {'point1': {'x': 1, 'y': 'foo', 'extra_field_0': 'extra_data_0'},
+         'point2': {'x': 1, 'y': 'foo', 'extra_field_1': 'extra_data_1'},
+         'points': [{'x': 1, 'y': 'foo', 'extra_field_2': 'extra_data_2'},
+                    {'x': 1, 'y': 'foo', 'extra_field_3': 'extra_data_3'}],
+         'extra_field____': 'extra_data_2',
+         }, ignore_extra=True
+    )
+    assert h
+
+
 def test_create():
     r = ARecord(x=1, y='foo')
     assert r.x == 1


Reply via email to