Hello community,

here is the log from the commit of package python-PyTrie for openSUSE:Factory 
checked in at 2020-11-11 20:47:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyTrie (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyTrie.new.26437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyTrie"

Wed Nov 11 20:47:04 2020 rev:4 rq:847639 version:0.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyTrie/python-PyTrie.changes      
2019-12-04 14:20:18.654434637 +0100
+++ /work/SRC/openSUSE:Factory/.python-PyTrie.new.26437/python-PyTrie.changes   
2020-11-11 20:47:08.675689392 +0100
@@ -1,0 +2,11 @@
+Wed Nov 11 01:51:53 UTC 2020 - Steve Kowalik <[email protected]>
+
+- Update to 0.4.0:
+  * Drop Python 2.7 support
+- LICENSE now included in the tarball, drop the separate Source. 
+- Drop fix-sorting-py2.patch, Python 2 not supported
+- Drop no-import-from-collections.patch, included upstream
+- No longer BuildRequire python-devel, and switch to the macro for
+  testsuite
+
+-------------------------------------------------------------------

Old:
----
  LICENSE
  PyTrie-0.3.1.tar.gz
  fix-sorting-py2.patch
  no-import-from-collections.patch

New:
----
  PyTrie-0.4.0.tar.gz

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

Other differences:
------------------
++++++ python-PyTrie.spec ++++++
--- /var/tmp/diff_new_pack.HdSfgN/_old  2020-11-11 20:47:09.339690016 +0100
+++ /var/tmp/diff_new_pack.HdSfgN/_new  2020-11-11 20:47:09.343690019 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-PyTrie
 #
-# Copyright (c) 2019 SUSE LLC
+# 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
@@ -17,26 +17,19 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-PyTrie
-Version:        0.3.1
+Version:        0.4.0
 Release:        0
 Summary:        A pure Python implementation of the trie data structure
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 URL:            https://github.com/gsakkis/pytrie/
 Source:         
https://files.pythonhosted.org/packages/source/P/PyTrie/PyTrie-%{version}.tar.gz
-Source1:        https://raw.githubusercontent.com/gsakkis/pytrie/master/LICENSE
-Patch0:         fix-sorting-py2.patch
-# PATCH-FIX-UPSTREAM no-import-from-collections.patch gh#gsakkis/pytrie#5 
[email protected]
-# Don't import directly from collections.
-Patch1:         no-import-from-collections.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module sortedcontainers}
+BuildRequires:  %{python_module testsuite}
 BuildRequires:  fdupes
-# needs tests, on py2 they are in devel
-BuildRequires:  python-devel
 BuildRequires:  python-rpm-macros
-BuildRequires:  python3-testsuite
 Requires:       python-sortedcontainers
 Provides:       python-pytrie
 Obsoletes:      python-pytrie
@@ -44,7 +37,7 @@
 %python_subpackages
 
 %description
-pytrie is a pure Python (2 and 3) implementation of the trie data structure.
+pytrie is a pure Python 3 implementation of the trie data structure.
 
 A trie is an ordered tree data structure that is used to store a mapping
 where the keys are sequences, usually strings over an alphabet. In addition to
@@ -53,7 +46,6 @@
 
 %prep
 %setup -q -n PyTrie-%{version}
-cp %{SOURCE1} .
 %autopatch -p1
 
 %build

++++++ PyTrie-0.3.1.tar.gz -> PyTrie-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/LICENSE new/PyTrie-0.4.0/LICENSE
--- old/PyTrie-0.3.1/LICENSE    1970-01-01 01:00:00.000000000 +0100
+++ new/PyTrie-0.4.0/LICENSE    2020-10-21 17:04:01.000000000 +0200
@@ -0,0 +1,21 @@
+Copyright (c) 2009, George Sakkis
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
notice, this list of conditions and the following disclaimer in the 
documentation and/or other materials provided with the distribution.
+    * The names of its contributors may not be used to endorse or promote 
products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/MANIFEST.in new/PyTrie-0.4.0/MANIFEST.in
--- old/PyTrie-0.3.1/MANIFEST.in        2018-07-28 19:04:39.000000000 +0200
+++ new/PyTrie-0.4.0/MANIFEST.in        2020-10-21 17:04:01.000000000 +0200
@@ -1,3 +1,4 @@
+include LICENSE
 include tests/*.py
 include README.md
 recursive-include docs *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/PKG-INFO new/PyTrie-0.4.0/PKG-INFO
--- old/PyTrie-0.3.1/PKG-INFO   2018-07-28 19:13:52.000000000 +0200
+++ new/PyTrie-0.4.0/PKG-INFO   2020-10-21 17:29:23.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyTrie
-Version: 0.3.1
+Version: 0.4.0
 Summary: A pure Python implementation of the trie data structure.
 Home-page: https://github.com/gsakkis/pytrie/
 Author: George Sakkis
@@ -8,14 +8,14 @@
 License: UNKNOWN
 Description: # pytrie
         
-        `pytrie` is a a pure Python (2 and 3) implementation of the trie data 
structure.
+        `pytrie` is a a pure Python 3 implementation of the trie data 
structure.
         
         A _trie_ is an ordered tree data structure that is used to store a 
mapping
         where the keys are sequences, usually strings over an alphabet. In 
addition to
         implementing the mapping interface, tries allow finding the items for 
a given
         prefix, and vice versa, finding the items whose keys are prefixes of a 
given key.
         
-        `pytrie` runs on Python 2.7 and 3.x without modification. To install 
run:
+        To install run:
         
             pip install pytrie
         
@@ -23,6 +23,10 @@
         
         ## Changelog
         
+        ### 0.4.0
+        
+        * Drop Python 2 support
+        
         ### 0.3.1
         
         * Fixed iteritems/itervalues for SortedDicts in Python 2.7.
@@ -48,6 +52,5 @@
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 3
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/PyTrie.egg-info/PKG-INFO 
new/PyTrie-0.4.0/PyTrie.egg-info/PKG-INFO
--- old/PyTrie-0.3.1/PyTrie.egg-info/PKG-INFO   2018-07-28 19:13:52.000000000 
+0200
+++ new/PyTrie-0.4.0/PyTrie.egg-info/PKG-INFO   2020-10-21 17:29:23.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyTrie
-Version: 0.3.1
+Version: 0.4.0
 Summary: A pure Python implementation of the trie data structure.
 Home-page: https://github.com/gsakkis/pytrie/
 Author: George Sakkis
@@ -8,14 +8,14 @@
 License: UNKNOWN
 Description: # pytrie
         
-        `pytrie` is a a pure Python (2 and 3) implementation of the trie data 
structure.
+        `pytrie` is a a pure Python 3 implementation of the trie data 
structure.
         
         A _trie_ is an ordered tree data structure that is used to store a 
mapping
         where the keys are sequences, usually strings over an alphabet. In 
addition to
         implementing the mapping interface, tries allow finding the items for 
a given
         prefix, and vice versa, finding the items whose keys are prefixes of a 
given key.
         
-        `pytrie` runs on Python 2.7 and 3.x without modification. To install 
run:
+        To install run:
         
             pip install pytrie
         
@@ -23,6 +23,10 @@
         
         ## Changelog
         
+        ### 0.4.0
+        
+        * Drop Python 2 support
+        
         ### 0.3.1
         
         * Fixed iteritems/itervalues for SortedDicts in Python 2.7.
@@ -48,6 +52,5 @@
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 3
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/PyTrie.egg-info/SOURCES.txt 
new/PyTrie-0.4.0/PyTrie.egg-info/SOURCES.txt
--- old/PyTrie-0.3.1/PyTrie.egg-info/SOURCES.txt        2018-07-28 
19:13:52.000000000 +0200
+++ new/PyTrie-0.4.0/PyTrie.egg-info/SOURCES.txt        2020-10-21 
17:29:23.000000000 +0200
@@ -1,3 +1,4 @@
+LICENSE
 MANIFEST.in
 README.md
 pytrie.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/README.md new/PyTrie-0.4.0/README.md
--- old/PyTrie-0.3.1/README.md  2018-07-28 19:06:17.000000000 +0200
+++ new/PyTrie-0.4.0/README.md  2020-10-21 17:28:19.000000000 +0200
@@ -1,13 +1,13 @@
 # pytrie
 
-`pytrie` is a a pure Python (2 and 3) implementation of the trie data 
structure.
+`pytrie` is a a pure Python 3 implementation of the trie data structure.
 
 A _trie_ is an ordered tree data structure that is used to store a mapping
 where the keys are sequences, usually strings over an alphabet. In addition to
 implementing the mapping interface, tries allow finding the items for a given
 prefix, and vice versa, finding the items whose keys are prefixes of a given 
key.
 
-`pytrie` runs on Python 2.7 and 3.x without modification. To install run:
+To install run:
 
     pip install pytrie
 
@@ -15,6 +15,10 @@
 
 ## Changelog
 
+### 0.4.0
+
+* Drop Python 2 support
+
 ### 0.3.1
 
 * Fixed iteritems/itervalues for SortedDicts in Python 2.7.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/pytrie.py new/PyTrie-0.4.0/pytrie.py
--- old/PyTrie-0.3.1/pytrie.py  2018-07-28 19:04:39.000000000 +0200
+++ new/PyTrie-0.4.0/pytrie.py  2020-10-21 17:09:26.000000000 +0200
@@ -45,31 +45,10 @@
 
 import sys
 from copy import copy
-from collections import MutableMapping
+from collections.abc import MutableMapping
 
 import sortedcontainers
 
-# Python 3 interoperability
-PY3 = sys.version_info[0] == 3
-if PY3:
-    def itervalues(d):  # pylint: disable=invalid-name
-        return d.values()
-
-    def iteritems(d):  # pylint: disable=invalid-name
-        return d.items()
-else:
-    def itervalues(d):  # pylint: disable=invalid-name
-        if hasattr(d, 'itervalues'):
-            return d.itervalues()
-
-        return d.values()
-
-    def iteritems(d):  # pylint: disable=invalid-name
-        if hasattr(d, 'iteritems'):
-            return d.iteritems()
-
-        return d.items()
-
 
 # Singleton sentinel - works with pickling
 class NULL(object):
@@ -99,17 +78,17 @@
     def numkeys(self):
         """Return the number of keys in the subtree rooted at this node."""
         return (int(self.value is not NULL) +
-                sum(child.numkeys() for child in itervalues(self.children)))
+                sum(child.numkeys() for child in self.children.values()))
 
     def __repr__(self):
         return '(%s, {%s})' % (
             self.value is NULL and 'NULL' or repr(self.value),
-            ', '.join('%r: %r' % t for t in iteritems(self.children)))
+            ', '.join('%r: %r' % t for t in self.children.items()))
 
     def __copy__(self):
         clone = self.__class__(self.value)
         clone_children = clone.children
-        for key, child in iteritems(self.children):
+        for key, child in self.children.items():
             clone_children[key] = child.__copy__()
         return clone
 
@@ -318,7 +297,7 @@
         def generator(node, null=NULL):
             if node.value is not null:
                 yield node.value
-            for child in itervalues(node.children):
+            for child in node.children.values():
                 for subresult in generator(child):
                     yield subresult
         if prefix is None:
@@ -343,7 +322,7 @@
                       append=append, null=NULL):
             if node.value is not null:
                 yield (key_factory(parts), node.value)
-            for part, child in iteritems(node.children):
+            for part, child in node.children.items():
                 append(part)
                 for subresult in generator(child):
                     yield subresult
@@ -367,13 +346,9 @@
     def __len__(self):
         return self._root.numkeys()
 
-    def __nonzero__(self):
+    def __bool__(self):
         return self._root.value is not NULL or bool(self._root.children)
 
-    if PY3:
-        __bool__ = __nonzero__
-        del __nonzero__
-
     def __iter__(self):
         return self.iterkeys()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyTrie-0.3.1/setup.py new/PyTrie-0.4.0/setup.py
--- old/PyTrie-0.3.1/setup.py   2018-07-28 19:06:23.000000000 +0200
+++ new/PyTrie-0.4.0/setup.py   2020-10-21 17:22:50.000000000 +0200
@@ -4,7 +4,7 @@
 
 setup(
     name='PyTrie',
-    version='0.3.1',
+    version='0.4.0',
     author='George Sakkis',
     author_email='[email protected]',
     url='https://github.com/gsakkis/pytrie/',
@@ -15,7 +15,6 @@
         'Intended Audience :: Developers',
         'License :: OSI Approved :: BSD License',
         'Operating System :: OS Independent',
-        'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 3',
         'Topic :: Software Development :: Libraries :: Python Modules',
     ],
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to