Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ordered-set for openSUSE:Factory checked in at 2021-09-09 23:07:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ordered-set (Old) and /work/SRC/openSUSE:Factory/.python-ordered-set.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ordered-set" Thu Sep 9 23:07:16 2021 rev:8 rq:917205 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ordered-set/python-ordered-set.changes 2021-07-10 22:53:44.848108178 +0200 +++ /work/SRC/openSUSE:Factory/.python-ordered-set.new.1899/python-ordered-set.changes 2021-09-09 23:07:18.140814116 +0200 @@ -1,0 +2,15 @@ +Mon Sep 6 13:54:50 UTC 2021 - Martin Hauke <[email protected]> + +- Update to version 4.0.2 + * Restore compatibility with Python 3.5 + * fix packaging, remove vestiges of type stubs + * Remove unused type + * Add a mailmap + * remove old .pyi type stub + * Implement code review suggestions for types + * Code formatting (isort and black) + * Move type annotations inline + * Directly distribute type stub file via PEP 561 + * Handle another indexing case from NumPy + +------------------------------------------------------------------- Old: ---- ordered-set-3.1.1.tar.gz New: ---- ordered-set-4.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ordered-set.spec ++++++ --- /var/tmp/diff_new_pack.5RAVH8/_old 2021-09-09 23:07:18.796814878 +0200 +++ /var/tmp/diff_new_pack.5RAVH8/_new 2021-09-09 23:07:18.800814882 +0200 @@ -31,7 +31,7 @@ %bcond_with test %endif Name: python-%{modname}%{psuffix} -Version: 3.1.1 +Version: 4.0.2 Release: 0 Summary: Custom MutableSet that remembers its order License: MIT ++++++ ordered-set-3.1.1.tar.gz -> ordered-set-4.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/MANIFEST.in new/ordered-set-4.0.2/MANIFEST.in --- old/ordered-set-3.1.1/MANIFEST.in 2018-10-01 23:26:15.000000000 +0200 +++ new/ordered-set-4.0.2/MANIFEST.in 2020-01-13 20:26:33.000000000 +0100 @@ -1,2 +1,3 @@ include MIT-LICENSE include test.py +include pytest.ini diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/PKG-INFO new/ordered-set-4.0.2/PKG-INFO --- old/ordered-set-3.1.1/PKG-INFO 2019-04-25 21:07:28.000000000 +0200 +++ new/ordered-set-4.0.2/PKG-INFO 2020-06-17 22:49:57.000000000 +0200 @@ -1,7 +1,7 @@ Metadata-Version: 2.1 Name: ordered-set -Version: 3.1.1 -Summary: A MutableSet that remembers its order, so that every entry has an index. +Version: 4.0.2 +Summary: A set that remembers its order, and allows looking up its items by their index in that order. Home-page: https://github.com/LuminosoInsight/ordered-set Maintainer: Robyn Speer Maintainer-email: [email protected] @@ -14,7 +14,6 @@ It remembers the order of its entries, and every entry has an index number that can be looked up. - ## Usage examples An OrderedSet is created and used like a set: @@ -77,8 +76,13 @@ and implements the abstract base classes `collections.MutableSet` and `collections.Sequence`. + OrderedSet can be used as a generic collection type, similar to the collections + in the `typing` module like List, Dict, and Set. For example, you can annotate + a variable as having the type `OrderedSet[str]` or `OrderedSet[Tuple[int, + str]]`. + - ## Interoperability with NumPy and Pandas + ## OrderedSet in data science applications An OrderedSet can be used as a bi-directional mapping between a sparse vocabulary and dense index numbers. As of version 3.1, it accepts NumPy arrays @@ -94,17 +98,11 @@ in OrderedSet). - ## Type hinting - To use type hinting features install `ordered-set-stubs` package from - [PyPI](https://pypi.org/project/ordered-set-stubs/): - - $ pip install ordered-set-stubs - - ## Authors OrderedSet was implemented by Robyn Speer. Jon Crall contributed changes and - tests to make it fit the Python set API. + tests to make it fit the Python set API. Roman Inflianskas added the original + type annotations. ## Comparisons @@ -130,25 +128,16 @@ would have to convert it to a list in O(N) to look up the index of an entry or look up an entry by its index. - - ## Compatibility - - OrderedSet is automatically tested on Python 2.7, 3.4, 3.5, 3.6, and 3.7. - We've checked more informally that it works on PyPy and PyPy3. - Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy -Requires-Python: >=2.7 +Requires-Python: >=3.5 Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/README.md new/ordered-set-4.0.2/README.md --- old/ordered-set-3.1.1/README.md 2018-12-20 20:44:37.000000000 +0100 +++ new/ordered-set-4.0.2/README.md 2020-02-13 18:15:42.000000000 +0100 @@ -6,7 +6,6 @@ It remembers the order of its entries, and every entry has an index number that can be looked up. - ## Usage examples An OrderedSet is created and used like a set: @@ -69,8 +68,13 @@ and implements the abstract base classes `collections.MutableSet` and `collections.Sequence`. +OrderedSet can be used as a generic collection type, similar to the collections +in the `typing` module like List, Dict, and Set. For example, you can annotate +a variable as having the type `OrderedSet[str]` or `OrderedSet[Tuple[int, +str]]`. + -## Interoperability with NumPy and Pandas +## OrderedSet in data science applications An OrderedSet can be used as a bi-directional mapping between a sparse vocabulary and dense index numbers. As of version 3.1, it accepts NumPy arrays @@ -86,17 +90,11 @@ in OrderedSet). -## Type hinting -To use type hinting features install `ordered-set-stubs` package from -[PyPI](https://pypi.org/project/ordered-set-stubs/): - - $ pip install ordered-set-stubs - - ## Authors OrderedSet was implemented by Robyn Speer. Jon Crall contributed changes and -tests to make it fit the Python set API. +tests to make it fit the Python set API. Roman Inflianskas added the original +type annotations. ## Comparisons @@ -121,9 +119,3 @@ does not provide the list-like random access features of OrderedSet. You would have to convert it to a list in O(N) to look up the index of an entry or look up an entry by its index. - - -## Compatibility - -OrderedSet is automatically tested on Python 2.7, 3.4, 3.5, 3.6, and 3.7. -We've checked more informally that it works on PyPy and PyPy3. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/ordered_set.egg-info/PKG-INFO new/ordered-set-4.0.2/ordered_set.egg-info/PKG-INFO --- old/ordered-set-3.1.1/ordered_set.egg-info/PKG-INFO 2019-04-25 21:07:27.000000000 +0200 +++ new/ordered-set-4.0.2/ordered_set.egg-info/PKG-INFO 2020-06-17 22:49:56.000000000 +0200 @@ -1,7 +1,7 @@ Metadata-Version: 2.1 Name: ordered-set -Version: 3.1.1 -Summary: A MutableSet that remembers its order, so that every entry has an index. +Version: 4.0.2 +Summary: A set that remembers its order, and allows looking up its items by their index in that order. Home-page: https://github.com/LuminosoInsight/ordered-set Maintainer: Robyn Speer Maintainer-email: [email protected] @@ -14,7 +14,6 @@ It remembers the order of its entries, and every entry has an index number that can be looked up. - ## Usage examples An OrderedSet is created and used like a set: @@ -77,8 +76,13 @@ and implements the abstract base classes `collections.MutableSet` and `collections.Sequence`. + OrderedSet can be used as a generic collection type, similar to the collections + in the `typing` module like List, Dict, and Set. For example, you can annotate + a variable as having the type `OrderedSet[str]` or `OrderedSet[Tuple[int, + str]]`. + - ## Interoperability with NumPy and Pandas + ## OrderedSet in data science applications An OrderedSet can be used as a bi-directional mapping between a sparse vocabulary and dense index numbers. As of version 3.1, it accepts NumPy arrays @@ -94,17 +98,11 @@ in OrderedSet). - ## Type hinting - To use type hinting features install `ordered-set-stubs` package from - [PyPI](https://pypi.org/project/ordered-set-stubs/): - - $ pip install ordered-set-stubs - - ## Authors OrderedSet was implemented by Robyn Speer. Jon Crall contributed changes and - tests to make it fit the Python set API. + tests to make it fit the Python set API. Roman Inflianskas added the original + type annotations. ## Comparisons @@ -130,25 +128,16 @@ would have to convert it to a list in O(N) to look up the index of an entry or look up an entry by its index. - - ## Compatibility - - OrderedSet is automatically tested on Python 2.7, 3.4, 3.5, 3.6, and 3.7. - We've checked more informally that it works on PyPy and PyPy3. - Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy -Requires-Python: >=2.7 +Requires-Python: >=3.5 Description-Content-Type: text/markdown diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/ordered_set.egg-info/SOURCES.txt new/ordered-set-4.0.2/ordered_set.egg-info/SOURCES.txt --- old/ordered-set-3.1.1/ordered_set.egg-info/SOURCES.txt 2019-04-25 21:07:28.000000000 +0200 +++ new/ordered-set-4.0.2/ordered_set.egg-info/SOURCES.txt 2020-06-17 22:49:56.000000000 +0200 @@ -2,7 +2,7 @@ MIT-LICENSE README.md ordered_set.py -ordered_set.pyi +pytest.ini setup.cfg setup.py test.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/ordered_set.py new/ordered-set-4.0.2/ordered_set.py --- old/ordered-set-3.1.1/ordered_set.py 2019-04-25 21:07:12.000000000 +0200 +++ new/ordered-set-4.0.2/ordered_set.py 2020-06-17 22:49:25.000000000 +0200 @@ -1,45 +1,58 @@ """ An OrderedSet is a custom MutableSet that remembers its order, so that every -entry has an index that can be looked up. +entry has an index that can be looked up. It can also act like a Sequence. Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger, and released under the MIT license. """ import itertools as it -from collections import deque - -try: - # Python 3 - from collections.abc import MutableSet, Sequence -except ImportError: - # Python 2.7 - from collections import MutableSet, Sequence +from typing import ( + Any, + Dict, + Iterable, + Iterator, + List, + MutableSet, + Optional, + Sequence, + Set, + TypeVar, + Union, + overload, +) SLICE_ALL = slice(None) -__version__ = "3.1" +__version__ = "4.0.2" + + +T = TypeVar("T") + +# When Python 3.6 is the minimum version, we can define a type like this, +# parameterizing the types that an OrderedSet can interoperate with: +# +# SetLike = Union[Sequence[T], Set[T]] -def is_iterable(obj): +def _is_atomic(obj: Any) -> bool: """ - Are we being asked to look up a list of things, instead of a single thing? - We check for the `__iter__` attribute so that this can cover types that - don't have to be known by this module, such as NumPy arrays. - - Strings, however, should be considered as atomic values to look up, not - iterables. The same goes for tuples, since they are immutable and therefore - valid entries. + Returns True for objects which are iterable but should not be iterated in + the context of indexing an OrderedSet. - We don't need to check for the Python 2 `unicode` type, because it doesn't - have an `__iter__` attribute anyway. + When we index by an iterable, usually that means we're being asked to look + up a list of things. + + However, in the case of the .index() method, we shouldn't handle strings + and tuples like other iterables. They're not sequences of things to look + up, they're the single, atomic thing we're trying to find. + + As an example, oset.index('hello') should give the index of 'hello' in an + OrderedSet of strings. It shouldn't give the indexes of each individual + character. """ - return ( - hasattr(obj, "__iter__") - and not isinstance(obj, str) - and not isinstance(obj, tuple) - ) + return isinstance(obj, str) or isinstance(obj, tuple) -class OrderedSet(MutableSet, Sequence): +class OrderedSet(MutableSet[T], Sequence[T]): """ An OrderedSet is a custom MutableSet that remembers its order, so that every entry has an index that can be looked up. @@ -49,9 +62,9 @@ OrderedSet([1, 2, 3]) """ - def __init__(self, iterable=None): - self.items = [] - self.map = {} + def __init__(self, iterable: Optional[Iterable[T]] = None): + self.items = [] # type: List[T] + self.map = {} # type: Dict[T, int] if iterable is not None: self |= iterable @@ -67,7 +80,15 @@ """ return len(self.items) - def __getitem__(self, index): + @overload + def __getitem__(self, index: Sequence[int]) -> List[T]: + ... + + @overload + def __getitem__(self, index: slice) -> "OrderedSet[T]": + ... + + def __getitem__(self, index: int) -> T: """ Get the item at a given index. @@ -87,9 +108,9 @@ """ if isinstance(index, slice) and index == SLICE_ALL: return self.copy() - elif is_iterable(index): + elif isinstance(index, Iterable): return [self.items[i] for i in index] - elif hasattr(index, "__index__") or isinstance(index, slice): + elif isinstance(index, slice) or hasattr(index, "__index__"): result = self.items[index] if isinstance(result, list): return self.__class__(result) @@ -98,7 +119,7 @@ else: raise TypeError("Don't know how to index an OrderedSet by %r" % index) - def copy(self): + def copy(self) -> "OrderedSet[T]": """ Return a shallow copy of this object. @@ -112,9 +133,12 @@ """ return self.__class__(self) + # Define the gritty details of how an OrderedSet is serialized as a pickle. + # We leave off type annotations, because the only code that should interact + # with these is a generalized tool such as pickle. def __getstate__(self): if len(self) == 0: - # The state can't be an empty list. + # In pickle, the state can't be an empty list. # We need to return a truthy value, or else __setstate__ won't be run. # # This could have been done more gracefully by always putting the state @@ -130,9 +154,9 @@ else: self.__init__(state) - def __contains__(self, key): + def __contains__(self, key: Any) -> bool: """ - Test if the item is in this ordered set + Test if the item is in this ordered set. Example: >>> 1 in OrderedSet([1, 3, 2]) @@ -142,7 +166,7 @@ """ return key in self.map - def add(self, key): + def add(self, key: T) -> int: """ Add `key` as an item to this OrderedSet, then return its index. @@ -163,7 +187,7 @@ append = add - def update(self, sequence): + def update(self, sequence: Union[Sequence[T], Set[T]]) -> int: """ Update the set with the given iterable sequence, then return the index of the last element inserted. @@ -175,7 +199,7 @@ >>> print(oset) OrderedSet([1, 2, 3, 5, 4]) """ - item_index = None + item_index = 0 try: for item in sequence: item_index = self.add(item) @@ -185,7 +209,11 @@ ) return item_index - def index(self, key): + @overload + def index(self, key: T) -> int: + ... + + def index(self, key: Sequence[T]) -> List[int]: """ Get the index of a given entry, raising an IndexError if it's not present. @@ -198,7 +226,7 @@ >>> oset.index(2) 1 """ - if is_iterable(key): + if isinstance(key, Iterable) and not _is_atomic(key): return [self.index(subkey) for subkey in key] return self.map[key] @@ -206,7 +234,7 @@ get_loc = index get_indexer = index - def pop(self): + def pop(self) -> T: """ Remove and return the last element from the set. @@ -225,7 +253,7 @@ del self.map[elem] return elem - def discard(self, key): + def discard(self, key: T) -> None: """ Remove an element. Do not raise an exception if absent. @@ -249,14 +277,14 @@ if v >= i: self.map[k] = v - 1 - def clear(self): + def clear(self) -> None: """ Remove all items from this OrderedSet. """ del self.items[:] self.map.clear() - def __iter__(self): + def __iter__(self) -> Iterator[T]: """ Example: >>> list(iter(OrderedSet([1, 2, 3]))) @@ -264,7 +292,7 @@ """ return iter(self.items) - def __reversed__(self): + def __reversed__(self) -> Iterator[T]: """ Example: >>> list(reversed(OrderedSet([1, 2, 3]))) @@ -272,12 +300,12 @@ """ return reversed(self.items) - def __repr__(self): + def __repr__(self) -> str: if not self: return "%s()" % (self.__class__.__name__,) return "%s(%r)" % (self.__class__.__name__, list(self)) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """ Returns true if the containers have the same items. If `other` is a Sequence, then order is checked, otherwise it is ignored. @@ -293,9 +321,7 @@ >>> oset == OrderedSet([3, 2, 1]) False """ - # In Python 2 deque is not a Sequence, so treat it as one for - # consistent behavior with Python 3. - if isinstance(other, (Sequence, deque)): + if isinstance(other, Sequence): # Check that this OrderedSet contains the same elements, in the # same order, as the other object. return list(self) == list(other) @@ -307,7 +333,7 @@ else: return set(self) == other_as_set - def union(self, *sets): + def union(self, *sets: Union[Sequence[T], Set[T]]) -> "OrderedSet[T]": """ Combines all unique items. Each items order is defined by its first appearance. @@ -326,11 +352,11 @@ items = it.chain.from_iterable(containers) return cls(items) - def __and__(self, other): + def __and__(self, other: Union[Sequence[T], Set[T]]) -> "OrderedSet[T]": # the parent implementation of this is backwards return self.intersection(other) - def intersection(self, *sets): + def intersection(self, *sets: Union[Sequence[T], Set[T]]) -> "OrderedSet[T]": """ Returns elements in common between all sets. Order is defined only by the first set. @@ -352,7 +378,7 @@ items = self return cls(items) - def difference(self, *sets): + def difference(self, *sets: Union[Sequence[T], Set[T]]) -> "OrderedSet[T]": """ Returns all elements that are in this set but not the others. @@ -374,7 +400,7 @@ items = self return cls(items) - def issubset(self, other): + def issubset(self, other: Union[Sequence[T], Set[T]]) -> bool: """ Report whether another set contains this set. @@ -390,7 +416,7 @@ return False return all(item in other for item in self) - def issuperset(self, other): + def issuperset(self, other: Union[Sequence[T], Set[T]]) -> bool: """ Report whether this set contains another set. @@ -406,7 +432,7 @@ return False return all(item in self for item in other) - def symmetric_difference(self, other): + def symmetric_difference(self, other: Union[Sequence[T], Set[T]]) -> "OrderedSet[T]": """ Return the symmetric difference of two OrderedSets as a new set. That is, the new set will contain all elements that are in exactly @@ -426,7 +452,7 @@ diff2 = cls(other).difference(self) return diff1.union(diff2) - def _update_items(self, items): + def _update_items(self, items: list) -> None: """ Replace the 'items' list of this OrderedSet with a new one, updating self.map accordingly. @@ -434,7 +460,7 @@ self.items = items self.map = {item: idx for (idx, item) in enumerate(items)} - def difference_update(self, *sets): + def difference_update(self, *sets: Union[Sequence[T], Set[T]]) -> None: """ Update this OrderedSet to remove items from one or more other sets. @@ -449,12 +475,13 @@ >>> print(this) OrderedSet([3, 5]) """ - items_to_remove = set() + items_to_remove = set() # type: Set[T] for other in sets: - items_to_remove |= set(other) + items_as_set = set(other) # type: Set[T] + items_to_remove |= items_as_set self._update_items([item for item in self.items if item not in items_to_remove]) - def intersection_update(self, other): + def intersection_update(self, other: Union[Sequence[T], Set[T]]) -> None: """ Update this OrderedSet to keep only items in another set, preserving their order in this set. @@ -469,7 +496,7 @@ other = set(other) self._update_items([item for item in self.items if item in other]) - def symmetric_difference_update(self, other): + def symmetric_difference_update(self, other: Union[Sequence[T], Set[T]]) -> None: """ Update this OrderedSet to remove items from another set, then add items from the other set that were not present in this set. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/ordered_set.pyi new/ordered-set-4.0.2/ordered_set.pyi --- old/ordered-set-3.1.1/ordered_set.pyi 2018-09-14 22:41:05.000000000 +0200 +++ new/ordered-set-4.0.2/ordered_set.pyi 1970-01-01 01:00:00.000000000 +0100 @@ -1,41 +0,0 @@ -from typing import Any, MutableSet, TypeVar, Sequence, Union, Tuple, List, Iterator, Dict, Set, Iterable - - -def is_iterable(obj: Any) -> bool: ... - - -T = TypeVar('T') - - -class OrderedSet(MutableSet[T], Sequence[T]): - def __init__(self, iterable: Iterable[T] = None) -> None: - self.map: Dict[T, int] = {} - self.items: List[T] = [] - - def __len__(self) -> int: ... - def __getitem__(self, index: Union[int, slice, Sequence[int]]) -> OrderedSet[T]: ... - def copy(self) -> OrderedSet[T]: ... - def __getstate__(self) -> Union[Tuple[None], List[T]]: ... - def __setstate__(self, state: Union[Tuple[None], List[T]]) -> None: ... - def __contains__(self, key: T) -> bool: ... - def add(self, key: T) -> int: ... - append = add - def update(self, sequence: Sequence[T]) -> int: ... - def index(self, key: Union[T, Sequence[T]]) -> int: ... - def pop(self) -> T: ... - def discard(self, key: T) -> None: ... - def clear(self) -> None: ... - def __iter__(self) -> Iterator[T]: ... - def __reversed__(self) -> List[T]: ... - def __repr__(self) -> str: ... - def __eq__(self, other: Sequence[T]) -> bool: ... - def union(self, *sets: Sequence[T]) -> OrderedSet[T]: ... - def __and__(self, other: Sequence[T]) -> OrderedSet[T]: ... - def intersection(self, *sets: Sequence[T]) -> OrderedSet[T]: ... - def difference(self, *sets: Sequence[T]) -> OrderedSet[T]: ... - def issubset(self, other: Union[Set[T], Sequence[T]]) -> bool: ... - def issuperset(self, other: Union[Set[T], Sequence[T]]) -> bool: ... - def symmetric_difference(self, other: Sequence[T]) -> OrderedSet[T]: ... - def difference_update(self, *sets: Sequence[T]) -> None: ... - def intersection_update(self, other: Sequence[T]) -> None: ... - def symmetric_difference_update(self, other: Sequence[T]) -> None: ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/pytest.ini new/ordered-set-4.0.2/pytest.ini --- old/ordered-set-3.1.1/pytest.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/ordered-set-4.0.2/pytest.ini 2018-07-10 22:55:47.000000000 +0200 @@ -0,0 +1,4 @@ +[pytest] +addopts = --doctest-modules test.py ordered_set.py README.md --doctest-glob=README.md --ignore=setup.py + +norecursedirs = .git ignore build __pycache__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/setup.py new/ordered-set-4.0.2/setup.py --- old/ordered-set-3.1.1/setup.py 2019-04-25 21:07:12.000000000 +0200 +++ new/ordered-set-4.0.2/setup.py 2020-06-17 22:49:25.000000000 +0200 @@ -4,29 +4,26 @@ setup( name="ordered-set", - version='3.1.1', + version='4.0.2', maintainer='Robyn Speer', maintainer_email='[email protected]', license="MIT-LICENSE", url='https://github.com/LuminosoInsight/ordered-set', platforms=["any"], - description="A MutableSet that remembers its order, so that every entry has an index.", + description="A set that remembers its order, and allows looking up its items by their index in that order.", long_description=DESCRIPTION, long_description_content_type='text/markdown', py_modules=['ordered_set'], package_data={'': ['MIT-LICENSE']}, include_package_data=True, tests_require=['pytest'], - python_requires='>=2.7', + python_requires='>=3.5', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ordered-set-3.1.1/test.py new/ordered-set-4.0.2/test.py --- old/ordered-set-3.1.1/test.py 2019-04-25 21:07:12.000000000 +0200 +++ new/ordered-set-4.0.2/test.py 2020-02-13 18:15:42.000000000 +0100 @@ -1,10 +1,12 @@ -import pickle -import pytest import collections -import sys -import operator import itertools as it +import operator +import pickle import random +import sys + +import pytest + from ordered_set import OrderedSet @@ -58,6 +60,7 @@ Make sure we can index by a NumPy ndarray, without having to import NumPy. """ + def __init__(self, indices): self.indices = indices
