Hello community, here is the log from the commit of package python-decorator for openSUSE:Factory checked in at 2020-03-27 00:24:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-decorator (Old) and /work/SRC/openSUSE:Factory/.python-decorator.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-decorator" Fri Mar 27 00:24:19 2020 rev:22 rq:785072 version:4.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-decorator/python-decorator.changes 2020-02-14 16:25:55.243208439 +0100 +++ /work/SRC/openSUSE:Factory/.python-decorator.new.3160/python-decorator.changes 2020-03-27 00:24:30.340232740 +0100 @@ -1,0 +2,8 @@ +Sat Mar 14 15:50:24 UTC 2020 - Dirk Mueller <dmuel...@suse.com> + +- update to 4.4.2: + * removing the usage of `__file__`, that was breaking PyOxidizer. + * fixes for the future Python 3.9. + * some fixes for the future Python 3.10. + +------------------------------------------------------------------- Old: ---- decorator-4.4.1.tar.gz New: ---- decorator-4.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-decorator.spec ++++++ --- /var/tmp/diff_new_pack.2gMoBx/_old 2020-03-27 00:24:31.288233221 +0100 +++ /var/tmp/diff_new_pack.2gMoBx/_new 2020-03-27 00:24:31.288233221 +0100 @@ -20,7 +20,7 @@ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-decorator -Version: 4.4.1 +Version: 4.4.2 Release: 0 Summary: Decorators for Humans License: BSD-2-Clause ++++++ decorator-4.4.1.tar.gz -> decorator-4.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/CHANGES.md new/decorator-4.4.2/CHANGES.md --- old/decorator-4.4.1/CHANGES.md 2019-10-27 08:58:49.000000000 +0100 +++ new/decorator-4.4.2/CHANGES.md 2020-02-29 06:22:24.000000000 +0100 @@ -3,6 +3,17 @@ ## unreleased +## 4.4.2 (2020-02-29) + +Sylvan Mosberger (https://github.com/Infinisil) contributed a patch to +some doctests that were breaking on NixOS. +John Vandenberg (https://github.com/jayvdb) made a case for removing the usage +of `__file__`, that was breaking PyOxidizer. +Miro HronĨok (https://github.com/hroncok) contributed some fixes for the +future Python 3.9. +Hugo van Kemenade (https://github.com/hugovk) contributed some fixes for the +future Python 3.10. + ## 4.4.1 (2019-10-27) Changed the description to "Decorators for Humans" are requested by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/PKG-INFO new/decorator-4.4.2/PKG-INFO --- old/decorator-4.4.1/PKG-INFO 2019-10-27 09:08:56.000000000 +0100 +++ new/decorator-4.4.2/PKG-INFO 2020-02-29 06:24:41.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: decorator -Version: 4.4.1 +Version: 4.4.2 Summary: Decorators for Humans Home-page: https://github.com/micheles/decorator Author: Michele Simionato @@ -32,7 +32,7 @@ in the main directory, possibly as superuser. - .. _tarball: http://pypi.python.org/pypi/decorator + .. _tarball: https://pypi.org/project/decorator/#files .. _GitHub repo: https://github.com/micheles/decorator Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/README.rst new/decorator-4.4.2/README.rst --- old/decorator-4.4.1/README.rst 2019-10-27 08:59:19.000000000 +0100 +++ new/decorator-4.4.2/README.rst 2019-10-27 09:10:40.000000000 +0100 @@ -24,7 +24,7 @@ in the main directory, possibly as superuser. -.. _tarball: http://pypi.python.org/pypi/decorator +.. _tarball: https://pypi.org/project/decorator/#files .. _GitHub repo: https://github.com/micheles/decorator Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/src/decorator.egg-info/PKG-INFO new/decorator-4.4.2/src/decorator.egg-info/PKG-INFO --- old/decorator-4.4.1/src/decorator.egg-info/PKG-INFO 2019-10-27 09:08:56.000000000 +0100 +++ new/decorator-4.4.2/src/decorator.egg-info/PKG-INFO 2020-02-29 06:24:40.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: decorator -Version: 4.4.1 +Version: 4.4.2 Summary: Decorators for Humans Home-page: https://github.com/micheles/decorator Author: Michele Simionato @@ -32,7 +32,7 @@ in the main directory, possibly as superuser. - .. _tarball: http://pypi.python.org/pypi/decorator + .. _tarball: https://pypi.org/project/decorator/#files .. _GitHub repo: https://github.com/micheles/decorator Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/src/decorator.py new/decorator-4.4.2/src/decorator.py --- old/decorator-4.4.1/src/decorator.py 2019-10-27 09:00:08.000000000 +0100 +++ new/decorator-4.4.2/src/decorator.py 2020-02-29 06:20:33.000000000 +0100 @@ -40,9 +40,9 @@ import itertools import collections -__version__ = '4.4.1' +__version__ = '4.4.2' -if sys.version >= '3': +if sys.version_info >= (3,): from inspect import getfullargspec def get_init(cls): @@ -179,8 +179,7 @@ # Ensure each generated function has a unique filename for profilers # (such as cProfile) that depend on the tuple of (<filename>, # <definition line>, <function name>) being unique. - filename = '<%s:decorator-gen-%d>' % ( - __file__, next(self._compile_count)) + filename = '<decorator-gen-%d>' % next(self._compile_count) try: code = compile(src, filename, 'single') exec(code, evaldict) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/src/tests/documentation.py new/decorator-4.4.2/src/tests/documentation.py --- old/decorator-4.4.1/src/tests/documentation.py 2019-10-27 09:01:53.000000000 +0100 +++ new/decorator-4.4.2/src/tests/documentation.py 2020-02-29 06:10:07.000000000 +0100 @@ -9,6 +9,7 @@ import collections.abc as c except ImportError: c = collections + collections.abc = collections from decorator import (decorator, decorate, FunctionMaker, contextmanager, dispatch_on, __version__) @@ -1008,15 +1009,16 @@ $$WithLength This class defines a ``__len__`` method, and is therefore -considered to be a subclass of the abstract base class ``collections.Sized``: +considered to be a subclass of the abstract base class +``collections.abc.Sized`` (``collections.Sized`` on Python 2): ```python ->>> issubclass(WithLength, collections.Sized) +>>> issubclass(WithLength, collections.abc.Sized) True ``` -However, ``collections.Sized`` is not in the MRO_ of ``WithLength``; it +However, ``collections.abc.Sized`` is not in the MRO_ of ``WithLength``; it is not a true ancestor. Any implementation of generic functions (even with single dispatch) must go through some contorsion to take into account the virtual ancestors. @@ -1037,7 +1039,7 @@ ``` -...even if ``collections.Sized`` is not a true ancestor of ``WithLength``. +...even if ``collections.abc.Sized`` is not a true ancestor of ``WithLength``. Of course, this is a contrived example--you could just use the builtin ``len``--but you should get the idea. @@ -1053,14 +1055,14 @@ $$SomeSet Here, the author of ``SomeSet`` made a mistake by inheriting from -``collections.Sized`` (instead of ``collections.Set``). +``collections.abc.Sized`` (instead of ``collections.abc.Set``). This is not a problem. You can register *a posteriori* -``collections.Set`` as a virtual ancestor of ``SomeSet``: +``collections.abc.Set`` as a virtual ancestor of ``SomeSet``: ```python ->>> _ = collections.Set.register(SomeSet) ->>> issubclass(SomeSet, collections.Set) +>>> _ = collections.abc.Set.register(SomeSet) +>>> issubclass(SomeSet, collections.abc.Set) True ``` @@ -1080,10 +1082,10 @@ ``` Sometimes it is not clear how to dispatch. For instance, consider a -class ``C`` registered both as ``collections.Iterable`` and -``collections.Sized``, and defines a generic function ``g`` with -implementations for both ``collections.Iterable`` *and* -``collections.Sized``: +class ``C`` registered both as ``collections.abc.Iterable`` and +``collections.abc.Sized``, and defines a generic function ``g`` with +implementations for both ``collections.abc.Iterable`` *and* +``collections.abc.Sized``: $$singledispatch_example1 @@ -1331,7 +1333,7 @@ LICENSE (2-clause BSD) --------------------------------------------- -Copyright (c) 2005-2019, Michele Simionato +Copyright (c) 2005-2020, Michele Simionato All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1419,7 +1421,7 @@ the qualified name. This attribute was introduced in Python 3.3. """ -if sys.version < '3': +if sys.version_info < (3,): function_annotations = '' today = time.strftime('%Y-%m-%d') @@ -1531,7 +1533,7 @@ f.thread = threading.Thread(None, set_result) f.thread.start() return msg - elif f.thread.isAlive(): + elif f.thread.is_alive(): return msg else: # the thread is ended, return the stored result del f.thread @@ -1652,7 +1654,7 @@ """ -if sys.version >= '3': # tests for signatures specific to Python 3 +if sys.version_info >= (3,): # tests for signatures specific to Python 3 def test_kwonlydefaults(): """ @@ -1784,7 +1786,7 @@ return 0 -class SomeSet(collections.Sized): +class SomeSet(collections.abc.Sized): # methods that make SomeSet set-like # not shown ... def __len__(self): @@ -1796,12 +1798,12 @@ raise NotImplementedError(type(obj)) -@get_length.register(collections.Sized) +@get_length.register(collections.abc.Sized) def get_length_sized(obj): return len(obj) -@get_length.register(collections.Set) +@get_length.register(collections.abc.Set) def get_length_set(obj): return 1 @@ -1810,8 +1812,8 @@ "Registered as Sized and Iterable" -collections.Sized.register(C) -collections.Iterable.register(C) +collections.abc.Sized.register(C) +collections.abc.Iterable.register(C) def singledispatch_example1(): @@ -1821,11 +1823,11 @@ def g(obj): raise NotImplementedError(type(g)) - @g.register(collections.Sized) + @g.register(collections.abc.Sized) def g_sized(object): return "sized" - @g.register(collections.Iterable) + @g.register(collections.abc.Iterable) def g_iterable(object): return "iterable" @@ -1867,7 +1869,7 @@ t0 = time.time() res = func(*args, **kwargs) dt = time.time() - t0 - if dt > duration: + if dt >= duration: print('%s is slow' % func.__name__) return res @@ -1878,6 +1880,7 @@ >>> operation1() operation1 is slow """ + time.sleep(.1) @warn_slow # without parens @@ -1886,6 +1889,7 @@ >>> operation2() operation2 is slow """ + time.sleep(.1) if __name__ == '__main__': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/decorator-4.4.1/src/tests/test.py new/decorator-4.4.2/src/tests/test.py --- old/decorator-4.4.1/src/tests/test.py 2019-03-16 15:21:37.000000000 +0100 +++ new/decorator-4.4.2/src/tests/test.py 2020-02-29 05:50:53.000000000 +0100 @@ -29,7 +29,7 @@ raise Exception('Expected %s' % etype.__name__) -if sys.version >= '3.5': +if sys.version_info >= (3, 5): exec('''from asyncio import get_event_loop @decorator @@ -92,7 +92,7 @@ class ExtraTestCase(unittest.TestCase): def test_qualname(self): - if sys.version >= '3.3': + if sys.version_info >= (3, 3): self.assertEqual(doc.hello.__qualname__, 'hello') else: with assertRaises(AttributeError):