summaryrefslogtreecommitdiff
path: root/dev-python/absl-py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-19 00:30:04 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-19 00:30:04 +0000
commit781c9128468d2e8302221d4d7152ae09cffc4a9e (patch)
tree1f0892c391dbb3e56d61a206fdc800034917eead /dev-python/absl-py
parentcade0827f4ab3a7b13c870b7841c4462dde54dc6 (diff)
gentoo auto-resync : 19:03:2025 - 00:30:03
Diffstat (limited to 'dev-python/absl-py')
-rw-r--r--dev-python/absl-py/Manifest3
-rw-r--r--dev-python/absl-py/absl-py-2.1.0.ebuild24
-rw-r--r--dev-python/absl-py/files/absl-py-2.1.0-py313.patch60
3 files changed, 79 insertions, 8 deletions
diff --git a/dev-python/absl-py/Manifest b/dev-python/absl-py/Manifest
index ad045223d42f..544b7393950d 100644
--- a/dev-python/absl-py/Manifest
+++ b/dev-python/absl-py/Manifest
@@ -1,3 +1,4 @@
+AUX absl-py-2.1.0-py313.patch 2764 BLAKE2B 832149ae273f28f74fbe86c3b9c8f3497df44e685ed626f531d4015826e58e5d34af038dd4191b38960cd87acd18e226b6bf13a4bf08abf41010304b59d0030b SHA512 b6b71ceb86f9863d65428b9d31259a30831c122f2c6497a3e76b864e58d9e6eca951f4b2d0b1ea7935abf15d4613781e90f4a69922604144efdaf3ba94ce8faf
DIST abseil-py-2.1.0.gh.tar.gz 235261 BLAKE2B 85232156e722cb874e29e1f92513b24836553476d5ff379e8df32d307ca21709b5869edd80a3bb7fe757ae585bb45df21c89ae6f2218147a5812f171d946e094 SHA512 298a876ed850085836cb1ff6fddf98aca6a3283780bece8c0a7d118fd4e16cc258e51f721e4a5fcbe62b23d2da05638475d426bb650b0694ff7c1d0119e3be97
-EBUILD absl-py-2.1.0.ebuild 2758 BLAKE2B 328917084528efc1b6c1f51ccc901bb6ff18e3d5eacbb33a299e1fd179a56ce078aa4544315c0a711ee85116e2e4cda3c7c0bbbb94a4390064d6825d352bd9a6 SHA512 06f30cb48244d64f3458d4d327697f7ce84c9e7876a36b2fc78d1e473d0075d3f35a0284bc13dbab2dd912cd66f9abe8ce55d853fc38a8e249be96dc3d205d81
+EBUILD absl-py-2.1.0.ebuild 3173 BLAKE2B 0502cdd7b594d6375ec69d47eae04bd90e2ad9c734930f0491e37bf96b4ff2a0a160dd226848fc9b5e122fc7df8daa9aca18ee176f042b3e951d88e0641234ea SHA512 92cef29ff05c8533196c02deca5a887fc2b53eb79d80a91195074af72114243d1fec90f3f33d441074ff6b8718f2778caf8907f19be506ef689362cbfbc9bdd6
MISC metadata.xml 577 BLAKE2B dd0e02b24bdb42f24bd675cadf13e99f861a6dc9be2879f671b9bc4e9e078ef81759909e81e3063cb54c71ff71d6609624f0cf2645bf6ec055c643fbb0f3ab5c SHA512 7cfa86cac5d38b10aedacdb4bafc7acbd11cf4a98a873a2435ef5761d5186c5128171eb286b2d2568a1a353eb4de815303eae225cf5823a5292ac362633b67c7
diff --git a/dev-python/absl-py/absl-py-2.1.0.ebuild b/dev-python/absl-py/absl-py-2.1.0.ebuild
index 93edca72b17f..eb498851db10 100644
--- a/dev-python/absl-py/absl-py-2.1.0.ebuild
+++ b/dev-python/absl-py/absl-py-2.1.0.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1
@@ -29,6 +29,13 @@ RDEPEND="
"
src_prepare() {
+ local PATCHES=(
+ # https://github.com/abseil/abseil-py/commit/78fb38cea7ffd1329f6455c997302529ce6fc6ce
+ "${FILESDIR}/${P}-py313.patch"
+ )
+
+ distutils-r1_src_prepare
+
# what a nightmare... well, we could have called bazel but that would
# even worse
local helpers=(
@@ -55,12 +62,15 @@ src_prepare() {
done
# i don't wanna know how these pass for upstream with wrong helper names
- sed -i -e 's:\(app_test_helper\)\.py:\1_pure_python:' \
- absl/tests/app_test.py || die
- sed -i -e 's:\(logging_functional_test_helper\)\.py:\1:' \
- absl/logging/tests/logging_functional_test.py || die
+ sed -e 's:\(app_test_helper\)\.py:\1_pure_python:' \
+ -i absl/tests/app_test.py || die
+ sed -e 's:\(logging_functional_test_helper\)\.py:\1:' \
+ -i absl/logging/tests/logging_functional_test.py || die
- distutils-r1_src_prepare
+ # parts of 617ce2c8b9976aa9e32c079c625fa6d864b2bbee
+ # (don't sed the one case containing ", suiteClass=...")
+ sed -e 's:unittest\.makeSuite\(([^,]*)\):unittest.defaultTestLoader.loadTestsFromTestCase\1:' \
+ -i absl/testing/tests/{absltest,parameterized}_test.py || die
}
python_test() {
diff --git a/dev-python/absl-py/files/absl-py-2.1.0-py313.patch b/dev-python/absl-py/files/absl-py-2.1.0-py313.patch
new file mode 100644
index 000000000000..81406734980c
--- /dev/null
+++ b/dev-python/absl-py/files/absl-py-2.1.0-py313.patch
@@ -0,0 +1,60 @@
+From 78fb38cea7ffd1329f6455c997302529ce6fc6ce Mon Sep 17 00:00:00 2001
+From: Oleh Prypin <oprypin@google.com>
+Date: Wed, 11 Dec 2024 04:19:00 -0800
+Subject: [PATCH] Declare support for Python 3.13
+
+PiperOrigin-RevId: 705056014
+
+diff --git a/absl/flags/tests/argparse_flags_test.py b/absl/flags/tests/argparse_flags_test.py
+index 679a1cce..cfc364f0 100644
+--- a/absl/flags/tests/argparse_flags_test.py
++++ b/absl/flags/tests/argparse_flags_test.py
+@@ -227,7 +227,10 @@ def test_help_main_module_flags(self):
+ # Only the short name is shown in the usage string.
+ self.assertIn('[-s ABSL_STRING]', help_message)
+ # Both names are included in the options section.
+- self.assertIn('-s ABSL_STRING, --absl_string ABSL_STRING', help_message)
++ if sys.version_info >= (3, 13):
++ self.assertIn(' -s, --absl_string ABSL_STRING', help_message)
++ else:
++ self.assertIn(' -s ABSL_STRING, --absl_string ABSL_STRING', help_message)
+ # Verify help messages.
+ self.assertIn('help for --absl_string=%.', help_message)
+ self.assertIn('<apple|orange>: help for --absl_enum.', help_message)
+diff --git a/absl/testing/tests/parameterized_test.py b/absl/testing/tests/parameterized_test.py
+index 609c5571..4c024927 100644
+--- a/absl/testing/tests/parameterized_test.py
++++ b/absl/testing/tests/parameterized_test.py
+@@ -1128,6 +1128,9 @@ def test_successful_execution(self):
+ self.assertEqual(2, res.testsRun)
+ self.assertTrue(res.wasSuccessful())
+
++ @unittest.skipIf(
++ sys.version_info >= (3, 13), 'makeSuite was removed in Python 3.13'
++ )
+ def test_metaclass_side_effects(self):
+ ts = unittest.makeSuite(self.MyParams, suiteClass=self.MySuite)
+
+diff --git a/absl/testing/tests/xml_reporter_test.py b/absl/testing/tests/xml_reporter_test.py
+index ba8a88f7..e0b61a98 100644
+--- a/absl/testing/tests/xml_reporter_test.py
++++ b/absl/testing/tests/xml_reporter_test.py
+@@ -85,14 +85,16 @@ def xml_escaped_exception_type(exception_type):
+ FAILURE_MESSAGE = r"""
+ <failure message="e" type="{}"><!\[CDATA\[Traceback \(most recent call last\):
+ File ".*xml_reporter_test\.py", line \d+, in get_sample_failure
+- self.fail\(\'e\'\)
++ self.fail\(\'e\'\)(
++ ~~~~~~~~~\^\^\^\^\^)?
+ AssertionError: e
+ \]\]></failure>""".format(xml_escaped_exception_type(AssertionError))
+
+ ERROR_MESSAGE = r"""
+ <error message="invalid&#x20;literal&#x20;for&#x20;int\(\)&#x20;with&#x20;base&#x20;10:&#x20;(&apos;)?a(&apos;)?" type="{}"><!\[CDATA\[Traceback \(most recent call last\):
+ File ".*xml_reporter_test\.py", line \d+, in get_sample_error
+- int\('a'\)
++ int\('a'\)(
++ ~~~\^\^\^\^\^)?
+ ValueError: invalid literal for int\(\) with base 10: '?a'?
+ \]\]></error>""".format(xml_escaped_exception_type(ValueError))
+