Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-installer for openSUSE:Factory checked in at 2026-10-08 15:12:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-installer (Old) and /work/SRC/openSUSE:Factory/.python-installer.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-installer" Thu Oct 8 15:12:43 2026 rev:10 rq:1382902 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-installer/python-installer.changes 2026-06-29 17:30:10.877658652 +0200 +++ /work/SRC/openSUSE:Factory/.python-installer.new.3698736/python-installer.changes 2026-10-08 15:12:45.578174512 +0200 @@ -1,0 +2,6 @@ +Wed Oct 7 05:11:44 UTC 2026 - Steve Kowalik <[email protected]> + +- Add patch do-not-use-commonprefix.patch: + * Use pathlib.Path.commonpath() rather than commonprefix. + +------------------------------------------------------------------- New: ---- do-not-use-commonprefix.patch ----------(New B)---------- New: - Add patch do-not-use-commonprefix.patch: * Use pathlib.Path.commonpath() rather than commonprefix. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-installer.spec ++++++ --- /var/tmp/diff_new_pack.DiIYm9/_old 2026-10-08 15:12:48.300288584 +0200 +++ /var/tmp/diff_new_pack.DiIYm9/_new 2026-10-08 15:12:48.302288668 +0200 @@ -32,6 +32,8 @@ License: MIT URL: https://github.com/pypa/installer Source: https://github.com/pypa/installer/archive/refs/tags/%{version}.tar.gz#/installer-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Based on gh#pypa/installer#345 +Patch0: do-not-use-commonprefix.patch BuildRequires: %{python_module base >= 3.10} BuildRequires: %{python_module flit-core >= 3.11} BuildRequires: fdupes @@ -60,7 +62,7 @@ %if !%{with test} %install export PYTHONPATH=src -%python_expand $python -m installer -d %{buildroot} dist/*.whl +%python_exec -m installer -d %{buildroot} dist/*.whl %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif ++++++ do-not-use-commonprefix.patch ++++++ >From d6b76a8ef9c3ebb5f15e7aba64dd8dfee1461ead Mon Sep 17 00:00:00 2001 From: Richard Si <[email protected]> Date: Fri, 26 Jun 2026 18:00:35 -0400 Subject: [PATCH] Use os.path.commonpath over commonprefix 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). --- docs/changelog.md | 5 +++++ src/installer/_core.py | 2 +- src/installer/sources.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/installer/_core.py b/src/installer/_core.py index a33011bb..3aad93c0 100644 --- a/src/installer/_core.py +++ b/src/installer/_core.py @@ -41,7 +41,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. diff --git a/src/installer/sources.py b/src/installer/sources.py index 839934f3..836c1f20 100644 --- a/src/installer/sources.py +++ b/src/installer/sources.py @@ -220,7 +220,7 @@ def dist_info_filenames(self) -> list[str]: 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 @@ def validate_record(self, *, validate_contents: bool = True) -> None: 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
