From a407e25d814596ca802d83102671d95e00079767 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 31 May 2023 15:23:38 +0100 Subject: gentoo auto-resync : 31:05:2023 - 15:23:38 --- dev-python/testresources/Manifest | 4 ++- .../files/testresources-2.0.1-py312-tests.patch | 35 ++++++++++++++++++++ dev-python/testresources/metadata.xml | 3 +- .../testresources/testresources-2.0.1-r3.ebuild | 37 ++++++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 dev-python/testresources/files/testresources-2.0.1-py312-tests.patch create mode 100644 dev-python/testresources/testresources-2.0.1-r3.ebuild (limited to 'dev-python/testresources') diff --git a/dev-python/testresources/Manifest b/dev-python/testresources/Manifest index 37d78561c579..64b70a317024 100644 --- a/dev-python/testresources/Manifest +++ b/dev-python/testresources/Manifest @@ -1,3 +1,5 @@ +AUX testresources-2.0.1-py312-tests.patch 1627 BLAKE2B 516abb3270532c89408a64b757d491a5bf53aa56182b440dd87b3a5fc71aff7173a561c3522f06356d05df67daf05a21bd667cdd5c90d8020cf9f7b2271ad526 SHA512 f67ab39646704067ba2fc8075e100faad2adbb41369177a6c82c6de9a5a9027233e226f9ebeb85929350d9a68312413d32bb2ece0261876662d9163be73901ce DIST testresources-2.0.1.tar.gz 41948 BLAKE2B 81f597099eb17090cfa759c2fc4e30be2de3f749760e6a0e88e4c5484c91fe6a00d1296ec6ba7dc5aea1bcd0f9239989fab8fbb4f211b6c5bf031ff1be4b803b SHA512 0b23432b019400fe378e957d14a91083eef7fe1130a494b567a5274d69e4e8e09ab75861e5453c3f217507e144cf179c908f84dd1a807992d4bee0b8d32cb0f4 EBUILD testresources-2.0.1-r2.ebuild 962 BLAKE2B a935cb64e2e4794823fdd06143c49b5929d504eef6a8902c738a38c30dd1a1d75f78aa1116c82639236a4a0173ec2b6ed9c592531b68708228fd93e02eeb9d3b SHA512 93611fd7c50a62bcba7cb11adaf4f601ecef0417f13787654036f0b5ccc24fd8ef9cc623810480797316275b7c11fc5a351782205281b4e4a72a8fdc868d8a55 -MISC metadata.xml 964 BLAKE2B 6857a30f001cc619ed460c6cea5e60e31bb4653a7f5a6b3f357da0dd8649728bb152efd742f2db1541cb283dfda5bb2dc07f8bb61482c6b0522562046b6a5d67 SHA512 b63c926db0afd5d651a8470c9e4e34cd032c83634a067846c91a3ea12649ccd0c3a7990739bb741766b37b739e91078ea367556a84de6eeefcc5ff697424ae9c +EBUILD testresources-2.0.1-r3.ebuild 856 BLAKE2B bc76ee0044d27a6da4cbf84b80c0766c634c1420b8b00ceb3989abaddf05d6d11f54fc37d61be061796421ca13a6dd5be90c46da5b8928a2aa36176abbce9fa0 SHA512 941e1938b3dbc2326f6af36289e695b387572f396105db309a420ff1e26783c4d7007c9b554cd9dbc8e68ba3d497f7b1583e9328a1cf6a9a29e3bfaf02313634 +MISC metadata.xml 1031 BLAKE2B d0eaaaa67bda4c97d6a02a3bb78dd6fe148362dd896262525b7ebe1a314ac56969b30ea0d14d49232f767c5bc7ef836cfed7d6625eb609beade614d720b9d560 SHA512 5ce52d0d37fd23da71539958d0948417d3b804f38745a2b94c4530120cdab175ae7c25dbc7f2c7a02792e0b89e8ea1c1c99d2942caaa22f04e54046f5ebf80ec diff --git a/dev-python/testresources/files/testresources-2.0.1-py312-tests.patch b/dev-python/testresources/files/testresources-2.0.1-py312-tests.patch new file mode 100644 index 000000000000..7d4451ca43b9 --- /dev/null +++ b/dev-python/testresources/files/testresources-2.0.1-py312-tests.patch @@ -0,0 +1,35 @@ +Subject: [PATCH] Refactor failIf to assertFalse for Python 3.12 Compatibility + +This commit replaces deprecated failIf calls with assertFalse in the +test_resourced_test_case.py file. The failIf method was removed in +Python 3.12 [1-3]. + +[1] https://docs.python.org/3.12/whatsnew/3.12.html#removed +[2] https://github.com/python/cpython/issues/89325 +[3] https://github.com/python/cpython/pull/28268 + +Upstream-PR: https://github.com/testing-cabal/testresources/pull/15 + +diff --git a/testresources/tests/test_resourced_test_case.py b/testresources/tests/test_resourced_test_case.py +index 7d2cfba..3c8a1b3 100644 +--- a/testresources/tests/test_resourced_test_case.py ++++ b/testresources/tests/test_resourced_test_case.py +@@ -129,7 +129,7 @@ class TestResourcedTestCase(testtools.TestCase): + self.resourced_case.resources = [("foo", self.resource_manager)] + self.resourced_case.setUpResources() + self.resourced_case.tearDownResources() +- self.failIf(hasattr(self.resourced_case, "foo")) ++ self.assertFalse(hasattr(self.resourced_case, "foo")) + + def testTearDownResourcesStopsUsingResource(self): + # tearDownResources records that there is one less use of each +@@ -158,5 +158,5 @@ class TestResourcedTestCase(testtools.TestCase): + self.assertEqual(self.resourced_case.foo, self.resource) + self.assertEqual(self.resource_manager._uses, 1) + self.resourced_case.tearDown() +- self.failIf(hasattr(self.resourced_case, "foo")) ++ self.assertFalse(hasattr(self.resourced_case, "foo")) + self.assertEqual(self.resource_manager._uses, 0) +-- +2.39.2 + diff --git a/dev-python/testresources/metadata.xml b/dev-python/testresources/metadata.xml index db9726aac1d4..dae62b0347a1 100644 --- a/dev-python/testresources/metadata.xml +++ b/dev-python/testresources/metadata.xml @@ -21,7 +21,8 @@ - testresources + testing-cabal/testresources testresources + testresources diff --git a/dev-python/testresources/testresources-2.0.1-r3.ebuild b/dev-python/testresources/testresources-2.0.1-r3.ebuild new file mode 100644 index 000000000000..30c055507529 --- /dev/null +++ b/dev-python/testresources/testresources-2.0.1-r3.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="A pyunit extension for managing expensive test resources" +HOMEPAGE=" + https://launchpad.net/testresources/ + https://github.com/testing-cabal/testresources/ + https://pypi.org/project/testresources/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + dev-python/pbr[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/pbr[${PYTHON_USEDEP}] + test? ( + dev-python/testtools[${PYTHON_USEDEP}] + dev-python/fixtures[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${P}-py312-tests.patch" +) + +distutils_enable_tests unittest -- cgit v1.2.3