commit:     8f03ce653d63823a2c13b00b0bd4783f99f7491e
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 20:18:27 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu May 29 20:18:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f03ce65

dev-python/lz4: enable py3.14

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/lz4/files/lz4-4.4.4-fix-py3.14.patch | 20 ++++++++++++++++++++
 dev-python/lz4/lz4-4.4.4.ebuild                 |  6 +++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/dev-python/lz4/files/lz4-4.4.4-fix-py3.14.patch 
b/dev-python/lz4/files/lz4-4.4.4-fix-py3.14.patch
new file mode 100644
index 000000000000..9de81cd18e18
--- /dev/null
+++ b/dev-python/lz4/files/lz4-4.4.4-fix-py3.14.patch
@@ -0,0 +1,20 @@
+https://github.com/python-lz4/python-lz4/pull/303
+From: Karolina Surma <[email protected]>
+Date: Thu, 29 May 2025 12:06:30 +0200
+Subject: [PATCH] Correct the import of _compression for Python 3.14
+
+This is backwards compatible with all supported versions of Python.
+--- a/lz4/frame/__init__.py
++++ b/lz4/frame/__init__.py
+@@ -25,9 +25,9 @@
+ __doc__ = _doc
+
+ try:
+-    import _compression   # Python 3.6 and later
++    import compression._common._streams as _compression  # Python 3.14
+ except ImportError:
+-    from . import _compression
++    import _compression   # Python 3.6 - 3.13
+
+
+ BLOCKSIZE_DEFAULT = _BLOCKSIZE_DEFAULT

diff --git a/dev-python/lz4/lz4-4.4.4.ebuild b/dev-python/lz4/lz4-4.4.4.ebuild
index 22b4e5a12165..4099cf109613 100644
--- a/dev-python/lz4/lz4-4.4.4.ebuild
+++ b/dev-python/lz4/lz4-4.4.4.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
 
 inherit distutils-r1 pypi
 
@@ -33,6 +33,10 @@ BDEPEND="
        )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-py3.14.patch # merged upstream
+)
+
 # note: test suite fails with xdist
 distutils_enable_tests pytest
 

Reply via email to