public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-installer] rawhide: Update to 1.0.1 (rhbz#2452717)
@ 2026-07-02  9:04 Lumir Balhar
  0 siblings, 0 replies; only message in thread
From: Lumir Balhar @ 2026-07-02  9:04 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-installer
Branch : rawhide
Commit : cc66a773d5b2166a242c58ab3fe3c999e438fa14
Author : Lumir Balhar <lbalhar@redhat.com>
Date   : 2026-06-18T21:10:18+02:00
Stats  : +87/-44 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/python-installer/c/cc66a773d5b2166a242c58ab3fe3c999e438fa14?branch=rawhide

Log:
Update to 1.0.1 (rhbz#2452717)

---
diff --git a/.gitignore b/.gitignore
index cc872a3..309d0f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /installer-0.5.1.tar.gz
 /installer-0.6.0.tar.gz
 /installer-0.7.0.tar.gz
+/installer-1.0.1.tar.gz

diff --git a/340.patch b/340.patch
new file mode 100644
index 0000000..9d0629c
--- /dev/null
+++ b/340.patch
@@ -0,0 +1,80 @@
+From 35faee2f30d2050c4b14172073c3252d150896b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lum=C3=ADr=20Balhar?= <lbalhar@redhat.com>
+Date: Thu, 18 Jun 2026 12:00:18 +0000
+Subject: [PATCH 1/2] fix: replace deprecated posixpath.commonprefix() with
+ startswith()
+
+os.path.commonprefix() is deprecated in Python 3.15 and emits a
+DeprecationWarning. Replace all three usages with str.startswith()
+checks, which are also semantically more correct (commonprefix does
+character-level matching and can produce false positives for paths
+sharing a string prefix but not a directory boundary).
+---
+ src/installer/_core.py   | 2 +-
+ src/installer/sources.py | 6 ++----
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/installer/_core.py b/src/installer/_core.py
+index e23f06e..24ed294 100644
+--- a/src/installer/_core.py
++++ b/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 not path.startswith(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 839934f..f76177b 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 name.startswith(base + "/")
+         ]
+ 
+     def read_dist_info(self, filename: str) -> str:
+@@ -259,9 +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(
+-                [self.dist_info_dir, item.filename]
+-            ) and item.filename.split("/")[-1] in ("RECORD.p7s", "RECORD.jws"):
++            if item.filename.startswith(self.dist_info_dir + "/") and item.filename.split("/")[-1] in ("RECORD.p7s", "RECORD.jws"):
+                 # both are for digital signatures, and not mentioned in RECORD
+                 if record_args is not None:
+                     # Incorrectly contained
+
+From 7671087481739236ff40788b9045c4b8a62f98fa Mon Sep 17 00:00:00 2001
+From: "pre-commit-ci[bot]"
+ <66853113+pre-commit-ci[bot]@users.noreply.github.com>
+Date: Thu, 18 Jun 2026 19:03:32 +0000
+Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
+
+for more information, see https://pre-commit.ci
+---
+ src/installer/sources.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/installer/sources.py b/src/installer/sources.py
+index f76177b..cd6291a 100644
+--- a/src/installer/sources.py
++++ b/src/installer/sources.py
+@@ -259,7 +259,9 @@ def validate_record(self, *, validate_contents: bool = True) -> None:
+ 
+             record_args = record_mapping.pop(item.filename, None)
+ 
+-            if item.filename.startswith(self.dist_info_dir + "/") and item.filename.split("/")[-1] in ("RECORD.p7s", "RECORD.jws"):
++            if item.filename.startswith(
++                self.dist_info_dir + "/"
++            ) and item.filename.split("/")[-1] in ("RECORD.p7s", "RECORD.jws"):
+                 # both are for digital signatures, and not mentioned in RECORD
+                 if record_args is not None:
+                     # Incorrectly contained

diff --git a/Fix-removed-importlib.resources.read_binary-in-Pytho.patch b/Fix-removed-importlib.resources.read_binary-in-Pytho.patch
deleted file mode 100644
index 95abd6d..0000000
--- a/Fix-removed-importlib.resources.read_binary-in-Pytho.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 28f0a1a5ed9d33567353ec930cf4702c2bc86886 Mon Sep 17 00:00:00 2001
-From: Karolina Surma <ksurma@redhat.com>
-Date: Thu, 11 Jan 2024 10:33:54 +0100
-Subject: [PATCH] Fix removed importlib.resources.read_binary in Python 3.13
-
----
- src/installer/scripts.py | 14 ++++++++++++--
- 1 files changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/src/installer/scripts.py b/src/installer/scripts.py
-index 7e3c8fc..a70c59f 100644
---- a/src/installer/scripts.py
-+++ b/src/installer/scripts.py
-@@ -2,9 +2,19 @@
- 
- import io
- import shlex
-+import sys
- import zipfile
--from importlib.resources import read_binary
--from typing import TYPE_CHECKING, Mapping, Optional, Tuple
-+from types import ModuleType
-+from typing import TYPE_CHECKING, Mapping, Optional, Tuple, Union
-+
-+if sys.version_info >= (3, 9):  # pragma: no cover
-+    from importlib.resources import files
-+
-+    def read_binary(package: Union[str, ModuleType], file_path: str) -> bytes:
-+        return (files(package) / file_path).read_bytes()
-+
-+else:  # pragma: no cover
-+    from importlib.resources import read_binary
- 
- from installer import _scripts
- 
--- 
-2.43.0
-

diff --git a/python-installer.spec b/python-installer.spec
index c2f7ea6..03594bd 100644
--- a/python-installer.spec
+++ b/python-installer.spec
@@ -1,5 +1,5 @@
 Name:           python-installer
-Version:        0.7.0
+Version:        1.0.1
 Release:        %autorelease
 Summary:        A library for installing Python wheels
 
@@ -8,9 +8,9 @@ License:        MIT
 URL:            https://github.com/pypa/installer
 Source:         %{pypi_source installer}
 
-# Fix the build with Python 3.13 - merged upstream
-# https://github.com/pypa/installer/commit/b23f89b10cf5
-Patch:          Fix-removed-importlib.resources.read_binary-in-Pytho.patch
+# Replace deprecated posixpath.commonprefix() usage with path.startswith()
+# Fixes tests with Python 3.15
+Patch:          https://github.com/pypa/installer/pull/340.patch
 
 BuildArch:      noarch
 BuildRequires:  python3-devel
@@ -55,7 +55,7 @@ Summary:        %{summary}
 
 %files -n python3-installer -f %{pyproject_files}
 %license LICENSE
-%doc CONTRIBUTING.md README.md
+%doc README.md
 
 
 %changelog

diff --git a/sources b/sources
index 5e1de82..a8fcb95 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (installer-0.7.0.tar.gz) = e89c2d28ca73d9c4291d645dda675fdcfcaba2e4f8765b9fa4a2f211e27711510f3d171b96a6b024c11808ba7f06b7b560a7cb31fafba815bd5c7396f26789f7
+SHA512 (installer-1.0.1.tar.gz) = cabc4efb8ce66ce85c2139e264f66c449f9e5cf1f8c860afa7f147daf0b983716fe02182ef1f6e4abbc4b6be34d75738a0281c77dda9d48a075c212301278a73

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-02  9:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02  9:04 [rpms/python-installer] rawhide: Update to 1.0.1 (rhbz#2452717) Lumir Balhar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox