Package: src:python-installer
Version: 1.0.1-2
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Hi!
While rebuilding the python related packages against the Python 3.15rc1
version we found that python-installer fails to build from source [1].
The problem can be fixed applying upstream's commit 97609d8: Use
os.path.commonpath over commonprefix (#345) [2].
I applied the upstream fix in the sandbox [3] to be able to build the
packages that depend on python-installer, please consider applying the
patch to support the upcoming 3.15 version.
Happy hacking,
[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4431389/
[2]:
https://github.com/pypa/installer/commit/97609d8b7c202f3a8e5174747559e83c61a4cc95
[3]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
From: Richard Si <[email protected]>
Date: Tue, 21 Jul 2026 05:38:28 -0400
Subject: Use os.path.commonpath over commonprefix (#345)
commonprefix was deprecated in Python 3.15 as it does a
character-by-character check which is 99% likely to be not what you
actually want.
commonpath does the sane thing of returning only valid paths (aka
respecting the directory structure).
---
src/installer/_core.py | 2 +-
src/installer/sources.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Index: python-installer/src/installer/_core.py
===================================================================
--- python-installer.orig/src/installer/_core.py
+++ python-installer/src/installer/_core.py
@@ -42,7 +42,7 @@ def _determine_scheme(
data_dir = source.data_dir
# If it's in not `{distribution}-{version}.data`, then it's in root_scheme.
- if posixpath.commonprefix([data_dir, path]) != data_dir:
+ if posixpath.commonpath([data_dir, path]) != data_dir:
return root_scheme, path
# Figure out which scheme this goes to.
Index: python-installer/src/installer/sources.py
===================================================================
--- python-installer.orig/src/installer/sources.py
+++ python-installer/src/installer/sources.py
@@ -220,7 +220,7 @@ class WheelFile(WheelSource):
name[len(base) + 1 :]
for name in self._zipfile.namelist()
if name[-1:] != "/"
- if base == posixpath.commonprefix([name, base])
+ if base == posixpath.commonpath([name, base])
]
def read_dist_info(self, filename: str) -> str:
@@ -259,7 +259,7 @@ class WheelFile(WheelSource):
record_args = record_mapping.pop(item.filename, None)
- if self.dist_info_dir == posixpath.commonprefix(
+ if self.dist_info_dir == posixpath.commonpath(
[self.dist_info_dir, item.filename]
) and item.filename.split("/")[-1] in ("RECORD.p7s", "RECORD.jws"):
# both are for digital signatures, and not mentioned in RECORD