openSUSE Commits
Threads by month
- ----- 2025 -----
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2021
- 1 participants
- 2358 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-cachetools for openSUSE:Factory checked in at 2021-02-01 13:26:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cachetools (Old)
and /work/SRC/openSUSE:Factory/.python-cachetools.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cachetools"
Mon Feb 1 13:26:52 2021 rev:12 rq:867588 version:4.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cachetools/python-cachetools.changes 2020-12-30 17:12:35.288760517 +0100
+++ /work/SRC/openSUSE:Factory/.python-cachetools.new.28504/python-cachetools.changes 2021-02-01 13:28:35.826139829 +0100
@@ -1,0 +2,7 @@
+Thu Jan 28 22:51:01 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 4.2.1:
+ - Handle ``__missing__()`` not storing cache items.
+ - Clean up ``__missing__()`` example.
+
+-------------------------------------------------------------------
Old:
----
cachetools-4.2.0.tar.gz
New:
----
cachetools-4.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cachetools.spec ++++++
--- /var/tmp/diff_new_pack.7MLknS/_old 2021-02-01 13:28:36.442140788 +0100
+++ /var/tmp/diff_new_pack.7MLknS/_new 2021-02-01 13:28:36.446140794 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-cachetools
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cachetools
-Version: 4.2.0
+Version: 4.2.1
Release: 0
Summary: Extensible memoizing collections and decorators
License: MIT
++++++ cachetools-4.2.0.tar.gz -> cachetools-4.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/CHANGELOG.rst new/cachetools-4.2.1/CHANGELOG.rst
--- old/cachetools-4.2.0/CHANGELOG.rst 2020-12-10 21:24:59.000000000 +0100
+++ new/cachetools-4.2.1/CHANGELOG.rst 2021-01-24 21:35:01.000000000 +0100
@@ -1,3 +1,11 @@
+v4.2.1 (2021-01-24)
+===================
+
+- Handle ``__missing__()`` not storing cache items.
+
+- Clean up ``__missing__()`` example.
+
+
v4.2.0 (2020-12-10)
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/PKG-INFO new/cachetools-4.2.1/PKG-INFO
--- old/cachetools-4.2.0/PKG-INFO 2020-12-10 21:27:30.148768000 +0100
+++ new/cachetools-4.2.1/PKG-INFO 2021-01-24 23:40:01.706941600 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: cachetools
-Version: 4.2.0
+Version: 4.2.1
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools/
Author: Thomas Kemmer
@@ -93,7 +93,7 @@
License
------------------------------------------------------------------------
- Copyright (c) 2014-2020 Thomas Kemmer.
+ Copyright (c) 2014-2021 Thomas Kemmer.
Licensed under the `MIT License`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/README.rst new/cachetools-4.2.1/README.rst
--- old/cachetools-4.2.0/README.rst 2020-12-10 21:24:17.000000000 +0100
+++ new/cachetools-4.2.1/README.rst 2021-01-24 21:34:50.000000000 +0100
@@ -85,7 +85,7 @@
License
------------------------------------------------------------------------
-Copyright (c) 2014-2020 Thomas Kemmer.
+Copyright (c) 2014-2021 Thomas Kemmer.
Licensed under the `MIT License`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/cachetools/__init__.py new/cachetools-4.2.1/cachetools/__init__.py
--- old/cachetools-4.2.0/cachetools/__init__.py 2020-12-10 21:24:42.000000000 +0100
+++ new/cachetools-4.2.1/cachetools/__init__.py 2021-01-24 21:34:50.000000000 +0100
@@ -21,4 +21,4 @@
'cachedmethod'
)
-__version__ = '4.2.0'
+__version__ = '4.2.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/cachetools/lfu.py new/cachetools-4.2.1/cachetools/lfu.py
--- old/cachetools-4.2.0/cachetools/lfu.py 2020-12-10 21:24:17.000000000 +0100
+++ new/cachetools-4.2.1/cachetools/lfu.py 2021-01-24 21:34:50.000000000 +0100
@@ -12,7 +12,8 @@
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
value = cache_getitem(self, key)
- self.__counter[key] -= 1
+ if key in self: # __missing__ may not store item
+ self.__counter[key] -= 1
return value
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/cachetools/lru.py new/cachetools-4.2.1/cachetools/lru.py
--- old/cachetools-4.2.0/cachetools/lru.py 2020-12-10 21:24:17.000000000 +0100
+++ new/cachetools-4.2.1/cachetools/lru.py 2021-01-24 21:34:50.000000000 +0100
@@ -12,7 +12,8 @@
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
value = cache_getitem(self, key)
- self.__update(key)
+ if key in self: # __missing__ may not store item
+ self.__update(key)
return value
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/cachetools/mru.py new/cachetools-4.2.1/cachetools/mru.py
--- old/cachetools-4.2.0/cachetools/mru.py 2020-12-10 21:24:17.000000000 +0100
+++ new/cachetools-4.2.1/cachetools/mru.py 2021-01-24 21:34:50.000000000 +0100
@@ -12,7 +12,8 @@
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
value = cache_getitem(self, key)
- self.__update(key)
+ if key in self: # __missing__ may not store item
+ self.__update(key)
return value
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/cachetools.egg-info/PKG-INFO new/cachetools-4.2.1/cachetools.egg-info/PKG-INFO
--- old/cachetools-4.2.0/cachetools.egg-info/PKG-INFO 2020-12-10 21:27:30.000000000 +0100
+++ new/cachetools-4.2.1/cachetools.egg-info/PKG-INFO 2021-01-24 23:40:01.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: cachetools
-Version: 4.2.0
+Version: 4.2.1
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools/
Author: Thomas Kemmer
@@ -93,7 +93,7 @@
License
------------------------------------------------------------------------
- Copyright (c) 2014-2020 Thomas Kemmer.
+ Copyright (c) 2014-2021 Thomas Kemmer.
Licensed under the `MIT License`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/docs/conf.py new/cachetools-4.2.1/docs/conf.py
--- old/cachetools-4.2.0/docs/conf.py 2020-08-10 19:33:30.000000000 +0200
+++ new/cachetools-4.2.1/docs/conf.py 2021-01-24 21:34:50.000000000 +0100
@@ -9,7 +9,7 @@
project = 'cachetools'
-copyright = '2014-2020 Thomas Kemmer'
+copyright = '2014-2021 Thomas Kemmer'
version = get_version()
release = version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/docs/index.rst new/cachetools-4.2.1/docs/index.rst
--- old/cachetools-4.2.0/docs/index.rst 2020-12-10 21:24:17.000000000 +0100
+++ new/cachetools-4.2.1/docs/index.rst 2021-01-24 21:34:50.000000000 +0100
@@ -171,13 +171,10 @@
... def __missing__(self, key):
... """Retrieve text of a Python Enhancement Proposal"""
... url = 'http://www.python.org/dev/peps/pep-%04d/' % key
- ... try:
- ... with urllib.request.urlopen(url) as s:
- ... pep = s.read()
- ... self[key] = pep # store text in cache
- ... return pep
- ... except urllib.error.HTTPError:
- ... return 'Not Found' # do not store in cache
+ ... with urllib.request.urlopen(url) as s:
+ ... pep = s.read()
+ ... self[key] = pep # store text in cache
+ ... return pep
>>> peps = PepStore(maxsize=4)
>>> for n in 8, 9, 290, 308, 320, 8, 218, 320, 279, 289, 320:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/setup.cfg new/cachetools-4.2.1/setup.cfg
--- old/cachetools-4.2.0/setup.cfg 2020-12-10 21:27:30.152768600 +0100
+++ new/cachetools-4.2.1/setup.cfg 2021-01-24 23:40:01.706941600 +0100
@@ -1,6 +1,6 @@
[metadata]
name = cachetools
-version = 4.2.0
+version = 4.2.1
url = https://github.com/tkem/cachetools/
author = Thomas Kemmer
author_email = tkemmer(a)computer.org
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.2.0/tests/__init__.py new/cachetools-4.2.1/tests/__init__.py
--- old/cachetools-4.2.0/tests/__init__.py 2020-08-10 19:33:30.000000000 +0200
+++ new/cachetools-4.2.1/tests/__init__.py 2021-01-24 21:34:50.000000000 +0100
@@ -120,7 +120,14 @@
self.assertIsNone(exception.__cause__)
self.assertTrue(exception.__suppress_context__)
- def _test_missing(self, cache):
+ def test_missing(self):
+ class DefaultCache(self.Cache):
+ def __missing__(self, key):
+ self[key] = key
+ return key
+
+ cache = DefaultCache(maxsize=2)
+
self.assertEqual(0, cache.currsize)
self.assertEqual(2, cache.maxsize)
self.assertEqual(0, len(cache))
@@ -172,30 +179,38 @@
self.assertTrue(1 in cache or 2 in cache)
self.assertTrue(1 not in cache or 2 not in cache)
- def _test_missing_getsizeof(self, cache):
+ def test_missing_getsizeof(self):
+ class DefaultCache(self.Cache):
+ def __missing__(self, key):
+ try:
+ self[key] = key
+ except ValueError:
+ pass # not stored
+ return key
+
+ cache = DefaultCache(maxsize=2, getsizeof=lambda x: x)
+
self.assertEqual(0, cache.currsize)
self.assertEqual(2, cache.maxsize)
+
self.assertEqual(1, cache[1])
+ self.assertEqual(1, len(cache))
+ self.assertEqual(1, cache.currsize)
self.assertIn(1, cache)
+
self.assertEqual(2, cache[2])
+ self.assertEqual(1, len(cache))
+ self.assertEqual(2, cache.currsize)
self.assertNotIn(1, cache)
self.assertIn(2, cache)
- self.assertEqual(3, cache[3])
- self.assertNotIn(1, cache)
- self.assertIn(2, cache)
- self.assertNotIn(3, cache)
- def test_missing_subclass(self):
- class Cache(self.Cache):
- def __missing__(self, key):
- try:
- self[key] = key
- except ValueError:
- pass
- return key
-
- self._test_missing(Cache(maxsize=2))
- self._test_missing_getsizeof(Cache(maxsize=2, getsizeof=lambda x: x))
+ self.assertEqual(3, cache[3]) # not stored
+ self.assertEqual(1, len(cache))
+ self.assertEqual(2, cache.currsize)
+ self.assertEqual(1, cache[1])
+ self.assertEqual(1, len(cache))
+ self.assertEqual(1, cache.currsize)
+ self.assertEqual((1, 1), cache.popitem())
def _test_getsizeof(self, cache):
self.assertEqual(0, cache.currsize)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest5 for openSUSE:Factory checked in at 2021-02-01 13:26:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest5 (Old)
and /work/SRC/openSUSE:Factory/.python-pytest5.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest5"
Mon Feb 1 13:26:49 2021 rev:4 rq:867575 version:5.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest5/python-pytest5.changes 2020-11-12 22:34:39.797863451 +0100
+++ /work/SRC/openSUSE:Factory/.python-pytest5.new.28504/python-pytest5.changes 2021-02-01 13:28:34.658138012 +0100
@@ -1,0 +2,5 @@
+Thu Jan 28 21:09:10 UTC 2021 - Mark��ta Machov�� <mmachova(a)suse.com>
+
+- Fix the conditional to work with new python-rpm-macros
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest5.spec ++++++
--- /var/tmp/diff_new_pack.7OAnbp/_old 2021-02-01 13:28:35.374139126 +0100
+++ /var/tmp/diff_new_pack.7OAnbp/_new 2021-02-01 13:28:35.378139132 +0100
@@ -72,7 +72,7 @@
BuildRequires: %{python_module xmlschema}
BuildRequires: lsof
%endif
-%if %{python3_version_nodots} < 36
+%if %{?python3_version_nodots} < 36
Requires: python-pathlib2 >= 2.2.0
%endif
%python_subpackages
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-celery for openSUSE:Factory checked in at 2021-02-01 13:26:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-celery (Old)
and /work/SRC/openSUSE:Factory/.python-celery.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-celery"
Mon Feb 1 13:26:47 2021 rev:36 rq:866877 version:5.0.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-celery/python-celery.changes 2020-12-12 20:31:03.629770416 +0100
+++ /work/SRC/openSUSE:Factory/.python-celery.new.28504/python-celery.changes 2021-02-01 13:28:33.458136145 +0100
@@ -1,0 +2,11 @@
+Tue Jan 26 10:14:33 UTC 2021 - Mark��ta Machov�� <mmachova(a)suse.com>
+
+- Update to 5.0.5
+ * Make ���workdir eager for early handling
+ * When using the MongoDB backend, don���t cleanup if result_expires is 0 or None
+ * Detaching no longer creates an extra log file
+ * DummyClient of cache+memory:// backend now shares state between threads
+ * Ensure keys are strings when deleting results from S3
+- Require celery package when running tests to automatically pull dependencies
+
+-------------------------------------------------------------------
Old:
----
celery-5.0.2.tar.gz
New:
----
celery-5.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-celery.spec ++++++
--- /var/tmp/diff_new_pack.0cGahA/_old 2021-02-01 13:28:34.234137352 +0100
+++ /var/tmp/diff_new_pack.0cGahA/_new 2021-02-01 13:28:34.238137359 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-celery
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,7 +28,7 @@
%endif
%bcond_with ringdisabled
Name: python-celery%{psuffix}
-Version: 5.0.2
+Version: 5.0.5
Release: 0
Summary: Distributed Task Queue module for Python
License: BSD-3-Clause
@@ -42,6 +42,7 @@
Requires: python-billiard >= 3.6.3.0
Requires: python-click => 7.0
Requires: python-click-didyoumean >= 0.0.3
+Requires: python-click-plugins >= 1.1.1
Requires: python-click-repl >= 0.1.6
Requires: python-kombu >= 5.0.0
Requires: python-pytz >= 2016.7
@@ -58,20 +59,17 @@
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module SQLAlchemy}
-BuildRequires: %{python_module billiard >= 3.6.3.0}
BuildRequires: %{python_module boto3 >= 1.9.178}
BuildRequires: %{python_module case >= 1.3.1}
+BuildRequires: %{python_module celery = %{version}}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module eventlet >= 0.26.1}
BuildRequires: %{python_module gevent}
-BuildRequires: %{python_module kombu >= 5.0.0}
BuildRequires: %{python_module moto >= 1.3.7}
BuildRequires: %{python_module msgpack}
BuildRequires: %{python_module pymongo >= 3.3.0}
BuildRequires: %{python_module pytest >= 4.5.0}
BuildRequires: %{python_module pytest-subtests}
-BuildRequires: %{python_module pytz >= 2016.7}
-BuildRequires: %{python_module vine >= 5.0.0}
%if %{with ringdisabled}
ExclusiveArch: do-not-build
%endif
@@ -90,7 +88,9 @@
sed -i -e 's:==:>=:g' requirements/*.txt
%build
+%if !%{with test}
%python_build
+%endif
%install
%if !%{with test}
@@ -101,9 +101,8 @@
%check
%if %{with test}
-# test_setup_security__default_app - fails with py3.8
-# test_pytest_celery_marker_registration - fails, do not know really why
-%pytest -k 'not test_setup_security__default_app' -k 'not test_pytest_celery_marker_registration'
+# test_init_mongodb_dns_seedlist - does not work with new pymongo, will be fixed in 5.1
+%pytest -k 'not test_init_mongodb_dns_seedlist'
%endif
%if !%{with test}
++++++ celery-5.0.2.tar.gz -> celery-5.0.5.tar.gz ++++++
++++ 2530 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package mypy for openSUSE:Factory checked in at 2021-02-01 13:26:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mypy (Old)
and /work/SRC/openSUSE:Factory/.mypy.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mypy"
Mon Feb 1 13:26:44 2021 rev:21 rq:866688 version:0.800
Changes:
--------
--- /work/SRC/openSUSE:Factory/mypy/mypy.changes 2020-10-20 16:12:15.794062434 +0200
+++ /work/SRC/openSUSE:Factory/.mypy.new.28504/mypy.changes 2021-02-01 13:28:31.786133543 +0100
@@ -1,0 +2,89 @@
+Mon Jan 25 22:16:46 UTC 2021 - Benjamin Greiner <code(a)bnavigator.de>
+
+- Provide the toolname only for the primary python3 flavor in order
+ to avoid choice conflicts.
+- python3-mypy and python3Y-mypy are provided automatically.
+
+-------------------------------------------------------------------
+Sat Jan 23 19:22:44 UTC 2021 - Sebastian Wagner <sebix+novell.com(a)sebix.at>
+
+- Update to version 0.800:
+ - Python 3.9 Support
+ - Typing Usability Improvements (PEP 585 and PEP 604)
+ The necessity to repeatedly import various types and special forms from typing has been a long-term nuisance for users of static type checking and Python.
+ Two new Python features improve this situation and are now supported by mypy:
+ PEP 585 lets you use list[int] instead of List[int] (no need to import List and other generic collections from typing).
+ PEP 604 lets you write X | Y instead of Union[X, Y], and X | None instead of Optional[X] (no need to import Union or Optional from typing).
+ Note: Using list[int] requires Python 3.9 and X | Y requires Python 3.10 (alpha) in order to work at runtime. To use them on older versions of Python, use from __future__ import annotations. This allows them to be used in type annotations, but the older variants (or string literal escaping) may be required in non-annotation contexts, such as in type aliases. See the docs for more details.
+ Here is an example that uses the new features:
+ from __future__ import annotations
+ def fields(s: str | None) -> list[str]:
+ if not s:
+ return []
+ else:
+ return s.split(',')
+ These were implemented by Allan Daemon in PR 9564 and by Marc Mueller in PR 9647.
+ - Improvements to Finding Modules
+ This release adds several improvements to how mypy finds Python source files to type check.
+ You can now pass paths to files within namespace packages on the command line, and mypy can better infer their module names. As before, use --namespace-packages to enable namespace packages.
+ When you use --explicit-package-bases together with --namespace-packages, mypy assumes that only the current directory and directories explicitly specified in MYPYPATH (or mypy_path in the config file) are valid package roots. This can help with situations where the module name of a file is ambiguous. For example, it may not be clear whether src/pkg/mod.py should be treated as src.pkg.mod or pkg.mod, and you can use this option to disambiguate between the two (more information in the docs).
+ The above improvements were implemented in PR 9742 by Shantanu.
+ Other related improvements (also implemented by Shantanu):
+ - When you run mypy as mypy <directory>, look for source files recursively also inside directories without a __init__.py (PR 9614)
+ - Support namespace packages with -p (PR 9683)
+ - Log encountered source files when running mypy with -v (PR 9672)
+ - Document the new module finding behavior (PR 9923)
+ - Other Notable Improvements and Bug Fixes
+ - Only treat import X as X as a re-export in stubs (Shantanu, PR 9515)
+ - Fix package imports with aliases in stubgen (Chad Dombrova, PR 9534)
+ - Require first argument of namedtuple() to match the variable name (Momoko Hattori, PR 9577)
+ - Add error code for name mismatches in named tuples and TypedDicts to make it easy to disable these error messages (Jukka Lehtosalo, PR 9811)
+ - Document local_partial_types config option (Momoko Hattori, PR 9551)
+ - Improve ambiguous kwargs checking (Erik Soma, PR 9573)
+ - Disable unreachable warnings in boolean operators for type variables with value restrictions (Vincent Barbaresi, PR 9572)
+ - Allow assignment to an empty tuple (Tobin Yehle, PR 5617)
+ - Use absolute path when checking source duplication error (Yuki Igarashi, PR 9059)
+ - Add get_function_signature_hook() to the plugin API (Nikita Sobolev, PR 9102)
+ - Speed up type checking of dictionary, set, and list expressions (Hugues, PR 9477)
+ - Allow non-types as arguments in Annotated (Patrick Arminio, PR 9625)
+ - Add support for next generation attrs API (David Euresti, PR 9396)
+ - Fix case folding of missing keys error message for TypedDicts (Marti Raudsepp, PR 9757)
+ - Fix generic inheritance of __init__() methods in dataclasses and attrs classes (Nate McMaster, PR 9383, PR 9380)
+ - Add more information to error message on too few arguments (Abhinay Pandey, PR 9796)
+ - Document PEP 585, 563, 604, and related functionality (Shantanu, PR 9763)
+ - Mypyc Improvements
+ We use mypyc to compile mypy into fast C extension modules. This release includes many mypyc improvements.
+ Xuanda Yang finished the migration to use a new, lower-level compiler intermediate representation in his Google Summer of Code project.
+ - New supported Python features:
+ - Support the walrus operator (:=) (Michael J. Sullivan, PR 9624)
+ - Performance improvements:
+ - Add primitives for list sort and list reverse (Jukka Lehtosalo, PR 9897)
+ - Recognize six.moves.xrange again as an alias of range (Jukka Lehtosalo, PR 9896)
+ - Speed up some integer primitives (Jukka Lehtosalo, PR 9801)
+ - Speed up if x for int values (Jukka Lehtosalo, PR 9854)
+ - Implement dict clear primitive (Vasileios Sakkas, PR 9724)
+ - Implement list insert primitive (Vasileios Sakkas, PR 9741)
+ - Implement float abs primitive (Xuanda Yang, PR 9695)
+ - Implement str-to-float primitive (Xuanda Yang, PR 9685)
+ - Specialize some calls to frozenset (Michael J. Sullivan, PR 9623)
+ - Speed up multiple assignment from tuple (Xuanda Yang, PR 9575)
+ - Speed up multiple assignment from sequence (Jukka Lehtosalo, PR 9800)
+ - Optimize startswith and endswith (Tomer Chachamu, PR 9557)
+ - Add primitives for bitwise ops (Jukka Lehtosalo, PR 9529)
+ - Speed up in operations for list/tuple (Johan Dahlin, PR 9004)
+ - Add primitives for list, str and tuple slicing (Jukka Lehtosalo, PR 9283)
+ - Speed up tuple equality checks (Xuanda Yang, PR 9343)
+ - Bug fixes:
+ - Always add implicit None return type to __init__ method (Thomas Johnson, PR 9866)
+ - Fix deallocation of deeply nested data structures (Michael J. Sullivan, PR 9839)
+ - Fix using package imported inside a function (Jukka Lehtosalo, PR 9782)
+ - Fix type of for loop index register in for over range (Jukka Lehtosalo, PR 9634)
+
+-------------------------------------------------------------------
+Fri Jan 22 15:48:13 UTC 2021 - Mark��ta Machov�� <mmachova(a)suse.com>
+
+- Convert to single-spec
+- Use update-alternatives to handle binaries
+- Do not expect python3.5 during tests
+
+-------------------------------------------------------------------
Old:
----
mypy-0.790.tar.gz
New:
----
mypy-0.800.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mypy.spec ++++++
--- /var/tmp/diff_new_pack.zjrrT8/_old 2021-02-01 13:28:32.514134676 +0100
+++ /var/tmp/diff_new_pack.zjrrT8/_new 2021-02-01 13:28:32.514134676 +0100
@@ -1,7 +1,7 @@
#
# spec file for package mypy
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,9 @@
#
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: mypy
-Version: 0.790
+Version: 0.800
Release: 0
Summary: Optional static typing for Python
License: MIT
@@ -25,26 +26,30 @@
URL: http://www.mypy-lang.org/
Source0: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz
Source99: mypy-rpmlintrc
+BuildRequires: %{python_module mypy_extensions >= 0.4.0}
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module typed-ast >= 1.4.0}
+BuildRequires: %{python_module typing_extensions >= 3.7.4}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: python3-mypy_extensions >= 0.4.0
-BuildRequires: python3-setuptools
-BuildRequires: python3-typed-ast >= 1.4.0
-BuildRequires: python3-typing_extensions >= 3.7.4
+Requires: python-mypy_extensions >= 0.4.0
+Requires: python-typed-ast >= 1.4.0
+Requires: python-typing_extensions >= 3.7.4
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
+Provides: mypy = %{version}
+Obsoletes: mypy < %{version}
+%endif
+BuildArch: noarch
# SECTION tests
-BuildRequires: python3-pytest
+BuildRequires: %{python_module pytest}
# /SECTION
-Requires: python3
-Requires: python3-mypy_extensions >= 0.4.0
-Requires: python3-typed-ast >= 1.4.0
-Requires: python3-typing_extensions >= 3.7.4
-Provides: python3-mypy = %{version}
-Obsoletes: python3-mypy < %{version}
-BuildArch: noarch
# SECTION docs
BuildRequires: python3-Sphinx >= 1.4.4
BuildRequires: python3-sphinx_rtd_theme >= 0.1.9
# /SECTION
+%python_subpackages
%description
Mypy is an optional static type checker for Python that aims to
@@ -69,32 +74,43 @@
sed -i '1s/env //' mypy/typeshed/scripts/update-stubtest-whitelist.py
%build
-%python3_build
+%python_build
pushd docs
-make %{?_smp_mflags} html
+%make_build html
rm build/html/.buildinfo
popd
%install
-%python3_install
-%fdupes %{buildroot}
+%python_install
+%python_clone -a %{buildroot}%{_bindir}/dmypy
+%python_clone -a %{buildroot}%{_bindir}/mypy
+%python_clone -a %{buildroot}%{_bindir}/mypyc
+%python_clone -a %{buildroot}%{_bindir}/stubgen
+%python_clone -a %{buildroot}%{_bindir}/stubtest
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-export PYTHONPATH=%{buildroot}%{python3_sitelib}
sed -i '/plugin/d' ./mypy_self_check.ini
sed -i '/warn_unused_ignores/d' ./mypy_self_check.ini
-python3 -m mypy --config-file mypy_self_check.ini -p mypy
+sed -i '/python_version.*$/d' ./mypy_self_check.ini
+%python_exec -m mypy --config-file mypy_self_check.ini -p mypy
# py.test3 -v ��� we need to analyze subset of tests which would be
# available and without large dependencies.
-%files
+%post
+%python_install_alternative mypy dmypy mypyc stubgen stubtest
+
+%postun
+%python_uninstall_alternative mypy
+
+%files %{python_files}
%doc docs/README.md docs/build/html/
%license LICENSE
-%{python3_sitelib}/*
-%{_bindir}/dmypy
-%{_bindir}/mypy
-%{_bindir}/mypyc
-%{_bindir}/stubgen
-%{_bindir}/stubtest
+%{python_sitelib}/*
+%python_alternative %{_bindir}/dmypy
+%python_alternative %{_bindir}/mypy
+%python_alternative %{_bindir}/mypyc
+%python_alternative %{_bindir}/stubgen
+%python_alternative %{_bindir}/stubtest
%changelog
++++++ mypy-0.790.tar.gz -> mypy-0.800.tar.gz ++++++
++++ 73179 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ddt for openSUSE:Factory checked in at 2021-02-01 13:26:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ddt (Old)
and /work/SRC/openSUSE:Factory/.python-ddt.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ddt"
Mon Feb 1 13:26:42 2021 rev:12 rq:866682 version:1.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ddt/python-ddt.changes 2020-06-05 19:59:20.759758493 +0200
+++ /work/SRC/openSUSE:Factory/.python-ddt.new.28504/python-ddt.changes 2021-02-01 13:28:30.878132131 +0100
@@ -1,0 +2,5 @@
+Mon Jan 25 21:52:46 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- add 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
+
+-------------------------------------------------------------------
New:
----
0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ddt.spec ++++++
--- /var/tmp/diff_new_pack.SLggtg/_old 2021-02-01 13:28:31.502133101 +0100
+++ /var/tmp/diff_new_pack.SLggtg/_new 2021-02-01 13:28:31.502133101 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-ddt
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@
License: MIT
URL: https://github.com/txels/ddt
Source: https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
+# https://github.com/datadriventests/ddt/pull/96
+Patch1: 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -43,6 +45,7 @@
%prep
%setup -q -n ddt-%{version}
+%autopatch -p1
%build
%python_build
++++++ 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch ++++++
From 97f0a2315736e50f1b34a015447cd751da66ecb6 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk(a)dmllr.de>
Date: Mon, 25 Jan 2021 22:49:04 +0100
Subject: [PATCH] Use Yaml's UnsafeLoader for Python embedding tests
In newer PyYAML versions the default FullLoader has
python/object/* integration removed. One has to use
UnsafeLoader instead. see this issue for details:
https://github.com/yaml/pyyaml/issues/321
---
test/test_example.py | 2 +-
test/test_functional.py | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/test_example.py b/test/test_example.py
index db2cf17..1d27043 100644
--- a/test/test_example.py
+++ b/test/test_example.py
@@ -151,7 +151,7 @@ if have_yaml_support:
@ddt
class YamlOnlyTestCase(unittest.TestCase):
- @file_data('data/test_custom_yaml_loader.yaml', yaml.FullLoader)
+ @file_data('data/test_custom_yaml_loader.yaml', yaml.UnsafeLoader)
def test_custom_yaml_loader(self, instance, expected):
"""Test with yaml tags to create specific classes to compare"""
self.assertEqual(expected, instance)
diff --git a/test/test_functional.py b/test/test_functional.py
index 45c1cae..f9609c6 100644
--- a/test/test_functional.py
+++ b/test/test_functional.py
@@ -440,7 +440,7 @@ def test_load_yaml_with_python_tag():
loader allowing python tags is passed.
"""
- from yaml import FullLoader
+ from yaml import UnsafeLoader
from yaml.constructor import ConstructorError
def str_to_type(class_name):
@@ -457,13 +457,13 @@ def test_load_yaml_with_python_tag():
raise AssertionError()
@ddt
- class YamlFullLoaderTest(object):
- @file_data('data/test_functional_custom_tags.yaml', FullLoader)
+ class YamlUnsafeLoaderTest(object):
+ @file_data('data/test_functional_custom_tags.yaml', UnsafeLoader)
def test_cls_is_instance(self, instance, expected):
assert isinstance(instance, str_to_type(expected))
- tests = list(filter(_is_test, YamlFullLoaderTest.__dict__))
- obj = YamlFullLoaderTest()
+ tests = list(filter(_is_test, YamlUnsafeLoaderTest.__dict__))
+ obj = YamlUnsafeLoaderTest()
if not tests:
raise AssertionError('No tests have been found.')
--
2.30.0
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-Mako for openSUSE:Factory checked in at 2021-02-01 13:26:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Mako (Old)
and /work/SRC/openSUSE:Factory/.python-Mako.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Mako"
Mon Feb 1 13:26:41 2021 rev:42 rq:866414 version:1.1.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Mako/python-Mako.changes 2020-12-16 10:59:19.407501286 +0100
+++ /work/SRC/openSUSE:Factory/.python-Mako.new.28504/python-Mako.changes 2021-02-01 13:28:29.894130600 +0100
@@ -1,0 +2,8 @@
+Sun Jan 24 19:48:33 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 1.1.4:
+ * Fixed Python deprecation issues related to module importing, as well as
+ file access within the Lingua plugin, for deprecated APIs that began to
+ emit warnings under Python 3.10.
+
+-------------------------------------------------------------------
Old:
----
Mako-1.1.3.tar.gz
New:
----
Mako-1.1.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Mako.spec ++++++
--- /var/tmp/diff_new_pack.m24HnN/_old 2021-02-01 13:28:30.454131471 +0100
+++ /var/tmp/diff_new_pack.m24HnN/_new 2021-02-01 13:28:30.458131477 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-Mako
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Mako
-Version: 1.1.3
+Version: 1.1.4
Release: 0
Summary: A Python templating language
License: MIT
++++++ Mako-1.1.3.tar.gz -> Mako-1.1.4.tar.gz ++++++
++++ 4570 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-PyYAML for openSUSE:Factory checked in at 2021-02-01 13:26:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyYAML (Old)
and /work/SRC/openSUSE:Factory/.python-PyYAML.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyYAML"
Mon Feb 1 13:26:39 2021 rev:24 rq:866403 version:5.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyYAML/python-PyYAML.changes 2020-03-27 00:27:05.720311448 +0100
+++ /work/SRC/openSUSE:Factory/.python-PyYAML.new.28504/python-PyYAML.changes 2021-02-01 13:28:28.806128907 +0100
@@ -1,0 +2,11 @@
+Sun Jan 24 18:21:20 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 5.4.1 (bsc#1174514, CVE-2020-14343):
+ * Fix stub compat with older pyyaml versions that may unwittingly load it
+ * Build modernization, remove distutils, fix metadata, build wheels, CI to GHA
+ * Fix for CVE-2020-14343, moves arbitrary python tags to UnsafeLoader
+ * Fix memory leak in implicit resolver setup
+ * Fix py2 copy support for timezone objects
+ * Fix compatibility with Jython
+
+-------------------------------------------------------------------
Old:
----
PyYAML-5.3.1.tar.gz
New:
----
PyYAML-5.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyYAML.spec ++++++
--- /var/tmp/diff_new_pack.5r3sBv/_old 2021-02-01 13:28:29.386129809 +0100
+++ /var/tmp/diff_new_pack.5r3sBv/_new 2021-02-01 13:28:29.390129816 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-PyYAML
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-PyYAML
-Version: 5.3.1
+Version: 5.4.1
Release: 0
Summary: YAML parser and emitter for Python
License: MIT
URL: https://github.com/yaml/pyyaml
Source: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.t…
-BuildRequires: %{python_module devel}
+BuildRequires: %{python_module Cython}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: libyaml-devel
@@ -56,6 +56,7 @@
%build
export CFLAGS="%{optflags}"
+export PYYAML_FORCE_LIBYAML=0 # we don't actually want to build the python lib
%python_build
# Fix example permissions.
find examples/ -type f | xargs chmod a-x
@@ -75,7 +76,7 @@
%license LICENSE
%doc CHANGES README examples/
%{python_sitearch}/yaml
-%{python_sitearch}/_yaml.*so
+%{python_sitearch}/_yaml
%{python_sitearch}/PyYAML-%{version}-py%{python_version}.egg-info
%changelog
++++++ PyYAML-5.3.1.tar.gz -> PyYAML-5.4.1.tar.gz ++++++
++++ 33826 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-importlib-metadata for openSUSE:Factory checked in at 2021-02-01 13:26:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-importlib-metadata (Old)
and /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-importlib-metadata"
Mon Feb 1 13:26:37 2021 rev:4 rq:866399 version:3.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-importlib-metadata/python-importlib-metadata.changes 2020-12-24 19:41:29.247220919 +0100
+++ /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.28504/python-importlib-metadata.changes 2021-02-01 13:28:27.854127426 +0100
@@ -1,0 +2,11 @@
+Sun Jan 24 18:15:12 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 3.4.0:
+ * Project now declares itself as being typed.
+ * Additional performance enhancements to distribution
+ discovery.
+ * For PyPA projects, add test ensuring that
+ ``MetadataPathFinder._search_paths`` honors the needed
+ interface. Method is still private.
+
+-------------------------------------------------------------------
Old:
----
importlib_metadata-3.3.0.tar.gz
New:
----
importlib_metadata-3.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-importlib-metadata.spec ++++++
--- /var/tmp/diff_new_pack.W5gqzq/_old 2021-02-01 13:28:28.446128347 +0100
+++ /var/tmp/diff_new_pack.W5gqzq/_new 2021-02-01 13:28:28.450128353 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-importlib-metadata
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-importlib-metadata%{psuffix}
-Version: 3.3.0
+Version: 3.4.0
Release: 0
Summary: Read metadata from Python packages
License: Apache-2.0
++++++ importlib_metadata-3.3.0.tar.gz -> importlib_metadata-3.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/.coveragerc new/importlib_metadata-3.4.0/.coveragerc
--- old/importlib_metadata-3.3.0/.coveragerc 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/.coveragerc 2021-01-10 22:40:46.000000000 +0100
@@ -1,8 +1,8 @@
[run]
omit =
- */.tox/*
- tests/*
- prepare/*
+ */.tox/*
+ tests/*
+ prepare/*
[report]
show_missing = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/.flake8 new/importlib_metadata-3.4.0/.flake8
--- old/importlib_metadata-3.3.0/.flake8 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/.flake8 2021-01-10 22:40:46.000000000 +0100
@@ -1,10 +1,10 @@
[flake8]
max-line-length = 88
-ignore =
- # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
- W503
- # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
- W504
+
+# jaraco/skeleton#34
+max-complexity = 10
+
+extend-ignore =
# Black creates whitespace before colon
E203
enable-extensions = U4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/.github/workflows/main.yml new/importlib_metadata-3.4.0/.github/workflows/main.yml
--- old/importlib_metadata-3.3.0/.github/workflows/main.yml 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/.github/workflows/main.yml 2021-01-10 22:40:46.000000000 +0100
@@ -1,4 +1,4 @@
-name: Automated Tests
+name: tests
on: [push, pull_request]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/.pre-commit-config.yaml new/importlib_metadata-3.4.0/.pre-commit-config.yaml
--- old/importlib_metadata-3.3.0/.pre-commit-config.yaml 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/.pre-commit-config.yaml 2021-01-10 22:40:46.000000000 +0100
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/psf/black
- rev: stable
+ rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
- rev: v1.8.0
+ rev: v1.9.1
hooks:
- id: blacken-docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/CHANGES.rst new/importlib_metadata-3.4.0/CHANGES.rst
--- old/importlib_metadata-3.3.0/CHANGES.rst 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/CHANGES.rst 2021-01-10 22:40:46.000000000 +0100
@@ -1,7 +1,17 @@
+v3.4.0
+======
+
+* #10: Project now declares itself as being typed.
+* #272: Additional performance enhancements to distribution
+ discovery.
+* #111: For PyPA projects, add test ensuring that
+ ``MetadataPathFinder._search_paths`` honors the needed
+ interface. Method is still private.
+
v3.3.0
======
-* * #265: ``EntryPoint`` objects now expose a ``.dist`` object
+* #265: ``EntryPoint`` objects now expose a ``.dist`` object
referencing the ``Distribution`` when constructed from a
Distribution.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/PKG-INFO new/importlib_metadata-3.4.0/PKG-INFO
--- old/importlib_metadata-3.3.0/PKG-INFO 2020-12-14 02:25:13.023748200 +0100
+++ new/importlib_metadata-3.4.0/PKG-INFO 2021-01-10 22:41:04.982178000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib_metadata
-Version: 3.3.0
+Version: 3.4.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
@@ -14,9 +14,9 @@
.. _PyPI link: https://pypi.org/project/importlib_metadata
- .. image:: https://github.com/python/importlib_metadata/workflows/Automated%20Tests/ba…
- :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22Au…
- :alt: Automated Tests
+ .. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg
+ :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22te…
+ :alt: tests
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
@@ -26,8 +26,7 @@
:target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
- ``importlib_metadata`` is a library to access the metadata for a
- Python package.
+ Library to access the metadata for a Python package.
As of Python 3.8, this functionality has been added to the
`Python standard library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/README.rst new/importlib_metadata-3.4.0/README.rst
--- old/importlib_metadata-3.3.0/README.rst 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/README.rst 2021-01-10 22:40:46.000000000 +0100
@@ -6,9 +6,9 @@
.. _PyPI link: https://pypi.org/project/importlib_metadata
-.. image:: https://github.com/python/importlib_metadata/workflows/Automated%20Tests/ba…
- :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22Au…
- :alt: Automated Tests
+.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg
+ :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22te…
+ :alt: tests
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
@@ -18,8 +18,7 @@
:target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
-``importlib_metadata`` is a library to access the metadata for a
-Python package.
+Library to access the metadata for a Python package.
As of Python 3.8, this functionality has been added to the
`Python standard library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/docs/index.rst new/importlib_metadata-3.4.0/docs/index.rst
--- old/importlib_metadata-3.3.0/docs/index.rst 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/docs/index.rst 2021-01-10 22:40:46.000000000 +0100
@@ -1,5 +1,5 @@
-Welcome to importlib_metadata
-=============================
+Welcome to |project| documentation!
+===================================
``importlib_metadata`` is a library which provides an API for accessing an
installed package's metadata (see :pep:`566`), such as its entry points or its top-level
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/docs/using.rst new/importlib_metadata-3.4.0/docs/using.rst
--- old/importlib_metadata-3.3.0/docs/using.rst 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/docs/using.rst 2021-01-10 22:40:46.000000000 +0100
@@ -253,9 +253,3 @@
.. rubric:: Footnotes
-
-.. [#f1] Technically, the returned distribution metadata object is an
- :class:`email.message.EmailMessage`
- instance, but this is an implementation detail, and not part of the
- stable API. You should only use dictionary-like methods and syntax
- to access the metadata contents.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/importlib_metadata/__init__.py new/importlib_metadata-3.4.0/importlib_metadata/__init__.py
--- old/importlib_metadata-3.3.0/importlib_metadata/__init__.py 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/importlib_metadata/__init__.py 2021-01-10 22:40:46.000000000 +0100
@@ -493,15 +493,22 @@
"""
normalized = None
- suffixes = '.dist-info', '.egg-info'
+ suffixes = 'dist-info', 'egg-info'
exact_matches = [''][:0]
+ egg_prefix = ''
+ versionless_egg_name = ''
def __init__(self, name):
self.name = name
if name is None:
return
self.normalized = self.normalize(name)
- self.exact_matches = [self.normalized + suffix for suffix in self.suffixes]
+ self.exact_matches = [
+ self.normalized + '.' + suffix for suffix in self.suffixes
+ ]
+ legacy_normalized = self.legacy_normalize(self.name)
+ self.egg_prefix = legacy_normalized + '-'
+ self.versionless_egg_name = legacy_normalized + '.egg'
@staticmethod
def normalize(name):
@@ -520,8 +527,9 @@
def matches(self, cand, base):
low = cand.lower()
- pre, ext = os.path.splitext(low)
- name, sep, rest = pre.partition('-')
+ # rpartition is faster than splitext and suitable for this purpose.
+ pre, _, ext = low.rpartition('.')
+ name, _, rest = pre.partition('-')
return (
low in self.exact_matches
or ext in self.suffixes
@@ -532,12 +540,9 @@
)
def is_egg(self, base):
- normalized = self.legacy_normalize(self.name or '')
- prefix = normalized + '-' if normalized else ''
- versionless_egg_name = normalized + '.egg' if self.name else ''
return (
- base == versionless_egg_name
- or base.startswith(prefix)
+ base == self.versionless_egg_name
+ or base.startswith(self.egg_prefix)
and base.endswith('.egg')
)
@@ -565,8 +570,9 @@
@classmethod
def _search_paths(cls, name, paths):
"""Find metadata directories in paths heuristically."""
+ prepared = Prepared(name)
return itertools.chain.from_iterable(
- path.search(Prepared(name)) for path in map(FastPath, paths)
+ path.search(prepared) for path in map(FastPath, paths)
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/importlib_metadata.egg-info/PKG-INFO new/importlib_metadata-3.4.0/importlib_metadata.egg-info/PKG-INFO
--- old/importlib_metadata-3.3.0/importlib_metadata.egg-info/PKG-INFO 2020-12-14 02:25:12.000000000 +0100
+++ new/importlib_metadata-3.4.0/importlib_metadata.egg-info/PKG-INFO 2021-01-10 22:41:04.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib-metadata
-Version: 3.3.0
+Version: 3.4.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
@@ -14,9 +14,9 @@
.. _PyPI link: https://pypi.org/project/importlib_metadata
- .. image:: https://github.com/python/importlib_metadata/workflows/Automated%20Tests/ba…
- :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22Au…
- :alt: Automated Tests
+ .. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg
+ :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22te…
+ :alt: tests
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
@@ -26,8 +26,7 @@
:target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
- ``importlib_metadata`` is a library to access the metadata for a
- Python package.
+ Library to access the metadata for a Python package.
As of Python 3.8, this functionality has been added to the
`Python standard library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/importlib_metadata.egg-info/SOURCES.txt new/importlib_metadata-3.4.0/importlib_metadata.egg-info/SOURCES.txt
--- old/importlib_metadata-3.3.0/importlib_metadata.egg-info/SOURCES.txt 2020-12-14 02:25:12.000000000 +0100
+++ new/importlib_metadata-3.4.0/importlib_metadata.egg-info/SOURCES.txt 2021-01-10 22:41:04.000000000 +0100
@@ -23,6 +23,7 @@
docs/using.rst
importlib_metadata/__init__.py
importlib_metadata/_compat.py
+importlib_metadata/py.typed
importlib_metadata.egg-info/PKG-INFO
importlib_metadata.egg-info/SOURCES.txt
importlib_metadata.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/importlib_metadata.egg-info/requires.txt new/importlib_metadata-3.4.0/importlib_metadata.egg-info/requires.txt
--- old/importlib_metadata-3.3.0/importlib_metadata.egg-info/requires.txt 2020-12-14 02:25:12.000000000 +0100
+++ new/importlib_metadata-3.4.0/importlib_metadata.egg-info/requires.txt 2021-01-10 22:41:04.000000000 +0100
@@ -5,7 +5,7 @@
[docs]
sphinx
-jaraco.packaging>=3.2
+jaraco.packaging>=8.2
rst.linker>=1.9
[testing]
@@ -13,7 +13,7 @@
pytest-checkdocs>=1.2.3
pytest-flake8
pytest-cov
-jaraco.test>=3.2.0
+pytest-enabler
packaging
pep517
pyfakefs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/pyproject.toml new/importlib_metadata-3.4.0/pyproject.toml
--- old/importlib_metadata-3.3.0/pyproject.toml 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/pyproject.toml 2021-01-10 22:40:46.000000000 +0100
@@ -7,16 +7,14 @@
[tool.setuptools_scm]
-# jaraco/skeleton#22
-[tool.jaraco.pytest.plugins.black]
+[pytest.enabler.black]
addopts = "--black"
-# jaraco/skeleton#22
-[tool.jaraco.pytest.plugins.mypy]
+[pytest.enabler.mypy]
addopts = "--mypy"
-[tool.jaraco.pytest.plugins.flake8]
+[pytest.enabler.flake8]
addopts = "--flake8"
-[tool.jaraco.pytest.plugins.cov]
+[pytest.enabler.cov]
addopts = "--cov"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/setup.cfg new/importlib_metadata-3.4.0/setup.cfg
--- old/importlib_metadata-3.3.0/setup.cfg 2020-12-14 02:25:13.023748200 +0100
+++ new/importlib_metadata-3.4.0/setup.cfg 2021-01-10 22:41:04.982178000 +0100
@@ -1,5 +1,6 @@
[metadata]
-license_file = LICENSE
+license_files =
+ LICENSE
name = importlib_metadata
author = Jason R. Coombs
author_email = jaraco(a)jaraco.com
@@ -35,7 +36,7 @@
pytest-black >= 0.3.7; python_implementation != "PyPy"
pytest-cov
pytest-mypy; python_implementation != "PyPy"
- jaraco.test >= 3.2.0
+ pytest-enabler
importlib_resources>=1.3; python_version < "3.9"
packaging
@@ -44,7 +45,7 @@
flufl.flake8
docs =
sphinx
- jaraco.packaging >= 3.2
+ jaraco.packaging >= 8.2
rst.linker >= 1.9
[options.entry_points]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/skeleton.md new/importlib_metadata-3.4.0/skeleton.md
--- old/importlib_metadata-3.3.0/skeleton.md 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/skeleton.md 2021-01-10 22:40:46.000000000 +0100
@@ -138,6 +138,8 @@
- test against multiple Python versions
- run on late (and updated) platform versions
- automated releases of tagged commits
+- [automatic merging of PRs](https://github.com/marketplace/actions/merge-pull-requests) (requires [protecting branches with required status checks](https://docs.github.com/en/free-pro-team@latest/github/administerin…, [not possible through API](https://github.community/t/set-all-status-checks-to-be-required-as-branch-protection-using-the-github-api/119493))
+
### Continuous Deployments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/tests/test_integration.py new/importlib_metadata-3.4.0/tests/test_integration.py
--- old/importlib_metadata-3.3.0/tests/test_integration.py 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/tests/test_integration.py 2021-01-10 22:40:46.000000000 +0100
@@ -5,6 +5,7 @@
from . import fixtures
from importlib_metadata import (
Distribution,
+ MetadataPathFinder,
_compat,
version,
)
@@ -47,3 +48,14 @@
dist = Distribution._local()
assert dist.metadata['Name'] == 'local-pkg'
assert dist.version == '2.0.1'
+
+
+class DistSearch(unittest.TestCase):
+ def test_search_dist_dirs(self):
+ """
+ Pip needs the _search_paths interface to locate
+ distribution metadata dirs. Protect it for PyPA
+ use-cases (only). Ref python/importlib_metadata#111.
+ """
+ res = MetadataPathFinder._search_paths('any-name', [])
+ assert list(res) == []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-3.3.0/tox.ini new/importlib_metadata-3.4.0/tox.ini
--- old/importlib_metadata-3.3.0/tox.ini 2020-12-14 02:24:53.000000000 +0100
+++ new/importlib_metadata-3.4.0/tox.ini 2021-01-10 22:40:46.000000000 +0100
@@ -12,6 +12,10 @@
pytest {posargs}
usedevelop = True
extras = testing
+setenv =
+ # workaround pypa/pip#9143
+ PIP_USE_DEPRECATED=legacy-resolver
+
[testenv:docs]
extras =
@@ -32,14 +36,14 @@
[testenv:perf]
use_develop = False
deps =
- ipython
+ ipython
commands =
- python -m timeit -s 'import importlib_metadata' -- 'importlib_metadata.distribution("ipython")'
+ python -m timeit -s 'import importlib_metadata' -- 'importlib_metadata.distribution("ipython")'
[testenv:release]
skip_install = True
deps =
- pep517>=0.5
+ build
twine[keyring]>=1.13
path
jaraco.develop>=7.1
@@ -50,6 +54,6 @@
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
- python -m pep517.build .
+ python -m build
python -m twine upload dist/*
python -m jaraco.develop.create-github-release
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ptyprocess for openSUSE:Factory checked in at 2021-02-01 13:26:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ptyprocess (Old)
and /work/SRC/openSUSE:Factory/.python-ptyprocess.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ptyprocess"
Mon Feb 1 13:26:35 2021 rev:8 rq:866398 version:0.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ptyprocess/python-ptyprocess.changes 2020-06-11 14:45:00.393435736 +0200
+++ /work/SRC/openSUSE:Factory/.python-ptyprocess.new.28504/python-ptyprocess.changes 2021-02-01 13:28:26.970126050 +0100
@@ -1,0 +2,7 @@
+Sun Jan 24 18:13:49 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 0.7.0:
+ * Add pass_fds parameters (#49)
+ * Switch to Github actions for CI
+
+-------------------------------------------------------------------
Old:
----
ptyprocess-0.6.0.tar.gz
New:
----
ptyprocess-0.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ptyprocess.spec ++++++
--- /var/tmp/diff_new_pack.h9xpch/_old 2021-02-01 13:28:27.602127034 +0100
+++ /var/tmp/diff_new_pack.h9xpch/_new 2021-02-01 13:28:27.602127034 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-ptyprocess
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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-ptyprocess
-Version: 0.6.0
+Version: 0.7.0
Release: 0
Summary: Run a subprocess in a pseudo terminal
License: ISC
++++++ ptyprocess-0.6.0.tar.gz -> ptyprocess-0.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/.github/workflows/test.yml new/ptyprocess-0.7.0/.github/workflows/test.yml
--- old/ptyprocess-0.6.0/.github/workflows/test.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/ptyprocess-0.7.0/.github/workflows/test.yml 2020-12-28 16:13:46.125647500 +0100
@@ -0,0 +1,24 @@
+name: Test
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, 2.7 ]
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install dependencies
+ run: |
+ pip install pytest
+
+ - name: Run tests
+ run: pytest -v
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/.travis.yml new/ptyprocess-0.7.0/.travis.yml
--- old/ptyprocess-0.6.0/.travis.yml 2018-06-22 10:30:09.084751800 +0200
+++ new/ptyprocess-0.7.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-language: python
-python:
- - "3.6"
- - "3.5"
- - "3.4"
- - "2.7"
-# command to run tests
-script: py.test --verbose --verbose
-sudo: False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/PKG-INFO new/ptyprocess-0.7.0/PKG-INFO
--- old/ptyprocess-0.6.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/ptyprocess-0.7.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ptyprocess
-Version: 0.6.0
+Version: 0.7.0
Summary: Run a subprocess in a pseudo terminal
Home-page: https://github.com/pexpect/ptyprocess
Author: Thomas Kluyver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/docs/conf.py new/ptyprocess-0.7.0/docs/conf.py
--- old/ptyprocess-0.6.0/docs/conf.py 2017-07-01 23:19:37.478078000 +0200
+++ new/ptyprocess-0.7.0/docs/conf.py 2020-12-28 16:13:18.195637700 +0100
@@ -55,9 +55,9 @@
# built documents.
#
# The short X.Y version.
-version = '0.5'
+version = '0.7'
# The full version, including alpha/beta/rc tags.
-release = version + '.2'
+release = version #+ '.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/ptyprocess/__init__.py new/ptyprocess-0.7.0/ptyprocess/__init__.py
--- old/ptyprocess-0.6.0/ptyprocess/__init__.py 2018-06-22 10:28:26.157719400 +0200
+++ new/ptyprocess-0.7.0/ptyprocess/__init__.py 2020-12-28 16:13:18.182637700 +0100
@@ -1,4 +1,4 @@
"""Run a subprocess in a pseudo terminal"""
from .ptyprocess import PtyProcess, PtyProcessUnicode, PtyProcessError
-__version__ = '0.6.0'
+__version__ = '0.7.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/ptyprocess/ptyprocess.py new/ptyprocess-0.7.0/ptyprocess/ptyprocess.py
--- old/ptyprocess-0.6.0/ptyprocess/ptyprocess.py 2018-06-22 10:22:19.183169100 +0200
+++ new/ptyprocess-0.7.0/ptyprocess/ptyprocess.py 2020-12-28 15:31:40.890978000 +0100
@@ -178,7 +178,7 @@
@classmethod
def spawn(
cls, argv, cwd=None, env=None, echo=True, preexec_fn=None,
- dimensions=(24, 80)):
+ dimensions=(24, 80), pass_fds=()):
'''Start the given command in a child process in a pseudo terminal.
This does all the fork/exec type of stuff for a pty, and returns an
@@ -190,6 +190,10 @@
Dimensions of the psuedoterminal used for the subprocess can be
specified as a tuple (rows, cols), or the default (24, 80) will be used.
+
+ By default, all file descriptors except 0, 1 and 2 are closed. This
+ behavior can be overridden with pass_fds, a list of file descriptors to
+ keep open between the parent and the child.
'''
# Note that it is difficult for this method to fail.
# You cannot detect if the child process cannot start.
@@ -255,12 +259,14 @@
# Do not allow child to inherit open file descriptors from parent,
# with the exception of the exec_err_pipe_write of the pipe
+ # and pass_fds.
# Impose ceiling on max_fd: AIX bugfix for users with unlimited
# nofiles where resource.RLIMIT_NOFILE is 2^63-1 and os.closerange()
# occasionally raises out of range error
max_fd = min(1048576, resource.getrlimit(resource.RLIMIT_NOFILE)[0])
- os.closerange(3, exec_err_pipe_write)
- os.closerange(exec_err_pipe_write+1, max_fd)
+ spass_fds = sorted(set(pass_fds) | {exec_err_pipe_write})
+ for pair in zip([2] + spass_fds, spass_fds + [max_fd]):
+ os.closerange(pair[0]+1, pair[1])
if cwd is not None:
os.chdir(cwd)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/pyproject.toml new/ptyprocess-0.7.0/pyproject.toml
--- old/ptyprocess-0.6.0/pyproject.toml 2018-06-22 10:27:25.242292000 +0200
+++ new/ptyprocess-0.7.0/pyproject.toml 2020-12-28 16:13:46.125647500 +0100
@@ -1,6 +1,6 @@
[build-system]
-requires = ["flit"]
-build-backend = "flit.buildapi"
+requires = ["flit_core >=2,<4"]
+build-backend = "flit_core.buildapi"
[tool.flit.metadata]
module = "ptyprocess"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/setup.py new/ptyprocess-0.7.0/setup.py
--- old/ptyprocess-0.6.0/setup.py 1970-01-01 01:00:00.000000000 +0100
+++ new/ptyprocess-0.7.0/setup.py 1970-01-01 01:00:00.000000000 +0100
@@ -10,7 +10,7 @@
{'': ['*']}
setup(name='ptyprocess',
- version='0.6.0',
+ version='0.7.0',
description='Run a subprocess in a pseudo terminal',
author='Thomas Kluyver',
author_email='thomas(a)kluyver.me.uk',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ptyprocess-0.6.0/tests/test_spawn.py new/ptyprocess-0.7.0/tests/test_spawn.py
--- old/ptyprocess-0.6.0/tests/test_spawn.py 2015-12-09 17:48:31.281371400 +0100
+++ new/ptyprocess-0.7.0/tests/test_spawn.py 2020-12-28 15:31:40.890978000 +0100
@@ -1,6 +1,8 @@
+import fcntl
import os
import time
import select
+import tempfile
import unittest
from ptyprocess.ptyprocess import which
from ptyprocess import PtyProcess, PtyProcessUnicode
@@ -111,3 +113,37 @@
@unittest.skipIf(which('bc') is None, "bc(1) not found on this server.")
def test_interactive_repl_unicode_echo(self):
self._interactive_repl_unicode(echo=True)
+
+ def test_pass_fds(self):
+ with tempfile.NamedTemporaryFile() as temp_file:
+ temp_file_fd = temp_file.fileno()
+ temp_file_name = temp_file.name
+
+ # Temporary files are CLOEXEC by default
+ fcntl.fcntl(temp_file_fd,
+ fcntl.F_SETFD,
+ fcntl.fcntl(temp_file_fd, fcntl.F_GETFD) &
+ ~fcntl.FD_CLOEXEC)
+
+ # You can write with pass_fds
+ p = PtyProcess.spawn(['bash',
+ '-c',
+ 'printf hello >&{}'.format(temp_file_fd)],
+ echo=True,
+ pass_fds=(temp_file_fd,))
+ p.wait()
+ assert p.status == 0
+
+ with open(temp_file_name, 'r') as temp_file_r:
+ assert temp_file_r.read() == 'hello'
+
+ # You can't write without pass_fds
+ p = PtyProcess.spawn(['bash',
+ '-c',
+ 'printf bye >&{}'.format(temp_file_fd)],
+ echo=True)
+ p.wait()
+ assert p.status != 0
+
+ with open(temp_file_name, 'r') as temp_file_r:
+ assert temp_file_r.read() == 'hello'
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-mock for openSUSE:Factory checked in at 2021-02-01 13:26:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mock (Old)
and /work/SRC/openSUSE:Factory/.python-mock.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mock"
Mon Feb 1 13:26:34 2021 rev:27 rq:866397 version:4.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mock/python-mock.changes 2020-05-01 11:04:49.618734909 +0200
+++ /work/SRC/openSUSE:Factory/.python-mock.new.28504/python-mock.changes 2021-02-01 13:28:25.910124402 +0100
@@ -1,0 +2,16 @@
+Sun Jan 24 18:10:57 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 4.0.3:
+ * Issue #42532: Remove unexpected call of ``__bool__`` when passing a
+ ``spec_arg`` argument to a Mock.
+ * Issue #39966: Revert bpo-25597. :class:`unittest.mock.MagicMock` with
+ wraps' set uses default return values for magic methods.
+ * Issue #41877: Mock objects which are not unsafe will now raise an
+ AttributeError if an attribute with the prefix asert, aseert, or assrt is
+ accessed, in addition to this already happening for the prefixes assert or
+ assret.
+ * Issue #40126: Fixed reverting multiple patches in unittest.mock. Patcher's
+ ``__exit__()`` is now never called if its ``__enter__()`` is failed.
+ Returning true from ``__exit__()`` silences now the exception.
+
+-------------------------------------------------------------------
Old:
----
4.0.2.tar.gz
New:
----
4.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mock.spec ++++++
--- /var/tmp/diff_new_pack.0dyLwS/_old 2021-02-01 13:28:26.610125491 +0100
+++ /var/tmp/diff_new_pack.0dyLwS/_new 2021-02-01 13:28:26.610125491 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-mock
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
%bcond_with test
%endif
Name: python-mock%{psuffix}
-Version: 4.0.2
+Version: 4.0.3
Release: 0
Summary: A Python Mocking and Patching Library for Testing
License: BSD-2-Clause
++++++ 4.0.2.tar.gz -> 4.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/.github/ISSUE_TEMPLATE/bug_report.md new/mock-4.0.3/.github/ISSUE_TEMPLATE/bug_report.md
--- old/mock-4.0.2/.github/ISSUE_TEMPLATE/bug_report.md 1970-01-01 01:00:00.000000000 +0100
+++ new/mock-4.0.3/.github/ISSUE_TEMPLATE/bug_report.md 2020-12-10 08:30:27.000000000 +0100
@@ -0,0 +1,30 @@
+---
+name: Bug report
+about: Only report bugs here that are specific to this backport.
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+This package is a rolling backport of [`unittest.mock`](https://github.com/python/cpython/blob/master/Lib/unittest/mock.py).
+As such, any problems you encounter most likely need to be fixed upstream.
+
+Before submitting an issue here, please try and reproduce the problem on the latest release of Python 3, including alphas, and replace any import from `mock` with ones from `unittest.mock`.
+
+If the issue still occurs, then please report upstream through https://bugs.python.org/ as it will need to be fixed there so that it can be backported here and released to you.
+
+If the issue does not occur upstream, please file an issue using the template below as it may be an issue specific to the backport:
+
+**What versions are you using?**
+ - Python: [e.g. 3.7.1]
+ - Mock: [e.g. 4.0.2]
+ - Operating System: [e.g.Linux, macOS, Windows]
+
+**What happened?**
+
+<!--
+A clear and concise description of what the problem is, including full tracebacks and code being executed
+-->
+
+**What were you hoping to happen instead?**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/CHANGELOG.rst new/mock-4.0.3/CHANGELOG.rst
--- old/mock-4.0.2/CHANGELOG.rst 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/CHANGELOG.rst 2020-12-10 08:30:27.000000000 +0100
@@ -1,3 +1,21 @@
+4.0.3
+-----
+
+- Issue #42532: Remove unexpected call of ``__bool__`` when passing a
+ ``spec_arg`` argument to a Mock.
+
+- Issue #39966: Revert bpo-25597. :class:`unittest.mock.MagicMock` with
+ wraps' set uses default return values for magic methods.
+
+- Issue #41877: Mock objects which are not unsafe will now raise an
+ AttributeError if an attribute with the prefix asert, aseert, or assrt is
+ accessed, in addition to this already happening for the prefixes assert or
+ assret.
+
+- Issue #40126: Fixed reverting multiple patches in unittest.mock. Patcher's
+ ``__exit__()`` is now never called if its ``__enter__()`` is failed.
+ Returning true from ``__exit__()`` silences now the exception.
+
4.0.2
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/lastsync.txt new/mock-4.0.3/lastsync.txt
--- old/mock-4.0.2/lastsync.txt 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/lastsync.txt 2020-12-10 08:30:27.000000000 +0100
@@ -1 +1 @@
-e553f204bf0e39b1d701a364bc71b286acb9433f
+c598a04dd29b89ad072245ddaf738badcfb41ac7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/mock/__init__.py new/mock-4.0.3/mock/__init__.py
--- old/mock-4.0.2/mock/__init__.py 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/mock/__init__.py 2020-12-10 08:30:27.000000000 +0100
@@ -7,7 +7,7 @@
import mock.mock as _mock
from mock.mock import *
-__version__ = '4.0.2'
+__version__ = '4.0.3'
version_info = tuple(int(p) for p in
re.match(r'(\d+).(\d+).(\d+)', __version__).groups())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/mock/mock.py new/mock-4.0.3/mock/mock.py
--- old/mock-4.0.2/mock/mock.py 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/mock/mock.py 2020-12-10 08:30:27.000000000 +0100
@@ -408,7 +408,7 @@
# Check if spec is an async object or function
bound_args = _MOCK_SIG.bind_partial(cls, *args, **kw).arguments
spec_arg = bound_args.get('spec_set', bound_args.get('spec'))
- if spec_arg and _is_async_obj(spec_arg):
+ if spec_arg is not None and _is_async_obj(spec_arg):
bases = (AsyncMockMixin, cls)
new = type(cls.__name__, bases, {'__doc__': cls.__doc__})
instance = _safe_super(NonCallableMock, cls).__new__(new)
@@ -633,9 +633,9 @@
elif _is_magic(name):
raise AttributeError(name)
if not self._mock_unsafe:
- if name.startswith(('assert', 'assret')):
+ if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')):
raise AttributeError("Attributes cannot start with 'assert' "
- "or 'assret'")
+ "or its misspellings")
result = self._mock_children.get(name)
if result is _deleted:
@@ -1250,11 +1250,6 @@
return thing
-def _is_started(patcher):
- # XXXX horrible
- return hasattr(patcher, 'is_local')
-
-
class _patch(object):
attribute_name = None
@@ -1325,14 +1320,9 @@
@contextlib.contextmanager
def decoration_helper(self, patched, args, keywargs):
extra_args = []
- entered_patchers = []
- patching = None
-
- exc_info = tuple()
- try:
+ with contextlib.ExitStack() as exit_stack:
for patching in patched.patchings:
- arg = patching.__enter__()
- entered_patchers.append(patching)
+ arg = exit_stack.enter_context(patching)
if patching.attribute_name is not None:
keywargs.update(arg)
elif patching.new is DEFAULT:
@@ -1340,19 +1330,6 @@
args += tuple(extra_args)
yield (args, keywargs)
- except:
- if (patching not in entered_patchers and
- _is_started(patching)):
- # the patcher may have been started, but an exception
- # raised whilst entering one of its additional_patchers
- entered_patchers.append(patching)
- # Pass the exception to __exit__
- exc_info = sys.exc_info()
- # re-raise the exception
- raise
- finally:
- for patching in reversed(entered_patchers):
- patching.__exit__(*exc_info)
def decorate_callable(self, func):
@@ -1529,25 +1506,26 @@
self.temp_original = original
self.is_local = local
- setattr(self.target, self.attribute, new_attr)
- if self.attribute_name is not None:
- extra_args = {}
- if self.new is DEFAULT:
- extra_args[self.attribute_name] = new
- for patching in self.additional_patchers:
- arg = patching.__enter__()
- if patching.new is DEFAULT:
- extra_args.update(arg)
- return extra_args
-
- return new
+ self._exit_stack = contextlib.ExitStack()
+ try:
+ setattr(self.target, self.attribute, new_attr)
+ if self.attribute_name is not None:
+ extra_args = {}
+ if self.new is DEFAULT:
+ extra_args[self.attribute_name] = new
+ for patching in self.additional_patchers:
+ arg = self._exit_stack.enter_context(patching)
+ if patching.new is DEFAULT:
+ extra_args.update(arg)
+ return extra_args
+ return new
+ except:
+ if not self.__exit__(*sys.exc_info()):
+ raise
def __exit__(self, *exc_info):
"""Undo the patch."""
- if not _is_started(self):
- return
-
if self.is_local and self.temp_original is not DEFAULT:
setattr(self.target, self.attribute, self.temp_original)
else:
@@ -1562,9 +1540,9 @@
del self.temp_original
del self.is_local
del self.target
- for patcher in reversed(self.additional_patchers):
- if _is_started(patcher):
- patcher.__exit__(*exc_info)
+ exit_stack = self._exit_stack
+ del self._exit_stack
+ return exit_stack.__exit__(*exc_info)
def start(self):
@@ -1580,9 +1558,9 @@
self._active_patches.remove(self)
except ValueError:
# If the patch hasn't been started this will fail
- pass
+ return None
- return self.__exit__()
+ return self.__exit__(None, None, None)
@@ -1882,9 +1860,9 @@
_patch._active_patches.remove(self)
except ValueError:
# If the patch hasn't been started this will fail
- pass
+ return None
- return self.__exit__()
+ return self.__exit__(None, None, None)
def _clear_dict(in_dict):
@@ -2047,12 +2025,6 @@
def _set_return_value(mock, method, name):
- # If _mock_wraps is present then attach it so that wrapped object
- # is used for return value is used when called.
- if mock._mock_wraps is not None:
- method._mock_wraps = getattr(mock._mock_wraps, name)
- return
-
fixed = _return_values.get(name, DEFAULT)
if fixed is not DEFAULT:
method.return_value = fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/mock/tests/testmock.py new/mock-4.0.3/mock/tests/testmock.py
--- old/mock-4.0.2/mock/tests/testmock.py 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/mock/tests/testmock.py 2020-12-10 08:30:27.000000000 +0100
@@ -716,12 +716,16 @@
def test_magic_method_wraps_dict(self):
+ # bpo-25597: MagicMock with wrap doesn't call wrapped object's
+ # method for magic methods with default values.
data = {'foo': 'bar'}
wrapped_dict = MagicMock(wraps=data)
self.assertEqual(wrapped_dict.get('foo'), 'bar')
- self.assertEqual(wrapped_dict['foo'], 'bar')
- self.assertTrue('foo' in wrapped_dict)
+ # Accessing key gives a MagicMock
+ self.assertIsInstance(wrapped_dict['foo'], MagicMock)
+ # __contains__ method has a default value of False
+ self.assertFalse('foo' in wrapped_dict)
# return_value is non-sentinel and takes precedence over wrapped value.
wrapped_dict.get.return_value = 'return_value'
@@ -732,14 +736,13 @@
self.assertEqual(wrapped_dict.get('foo'), 'bar')
self.assertEqual(wrapped_dict.get('baz'), None)
- with self.assertRaises(KeyError):
- wrapped_dict['baz']
+ self.assertIsInstance(wrapped_dict['baz'], MagicMock)
self.assertFalse('bar' in wrapped_dict)
data['baz'] = 'spam'
self.assertEqual(wrapped_dict.get('baz'), 'spam')
- self.assertEqual(wrapped_dict['baz'], 'spam')
- self.assertTrue('baz' in wrapped_dict)
+ self.assertIsInstance(wrapped_dict['baz'], MagicMock)
+ self.assertFalse('bar' in wrapped_dict)
del data['baz']
self.assertEqual(wrapped_dict.get('baz'), None)
@@ -759,6 +762,7 @@
klass = MagicMock(wraps=Foo)
obj = klass()
self.assertEqual(obj.__getitem__(2), 2)
+ self.assertEqual(obj[2], 2)
self.assertEqual(obj.__custom_method__(), "foo")
@@ -1596,14 +1600,23 @@
#Issue21238
def test_mock_unsafe(self):
m = Mock()
- msg = "Attributes cannot start with 'assert' or 'assret'"
+ msg = "Attributes cannot start with 'assert' or its misspellings"
with self.assertRaisesRegex(AttributeError, msg):
m.assert_foo_call()
with self.assertRaisesRegex(AttributeError, msg):
m.assret_foo_call()
+ with self.assertRaisesRegex(AttributeError, msg):
+ m.asert_foo_call()
+ with self.assertRaisesRegex(AttributeError, msg):
+ m.aseert_foo_call()
+ with self.assertRaisesRegex(AttributeError, msg):
+ m.assrt_foo_call()
m = Mock(unsafe=True)
m.assert_foo_call()
m.assret_foo_call()
+ m.asert_foo_call()
+ m.aseert_foo_call()
+ m.assrt_foo_call()
#Issue21262
def test_assert_not_called(self):
@@ -2154,6 +2167,16 @@
obj = mock(spec=Something)
self.assertIsInstance(obj, Something)
+ def test_bool_not_called_when_passing_spec_arg(self):
+ class Something:
+ def __init__(self):
+ self.obj_with_bool_func = unittest.mock.MagicMock()
+
+ obj = Something()
+ with unittest.mock.patch.object(obj, 'obj_with_bool_func', autospec=True): pass
+
+ self.assertEqual(obj.obj_with_bool_func.__bool__.call_count, 0)
+
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/mock/tests/testpatch.py new/mock-4.0.3/mock/tests/testpatch.py
--- old/mock-4.0.2/mock/tests/testpatch.py 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/mock/tests/testpatch.py 2020-12-10 08:30:27.000000000 +0100
@@ -774,7 +774,7 @@
d = {'foo': 'bar'}
original = d.copy()
patcher = patch.dict(d, [('spam', 'eggs')], clear=True)
- self.assertEqual(patcher.stop(), False)
+ self.assertFalse(patcher.stop())
self.assertEqual(d, original)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mock-4.0.2/setup.cfg new/mock-4.0.3/setup.cfg
--- old/mock-4.0.2/setup.cfg 2020-03-11 18:25:49.000000000 +0100
+++ new/mock-4.0.3/setup.cfg 2020-12-10 08:30:27.000000000 +0100
@@ -31,7 +31,7 @@
docs =
sphinx
test =
- pytest
+ pytest<5.4
pytest-cov
build =
twine
1
0