Package: src:python-pyproject-hooks Version: 1.2.0-1 User: [email protected] Usertags: python3.15 Tags: patch
Hi! While rebuilding the python related packages against the python version 3.15rc1 we found that python-pyproject-hooks fails to build from source[1]. This is due to the use of a the deprecated commonprefix, upstream has a fix for this issue in the commit f230da Use os.path.commonpath() instead of commonprefix() I'm attaching a patch with the upstream fix. Please consider including this patch in your next upload. Happy hacking, [1]: https://debusine.debian.net/debian/r-python-python3.15/work-request/1073847/ -- "Can you imagine what I would do if I could do all I can?" -- Sun Tzu Saludos /\/\ /\ >< `/
commit f230da76573e32003cf42746b32821f32b0beda6 Author: Seth Michael Larson <[email protected]> Date: Tue Feb 3 19:43:44 2026 +0000 Use os.path.commonpath() instead of commonprefix() Index: python-pyproject-hooks/src/pyproject_hooks/_impl.py =================================================================== --- python-pyproject-hooks.orig/src/pyproject_hooks/_impl.py +++ python-pyproject-hooks/src/pyproject_hooks/_impl.py @@ -112,12 +112,9 @@ def norm_and_check(source_tree: str, req abs_source = os.path.abspath(source_tree) abs_requested = os.path.normpath(os.path.join(abs_source, requested)) - # We have to use commonprefix for Python 2.7 compatibility. So we - # normalise case to avoid problems because commonprefix is a character - # based comparison :-( norm_source = os.path.normcase(abs_source) norm_requested = os.path.normcase(abs_requested) - if os.path.commonprefix([norm_source, norm_requested]) != norm_source: + if os.path.commonpath([norm_source, norm_requested]) != norm_source: raise ValueError("paths must be inside source tree") return abs_requested

