diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /dev-python/wrapt | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-python/wrapt')
-rw-r--r-- | dev-python/wrapt/Manifest | 8 | ||||
-rw-r--r-- | dev-python/wrapt/files/wrapt-1.12.1-py39.patch | 182 | ||||
-rw-r--r-- | dev-python/wrapt/wrapt-1.12.1.ebuild | 30 | ||||
-rw-r--r-- | dev-python/wrapt/wrapt-1.13.2-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-python/wrapt/wrapt-1.14.0.ebuild (renamed from dev-python/wrapt/wrapt-1.13.2.ebuild) | 6 |
5 files changed, 8 insertions, 220 deletions
diff --git a/dev-python/wrapt/Manifest b/dev-python/wrapt/Manifest index 031f5433d38a..e026f235443c 100644 --- a/dev-python/wrapt/Manifest +++ b/dev-python/wrapt/Manifest @@ -1,7 +1,5 @@ -AUX wrapt-1.12.1-py39.patch 8250 BLAKE2B d3f40b0ef14dc61a12b4e386d1b14b5f5d7f944ea991c7efb70c535b5f77c489feb31f9b162c9aa6fb68236bd0775ceed6c6582247ca0aacbb79255c90b10d57 SHA512 e157e40e720a173762ca227a1daa0acc7fc437f632943c5b5158cb776b32457d592571ff7dadc4f0069b5ace9cb1fd2ebb51807d78d62ca94d8148a4d5be48aa -DIST wrapt-1.12.1.tar.gz 126750 BLAKE2B 92aba2d400aa626445be68fdda2831132e1c341a2f20065b3d7071a2ebc174cb9de7e6a20a8375360cf7df181881fd20b7b2f70dbfdf533e8823982eeaa722f5 SHA512 33e964cb3aa2437bc7d084a98f622f7c5c8c719d97806796ae0317d35130bdb2679a9dd87be7077e2cae1eb32b65d152349fa7cc138cb392d5999cbfdcecc9ac DIST wrapt-1.13.2.tar.gz 130624 BLAKE2B 7ad74653208042326630ae4464494fcdd5299b35a42d495a16a3cbd68bb60fe5ea17f3e95eac85d98142fe339a593a8cda7e3182ce2a6e96f6ba2bb204a1fc46 SHA512 14648465745af7972ffd449783a24a4b5bf8187cbee517d3427825409bd5d073e3153a0c61f5583b84fc6ca2c48479ebf112977ce340369019a617559d09dfc0 -EBUILD wrapt-1.12.1.ebuild 765 BLAKE2B 54e2d2d3ce53c7c234f48b305bcfd1c0b1c2a4ea00697816871580dc5347f428af4729ba5f7c280e31420ea88221a640430b8e98472ebf2ab85da2ed882e6253 SHA512 0ec5d5a96394877bc7a29b7feedf13a203d7d0c8282d3f452c70a9026234f6888187756232a98e94bb90c459c2d9c90de9000722bb692fa70e826bea8518d640 -EBUILD wrapt-1.13.2-r1.ebuild 739 BLAKE2B c18e0245ab4a9998c09495ecdf4cafb477bfa0efd781a1af3d8c0eb4da077b0e48fc68b689cd6d3cc494f64269c4b674496522190f7d8a3f28b89c0d791ac027 SHA512 6a686f352fd59cf3f94f97f99e36d9dcdbee51b5d0f9f8b441034c879f7ba02760b1eb4ed994f5c408da4cdcf6b9e293d7f793abf1ddf9d17b1cbf46897222ec -EBUILD wrapt-1.13.2.ebuild 698 BLAKE2B 6bdb354ede6b31faf464fd3ef775aabb0884658662fae939d2c0a4d8a06145476c400a3cd125b345ec477b3b4b489cd91801fa4a3baa5add0483f086aa56555b SHA512 c9a91744f730b9184f99e776b4146b79e05c487a54aef71587e62c5fc11b17fc726405dac7b277648f81495a69b172f242d594d8436f529c2368b050bbfe2804 +DIST wrapt-1.14.0.tar.gz 133565 BLAKE2B 7548183c4b0b566df3a96cb309b44975a633976f6b56a332d87587dbce5bfaf80cbbfc692ef163118794c1d8e44995ef4750748990ab3e6f5f87968df44f02aa SHA512 ef31279873688208bb17d875a3bbdba3d506f5d9febeae28f1bdb740830395d86aa21dcbe747d592f098b745e5a599c352e122a642f923eab0eb39a30f19695d +EBUILD wrapt-1.13.2-r1.ebuild 731 BLAKE2B 3ddc82845bfb1d3b9d3772c5dadba7251d373f57970ee6b88f0f14f00607552cb9d3969862178f7ec14fbd693fa488b74f24dc0af7b367aead78a8774f3ddb6b SHA512 657d6983a892deb69ebb395e4882b39bcbd4917cde336d7e4663ff56c1b96656b826ade7a54f2abd06fe9e11a8e7bf6b603485d9d06316af4e9a5d5cd5a2210c +EBUILD wrapt-1.14.0.ebuild 739 BLAKE2B c18e0245ab4a9998c09495ecdf4cafb477bfa0efd781a1af3d8c0eb4da077b0e48fc68b689cd6d3cc494f64269c4b674496522190f7d8a3f28b89c0d791ac027 SHA512 6a686f352fd59cf3f94f97f99e36d9dcdbee51b5d0f9f8b441034c879f7ba02760b1eb4ed994f5c408da4cdcf6b9e293d7f793abf1ddf9d17b1cbf46897222ec MISC metadata.xml 370 BLAKE2B 251d8c90cd2a0a1b9fbc714b624c7113e9791f268130211160655f4e4e32aadaddaf98a95bb6d9fff5a5df128da9d551b1281a28e4bd7fa6e3c9db7d35b10829 SHA512 31b369317f4a44d593d9fb72bcb9fcb792809323862866da7c3464ca2282e29a65cd353909c05782b85b162cff363b0ad8ea4750d89c942d442034b9a6eb7dba diff --git a/dev-python/wrapt/files/wrapt-1.12.1-py39.patch b/dev-python/wrapt/files/wrapt-1.12.1-py39.patch deleted file mode 100644 index c3e85e09b660..000000000000 --- a/dev-python/wrapt/files/wrapt-1.12.1-py39.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 33708e76578c173333d1879a4a21baddf8fcdb6a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Fri, 29 May 2020 16:06:07 +0200 -Subject: [PATCH] Update for fixed outer @classmethod behavior in Python 3.9 - -Fixes #160 ---- - docs/decorators.rst | 18 ++++++------- - tests/test_outer_classmethod.py | 45 +++++++++++++++++++++------------ - tests/test_synchronized_lock.py | 22 ++++++++-------- - 3 files changed, 49 insertions(+), 36 deletions(-) - -diff --git a/docs/decorators.rst b/docs/decorators.rst -index b8200d6..94201de 100644 ---- a/docs/decorators.rst -+++ b/docs/decorators.rst -@@ -641,15 +641,15 @@ When calling the wrapped function in the decorator wrapper function, the - instance is already bound to ``wrapped`` and will be passed automatically - as the first argument to the original wrapped function. - --Note that due to a bug in Python ``classmethod.__get__()``, whereby it does --not apply the descriptor protocol to the function wrapped by ``@classmethod``, --the above only applies where the decorator wraps the ``@classmethod`` --decorator. If the decorator is placed inside of the ``@classmethod`` --decorator, then ``instance`` will be ``None`` and the decorator wrapper --function will see the call as being the same as a normal function. As a --result, always place any decorator outside of the ``@classmethod`` --decorator. Hopefully this issue in Python can be addressed in a future --Python version. -+Note that due to a bug in Python prior to 3.9 ``classmethod.__get__()``, -+whereby it does not apply the descriptor protocol to the function -+wrapped by ``@classmethod``, the above only applies where the decorator -+wraps the ``@classmethod`` decorator. If the decorator is placed inside -+of the ``@classmethod`` decorator, then ``instance`` will be ``None`` -+and the decorator wrapper function will see the call as being the same -+as a normal function. As a result, always place any decorator outside of -+the ``@classmethod`` decorator if you need to support earlier Python -+versions. - - Decorating Static Methods - ------------------------- -diff --git a/tests/test_outer_classmethod.py b/tests/test_outer_classmethod.py -index 6b4af4f..9c2fcb8 100644 ---- a/tests/test_outer_classmethod.py -+++ b/tests/test_outer_classmethod.py -@@ -3,6 +3,7 @@ from __future__ import print_function - import unittest - import inspect - import imp -+import sys - - import wrapt - -@@ -121,20 +122,26 @@ class TestNamingOuterClassMethod(unittest.TestCase): - class TestCallingOuterClassMethod(unittest.TestCase): - - def test_class_call_function(self): -- # Test calling classmethod. The instance and class passed to the -- # wrapper will both be None because our decorator is surrounded -- # by the classmethod decorator. The classmethod decorator -- # doesn't bind the method and treats it like a normal function, -- # explicitly passing the class as the first argument with the -- # actual arguments following that. -+ # Test calling classmethod. In Python 3.9, the class will be -+ # passed as instance. In older versions of Python, the instance -+ # and class passed to the wrapper will both be None because our -+ # decorator is surrounded by the classmethod decorator. -+ # The classmethod decorator doesn't bind the method and treats -+ # it like a normal function, explicitly passing the class -+ # as the first argument with the actual arguments following -+ # that. - - _args = (1, 2) - _kwargs = {'one': 1, 'two': 2} - - @wrapt.decorator - def _decorator(wrapped, instance, args, kwargs): -- self.assertEqual(instance, None) -- self.assertEqual(args, (Class,)+_args) -+ if sys.hexversion >= 0x03090000: -+ self.assertEqual(instance, Class) -+ self.assertEqual(args, _args) -+ else: -+ self.assertEqual(instance, None) -+ self.assertEqual(args, (Class,)+_args) - self.assertEqual(kwargs, _kwargs) - self.assertEqual(wrapped.__module__, _function.__module__) - self.assertEqual(wrapped.__name__, _function.__name__) -@@ -155,20 +162,26 @@ class TestCallingOuterClassMethod(unittest.TestCase): - self.assertEqual(result, (_args, _kwargs)) - - def test_instance_call_function(self): -- # Test calling classmethod via class instance. The instance -- # and class passed to the wrapper will both be None because our -- # decorator is surrounded by the classmethod decorator. The -- # classmethod decorator doesn't bind the method and treats it -- # like a normal function, explicitly passing the class as the -- # first argument with the actual arguments following that. -+ # Test calling classmethod via class instance. In Python 3.9, -+ # the class will be passed as instance. In older versions -+ # of Python, the instance and class passed to the wrapper will -+ # both be None because our decorator is surrounded -+ # by the classmethod decorator. The classmethod decorator -+ # doesn't bind the method and treats it like a normal function, -+ # explicitly passing the class as the first argument with -+ # the actual arguments following that. - - _args = (1, 2) - _kwargs = {'one': 1, 'two': 2} - - @wrapt.decorator - def _decorator(wrapped, instance, args, kwargs): -- self.assertEqual(instance, None) -- self.assertEqual(args, (Class,)+_args) -+ if sys.hexversion >= 0x03090000: -+ self.assertEqual(instance, Class) -+ self.assertEqual(args, _args) -+ else: -+ self.assertEqual(instance, None) -+ self.assertEqual(args, (Class,)+_args) - self.assertEqual(kwargs, _kwargs) - self.assertEqual(wrapped.__module__, _function.__module__) - self.assertEqual(wrapped.__name__, _function.__name__) -diff --git a/tests/test_synchronized_lock.py b/tests/test_synchronized_lock.py -index 6e7eb12..b8f60f3 100644 ---- a/tests/test_synchronized_lock.py -+++ b/tests/test_synchronized_lock.py -@@ -1,5 +1,6 @@ - from __future__ import print_function - -+import sys - import unittest - - import wrapt -@@ -157,34 +158,33 @@ class TestSynchronized(unittest.TestCase): - self.assertEqual(_lock3, _lock2) - - def test_synchronized_outer_classmethod(self): -- # XXX If all was good, this would be detected as a class -+ # Bug in Python < 3.9: -+ # If all was good, this would be detected as a class - # method call, but the classmethod decorator doesn't bind - # the wrapped function to the class before calling and - # just calls it direct, explicitly passing the class as -- # first argument. This screws things up. Would be nice if -- # Python were fixed, but that isn't likely to happen. -+ # first argument. This screws things up. - -- #_lock0 = getattr(C4, '_synchronized_lock', None) -- _lock0 = getattr(C4.function2, '_synchronized_lock', None) -+ lock_target = (C4 if sys.hexversion >= 0x03090000 -+ else C4.function2) -+ -+ _lock0 = getattr(lock_target, '_synchronized_lock', None) - self.assertEqual(_lock0, None) - - c4.function2() - -- #_lock1 = getattr(C4, '_synchronized_lock', None) -- _lock1 = getattr(C4.function2, '_synchronized_lock', None) -+ _lock1 = getattr(lock_target, '_synchronized_lock', None) - self.assertNotEqual(_lock1, None) - - C4.function2() - -- #_lock2 = getattr(C4, '_synchronized_lock', None) -- _lock2 = getattr(C4.function2, '_synchronized_lock', None) -+ _lock2 = getattr(lock_target, '_synchronized_lock', None) - self.assertNotEqual(_lock2, None) - self.assertEqual(_lock2, _lock1) - - C4.function2() - -- #_lock3 = getattr(C4, '_synchronized_lock', None) -- _lock3 = getattr(C4.function2, '_synchronized_lock', None) -+ _lock3 = getattr(lock_target, '_synchronized_lock', None) - self.assertNotEqual(_lock3, None) - self.assertEqual(_lock3, _lock2) - --- -2.26.2 - diff --git a/dev-python/wrapt/wrapt-1.12.1.ebuild b/dev-python/wrapt/wrapt-1.12.1.ebuild deleted file mode 100644 index 9e3ccec56fd1..000000000000 --- a/dev-python/wrapt/wrapt-1.12.1.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=no -PYTHON_COMPAT=( python3_{7..10} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="Module for decorators, wrappers and monkey patching" -HOMEPAGE="https://github.com/GrahamDumpleton/wrapt" -SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" - -distutils_enable_tests pytest -distutils_enable_sphinx docs dev-python/sphinx_rtd_theme - -PATCHES=( - "${FILESDIR}"/${P}-py39.patch -) - -python_compile() { - local WRAPT_EXTENSIONS=true - - distutils-r1_python_compile -} diff --git a/dev-python/wrapt/wrapt-1.13.2-r1.ebuild b/dev-python/wrapt/wrapt-1.13.2-r1.ebuild index 5a6bf40b15a8..e0c4a5aabb78 100644 --- a/dev-python/wrapt/wrapt-1.13.2-r1.ebuild +++ b/dev-python/wrapt/wrapt-1.13.2-r1.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.t LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" distutils_enable_tests pytest distutils_enable_sphinx docs dev-python/sphinx_rtd_theme diff --git a/dev-python/wrapt/wrapt-1.13.2.ebuild b/dev-python/wrapt/wrapt-1.14.0.ebuild index b5019252ff93..5a6bf40b15a8 100644 --- a/dev-python/wrapt/wrapt-1.13.2.ebuild +++ b/dev-python/wrapt/wrapt-1.14.0.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{8..10} pypy3 ) + inherit distutils-r1 DESCRIPTION="Module for decorators, wrappers and monkey patching" @@ -12,7 +14,7 @@ SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.t LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" distutils_enable_tests pytest distutils_enable_sphinx docs dev-python/sphinx_rtd_theme |