commit:     eb693fc918b9be5819eba8536a15772e05b08517
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  7 09:32:37 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun  7 09:32:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb693fc9

dev-python/s3transfer: Enable py3.14

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../s3transfer/files/s3transfer-0.13.0-py314.patch | 38 ++++++++++++++++++++++
 dev-python/s3transfer/s3transfer-0.13.0.ebuild     | 10 ++++--
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/dev-python/s3transfer/files/s3transfer-0.13.0-py314.patch 
b/dev-python/s3transfer/files/s3transfer-0.13.0-py314.patch
new file mode 100644
index 000000000000..cbd1dac52a1d
--- /dev/null
+++ b/dev-python/s3transfer/files/s3transfer-0.13.0-py314.patch
@@ -0,0 +1,38 @@
+From fed6e9872094908fae4fe6a441430fdb2d6b9b77 Mon Sep 17 00:00:00 2001
+From: Karolina Surma <[email protected]>
+Date: Fri, 30 May 2025 13:46:29 +0200
+Subject: [PATCH] Avoid the multiprocessing forkserver method
+
+---
+ tests/unit/test_compat.py | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py
+index 20f07c74..a50ad10a 100644
+--- a/tests/unit/test_compat.py
++++ b/tests/unit/test_compat.py
+@@ -10,6 +10,7 @@
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ # ANY KIND, either express or implied. See the License for the specific
+ # language governing permissions and limitations under the License.
++import multiprocessing
+ import os
+ import shutil
+ import signal
+@@ -80,7 +81,15 @@ def test_non_file_like_obj(self):
+ class TestBaseManager(unittest.TestCase):
+     def create_pid_manager(self):
+         class PIDManager(BaseManager):
+-            pass
++            def __init__(self):
++                # Python 3.14 changed the non-macOS POSIX default to 
forkserver
++                # but the code in this module does not work with it
++                # See https://github.com/python/cpython/issues/125714
++                if multiprocessing.get_start_method() == 'forkserver':
++                    ctx = multiprocessing.get_context(method='fork')
++                else:
++                    ctx = multiprocessing.get_context()
++                super().__init__(ctx=ctx)
+ 
+         PIDManager.register('getpid', os.getpid)
+         return PIDManager()

diff --git a/dev-python/s3transfer/s3transfer-0.13.0.ebuild 
b/dev-python/s3transfer/s3transfer-0.13.0.ebuild
index 8fc09e16b8e5..e69de071767b 100644
--- a/dev-python/s3transfer/s3transfer-0.13.0.ebuild
+++ b/dev-python/s3transfer/s3transfer-0.13.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 pypi
 
@@ -26,12 +26,18 @@ RDEPEND="
 distutils_enable_tests pytest
 
 src_prepare() {
+       local PATCHES=(
+               # https://github.com/boto/s3transfer/pull/347
+               "${FILESDIR}/${P}-py314.patch"
+       )
+
+       distutils-r1_src_prepare
+
        # do not rely on bundled deps in botocore (sic!)
        find -name '*.py' -exec sed -i \
                -e 's:from botocore[.]vendored import:import:' \
                -e 's:from botocore[.]vendored[.]:from :' \
                {} + || die
-       distutils-r1_src_prepare
 }
 
 python_test() {

Reply via email to