commit: 454415b039ab9518f7374bb91ff1e7c17e57db3d Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Tue Aug 5 11:56:09 2025 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Tue Aug 5 15:44:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=454415b0
dev-python/sip: enable py3.14 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> .../sip/files/sip-6.12.0-python314-test.patch | 30 ++++++++++++++++++++++ dev-python/sip/sip-6.12.0.ebuild | 6 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/dev-python/sip/files/sip-6.12.0-python314-test.patch b/dev-python/sip/files/sip-6.12.0-python314-test.patch new file mode 100644 index 000000000000..f1da2f14f8c3 --- /dev/null +++ b/dev-python/sip/files/sip-6.12.0-python314-test.patch @@ -0,0 +1,30 @@ +https://github.com/Python-SIP/sip/issues/82 +https://github.com/philthompson10/sip/commit/e967ea0ae77c45ab5f8a411390d1acf1e0bb394e +--- a/test/movable/test_movable.py ++++ b/test/movable/test_movable.py +@@ -24,5 +24,10 @@ + ++ # As of Python v3.14 we can't make assumptions about initial ++ # reference counts so we test for increases and decreases rather than ++ # absolute values. ++ ao_base_refcount = getrefcount(ao) ++ + # Test the value of the object. + self.assertEqual(ao.getValue(), 3) +- self.assertEqual(getrefcount(ao), 2) ++ self.assertEqual(getrefcount(ao), ao_base_refcount) + +@@ -33,3 +38,3 @@ + ow.setObject(ao) +- self.assertEqual(getrefcount(ao), 3) ++ self.assertEqual(getrefcount(ao), ao_base_refcount + 1) + self.assertEqual(ow.getObjectValue(), 4) +@@ -38,3 +43,2 @@ + ao2 = ow.takeObject() +- self.assertEqual(getrefcount(ao2), 2) + self.assertEqual(ow.getObjectValue(), -1000) +@@ -45,3 +49,3 @@ + # Check that the original Python object no longer wraps the C++ object. +- self.assertEqual(getrefcount(ao), 2) ++ self.assertEqual(getrefcount(ao), ao_base_refcount) + self.assertRaises(RuntimeError, ao.getValue) diff --git a/dev-python/sip/sip-6.12.0.ebuild b/dev-python/sip/sip-6.12.0.ebuild index 19d94660818e..5009d8f25ee3 100644 --- a/dev-python/sip/sip-6.12.0.ebuild +++ b/dev-python/sip/sip-6.12.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{11..13} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit distutils-r1 DESCRIPTION="Python bindings generator for C/C++ libraries" @@ -32,3 +32,7 @@ distutils_enable_sphinx docs \ EPYTEST_PLUGINS=() distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-python314-test.patch +)
