summaryrefslogtreecommitdiff
path: root/dev-python/fixtures
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/fixtures
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/fixtures')
-rw-r--r--dev-python/fixtures/Manifest5
-rw-r--r--dev-python/fixtures/files/fixtures-4.0.0-py311.patch116
-rw-r--r--dev-python/fixtures/fixtures-3.0.0-r1.ebuild38
-rw-r--r--dev-python/fixtures/fixtures-4.0.0.ebuild13
4 files changed, 123 insertions, 49 deletions
diff --git a/dev-python/fixtures/Manifest b/dev-python/fixtures/Manifest
index 38aea580f3cd..d9c2ed42883c 100644
--- a/dev-python/fixtures/Manifest
+++ b/dev-python/fixtures/Manifest
@@ -1,6 +1,5 @@
+AUX fixtures-4.0.0-py311.patch 5084 BLAKE2B 6cf7ec50b13ed6a76dcfd4f6b4a3c5dfc0062bcc3895811e1c26d156d15045c307f4e3050c086c0bb71b772f16dcd4f135126a6a853d622a5bc24f0c67aa11dc SHA512 99b7e5e3c26f58ce07b308cf4a53e2f90294b3a2fb2748276e882d28fcf4cb6ea5b0406beb6d3a920e775bb982cd6708b2852429b4e7676b9d0e9bd4849c516a
AUX fixtures-4.0.0-pypy39.patch 2158 BLAKE2B a46f4983224a28c9ec5c8cf40565fb9fb744b00435f68e632a0f95b447eed8fce2776e8f1639fa8b50d92eec3fc5a0550eaf30eaf99f082fbaf49def1475df40 SHA512 d94427b5c8d44295311849d9c93271edf829393a30ab98030e0e0270b6fcbc10467e000f50ba8dd863845e12fb1958405ea1bcc6d0ecdaa56f7ca0e628eb5013
-DIST fixtures-3.0.0.tar.gz 56629 BLAKE2B 949c67c428f5e5ca0afc2f875dd4e2a212922415762a2528c185794e4ae2b74d32873aaf7132d97dec95a681bb4d87d85b11a39c43c64cd531dd4bf2fce75f87 SHA512 e52ba864c42d15a8baa60583761006b2dd78e3cd5f3f043f5702346aef428b933d62e8fa5889b7cb4196e4072acc5df3b7ffa39702a1b782887bdc109299b695
DIST fixtures-4.0.0.tar.gz 56786 BLAKE2B 7fa8916d3e384a47c967b51ffeebb81c50c4be7432601aa94f220b6ae32ed189f16750cb126c2925995c2e945684c48041014a97902145343527e8856125b61a SHA512 dcd67c3df9efc16f2a21b6d2917a5b7e45ecc09d1ddbd1de98a5b4b717ea7da0fc82e1054f494255b419a792e841145110c77a1772444f4019fc02e9917c5b80
-EBUILD fixtures-3.0.0-r1.ebuild 1152 BLAKE2B f5cf9e18f9fb9f77c9e2542e7e9d5f903ed5b2516df3ca6d3f85ea4396f79b36eeb3abdaf5e4047dbe31423b1ca09bb6511c7c943006d6f222eac053eccbdb86 SHA512 82c9bf8adafe1b3d0e3c1e74355924c2cc6db37c4afc2d9037440a428f25e147c3fe2ce662f19c88a7e559e35b0a9c5ab20b46a97bbcc184ec80d67d8154b4b9
-EBUILD fixtures-4.0.0.ebuild 862 BLAKE2B 5529b317a8dc6efc0ecf6a41fa14b45ec593d36fb22b64bd11b3e16910427806c553d08969471f75774fb238df9121f95a316f14c9772a9c90f29acdeb301de3 SHA512 193901ee3ebf565c88edb83e58bae3971a7de9b62cde4f1f525d48dc1f052265db1496c6a3f9d2261bdd7382c4891549a07e25f42045e09fe95ed3ec8615ee90
+EBUILD fixtures-4.0.0.ebuild 848 BLAKE2B 5937eee87567b573377df40ab2a7e6cda7f68b481a67a9b93153fdd4fb248b74882d37b2c6ee016d0e98c4c70711da49904c4eb98218d562c45c964c08a95083 SHA512 901a2eccb8ee1bd1f9fdbf449a1a9745ebe1efc88252591d2db8c8a523f1f3e1bd96e89a6789b0cdadc41bdae8434a8581a68d94d5a22129f29c35e875fed406
MISC metadata.xml 914 BLAKE2B 402ef182133763f0b36e4653622cd9ef0bfa1871b05518aaf01701f1c57665ce358d002dc6e638ebd224225069a5b57877ff393567db7607dd0496a872edb2e5 SHA512 368e2a3587fa361618e5208f4c34a15a223bcdc2597dcbd25f5ba8ca74e67a0de4abb1f690f853ca8059df22eee61bf259e974aa92b1e8050435099d81a7a0db
diff --git a/dev-python/fixtures/files/fixtures-4.0.0-py311.patch b/dev-python/fixtures/files/fixtures-4.0.0-py311.patch
new file mode 100644
index 000000000000..6cda1104afca
--- /dev/null
+++ b/dev-python/fixtures/files/fixtures-4.0.0-py311.patch
@@ -0,0 +1,116 @@
+From 54ef596952d459d605fcb40f13bed6d07ef93f4c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 May 2022 12:15:21 +0200
+Subject: [PATCH 1/2] Update classmethod expectations (again) for Python 3.11
+
+It seems that the classmethod behavior in Python 3.11.0b1 is back
+to the one found in Python 3.8. Adjust the test expectations again.
+This time around, we expect the "old-new" behavior in CPython 3.9
+and 3.10 only.
+---
+ fixtures/tests/_fixtures/test_monkeypatch.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py
+index 08cd1c8..fa08b24 100644
+--- a/fixtures/tests/_fixtures/test_monkeypatch.py
++++ b/fixtures/tests/_fixtures/test_monkeypatch.py
+@@ -24,7 +24,8 @@ from fixtures import MonkeyPatch, TestWithFixtures
+ reference = 23
+
+ NEW_PY39_CLASSMETHOD = (
+- sys.version_info >= (3, 9) and not hasattr(sys, "pypy_version_info"))
++ sys.version_info[:2] in ((3, 9), (3,10))
++ and not hasattr(sys, "pypy_version_info"))
+
+ class C(object):
+ def foo(self, arg):
+--
+2.35.1
+
+From 48d8626168a374c099fa891d7e734548e1e03683 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 May 2022 12:25:49 +0200
+Subject: [PATCH 2/2] Support Popen's process_group argument from Python 3.11
+
+---
+ fixtures/_fixtures/popen.py | 9 +++++++--
+ fixtures/tests/_fixtures/test_popen.py | 14 ++++++++++++++
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/fixtures/_fixtures/popen.py b/fixtures/_fixtures/popen.py
+index ffa9bf4..a099854 100644
+--- a/fixtures/_fixtures/popen.py
++++ b/fixtures/_fixtures/popen.py
+@@ -131,7 +131,8 @@ class FakePopen(Fixture):
+ restore_signals=_unpassed, start_new_session=_unpassed,
+ pass_fds=_unpassed, *, group=_unpassed, extra_groups=_unpassed,
+ user=_unpassed, umask=_unpassed, encoding=_unpassed,
+- errors=_unpassed, text=_unpassed, pipesize=_unpassed):
++ errors=_unpassed, text=_unpassed, pipesize=_unpassed,
++ process_group=_unpassed):
+ # Reject arguments introduced by newer versions of Python in older
+ # versions; this makes it harder to accidentally hide compatibility
+ # problems using test doubles.
+@@ -149,6 +150,10 @@ class FakePopen(Fixture):
+ raise TypeError(
+ "FakePopen.__call__() got an unexpected keyword argument "
+ "'pipesize'")
++ if sys.version_info < (3, 11) and process_group is not FakePopen._unpassed:
++ raise TypeError(
++ "FakePopen.__call__() got an unexpected keyword argument "
++ "'process_group'")
+
+ proc_args = dict(args=args)
+ local = locals()
+@@ -158,7 +163,7 @@ class FakePopen(Fixture):
+ "universal_newlines", "startupinfo", "creationflags",
+ "restore_signals", "start_new_session", "pass_fds", "group",
+ "extra_groups", "user", "umask", "encoding", "errors", "text",
+- "pipesize"]:
++ "pipesize", "process_group"]:
+ if local[param] is not FakePopen._unpassed:
+ proc_args[param] = local[param]
+ proc_info = self.get_info(proc_args)
+diff --git a/fixtures/tests/_fixtures/test_popen.py b/fixtures/tests/_fixtures/test_popen.py
+index c7bf1bd..e9ab074 100644
+--- a/fixtures/tests/_fixtures/test_popen.py
++++ b/fixtures/tests/_fixtures/test_popen.py
+@@ -74,6 +74,8 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ all_args["umask"] = "umask"
+ if sys.version_info >= (3, 10):
+ all_args["pipesize"] = "pipesize"
++ if sys.version_info >= (3, 11):
++ all_args["process_group"] = "process_group"
+
+ def get_info(proc_args):
+ self.assertEqual(all_args, proc_args)
+@@ -110,6 +112,15 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ r".* got an unexpected keyword argument 'pipesize'"):
+ fixture(args="args", pipesize=1024)
+
++ @testtools.skipUnless(
++ sys.version_info < (3, 11), "only relevant on Python <3.11")
++ def test_rejects_3_11_args_on_older_versions(self):
++ fixture = self.useFixture(FakePopen(lambda proc_args: {}))
++ with testtools.ExpectedException(
++ TypeError,
++ r".* got an unexpected keyword argument 'process_group'"):
++ fixture(args="args", process_group=42)
++
+ def test_function_signature(self):
+ fake_signature = inspect.getfullargspec(FakePopen.__call__)
+ real_signature = inspect.getfullargspec(subprocess.Popen)
+@@ -130,6 +141,9 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ fake_kwargs = set(fake_signature.kwonlyargs)
+ real_kwargs = set(real_signature.kwonlyargs)
+
++ if sys.version_info < (3, 11):
++ fake_kwargs.remove('process_group')
++
+ if sys.version_info < (3, 10):
+ fake_kwargs.remove('pipesize')
+
+--
+2.35.1
+
diff --git a/dev-python/fixtures/fixtures-3.0.0-r1.ebuild b/dev-python/fixtures/fixtures-3.0.0-r1.ebuild
deleted file mode 100644
index 2f2791853de5..000000000000
--- a/dev-python/fixtures/fixtures-3.0.0-r1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-inherit distutils-r1
-
-DESCRIPTION="Fixtures, reusable state for writing clean tests and more"
-HOMEPAGE="https://launchpad.net/python-fixtures https://pypi.org/project/fixtures/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="|| ( Apache-2.0 BSD )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-# nose not listed but provides coverage output of tests
-# run of test files by python lacks any output except on fail
-RDEPEND="
- >=dev-python/pbr-0.11[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
- >=dev-python/testtools-0.9.22[${PYTHON_USEDEP}]"
-BDEPEND="${RDEPEND}
- test? ( dev-python/mock[${PYTHON_USEDEP}] )"
-
-src_prepare() {
- # broken on py3.9
- # https://github.com/testing-cabal/fixtures/issues/44
- sed -i -e 's:test_patch_classmethod_with:_&:' \
- fixtures/tests/_fixtures/test_monkeypatch.py || die
- distutils-r1_src_prepare
-}
-
-python_test() {
- emake check
-}
diff --git a/dev-python/fixtures/fixtures-4.0.0.ebuild b/dev-python/fixtures/fixtures-4.0.0.ebuild
index 25709bab8188..75916b42f6b4 100644
--- a/dev-python/fixtures/fixtures-4.0.0.ebuild
+++ b/dev-python/fixtures/fixtures-4.0.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=pbr
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
@@ -17,9 +17,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="|| ( Apache-2.0 BSD )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="test"
-RESTRICT="!test? ( test )"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
RDEPEND="
>=dev-python/pbr-5.7.0[${PYTHON_USEDEP}]
@@ -31,10 +29,9 @@ BDEPEND="
)
"
+distutils_enable_tests unittest
+
PATCHES=(
"${FILESDIR}"/${P}-pypy39.patch
+ "${FILESDIR}"/${P}-py311.patch
)
-
-python_test() {
- emake check
-}