From 7fdfa3a50a60f7f3a0a7bfdf3f084f44a3ec97dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Thu, 16 Feb 2023 10:02:00 +0100 Subject: [PATCH 01/80] Update to 23.0.1 --- python-pip.spec | 28 ++++++++++++++++------------ sources | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 08aedb1..bee4362 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.3.1 +%global base_version 23.0.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -39,10 +39,10 @@ Summary: A tool for installing and managing Python packages # ipaddress: Python-2.0.1 # msgpack: Apache-2.0 # packaging: Apache-2.0 OR BSD-2-Clause -# pep517: MIT # progress: ISC # pygments: BSD-2-Clause # pyparsing: MIT +# pyproject-hooks: MIT # requests: Apache-2.0 # resolvelib: ISC # rich: MIT @@ -126,27 +126,27 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2022.9.24 -Provides: bundled(python%{1}dist(chardet)) = 5 -Provides: bundled(python%{1}dist(colorama)) = 0.4.5 +Provides: bundled(python%{1}dist(certifi)) = 2022.12.7 +Provides: bundled(python%{1}dist(chardet)) = 5.1 +Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 -Provides: bundled(python%{1}dist(distro)) = 1.7 +Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(pep517)) = 0.13 -Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 +Provides: bundled(python%{1}dist(platformdirs)) = 2.6.2 Provides: bundled(python%{1}dist(pygments)) = 2.13 Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 -Provides: bundled(python%{1}dist(requests)) = 2.28.1 +Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 +Provides: bundled(python%{1}dist(requests)) = 2.28.2 Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 12.5.1 +Provides: bundled(python%{1}dist(rich)) = 12.6 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.1 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.12 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.14 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -390,6 +390,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 +- Update to 23.0.1 +Resolves: rhbz#2165760 + * Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index ac6d676..cde9066 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.3.1.tar.gz) = c7865c4ce79b0fea7ba469fe593af3be205b3bdb574a6ae019842e0f82a0af406ec905d8c6ff02fbbafe01630c8899a398d071ce74501ca830249160f2f6df98 +SHA512 (pip-23.0.1.tar.gz) = ed14ce37293e749b4fd93d7f93d81356c77428b1fb14dfd760b59aea720ebb3cce5a49c2d32ab600e73b37389937830ff4dee04750e83078c8ab9d57513f294c From 83fe8f1d738e48d98727d829d6243f445df7dc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 10 Feb 2023 17:38:34 +0100 Subject: [PATCH 02/80] Update the RHEL %bconds comment and style It is obvious to me now that this is not going to be removed, but will be reused for RHEL 10, 11, etc. The new %bcond syntax is nicer. --- python-pip.spec | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index bee4362..d6fb850 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,16 +1,9 @@ -# The original RHEL 9 content set is defined by (build)dependencies +# The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. -# Once the RHEL 9 content set is defined and/or RHEL 9 forks from ELN, -# the conditional can be removed from the Fedora spec file. # We intentionally keep this enabled on EPEL. -%if 0%{?rhel} >= 9 && !0%{?epel} -%bcond_with tests -%bcond_with doc -%else -%bcond_without tests -%bcond_without doc -%endif +%bcond tests %[%{defined fedora} || %{defined epel}] +%bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip %global base_version 23.0.1 From f657771b14d64d4348d3f6f349bd567c8ce1ee98 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 27 Mar 2023 10:54:18 +0200 Subject: [PATCH 03/80] Fix compatibility with Sphinx 6+ (fixes FTBFS) --- 11883.patch | 41 ++++++++++++++++++++++++++++++ 11904.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 10 +++++++- 3 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 11883.patch create mode 100644 11904.patch diff --git a/11883.patch b/11883.patch new file mode 100644 index 0000000..0bb3865 --- /dev/null +++ b/11883.patch @@ -0,0 +1,41 @@ +From 4944f6ff75e0a5e28d9719ae30dba03f196f2acf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 21 Mar 2023 16:42:09 +0100 +Subject: [PATCH] Make sphinx.ext.extlinks captions actual string templates + +In Sphinx 3, this used to be a prefix, but it is the full caption since Sphinx 4: + +https://github.com/sphinx-doc/sphinx/commit/fb39974486ab09320f0cf45f3c0ba0175f04d7d6 + +With Sphinx 6, captions without %s fail: + +https://github.com/sphinx-doc/sphinx/commit/ce31e1c0c7b32f6be93186e0fef076ef65ff0b05 + + Exception occurred: + File "/usr/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 103, in role + title = caption % part + ~~~~~~~~^~~~~~ + TypeError: not all arguments converted during string formatting + +Fixes Fedora downstream report: https://bugzilla.redhat.com/2180479 +--- + docs/html/conf.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/docs/html/conf.py b/docs/html/conf.py +index cc967e0ba3c..aae1364b87a 100644 +--- a/docs/html/conf.py ++++ b/docs/html/conf.py +@@ -74,9 +74,9 @@ + # -- Options for extlinks ------------------------------------------------------------- + + extlinks = { +- "issue": ("https://github.com/pypa/pip/issues/%s", "#"), +- "pull": ("https://github.com/pypa/pip/pull/%s", "PR #"), +- "pypi": ("https://pypi.org/project/%s/", ""), ++ "issue": ("https://github.com/pypa/pip/issues/%s", "#%s"), ++ "pull": ("https://github.com/pypa/pip/pull/%s", "PR #%s"), ++ "pypi": ("https://pypi.org/project/%s/", "%s"), + } + + # -- Options for towncrier_draft extension -------------------------------------------- diff --git a/11904.patch b/11904.patch new file mode 100644 index 0000000..e478f78 --- /dev/null +++ b/11904.patch @@ -0,0 +1,67 @@ +From 30a13bcaa7b0139c200458878a21e5467121fa34 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:49:35 +0100 +Subject: [PATCH 1/3] Add `--kep-going` to documentation build flags + +This ensures that all warnings are printed for Sphinx builds. +--- + noxfile.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/noxfile.py b/noxfile.py +index 5c4683b7d79..565a5039955 100644 +--- a/noxfile.py ++++ b/noxfile.py +@@ -133,6 +133,7 @@ def get_sphinx_build_command(kind: str) -> List[str]: + # fmt: off + return [ + "sphinx-build", ++ "--keep-going", + "-W", + "-c", "docs/html", # see note above + "-d", "docs/build/doctrees/" + kind, + +From 4fccbf0c74d252fd2301df397002c783ac6ad057 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:50:43 +0100 +Subject: [PATCH 2/3] Use a standard Sphinx document reference rather than + Markdown syntax + +This avoids providing too much information or using weird mechanics to +build across various MyST-Parser versions. +--- + docs/html/getting-started.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/html/getting-started.md b/docs/html/getting-started.md +index 0967b0eb99f..2b3f0bc9310 100644 +--- a/docs/html/getting-started.md ++++ b/docs/html/getting-started.md +@@ -98,5 +98,5 @@ Successfully uninstalled sampleproject + ## Next Steps + + It is recommended to learn about what virtual environments are and how to use +-them. This is covered in the ["Installing Packages"](pypug:tutorials/installing-packages) ++them. This is covered in the {doc}`Installing Packages ` + tutorial on packaging.python.org. + +From 6810341fd010d721541e87ba3125b275d0108c45 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Mon, 27 Mar 2023 12:51:17 +0100 +Subject: [PATCH 3/3] Bump to Sphinx 6 + +This is the current latest version of Sphinx. +--- + docs/requirements.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/requirements.txt b/docs/requirements.txt +index fa3a7390c15..ef72c8fb722 100644 +--- a/docs/requirements.txt ++++ b/docs/requirements.txt +@@ -1,4 +1,4 @@ +-sphinx ~= 4.2, != 4.4.0 ++sphinx ~= 6.0 + towncrier + furo + myst_parser diff --git a/python-pip.spec b/python-pip.spec index d6fb850..37ce4dd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -83,6 +83,10 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Fix compatibility with Sphinx 6+, merged upstream +Patch: https://github.com/pypa/pip/pull/11883.patch +Patch: https://github.com/pypa/pip/pull/11904.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -383,6 +387,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 +- Fix compatibility with Sphinx 6+ +Resolves: rhbz#2180479 + * Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 - Update to 23.0.1 Resolves: rhbz#2165760 From a2d6e7ddd8b3e962d6047206024a954b27e14dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 19 May 2023 13:10:04 +0200 Subject: [PATCH 04/80] CI: Remove `pipenv --three` from tests It does no longer exist: Usage: pipenv [OPTIONS] COMMAND [ARGS]... Try 'pipenv -h' for help. Error: No such option: --three (Possible options: --bare, --help, --where) The `pipenv install` command will create the environment. See https://src.fedoraproject.org/rpms/pipenv/c/5591b2df503495b --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8278b55..8c7064b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -62,7 +62,7 @@ dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh - pipenv: - run: pipenv --three && pipenv install six + run: pipenv install six - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From 384163c9b7fef0eb69c99fe34a3d4370e886a08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 19 May 2023 12:45:12 +0200 Subject: [PATCH 05/80] Update to 23.1.2 --- 11883.patch | 41 ------------------------------ 11904.patch | 67 ------------------------------------------------- python-pip.spec | 30 +++++++++++----------- sources | 2 +- 4 files changed, 16 insertions(+), 124 deletions(-) delete mode 100644 11883.patch delete mode 100644 11904.patch diff --git a/11883.patch b/11883.patch deleted file mode 100644 index 0bb3865..0000000 --- a/11883.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4944f6ff75e0a5e28d9719ae30dba03f196f2acf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 21 Mar 2023 16:42:09 +0100 -Subject: [PATCH] Make sphinx.ext.extlinks captions actual string templates - -In Sphinx 3, this used to be a prefix, but it is the full caption since Sphinx 4: - -https://github.com/sphinx-doc/sphinx/commit/fb39974486ab09320f0cf45f3c0ba0175f04d7d6 - -With Sphinx 6, captions without %s fail: - -https://github.com/sphinx-doc/sphinx/commit/ce31e1c0c7b32f6be93186e0fef076ef65ff0b05 - - Exception occurred: - File "/usr/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 103, in role - title = caption % part - ~~~~~~~~^~~~~~ - TypeError: not all arguments converted during string formatting - -Fixes Fedora downstream report: https://bugzilla.redhat.com/2180479 ---- - docs/html/conf.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/docs/html/conf.py b/docs/html/conf.py -index cc967e0ba3c..aae1364b87a 100644 ---- a/docs/html/conf.py -+++ b/docs/html/conf.py -@@ -74,9 +74,9 @@ - # -- Options for extlinks ------------------------------------------------------------- - - extlinks = { -- "issue": ("https://github.com/pypa/pip/issues/%s", "#"), -- "pull": ("https://github.com/pypa/pip/pull/%s", "PR #"), -- "pypi": ("https://pypi.org/project/%s/", ""), -+ "issue": ("https://github.com/pypa/pip/issues/%s", "#%s"), -+ "pull": ("https://github.com/pypa/pip/pull/%s", "PR #%s"), -+ "pypi": ("https://pypi.org/project/%s/", "%s"), - } - - # -- Options for towncrier_draft extension -------------------------------------------- diff --git a/11904.patch b/11904.patch deleted file mode 100644 index e478f78..0000000 --- a/11904.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 30a13bcaa7b0139c200458878a21e5467121fa34 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:49:35 +0100 -Subject: [PATCH 1/3] Add `--kep-going` to documentation build flags - -This ensures that all warnings are printed for Sphinx builds. ---- - noxfile.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/noxfile.py b/noxfile.py -index 5c4683b7d79..565a5039955 100644 ---- a/noxfile.py -+++ b/noxfile.py -@@ -133,6 +133,7 @@ def get_sphinx_build_command(kind: str) -> List[str]: - # fmt: off - return [ - "sphinx-build", -+ "--keep-going", - "-W", - "-c", "docs/html", # see note above - "-d", "docs/build/doctrees/" + kind, - -From 4fccbf0c74d252fd2301df397002c783ac6ad057 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:50:43 +0100 -Subject: [PATCH 2/3] Use a standard Sphinx document reference rather than - Markdown syntax - -This avoids providing too much information or using weird mechanics to -build across various MyST-Parser versions. ---- - docs/html/getting-started.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/html/getting-started.md b/docs/html/getting-started.md -index 0967b0eb99f..2b3f0bc9310 100644 ---- a/docs/html/getting-started.md -+++ b/docs/html/getting-started.md -@@ -98,5 +98,5 @@ Successfully uninstalled sampleproject - ## Next Steps - - It is recommended to learn about what virtual environments are and how to use --them. This is covered in the ["Installing Packages"](pypug:tutorials/installing-packages) -+them. This is covered in the {doc}`Installing Packages ` - tutorial on packaging.python.org. - -From 6810341fd010d721541e87ba3125b275d0108c45 Mon Sep 17 00:00:00 2001 -From: Pradyun Gedam -Date: Mon, 27 Mar 2023 12:51:17 +0100 -Subject: [PATCH 3/3] Bump to Sphinx 6 - -This is the current latest version of Sphinx. ---- - docs/requirements.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/requirements.txt b/docs/requirements.txt -index fa3a7390c15..ef72c8fb722 100644 ---- a/docs/requirements.txt -+++ b/docs/requirements.txt -@@ -1,4 +1,4 @@ --sphinx ~= 4.2, != 4.4.0 -+sphinx ~= 6.0 - towncrier - furo - myst_parser diff --git a/python-pip.spec b/python-pip.spec index 37ce4dd..c87cb54 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.0.1 +%global base_version 23.1.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -83,10 +83,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Fix compatibility with Sphinx 6+, merged upstream -Patch: https://github.com/pypa/pip/pull/11883.patch -Patch: https://github.com/pypa/pip/pull/11904.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -129,21 +125,21 @@ Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 2.6.2 -Provides: bundled(python%{1}dist(pygments)) = 2.13 +Provides: bundled(python%{1}dist(platformdirs)) = 3.2 +Provides: bundled(python%{1}dist(pygments)) = 2.14 Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 Provides: bundled(python%{1}dist(requests)) = 2.28.2 -Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 12.6 -Provides: bundled(python%{1}dist(setuptools)) = 44 +Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 +Provides: bundled(python%{1}dist(rich)) = 13.3.3 +Provides: bundled(python%{1}dist(setuptools)) = 67.7.2 Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.1 +Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.14 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.5 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.15 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -387,6 +383,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri May 19 2023 Miro Hrončok - 23.1.2-1 +- Update to 23.1.2 +Resolves: rhbz#2186979 + * Mon Mar 27 2023 Karolina Surma - 23.0.1-2 - Fix compatibility with Sphinx 6+ Resolves: rhbz#2180479 diff --git a/sources b/sources index cde9066..e714ca8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.0.1.tar.gz) = ed14ce37293e749b4fd93d7f93d81356c77428b1fb14dfd760b59aea720ebb3cce5a49c2d32ab600e73b37389937830ff4dee04750e83078c8ab9d57513f294c +SHA512 (pip-23.1.2.tar.gz) = b33070cb59a1258904a60b48ec8abfd9e316c5f87681fea13d89ddf6d516afac10965ae1db54fea299a0a72f98602ce02e8b3be46f239e857db84866045730e1 From f58b7e613e2a7831b44acea93bfe9227dcec1f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 22 May 2023 13:34:03 +0200 Subject: [PATCH 06/80] Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt --- python-pip.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index c87cb54..c9f527b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -261,6 +261,10 @@ ln -s %{python_wheel_dir} tests/data/common_wheels rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' setup.py +# Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt +# https://github.com/pypa/pip/pull/12046 +%{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' + %build %py3_build_wheel From a378787915598a15289a97b55bb1ebeb141242b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 22 May 2023 11:55:02 +0200 Subject: [PATCH 07/80] Update rpmlintrc rules to match rpmlint 2 and the current pip We got: python3-pip.noarch: E: unused-rpmlintrc-filter "(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b" python3-pip.noarch: E: unused-rpmlintrc-filter "zero-length .+/site-packages/.+\.dist-info/REQUESTED\b" python3-pip.noarch: E: unused-rpmlintrc-filter "W: spelling-error .* venv" python3-pip.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/pip/_vendor/distro/distro.py 644 /usr/bin/env python --- python-pip.rpmlintrc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index 3a17d79..d32664b 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -1,15 +1,9 @@ # This is just temporary, when upstream merges PRs it can be removed -# https://github.com/ActiveState/appdirs/pull/144 # https://github.com/psf/requests/pull/5410 -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appdirs.py\b') addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b') -# REQUESTED dist-info file is not meant to have any content -# Discussion: https://src.fedoraproject.org/rpms/python-pip/pull-request/69#comment-52525 -addFilter(r'zero-length .+/site-packages/.+\.dist-info/REQUESTED\b') +# This file is actually a script but in the vendored context of pip, it is never executed +addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') - -# SPELLING ERRORS -addFilter(r'W: spelling-error .* venv') From a9868b4795ae3355809dd21f21fb86b15e2d979a Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 30 May 2023 13:36:42 -0500 Subject: [PATCH 08/80] Support repeated keys in --config-settings --- ...the-same-key-multiple-times-in-confi.patch | 76 +++++++++++++++++++ python-pip.spec | 12 ++- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Support-passing-the-same-key-multiple-times-in-confi.patch diff --git a/Support-passing-the-same-key-multiple-times-in-confi.patch b/Support-passing-the-same-key-multiple-times-in-confi.patch new file mode 100644 index 0000000..0496d4e --- /dev/null +++ b/Support-passing-the-same-key-multiple-times-in-confi.patch @@ -0,0 +1,76 @@ +From d498b3997167865a42f4c663eac518cae3a0daeb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Filipe=20La=C3=ADns?= +Date: Fri, 17 Mar 2023 21:23:19 +0000 +Subject: [PATCH] Support passing the same key multiple times in + --config-settings (#11853) + +(cherry picked from commit 1268487cbab1b2ffab881b5961c0476e655b6c88) +--- + news/11681.feature.rst | 4 ++++ + src/pip/_internal/cli/cmdoptions.py | 8 +++++++- + tests/unit/test_pyproject_config.py | 15 ++++++++++++--- + 3 files changed, 23 insertions(+), 4 deletions(-) + create mode 100644 news/11681.feature.rst + +diff --git a/news/11681.feature.rst b/news/11681.feature.rst +new file mode 100644 +index 000000000..a0d918b19 +--- /dev/null ++++ b/news/11681.feature.rst +@@ -0,0 +1,4 @@ ++The ``--config-settings``/``-C`` option now supports using the same key multiple ++times. When the same key is specified multiple times, all values are passed to ++the build backend as a list, as opposed to the previous behavior where pip would ++only pass the last value is the same key was used multiple times. +diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py +index b4e2560de..4179f98a5 100644 +--- a/src/pip/_internal/cli/cmdoptions.py ++++ b/src/pip/_internal/cli/cmdoptions.py +@@ -803,7 +803,13 @@ def _handle_config_settings( + if dest is None: + dest = {} + setattr(parser.values, option.dest, dest) +- dest[key] = val ++ if key in dest: ++ if isinstance(dest[key], list): ++ dest[key].append(val) ++ else: ++ dest[key] = [dest[key], val] ++ else: ++ dest[key] = val + + + config_settings: Callable[..., Option] = partial( +diff --git a/tests/unit/test_pyproject_config.py b/tests/unit/test_pyproject_config.py +index 9937f3880..c7e469560 100644 +--- a/tests/unit/test_pyproject_config.py ++++ b/tests/unit/test_pyproject_config.py +@@ -1,3 +1,5 @@ ++from typing import Dict, List ++ + import pytest + + from pip._internal.commands import create_command +@@ -36,9 +38,16 @@ def test_set_config_empty_value() -> None: + assert options.config_settings == {"x": ""} + + +-def test_replace_config_value() -> None: ++@pytest.mark.parametrize( ++ ("passed", "expected"), ++ [ ++ (["x=hello", "x=world"], {"x": ["hello", "world"]}), ++ (["x=hello", "x=world", "x=other"], {"x": ["hello", "world", "other"]}), ++ ], ++) ++def test_multiple_config_values(passed: List[str], expected: Dict[str, str]) -> None: + i = create_command("install") + options, _ = i.parse_args( +- ["xxx", "--config-settings", "x=hello", "--config-settings", "x=world"] ++ ["xxx", *(f"--config-settings={option}" for option in passed)] + ) +- assert options.config_settings == {"x": "world"} ++ assert options.config_settings == expected +-- +2.40.1 + diff --git a/python-pip.spec b/python-pip.spec index 08aedb1..8a0640f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -90,6 +90,13 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Support passing the same key multiple times in --config-settings +# This is needed for pyproject-rpm-macros to have consistent behavior across +# Fedora releases. +# Based on: +# https://github.com/pypa/pip/commit/1268487cbab1b2ffab881b5961c0476e655b6c88 +Patch: Support-passing-the-same-key-multiple-times-in-confi.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -390,6 +397,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue May 30 2023 Maxwell G - 22.3.1-3 +- Backport patch to support passing the same key multiple times in --config-settings + * Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 558f1a0e2bff5c4b41390447591ece53c2502e7c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 16:40:50 +0200 Subject: [PATCH 09/80] Bootstrap for Python 3.12 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index c9f527b..478c39a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -14,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -387,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Jun 13 2023 Python Maint - 23.1.2-2 +- Bootstrap for Python 3.12 + * Fri May 19 2023 Miro Hrončok - 23.1.2-1 - Update to 23.1.2 Resolves: rhbz#2186979 From 8b06ef16f808db3a62ac4a305cea7447694ef45c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 20 Jul 2023 11:54:01 +0200 Subject: [PATCH 10/80] Rebuilt for Python 3.12 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 478c39a..6b29a15 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Thu Jul 20 2023 Python Maint - 23.1.2-3 +- Rebuilt for Python 3.12 + * Tue Jun 13 2023 Python Maint - 23.1.2-2 - Bootstrap for Python 3.12 From 72a236c147823e6f5cb6e84aace5d76584da9c4c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:17:32 +0000 Subject: [PATCH 11/80] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 6b29a15..cb31243 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jul 20 2023 Python Maint - 23.1.2-3 - Rebuilt for Python 3.12 From 3292de8e3b48866d7c6e16e1ab714351cb2e7d90 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 25 Jul 2023 12:10:44 +0200 Subject: [PATCH 12/80] Rebuilt for Python 3.12 --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index cb31243..94b6713 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -389,6 +389,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Jul 25 2023 Python Maint - 23.1.2-5 +- Rebuilt for Python 3.12 + * Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From e82cd73bd4ba80246d0c14b6542665abfc5477e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 26 Jul 2023 16:03:11 +0200 Subject: [PATCH 13/80] Drop no-longer-needed custom changes to /usr/bin/pip* pip >= 20 has a mechanism that replaces our pip-allow-different-versions.patch However, we kept our patch to support users doing e.g.: $ pip install --user --upgrade 'pip<20' However, pip 19.3.1 (the latest <20 version) does not even operate without distutils: (venv3.12)$ pip list Package Version ---------- ------- pip 22.3.1 setuptools 65.5.0 (venv3.12)$ pip install --upgrade 'pip<20' ... (venv3.12) $ pip list Traceback (most recent call last): File ".../venv3.12/bin/pip", line 5, in from pip._internal.main import main File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/main.py", line 13, in from pip._internal.cli.autocompletion import autocomplete File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/autocompletion.py", line 11, in from pip._internal.cli.main_parser import create_main_parser File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/main_parser.py", line 7, in from pip._internal.cli import cmdoptions File ".../venv3.12/lib64/python3.12/site-packages/pip/_internal/cli/cmdoptions.py", line 19, in from distutils.util import strtobool ModuleNotFoundError: No module named 'distutils' Hence, it no longer makes any sense to keep the patch with Python 3.12. --- pip-allow-different-versions.patch | 27 ------------------------ python-pip.spec | 34 +++++------------------------- 2 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 pip-allow-different-versions.patch diff --git a/pip-allow-different-versions.patch b/pip-allow-different-versions.patch deleted file mode 100644 index 4a11517..0000000 --- a/pip-allow-different-versions.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- /usr/bin/pip3 2019-11-12 17:37:34.793131862 +0100 -+++ pip3 2019-11-12 17:40:42.014107134 +0100 -@@ -2,7 +2,23 @@ - # -*- coding: utf-8 -*- - import re - import sys --from pip._internal.cli.main import main -+ -+try: -+ from pip._internal.cli.main import main -+except ImportError: -+ try: -+ from pip._internal.main import main -+ except ImportError: -+ try: -+ # If the user has downgraded pip, the above import will fail. -+ # Let's try older methods of invoking it: -+ -+ # pip 19 uses this -+ from pip._internal import main -+ except ImportError: -+ # older pip versions use this -+ from pip import main -+ - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/python-pip.spec b/python-pip.spec index 94b6713..8cf5b31 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -16,7 +16,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -85,29 +85,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Downstream only patch -# Users might have local installations of pip from using -# `pip install --user --upgrade pip` on older/newer versions. -# If they do that and they run `pip` or `pip3`, the one from /usr/bin is used. -# However that's the one from this RPM package and the import in there might -# fail (it tries to import from ~/.local, but older or newer pip is there with -# a bit different API). -# We add this patch as a dirty workaround to make /usr/bin/pip* work with -# both pip10+ (from this RPM) and older or newer (19.3+) pip (from whatever). -# A proper fix is to put ~/.local/bin in front of /usr/bin in the PATH, -# however others are against that and we cannot change it for existing -# installs/user homes anyway. -# https://bugzilla.redhat.com/show_bug.cgi?id=1569488 -# https://bugzilla.redhat.com/show_bug.cgi?id=1571650 -# https://bugzilla.redhat.com/show_bug.cgi?id=1767212 -# WARNING: /usr/bin/pip* are entrypoints, this cannot be applied in %%prep! -# %%patch10 doesn't work outside of %%prep, so we add it as a source -# Note that since pip 20, old main() import paths are preserved for backwards -# compatibility: https://github.com/pypa/pip/issues/7498 -# Meaning we don't need to update any of the older pips to support 20+ -# We also don't need to update Pythons to use new import path in ensurepip -Source10: pip-allow-different-versions.patch - %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -309,11 +286,6 @@ done popd %endif -# before we ln -s anything, we apply Source10 patch to all pips: -for PIP in %{buildroot}%{_bindir}/pip*; do - patch -p1 --no-backup-if-mismatch $PIP < %{SOURCE10} -done - mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ @@ -389,6 +361,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 +- Drop no-longer-needed custom changes to /usr/bin/pip* +Resolves: rhbz#2150373 + * Tue Jul 25 2023 Python Maint - 23.1.2-5 - Rebuilt for Python 3.12 From 960d5f25daa752e99ca479c3066dcf204649a2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 2 Aug 2023 22:42:14 +0200 Subject: [PATCH 14/80] Drop a pinned dependency only relevant with early Python 3.11 --- python-pip.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 8cf5b31..aa6a966 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -182,9 +182,6 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# The python3.11 version that stopped using the rpm_prefix scheme -Requires: python3-libs >= 3.11.0~rc1-2 - %{crypt_compat_recommends 3} From da117b531686c73ecfcb7e2a2dec0bcc4c59e985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 2 Aug 2023 22:47:04 +0200 Subject: [PATCH 15/80] Stop Recommending libcrypt.so.1 on Python 3.12+ See https://discuss.python.org/t/29455/ --- python-pip.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index aa6a966..9fe9cfd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -133,6 +133,9 @@ Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 # a long time until manylinux1 is phased out). # See: https://github.com/pypa/manylinux/issues/305 # Note that manylinux is only applicable to x86 (both 32 and 64 bits) +# As of Python 3.12, we no longer use this, +# see https://discuss.python.org/t/29455/ +# However, we keep it around for previous Python versions that use the wheel package. %global crypt_compat_recommends() %{expand: Recommends: (libcrypt.so.1()(64bit) if python%{1}(x86-64)) Recommends: (libcrypt.so.1 if python%{1}(x86-32)) @@ -182,9 +185,6 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} - -%{crypt_compat_recommends 3} - %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -212,7 +212,12 @@ Requires: ca-certificates # Virtual provides for the packages bundled by pip: %{bundled 3} -%{crypt_compat_recommends 3} +# This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels +%{crypt_compat_recommends 3.11} +%{crypt_compat_recommends 3.10} +%{crypt_compat_recommends 3.9} +%{crypt_compat_recommends 3.8} +%{crypt_compat_recommends 3.7} %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. @@ -360,6 +365,7 @@ pytest_k='not completion' %changelog * Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 - Drop no-longer-needed custom changes to /usr/bin/pip* +- Stop Recommending libcrypt.so.1 on Python 3.12+ Resolves: rhbz#2150373 * Tue Jul 25 2023 Python Maint - 23.1.2-5 From 432aea6d5c17187d627265f38b3baa331642ebdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Aug 2023 18:09:17 +0200 Subject: [PATCH 16/80] Remove leftovers from Python 3.12 bootstrap --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 9fe9cfd..9ce8462 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. @@ -16,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -363,6 +361,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 +- Actually run the tests and build the docs when building this package + * Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 - Drop no-longer-needed custom changes to /usr/bin/pip* - Stop Recommending libcrypt.so.1 on Python 3.12+ From fb213c6f74c1894448184d22ccc867538dd97709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Aug 2023 21:33:37 +0200 Subject: [PATCH 17/80] Update to 23.2.1 --- python-pip.spec | 26 +++++++++++++++----------- sources | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 9ce8462..fb0e399 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.1.2 +%global base_version 23.2.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 7%{?dist} +Release: 1%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -96,7 +96,7 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2022.12.7 +Provides: bundled(python%{1}dist(certifi)) = 2023.5.7 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 @@ -104,19 +104,19 @@ Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 3.2 -Provides: bundled(python%{1}dist(pygments)) = 2.14 -Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 +Provides: bundled(python%{1}dist(platformdirs)) = 3.8.1 +Provides: bundled(python%{1}dist(pygments)) = 2.15.1 +Provides: bundled(python%{1}dist(pyparsing)) = 3.1 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 -Provides: bundled(python%{1}dist(requests)) = 2.28.2 +Provides: bundled(python%{1}dist(requests)) = 2.31 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.3.3 -Provides: bundled(python%{1}dist(setuptools)) = 67.7.2 +Provides: bundled(python%{1}dist(rich)) = 13.4.2 +Provides: bundled(python%{1}dist(setuptools)) = 68 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.5 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.15 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.16 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -361,6 +361,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 +- Update to 23.2.1 +Resolves: rhbz#2223082 + * Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 - Actually run the tests and build the docs when building this package diff --git a/sources b/sources index e714ca8..428ed9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.1.2.tar.gz) = b33070cb59a1258904a60b48ec8abfd9e316c5f87681fea13d89ddf6d516afac10965ae1db54fea299a0a72f98602ce02e8b3be46f239e857db84866045730e1 +SHA512 (pip-23.2.1.tar.gz) = a6c629976c332cffe5dff0ec1e201d694c7a42fa8def202ebf1db251a6dbd90091eaac89c36a354a0cf0c60cdb267b4e0ec9ff6a88b0ac61cfaafdf159e34fc8 From be83e98e05c47c01435e3e514d6a566c17684471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 14:13:36 +0200 Subject: [PATCH 18/80] When built without tests, run a smoke test and bundled() Provides verification --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index fb0e399..b02777c 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -311,11 +311,16 @@ mkdir -p %{buildroot}%{python_wheel_dir} install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} -%if %{with tests} %check # Verify bundled provides are up to date %{_rpmconfigdir}/pythonbundles.py src/pip/_vendor/vendor.txt --compare-with '%{bundled 3}' +# Verify we can at least run basic commands without crashing +%{py3_test_envvars} %{buildroot}%{_bindir}/pip --help +%{py3_test_envvars} %{buildroot}%{_bindir}/pip list +%{py3_test_envvars} %{buildroot}%{_bindir}/pip show pip + +%if %{with tests} # Upstream tests # bash completion tests only work from installed package pytest_k='not completion' From e03098bace92ef6cb31e5ecf0594cb043e9d8f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 14:17:07 +0200 Subject: [PATCH 19/80] Don't generate conditional Recommends when the wheel is built for a single Python version --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index b02777c..3e7dce8 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -211,11 +211,14 @@ Requires: ca-certificates %{bundled 3} # This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels +# It is also only relevant when this wheel is shared across multiple Pythons +%if "%{python_wheel_pkg_prefix}" == "python" %{crypt_compat_recommends 3.11} %{crypt_compat_recommends 3.10} %{crypt_compat_recommends 3.9} %{crypt_compat_recommends 3.8} %{crypt_compat_recommends 3.7} +%endif %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. From 6648d06bdf42719d2b6c55a1490d8b02028b91a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Oct 2023 15:20:12 +0200 Subject: [PATCH 20/80] CI: Make Python 3.7 tests optional Python 3.7 has been retired from Fedora 40+: https://fedoraproject.org/wiki/Changes/RetirePython3.7 --- tests/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8c7064b..76f0da1 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -18,7 +18,7 @@ run: VERSION=3.6 ./venv.sh - smoke37: dir: python/smoke - run: VERSION=3.7 ./venv.sh + run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh @@ -45,7 +45,7 @@ run: VERSION=3.6 METHOD=virtualenv ./venv.sh - smoke37_virtualenv: dir: python/smoke - run: VERSION=3.7 METHOD=virtualenv ./venv.sh + run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh @@ -81,7 +81,6 @@ - virtualenv - python2.7 - python3.6 - - python3.7 - python3.8 - python3.9 - python3.10-devel From 0cc15183972bd9db3c6049e6b27964702b48a0b7 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 16 Nov 2023 16:24:11 +0100 Subject: [PATCH 21/80] Update to 23.3.1 --- python-pip.spec | 14 ++++++++++---- sources | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 3e7dce8..06d7c0e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.2.1 +%global base_version 23.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -42,6 +42,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # six: MIT # tenacity: Apache-2.0 +# truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT @@ -95,8 +96,8 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 -Provides: bundled(python%{1}dist(certifi)) = 2023.5.7 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 +Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 Provides: bundled(python%{1}dist(distlib)) = 0.3.6 @@ -114,9 +115,10 @@ Provides: bundled(python%{1}dist(rich)) = 13.4.2 Provides: bundled(python%{1}dist(setuptools)) = 68 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 +Provides: bundled(python%{1}dist(truststore)) = 0.8 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.16 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.17 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -369,6 +371,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 +- Update to 23.3.1 +Resolves: rhbz#2244306 + * Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 - Update to 23.2.1 Resolves: rhbz#2223082 diff --git a/sources b/sources index 428ed9f..8aba295 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.2.1.tar.gz) = a6c629976c332cffe5dff0ec1e201d694c7a42fa8def202ebf1db251a6dbd90091eaac89c36a354a0cf0c60cdb267b4e0ec9ff6a88b0ac61cfaafdf159e34fc8 +SHA512 (pip-23.3.1.tar.gz) = eddca29e8c3727d1d8d793ab0b05f069781cac06df805fcf7a363da738d39498135ccbbb6d2d442604a7bf78ba6c3d101ec2043431ac1832a3f2710db7cc5e56 From b9cefb7bc1c5b9501a2ca3ab8596062389eafd04 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 3 Jan 2024 18:40:48 +0000 Subject: [PATCH 22/80] Remove weak dependency on python3-setuptools Now that pip defaults to building in an isolated environment, there's no reason to pull in the python3-setuptools package. --- python-pip.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 06d7c0e..b575a09 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -171,14 +171,6 @@ BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates Requires: ca-certificates -# This was previously required and we keep it recommended because a lot of -# sdists installed via pip will try to import setuptools. -# But pip doesn't actually require setuptools. -# It can install wheels without them and it can build wheels in isolation mode -# (using setuptools/flit/poetry/... installed from PyPI). -# Side note: pip bundles pkg_resources from setuptools for internal usage. -Recommends: python%{python3_pkgversion}-setuptools - # Virtual provides for the packages bundled by pip: %{bundled 3} @@ -371,6 +363,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Jan 03 2024 Maxwell G - 23.3.1-2 +- Remove weak dependency on python3-setuptools + * Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 - Update to 23.3.1 Resolves: rhbz#2244306 From e286eac28b91839a9f17c95bcc6935e5acdef2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 3 Jan 2024 20:07:48 +0100 Subject: [PATCH 23/80] CI: Remove pipenv test, pipenv was retired from Rawhide https://src.fedoraproject.org/rpms/pipenv/c/892789a4d91e00f80f7ebc2a187d51038b7b5223 --- tests/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 76f0da1..51248e2 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -61,8 +61,6 @@ - smoke312_virtualenv: dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh - - pipenv: - run: pipenv install six - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -89,7 +87,6 @@ - python2-devel - python3-devel - python3-tox - - pipenv - mock - rpmdevtools - rpm-build From 26b3caa9259fd3bb53c6f4ab290ca816fe54f2eb Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 12 Jan 2024 23:12:02 +0000 Subject: [PATCH 24/80] Remove unused python3-mock dependency --- python-pip.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b575a09..7c0305b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -156,7 +156,6 @@ BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: bash-completion %if %{with tests} BuildRequires: python%{python3_pkgversion}-cryptography -BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-freezegun @@ -363,6 +362,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Fri Jan 12 2024 Maxwell G - 23.3.1-3 +- Remove unused python3-mock dependency + * Wed Jan 03 2024 Maxwell G - 23.3.1-2 - Remove weak dependency on python3-setuptools From 2a7f38350182342b01c8568b0cc5ab6924067549 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 04:56:31 +0000 Subject: [PATCH 25/80] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 7c0305b..f8ba025 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -362,6 +362,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 12 2024 Maxwell G - 23.3.1-3 - Remove unused python3-mock dependency From 9cd97d13383e51a9e9cdc7149f64c133ee0b3209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 13 Jan 2024 12:45:25 +0100 Subject: [PATCH 26/80] Generate test BuildRequires --- python-pip.spec | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f8ba025..606cab6 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -14,7 +14,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -153,20 +153,8 @@ BuildRequires: python%{python3_pkgversion}-devel # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: bash-completion -%if %{with tests} -BuildRequires: python%{python3_pkgversion}-cryptography -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-pretend -BuildRequires: python%{python3_pkgversion}-freezegun -BuildRequires: python%{python3_pkgversion}-scripttest -BuildRequires: python%{python3_pkgversion}-virtualenv -BuildRequires: python%{python3_pkgversion}-werkzeug -BuildRequires: python%{python3_pkgversion}-pyyaml -BuildRequires: python%{python3_pkgversion}-tomli-w -BuildRequires: python%{python3_pkgversion}-installer -%endif BuildRequires: python%{python3_pkgversion}-wheel +BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates @@ -240,6 +228,18 @@ sed -i '/\.exe/d' setup.py # https://github.com/pypa/pip/pull/12046 %{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' +# Remove unused test requirements +sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt + + +%if %{with tests} +%generate_buildrequires +# we only use this to generate test requires +# the "pyproject" part is explicitly disabled as it generates a requirement on pip +%pyproject_buildrequires -N tests/requirements.txt +%endif + + %build %py3_build_wheel @@ -362,6 +362,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 +- Switched to autogenerated BuildRequires for test dependencies, + which removed some that were no longer necessary + * Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From bd7e7a076a2afc11670b2bb1e1d55ecd238ac2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:47:58 +0100 Subject: [PATCH 27/80] Replace custom %{bashcompdir} macro with %{bash_completions_dir} $ pkg-config --variable=completionsdir bash-completion /usr/share/bash-completion/completions $ rpm --eval '%{bash_completions_dir}' /usr/share/bash-completion/completions --- python-pip.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 606cab6..8c5b05d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -10,8 +10,6 @@ %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl -%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) - Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} Release: 5%{?dist} @@ -282,15 +280,15 @@ done popd %endif -mkdir -p %{buildroot}%{bashcompdir} +mkdir -p %{buildroot}%{bash_completions_dir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bashcompdir}/pip3 + > %{buildroot}%{bash_completions_dir}/pip3 # Make bash completion apply to all the 5 symlinks we install sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bashcompdir}/pip3 + %{buildroot}%{bash_completions_dir}/pip3 # Provide symlinks to executables to comply with Fedora guidelines for Python @@ -345,8 +343,8 @@ pytest_k='not completion' %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* -%dir %{bashcompdir} -%{bashcompdir}/pip3 +%dir %{bash_completions_dir} +%{bash_completions_dir}/pip3 %if %{with doc} %files doc From b582198d1c36def4a4b3e586553952840387e634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:43:16 +0100 Subject: [PATCH 28/80] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 496 +++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 500 +----------------------------------------------- 2 files changed, 498 insertions(+), 498 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..f16cb91 --- /dev/null +++ b/changelog @@ -0,0 +1,496 @@ +* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 +- Switched to autogenerated BuildRequires for test dependencies, + which removed some that were no longer necessary + +* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 12 2024 Maxwell G - 23.3.1-3 +- Remove unused python3-mock dependency + +* Wed Jan 03 2024 Maxwell G - 23.3.1-2 +- Remove weak dependency on python3-setuptools + +* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 +- Update to 23.3.1 +Resolves: rhbz#2244306 + +* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 +- Update to 23.2.1 +Resolves: rhbz#2223082 + +* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 +- Actually run the tests and build the docs when building this package + +* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 +- Drop no-longer-needed custom changes to /usr/bin/pip* +- Stop Recommending libcrypt.so.1 on Python 3.12+ +Resolves: rhbz#2150373 + +* Tue Jul 25 2023 Python Maint - 23.1.2-5 +- Rebuilt for Python 3.12 + +* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jul 20 2023 Python Maint - 23.1.2-3 +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint - 23.1.2-2 +- Bootstrap for Python 3.12 + +* Fri May 19 2023 Miro Hrončok - 23.1.2-1 +- Update to 23.1.2 +Resolves: rhbz#2186979 + +* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 +- Fix compatibility with Sphinx 6+ +Resolves: rhbz#2180479 + +* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 +- Update to 23.0.1 +Resolves: rhbz#2165760 + +* Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Nov 14 2022 Karolina Surma - 22.3.1-1 +- Update to 22.3.1 +Resolves: rhbz#2135044 + +* Mon Sep 05 2022 Python Maint - 22.2.2-2 +- Fix crash when an empty dist-info/egg-info is present +Resolves: rhbz#2115001 +- No longer use the rpm_install prefix to determine RPM-installed packages +Related: rhbz#2026979 + +* Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 +- Update to 22.2.2 +Resolves: rhbz#2109468 + +* Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 +- Update to 22.2 +Resolves: rhbz#2109468 + +* Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jun 15 2022 Python Maint - 22.0.4-4 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 22.0.4-3 +- Bootstrap for Python 3.11 + +* Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 +- Fallback to pep517 if setup.py is present and setuptools cannot be imported +- Fixes: rhbz#2020635 + +* Mon Mar 21 2022 Karolina Surma - 22.0.4-1 +- Update to 22.0.4 +Resolves: rhbz#2061262 + +* Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 +- Update to 22.0.3 +Resolves: rhbz#2048243 + +* Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 +- Update to 21.3.1 +- Resolves: rhbz#2016682 + +* Wed Oct 13 2021 Miro Hrončok - 21.3-1 +- Update to 21.3 +- Resolves: rhbz#2013026 +- Fix incomplete pip-updates in virtual environments + +* Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 +- Remove bundled windows executables +- Resolves: rhbz#2005453 + +* Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 +- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme + +* Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 +- Fix broken uninstallation by a bogus downstream patch + +* Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 +- Update to 21.2.3 +- Resolves: rhbz#1985635 + +* Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 +- Update to 21.1.3 +Resolves: rhbz#1976449 + +* Mon Jun 07 2021 Karolina Surma - 21.1.2-1 +- Update to 21.1.2 +Resolves: rhbz#1963433 + +* Fri Jun 04 2021 Python Maint - 21.1.1-3 +- Rebuilt for Python 3.10 + +* Tue Jun 01 2021 Python Maint - 21.1.1-2 +- Bootstrap for Python 3.10 + +* Mon May 10 2021 Karolina Surma - 21.1.1-1 +- Update to 21.1.1 + +* Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 +- python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 + (The wheel is Python 3 only for a while) + +* Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 +- Update to 21.0.1 +Resolves: rhbz#1922592 + +* Tue Jan 26 2021 Lumír Balhar - 21.0-1 +- Update to 21.0 (#1919530) + +* Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 +- Update to 20.3.3 + +* Mon Nov 30 2020 Miro Hrončok - 20.3-1 +- Update to 20.3 +- Add support for PEP 600: Future manylinux Platform Tags +- New resolver +- Fixes: rhbz#1893470 + +* Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 +- Update to 20.2.4 (#1889112) + +* Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 +- Update to 20.2.2 (#1838553) + +* Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 +- Do not emit a warning about root privileges when --root is used + +* Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 +- Update bundled provides to match 20.1.1 + +* Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 +- Deselect tests incompatible with the latest virtualenv + +* Sun May 24 2020 Miro Hrončok - 20.1.1-3 +- Rebuilt for Python 3.9 + +* Thu May 21 2020 Miro Hrončok - 20.1.1-2 +- Bootstrap for Python 3.9 + +* Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 +- Update to 20.1.1 + +* Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 +- Update to 20.1 + +* Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 +- Update to 20.1~b1 + +* Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 +- Only recommend setuptools, don't require them + +* Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 +- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) + +* Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 +- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip + +* Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 +- Update to 20.0.2 (#1793456) + +* Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 +- Update to 19.3.1 (#1761508) +- Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions + +* Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 +- Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) + +* Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 +- Update to 19.2.3 (#1742230) +- Drop patch that should strip path prefixes from RECORD files, the paths are relative + +* Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 +- Remove python2-pip +- Make pip bootstrap itself, rather than with an extra bootstrap RPM build + +* Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 +- Rebuilt for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 +- Bootstrap for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 +- Bootstrap for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 +- Recommend libcrypt.so.1 for manylinux1 compatibility +- Make /usr/bin/pip Python 3 + +* Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 +- Fix root warning when pip is invoked via python -m pip +- Remove a redundant second WARNING prefix form the abovementioned warning + +* Wed May 15 2019 Miro Hrončok - 19.1.1-1 +- Update to 19.1.1 (#1706995) + +* Thu Apr 25 2019 Miro Hrončok - 19.1-1 +- Update to 19.1 (#1702525) + +* Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 +- Update to 19.0.3 (#1679277) + +* Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 +- Update to 19.0.2 (#1668492) + +* Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Dec 03 2018 Miro Hrončok - 18.1-2 +- Use the system level root certificate instead of the one bundled in certifi + +* Thu Nov 22 2018 Miro Hrončok - 18.1-1 +- Update to 18.1 (#1652089) + +* Tue Sep 18 2018 Victor Stinner - 18.0-4 +- Prevent removing of the system packages installed under /usr/lib + when pip install -U is executed. Original patch by Michal Cyprian. + Resolves: rhbz#1550368. + +* Wed Aug 08 2018 Miro Hrončok - 18.0-3 +- Create python-pip-wheel package with the wheel + +* Tue Jul 31 2018 Miro Hrončok - 18.0-2 +- Remove redundant "Unicode" from License + +* Mon Jul 23 2018 Marcel Plch - 18.0-7 +- Update to 18.0 + +* Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 +- Bootstrap for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 +- Bootstrap for Python 3.7 + +* Fri May 04 2018 Miro Hrončok - 9.0.3-2 +- Allow to import pip10's main from pip9's /usr/bin/pip +- Do not show the "new version of pip" warning outside of venv +Resolves: rhbz#1569488 +Resolves: rhbz#1571650 +Resolves: rhbz#1573755 + +* Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 +- Update to 9.0.3 + +* Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 +- Include built HTML documentation (in the new -doc subpackage) and man page + +* Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 +- Reintroduce the ipaddress module in the python3 subpackage. + +* Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 +- Add virtual provides for the bundled libraries. (rhbz#1096912) + +* Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 +- Switch macros to bcond's and make Python 2 optional to facilitate building + the Python 2 and Python 3 modules + +* Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue May 23 2017 Tomas Orsava - 9.0.1-10 +- Modernized package descriptions +Resolves: rhbz#1452568 + +* Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 +- Fix typo in the sudo pip warning + +* Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 +- Patch 1 update: No sudo pip warning in venv or virtualenv + +* Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 +- Patch 1 update: Customize the warning with the proper version of the pip + command + +* Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 +- Added patch 1: Emit a warning when running with root privileges + +* Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 +- Provide symlinks to executables to comply with Fedora guidelines for Python +Resolves: rhbz#1406922 + +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 +- Rebuild for Python 3.6 with wheel + +* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 +- Rebuild for Python 3.6 without wheel + +* Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 +- Update to 9.0.1 + +* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 +- Enable EPEL Python 3 builds +- Use new python macros +- Cleanup spec + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 +- Updated the test sources + +* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 +- Moved python-pip into the python2-pip subpackage +- Added the python_provide macro + +* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 17 2016 Tomas Orsava - 8.1.2-1 +- Update to 8.1.2 +- Moved to a new PyPI URL format +- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py + +* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 +- Update to 8.0.2 + +* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 +- Rebuilt for Python3.5 rebuild +- With wheel set to 1 + +* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 +- Rebuilt for Python3.5 rebuild + +* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 +- Update to 7.1.0 + +* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 +- Install bash completion +- Ship LICENSE.txt as %%license where available + +* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 +- Update to 7.0.3 + +* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 +- Update to 6.0.8 + +* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 +- Only enable tests on Fedora. + +* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 +- Add tests +- Add patch skipping tests requiring Internet access + +* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 +- Added patch for local dos with predictable temp dictionary names + (http://seclists.org/oss-sec/2014/q4/655) + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 +- Update to 1.5.6 + +* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 +- Rebuild as wheel for Python 3.4 + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 +- Disable build_wheel + +* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 +- Rebuild as wheel for Python 3.4 + +* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 +- Updated to 1.5.4 + +* Mon Oct 14 2013 Tim Flink - 1.4.1-1 +- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release +- Updated version to 1.4.1 + +* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 +- Fix for CVE 2013-2099 + +* Thu May 23 2013 Tim Flink - 1.3.1-3 +- undo python2 executable rename to python-pip. fixes #958377 +- fix summary to match upstream + +* Mon May 06 2013 Kevin Kofler - 1.3.1-2 +- Fix main package Summary, it's for Python 2, not 3 (#877401) + +* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 +- Update to 1.3.1, fix for CVE-2013-1888. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 09 2012 Tim Flink - 1.2.1-2 +- Fixing files for python3-pip + +* Thu Oct 04 2012 Tim Flink - 1.2.1-1 +- Update to upstream 1.2.1 +- Change binary from pip-python to python-pip (RHBZ#855495) +- Add alias from python-pip to pip-python, to be removed at a later date + +* Tue May 15 2012 Tim Flink - 1.1.0-1 +- Update to upstream 1.1.0 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sat Oct 22 2011 Tim Flink - 1.0.2-1 +- update to 1.0.2 and added python3 subpackage + +* Wed Jun 22 2011 Tim Flink - 0.8.3-1 +- update to 0.8.3 and project home page + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Luke Macken - 0.8.2-1 +- update to 0.8.2 of pip +* Mon Aug 30 2010 Peter Halliday - 0.8-1 +- update to 0.8 of pip +* Thu Jul 22 2010 David Malcolm - 0.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 +- update to 0.7.2 of pip +* Sun May 23 2010 Peter Halliday - 0.7.1-1 +- update to 0.7.1 of pip +* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 +- fix dependency issue +* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 +- fix spec file +* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 +- upgrade to 0.6.1 of pip +* Mon Aug 31 2009 Peter Halliday - 0.4-1 +- Initial package diff --git a/python-pip.spec b/python-pip.spec index 8c5b05d..e709a0e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -12,7 +12,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: %autorelease Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -360,500 +360,4 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog -* Mon Jan 22 2024 Miro Hrončok - 23.3.1-5 -- Switched to autogenerated BuildRequires for test dependencies, - which removed some that were no longer necessary - -* Mon Jan 22 2024 Fedora Release Engineering - 23.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 12 2024 Maxwell G - 23.3.1-3 -- Remove unused python3-mock dependency - -* Wed Jan 03 2024 Maxwell G - 23.3.1-2 -- Remove weak dependency on python3-setuptools - -* Thu Nov 16 2023 Petr Viktorin - 23.3.1-1 -- Update to 23.3.1 -Resolves: rhbz#2244306 - -* Fri Aug 04 2023 Miro Hrončok - 23.2.1-1 -- Update to 23.2.1 -Resolves: rhbz#2223082 - -* Fri Aug 04 2023 Miro Hrončok - 23.1.2-7 -- Actually run the tests and build the docs when building this package - -* Wed Jul 26 2023 Miro Hrončok - 23.1.2-6 -- Drop no-longer-needed custom changes to /usr/bin/pip* -- Stop Recommending libcrypt.so.1 on Python 3.12+ -Resolves: rhbz#2150373 - -* Tue Jul 25 2023 Python Maint - 23.1.2-5 -- Rebuilt for Python 3.12 - -* Fri Jul 21 2023 Fedora Release Engineering - 23.1.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jul 20 2023 Python Maint - 23.1.2-3 -- Rebuilt for Python 3.12 - -* Tue Jun 13 2023 Python Maint - 23.1.2-2 -- Bootstrap for Python 3.12 - -* Fri May 19 2023 Miro Hrončok - 23.1.2-1 -- Update to 23.1.2 -Resolves: rhbz#2186979 - -* Mon Mar 27 2023 Karolina Surma - 23.0.1-2 -- Fix compatibility with Sphinx 6+ -Resolves: rhbz#2180479 - -* Mon Feb 20 2023 Tomáš Hrnčiar - 23.0.1-1 -- Update to 23.0.1 -Resolves: rhbz#2165760 - -* Fri Jan 20 2023 Fedora Release Engineering - 22.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Nov 14 2022 Karolina Surma - 22.3.1-1 -- Update to 22.3.1 -Resolves: rhbz#2135044 - -* Mon Sep 05 2022 Python Maint - 22.2.2-2 -- Fix crash when an empty dist-info/egg-info is present -Resolves: rhbz#2115001 -- No longer use the rpm_install prefix to determine RPM-installed packages -Related: rhbz#2026979 - -* Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 -- Update to 22.2.2 -Resolves: rhbz#2109468 - -* Fri Jul 22 2022 Charalampos Stratakis - 22.2-1 -- Update to 22.2 -Resolves: rhbz#2109468 - -* Fri Jul 22 2022 Fedora Release Engineering - 22.0.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 15 2022 Python Maint - 22.0.4-4 -- Rebuilt for Python 3.11 - -* Mon Jun 13 2022 Python Maint - 22.0.4-3 -- Bootstrap for Python 3.11 - -* Tue Apr 26 2022 Tomáš Hrnčiar - 22.0.4-2 -- Fallback to pep517 if setup.py is present and setuptools cannot be imported -- Fixes: rhbz#2020635 - -* Mon Mar 21 2022 Karolina Surma - 22.0.4-1 -- Update to 22.0.4 -Resolves: rhbz#2061262 - -* Wed Feb 16 2022 Lumír Balhar - 22.0.3-1 -- Update to 22.0.3 -Resolves: rhbz#2048243 - -* Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 -- Update to 21.3.1 -- Resolves: rhbz#2016682 - -* Wed Oct 13 2021 Miro Hrončok - 21.3-1 -- Update to 21.3 -- Resolves: rhbz#2013026 -- Fix incomplete pip-updates in virtual environments - -* Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 -- Remove bundled windows executables -- Resolves: rhbz#2005453 - -* Thu Sep 23 2021 Miro Hrončok - 21.2.3-3 -- Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme - -* Mon Aug 16 2021 Miro Hrončok - 21.2.3-2 -- Fix broken uninstallation by a bogus downstream patch - -* Mon Aug 09 2021 Miro Hrončok - 21.2.3-1 -- Update to 21.2.3 -- Resolves: rhbz#1985635 - -* Fri Jul 23 2021 Fedora Release Engineering - 21.1.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jun 29 2021 Lumír Balhar - 21.1.3-1 -- Update to 21.1.3 -Resolves: rhbz#1976449 - -* Mon Jun 07 2021 Karolina Surma - 21.1.2-1 -- Update to 21.1.2 -Resolves: rhbz#1963433 - -* Fri Jun 04 2021 Python Maint - 21.1.1-3 -- Rebuilt for Python 3.10 - -* Tue Jun 01 2021 Python Maint - 21.1.1-2 -- Bootstrap for Python 3.10 - -* Mon May 10 2021 Karolina Surma - 21.1.1-1 -- Update to 21.1.1 - -* Sat Mar 13 2021 Miro Hrončok - 21.0.1-2 -- python-pip-wheel: Remove bundled provides and libcrypt recommends for Python 2 - (The wheel is Python 3 only for a while) - -* Wed Feb 17 2021 Lumír Balhar - 21.0.1-1 -- Update to 21.0.1 -Resolves: rhbz#1922592 - -* Tue Jan 26 2021 Lumír Balhar - 21.0-1 -- Update to 21.0 (#1919530) - -* Thu Dec 17 2020 Petr Viktorin - 20.3.3-1 -- Update to 20.3.3 - -* Mon Nov 30 2020 Miro Hrončok - 20.3-1 -- Update to 20.3 -- Add support for PEP 600: Future manylinux Platform Tags -- New resolver -- Fixes: rhbz#1893470 - -* Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 -- Update to 20.2.4 (#1889112) - -* Wed Aug 05 2020 Tomas Orsava - 20.2.2-1 -- Update to 20.2.2 (#1838553) - -* Wed Jul 29 2020 Fedora Release Engineering - 20.1.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 10 2020 Lumír Balhar - 20.1.1-6 -- Do not emit a warning about root privileges when --root is used - -* Wed Jul 08 2020 Miro Hrončok - 20.1.1-5 -- Update bundled provides to match 20.1.1 - -* Tue Jun 16 2020 Lumír Balhar - 20.1.1-4 -- Deselect tests incompatible with the latest virtualenv - -* Sun May 24 2020 Miro Hrončok - 20.1.1-3 -- Rebuilt for Python 3.9 - -* Thu May 21 2020 Miro Hrončok - 20.1.1-2 -- Bootstrap for Python 3.9 - -* Wed May 20 2020 Tomas Hrnciar - 20.1.1-1 -- Update to 20.1.1 - -* Wed Apr 29 2020 Tomas Hrnciar - 20.1-1 -- Update to 20.1 - -* Mon Apr 27 2020 Tomas Hrnciar - 20.1~b1-1 -- Update to 20.1~b1 - -* Wed Apr 15 2020 Miro Hrončok - 20.0.2-4 -- Only recommend setuptools, don't require them - -* Fri Apr 10 2020 Miro Hrončok - 20.0.2-3 -- Allow setting $TMPDIR to $PWD/... during pip wheel (#1806625) - -* Tue Mar 10 2020 Miro Hrončok - 20.0.2-2 -- Don't warn the user about pip._internal.main() entrypoint to fix ensurepip - -* Mon Mar 02 2020 Miro Hrončok - 20.0.2-1 -- Update to 20.0.2 (#1793456) - -* Thu Jan 30 2020 Fedora Release Engineering - 19.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Nov 04 2019 Tomas Orsava - 19.3.1-1 -- Update to 19.3.1 (#1761508) -- Drop upstreamed patch that fixed expected output in test to not break with alpha/beta/rc Python versions - -* Wed Oct 30 2019 Miro Hrončok - 19.2.3-2 -- Make /usr/bin/pip(3) work with user-installed pip 19.3+ (#1767212) - -* Mon Sep 02 2019 Miro Hrončok - 19.2.3-1 -- Update to 19.2.3 (#1742230) -- Drop patch that should strip path prefixes from RECORD files, the paths are relative - -* Wed Aug 21 2019 Petr Viktorin - 19.1.1-8 -- Remove python2-pip -- Make pip bootstrap itself, rather than with an extra bootstrap RPM build - -* Sat Aug 17 2019 Miro Hrončok - 19.1.1-7 -- Rebuilt for Python 3.8 - -* Wed Aug 14 2019 Miro Hrončok - 19.1.1-6 -- Bootstrap for Python 3.8 - -* Wed Aug 14 2019 Miro Hrončok - 19.1.1-5 -- Bootstrap for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 19.1.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 -- Recommend libcrypt.so.1 for manylinux1 compatibility -- Make /usr/bin/pip Python 3 - -* Mon Jun 10 2019 Miro Hrončok - 19.1.1-2 -- Fix root warning when pip is invoked via python -m pip -- Remove a redundant second WARNING prefix form the abovementioned warning - -* Wed May 15 2019 Miro Hrončok - 19.1.1-1 -- Update to 19.1.1 (#1706995) - -* Thu Apr 25 2019 Miro Hrončok - 19.1-1 -- Update to 19.1 (#1702525) - -* Wed Mar 06 2019 Miro Hrončok - 19.0.3-1 -- Update to 19.0.3 (#1679277) - -* Wed Feb 13 2019 Miro Hrončok - 19.0.2-1 -- Update to 19.0.2 (#1668492) - -* Sat Feb 02 2019 Fedora Release Engineering - 18.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Dec 03 2018 Miro Hrončok - 18.1-2 -- Use the system level root certificate instead of the one bundled in certifi - -* Thu Nov 22 2018 Miro Hrončok - 18.1-1 -- Update to 18.1 (#1652089) - -* Tue Sep 18 2018 Victor Stinner - 18.0-4 -- Prevent removing of the system packages installed under /usr/lib - when pip install -U is executed. Original patch by Michal Cyprian. - Resolves: rhbz#1550368. - -* Wed Aug 08 2018 Miro Hrončok - 18.0-3 -- Create python-pip-wheel package with the wheel - -* Tue Jul 31 2018 Miro Hrončok - 18.0-2 -- Remove redundant "Unicode" from License - -* Mon Jul 23 2018 Marcel Plch - 18.0-7 -- Update to 18.0 - -* Sat Jul 14 2018 Fedora Release Engineering - 9.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 18 2018 Miro Hrončok - 9.0.3-5 -- Rebuilt for Python 3.7 - -* Wed Jun 13 2018 Miro Hrončok - 9.0.3-4 -- Bootstrap for Python 3.7 - -* Wed Jun 13 2018 Miro Hrončok - 9.0.3-3 -- Bootstrap for Python 3.7 - -* Fri May 04 2018 Miro Hrončok - 9.0.3-2 -- Allow to import pip10's main from pip9's /usr/bin/pip -- Do not show the "new version of pip" warning outside of venv -Resolves: rhbz#1569488 -Resolves: rhbz#1571650 -Resolves: rhbz#1573755 - -* Thu Mar 29 2018 Charalampos Stratakis - 9.0.3-1 -- Update to 9.0.3 - -* Wed Feb 21 2018 Lumír Balhar - 9.0.1-16 -- Include built HTML documentation (in the new -doc subpackage) and man page - -* Fri Feb 09 2018 Fedora Release Engineering - 9.0.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Dec 04 2017 Charalampos Stratakis - 9.0.1-14 -- Reintroduce the ipaddress module in the python3 subpackage. - -* Mon Nov 20 2017 Charalampos Stratakis - 9.0.1-13 -- Add virtual provides for the bundled libraries. (rhbz#1096912) - -* Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 -- Switch macros to bcond's and make Python 2 optional to facilitate building - the Python 2 and Python 3 modules - -* Thu Jul 27 2017 Fedora Release Engineering - 9.0.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue May 23 2017 Tomas Orsava - 9.0.1-10 -- Modernized package descriptions -Resolves: rhbz#1452568 - -* Tue Mar 21 2017 Tomas Orsava - 9.0.1-9 -- Fix typo in the sudo pip warning - -* Fri Mar 03 2017 Tomas Orsava - 9.0.1-8 -- Patch 1 update: No sudo pip warning in venv or virtualenv - -* Thu Feb 23 2017 Tomas Orsava - 9.0.1-7 -- Patch 1 update: Customize the warning with the proper version of the pip - command - -* Tue Feb 14 2017 Tomas Orsava - 9.0.1-6 -- Added patch 1: Emit a warning when running with root privileges - -* Sat Feb 11 2017 Fedora Release Engineering - 9.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Jan 02 2017 Tomas Orsava - 9.0.1-4 -- Provide symlinks to executables to comply with Fedora guidelines for Python -Resolves: rhbz#1406922 - -* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-3 -- Rebuild for Python 3.6 with wheel - -* Fri Dec 09 2016 Charalampos Stratakis - 9.0.1-2 -- Rebuild for Python 3.6 without wheel - -* Fri Nov 18 2016 Orion Poplawski - 9.0.1-1 -- Update to 9.0.1 - -* Fri Nov 18 2016 Orion Poplawski - 8.1.2-5 -- Enable EPEL Python 3 builds -- Use new python macros -- Cleanup spec - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-4 -- Updated the test sources - -* Fri Aug 05 2016 Tomas Orsava - 8.1.2-3 -- Moved python-pip into the python2-pip subpackage -- Added the python_provide macro - -* Tue Jul 19 2016 Fedora Release Engineering - 8.1.2-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Tue May 17 2016 Tomas Orsava - 8.1.2-1 -- Update to 8.1.2 -- Moved to a new PyPI URL format -- Updated the prefix-stripping patch because of upstream changes in pip/wheel.py - -* Mon Feb 22 2016 Slavek Kabrda - 8.0.2-1 -- Update to 8.0.2 - -* Thu Feb 04 2016 Fedora Release Engineering - 7.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 14 2015 Robert Kuska - 7.1.0-3 -- Rebuilt for Python3.5 rebuild -- With wheel set to 1 - -* Tue Oct 13 2015 Robert Kuska - 7.1.0-2 -- Rebuilt for Python3.5 rebuild - -* Wed Jul 01 2015 Slavek Kabrda - 7.1.0-1 -- Update to 7.1.0 - -* Tue Jun 30 2015 Ville Skyttä - 7.0.3-3 -- Install bash completion -- Ship LICENSE.txt as %%license where available - -* Thu Jun 18 2015 Fedora Release Engineering - 7.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 04 2015 Matej Stuchlik - 7.0.3-1 -- Update to 7.0.3 - -* Fri Mar 06 2015 Matej Stuchlik - 6.0.8-1 -- Update to 6.0.8 - -* Thu Dec 18 2014 Slavek Kabrda - 1.5.6-5 -- Only enable tests on Fedora. - -* Mon Dec 01 2014 Matej Stuchlik - 1.5.6-4 -- Add tests -- Add patch skipping tests requiring Internet access - -* Tue Nov 18 2014 Matej Stuchlik - 1.5.6-3 -- Added patch for local dos with predictable temp dictionary names - (http://seclists.org/oss-sec/2014/q4/655) - -* Sat Jun 07 2014 Fedora Release Engineering - 1.5.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun May 25 2014 Matej Stuchlik - 1.5.6-1 -- Update to 1.5.6 - -* Fri Apr 25 2014 Matej Stuchlik - 1.5.4-4 -- Rebuild as wheel for Python 3.4 - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-3 -- Disable build_wheel - -* Thu Apr 24 2014 Matej Stuchlik - 1.5.4-2 -- Rebuild as wheel for Python 3.4 - -* Mon Apr 07 2014 Matej Stuchlik - 1.5.4-1 -- Updated to 1.5.4 - -* Mon Oct 14 2013 Tim Flink - 1.4.1-1 -- Removed patch for CVE 2013-2099 as it has been included in the upstream 1.4.1 release -- Updated version to 1.4.1 - -* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 16 2013 Toshio Kuratomi - 1.3.1-4 -- Fix for CVE 2013-2099 - -* Thu May 23 2013 Tim Flink - 1.3.1-3 -- undo python2 executable rename to python-pip. fixes #958377 -- fix summary to match upstream - -* Mon May 06 2013 Kevin Kofler - 1.3.1-2 -- Fix main package Summary, it's for Python 2, not 3 (#877401) - -* Fri Apr 26 2013 Jon Ciesla - 1.3.1-1 -- Update to 1.3.1, fix for CVE-2013-1888. - -* Thu Feb 14 2013 Fedora Release Engineering - 1.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Oct 09 2012 Tim Flink - 1.2.1-2 -- Fixing files for python3-pip - -* Thu Oct 04 2012 Tim Flink - 1.2.1-1 -- Update to upstream 1.2.1 -- Change binary from pip-python to python-pip (RHBZ#855495) -- Add alias from python-pip to pip-python, to be removed at a later date - -* Tue May 15 2012 Tim Flink - 1.1.0-1 -- Update to upstream 1.1.0 - -* Sat Jan 14 2012 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Sat Oct 22 2011 Tim Flink - 1.0.2-1 -- update to 1.0.2 and added python3 subpackage - -* Wed Jun 22 2011 Tim Flink - 0.8.3-1 -- update to 0.8.3 and project home page - -* Tue Feb 08 2011 Fedora Release Engineering - 0.8.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Dec 20 2010 Luke Macken - 0.8.2-1 -- update to 0.8.2 of pip -* Mon Aug 30 2010 Peter Halliday - 0.8-1 -- update to 0.8 of pip -* Thu Jul 22 2010 David Malcolm - 0.7.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Wed Jul 7 2010 Peter Halliday - 0.7.2-1 -- update to 0.7.2 of pip -* Sun May 23 2010 Peter Halliday - 0.7.1-1 -- update to 0.7.1 of pip -* Fri Jan 1 2010 Peter Halliday - 0.6.1.4 -- fix dependency issue -* Fri Dec 18 2009 Peter Halliday - 0.6.1-2 -- fix spec file -* Thu Dec 17 2009 Peter Halliday - 0.6.1-1 -- upgrade to 0.6.1 of pip -* Mon Aug 31 2009 Peter Halliday - 0.4-1 -- Initial package - +%autochangelog From 3c290026a93483b427fd88b8defc0fe11262a3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 25 Jan 2024 15:52:13 +0100 Subject: [PATCH 29/80] Update to 23.3.2 --- python-pip.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e709a0e..452ec3d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.3.1 +%global base_version 23.3.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl diff --git a/sources b/sources index 8aba295..3ed3c55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.3.1.tar.gz) = eddca29e8c3727d1d8d793ab0b05f069781cac06df805fcf7a363da738d39498135ccbbb6d2d442604a7bf78ba6c3d101ec2043431ac1832a3f2710db7cc5e56 +SHA512 (pip-23.3.2.tar.gz) = 976c6ab9959805f4d20d4bdedb4dabc95dd55f1ec78773f63f738599bbe44e766ad3a1394bee052a2c2386826d67686ad456726373345ba9e0d555fd251dff09 From 4899b5284a3cd5c6a8f7432d2b5ca816f25b6641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 28 Feb 2024 16:58:05 +0100 Subject: [PATCH 30/80] Update to 24.0 Resolves: rhbz#2262492 --- python-pip.spec | 4 ++-- sources | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 452ec3d..13f8830 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 23.3.2 +%global base_version 24.0 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -98,7 +98,7 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 Provides: bundled(python%{1}dist(chardet)) = 5.1 Provides: bundled(python%{1}dist(colorama)) = 0.4.6 -Provides: bundled(python%{1}dist(distlib)) = 0.3.6 +Provides: bundled(python%{1}dist(distlib)) = 0.3.8 Provides: bundled(python%{1}dist(distro)) = 1.8 Provides: bundled(python%{1}dist(idna)) = 3.4 Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 diff --git a/sources b/sources index 3ed3c55..2a0559e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-23.3.2.tar.gz) = 976c6ab9959805f4d20d4bdedb4dabc95dd55f1ec78773f63f738599bbe44e766ad3a1394bee052a2c2386826d67686ad456726373345ba9e0d555fd251dff09 +SHA512 (pip-24.0.tar.gz) = 0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df From 30632b6e8c11f6fa2ba3d6311ed77dc46321ca34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 7 Mar 2024 11:54:26 +0100 Subject: [PATCH 31/80] CI: Add Python 3.13 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 51248e2..cd36027 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -34,6 +34,9 @@ - smoke312: dir: python/smoke run: VERSION=3.12 ./venv.sh + - smoke313: + dir: python/smoke + run: VERSION=3.13 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -61,6 +64,9 @@ - smoke312_virtualenv: dir: python/smoke run: VERSION=3.12 METHOD=virtualenv ./venv.sh + - smoke313_virtualenv: + dir: python/smoke + run: VERSION=3.13 METHOD=virtualenv ./venv.sh - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -84,6 +90,7 @@ - python3.10-devel - python3.11-devel - python3.12-devel + - python3.13-devel - python2-devel - python3-devel - python3-tox From 0e5fd6d75c7f16879275d8d160e9942a726d62a9 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 17 Apr 2024 03:00:52 +0200 Subject: [PATCH 32/80] Security fix for CVE-2023-5752 Resolves: rhbz#2263291 --- CVE-2023-5752.patch | 166 ++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 14 +++- 2 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 CVE-2023-5752.patch diff --git a/CVE-2023-5752.patch b/CVE-2023-5752.patch new file mode 100644 index 0000000..446a270 --- /dev/null +++ b/CVE-2023-5752.patch @@ -0,0 +1,166 @@ +From e368a2ee9db863112dcd5054a8db439ea07c8ae9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= +Date: Mon, 29 May 2023 13:57:52 +0200 +Subject: [PATCH 1/4] Pass revisions options explicitly to mercurial commands + +--- + news/12119.bugfix.rst | 3 +++ + src/pip/_internal/vcs/mercurial.py | 2 +- + tests/unit/test_vcs.py | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + create mode 100644 news/12119.bugfix.rst + +diff --git a/news/12119.bugfix.rst b/news/12119.bugfix.rst +new file mode 100644 +index 0000000..da8d8b0 +--- /dev/null ++++ b/news/12119.bugfix.rst +@@ -0,0 +1,3 @@ ++Pass the ``-r`` flag to mercurial to be explicit that a revision is passed and protect ++against ``hg`` options injection as part of VCS URLs. Users that do not have control on ++VCS URLs passed to pip are advised to upgrade. +diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py +index 2a005e0..4595960 100644 +--- a/src/pip/_internal/vcs/mercurial.py ++++ b/src/pip/_internal/vcs/mercurial.py +@@ -31,7 +31,7 @@ class Mercurial(VersionControl): + + @staticmethod + def get_base_rev_args(rev: str) -> List[str]: +- return [rev] ++ return ["-r", rev] + + def fetch_new( + self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int +diff --git a/tests/unit/test_vcs.py b/tests/unit/test_vcs.py +index 566c88c..38daaa0 100644 +--- a/tests/unit/test_vcs.py ++++ b/tests/unit/test_vcs.py +@@ -66,7 +66,7 @@ def test_rev_options_repr() -> None: + # First check VCS-specific RevOptions behavior. + (Bazaar, [], ["-r", "123"], {}), + (Git, ["HEAD"], ["123"], {}), +- (Mercurial, [], ["123"], {}), ++ (Mercurial, [], ["-r", "123"], {}), + (Subversion, [], ["-r", "123"], {}), + # Test extra_args. For this, test using a single VersionControl class. + ( +-- +2.44.0 + + +From 29f1379a6ebcf48dae94d4446c568edac6a86372 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Sun, 1 Oct 2023 14:10:25 +0100 +Subject: [PATCH 2/4] Use `-r=...` instead of `-r ...` for hg + +This ensures that the resulting revision can not be misinterpreted as an +option. +--- + src/pip/_internal/vcs/mercurial.py | 2 +- + tests/unit/test_vcs.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py +index 4595960..e440c12 100644 +--- a/src/pip/_internal/vcs/mercurial.py ++++ b/src/pip/_internal/vcs/mercurial.py +@@ -31,7 +31,7 @@ class Mercurial(VersionControl): + + @staticmethod + def get_base_rev_args(rev: str) -> List[str]: +- return ["-r", rev] ++ return [f"-r={rev}"] + + def fetch_new( + self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int +diff --git a/tests/unit/test_vcs.py b/tests/unit/test_vcs.py +index 38daaa0..9afd022 100644 +--- a/tests/unit/test_vcs.py ++++ b/tests/unit/test_vcs.py +@@ -66,7 +66,7 @@ def test_rev_options_repr() -> None: + # First check VCS-specific RevOptions behavior. + (Bazaar, [], ["-r", "123"], {}), + (Git, ["HEAD"], ["123"], {}), +- (Mercurial, [], ["-r", "123"], {}), ++ (Mercurial, [], ["-r=123"], {}), + (Subversion, [], ["-r", "123"], {}), + # Test extra_args. For this, test using a single VersionControl class. + ( +-- +2.44.0 + + +From 19db9b777831cb3da519bc84304501b7b9702159 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Sun, 1 Oct 2023 13:49:06 +0100 +Subject: [PATCH 3/4] newspaper: + +--- + news/12306.bugfix.rst | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 news/12306.bugfix.rst + +diff --git a/news/12306.bugfix.rst b/news/12306.bugfix.rst +new file mode 100644 +index 0000000..eb6eeca +--- /dev/null ++++ b/news/12306.bugfix.rst +@@ -0,0 +1 @@ ++Use ``-r=...`` instead of ``-r ...`` to specify references with Mercurial. +-- +2.44.0 + + +From 259d59335885077c1e1adbed02986734e2823f27 Mon Sep 17 00:00:00 2001 +From: efflamlemaillet <6533295+efflamlemaillet@users.noreply.github.com> +Date: Fri, 27 Oct 2023 11:08:17 +0200 +Subject: [PATCH 4/4] Fix hg: "parse error at 0: not a prefix:" (#12373) + +Use two hypen argument `--rev=` instead of `-r=` + +Co-authored-by: Efflam Lemaillet +Co-authored-by: Pradyun Gedam +--- + news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst | 1 + + src/pip/_internal/vcs/mercurial.py | 2 +- + tests/unit/test_vcs.py | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + create mode 100644 news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst + +diff --git a/news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst b/news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst +new file mode 100644 +index 0000000..76a8e6b +--- /dev/null ++++ b/news/370392cf-52cd-402c-b402-06d2ff398f89.bugfix.rst +@@ -0,0 +1 @@ ++Fix mercurial revision "parse error": use ``--rev={ref}`` instead of ``-r={ref}`` +diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py +index e440c12..c183d41 100644 +--- a/src/pip/_internal/vcs/mercurial.py ++++ b/src/pip/_internal/vcs/mercurial.py +@@ -31,7 +31,7 @@ class Mercurial(VersionControl): + + @staticmethod + def get_base_rev_args(rev: str) -> List[str]: +- return [f"-r={rev}"] ++ return [f"--rev={rev}"] + + def fetch_new( + self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int +diff --git a/tests/unit/test_vcs.py b/tests/unit/test_vcs.py +index 9afd022..8512357 100644 +--- a/tests/unit/test_vcs.py ++++ b/tests/unit/test_vcs.py +@@ -66,7 +66,7 @@ def test_rev_options_repr() -> None: + # First check VCS-specific RevOptions behavior. + (Bazaar, [], ["-r", "123"], {}), + (Git, ["HEAD"], ["123"], {}), +- (Mercurial, [], ["-r=123"], {}), ++ (Mercurial, [], ["--rev=123"], {}), + (Subversion, [], ["-r", "123"], {}), + # Test extra_args. For this, test using a single VersionControl class. + ( +-- +2.44.0 + diff --git a/python-pip.spec b/python-pip.spec index 8a0640f..66e1b23 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -97,6 +97,14 @@ Patch: no-version-warning.patch # https://github.com/pypa/pip/commit/1268487cbab1b2ffab881b5961c0476e655b6c88 Patch: Support-passing-the-same-key-multiple-times-in-confi.patch +# Security fix for CVE-2023-5752: +# Mercurial configuration injectable in repo revision when installing via pip +# Resolved upstream: +# https://github.com/pypa/pip/commit/4145168d68884a6ec10948dd28b1a6f54f17e63b +# https://github.com/pypa/pip/commit/1082eb12622b20d101d2864111dd9a591dd6c2f5 +# https://github.com/pypa/pip/commit/6dbd9c68f085c5bf304247bf7c7933842092efb2 +Patch: CVE-2023-5752.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -397,6 +405,10 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Apr 17 2024 Charalampos Stratakis - 22.3.1-4 +- Security fix for CVE-2023-5752 +Resolves: rhbz#2263291 + * Tue May 30 2023 Maxwell G - 22.3.1-3 - Backport patch to support passing the same key multiple times in --config-settings From 8a984c45656a6e0f7eeabc62c574e088f339759b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 28 May 2024 14:06:13 +0200 Subject: [PATCH 33/80] Fix tests with Python 3.13.0b1 --- 12698.patch | 30 ++++++++++++++++++++++++++++++ python-pip.spec | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 12698.patch diff --git a/12698.patch b/12698.patch new file mode 100644 index 0000000..6251567 --- /dev/null +++ b/12698.patch @@ -0,0 +1,30 @@ +From a2b23ffd477dcd90de6f1cb1f4cb75e0229d0e16 Mon Sep 17 00:00:00 2001 +From: Richard Si +Date: Sat, 11 May 2024 13:26:30 -0400 +Subject: [PATCH] Also patch time.time_ns() in unit tests + +The logging implementation in Python 3.13.0b1 uses time.time_ns() instead +of time.time(). +--- + tests/unit/test_base_command.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/unit/test_base_command.py b/tests/unit/test_base_command.py +index 80c93799d94..f9fae651422 100644 +--- a/tests/unit/test_base_command.py ++++ b/tests/unit/test_base_command.py +@@ -17,8 +17,12 @@ + + @pytest.fixture + def fixed_time() -> Iterator[None]: +- with patch("time.time", lambda: 1547704837.040001 + time.timezone): +- yield ++ # Patch time so logs contain a constant timestamp. time.time_ns is used by ++ # logging starting with Python 3.13. ++ year2019 = 1547704837.040001 + time.timezone ++ with patch("time.time", lambda: year2019): ++ with patch("time.time_ns", lambda: int(year2019 * 1e9)): ++ yield + + + class FakeCommand(Command): diff --git a/python-pip.spec b/python-pip.spec index 13f8830..5969cd0 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -82,6 +82,9 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Python 3.13 support: Also patch time.time_ns() in unit tests +Patch: https://github.com/pypa/pip/pull/12698.patch + %description pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index From af4d3ddf2608de00da9ff5912ec6b1b04341b094 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 6 Jun 2024 16:32:01 +0200 Subject: [PATCH 34/80] Bootstrap for Python 3.13 --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 5969cd0..a3bdada 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_tests 1 +%global _without_doc 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. From 531939a7cad9955fb7dced8896513591fdf1b1d7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 9 Jun 2024 10:15:36 +0200 Subject: [PATCH 35/80] Rebuilt for Python 3.13 --- python-pip.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a3bdada..5969cd0 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_tests 1 -%global _without_doc 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests and documentation here # to prevent pulling many unwanted packages in. From 05483f6f2049f4ac1235a47f9d1e7cd814a24bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 24 May 2024 15:06:49 +0200 Subject: [PATCH 36/80] Stop invoking setup.py during the build This is a preparation for pip 24.1 which drops setup.py entirely. [skip changelog] --- python-pip.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 5969cd0..5e35e5f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -153,6 +153,7 @@ BuildRequires: python%{python3_pkgversion}-devel # Note that the package prefix is always python3-, even if we build for 3.X # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 +BuildRequires: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: bash-completion @@ -242,10 +243,10 @@ sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt %build -%py3_build_wheel +export PYTHONPATH=./src/ +%pyproject_wheel %if %{with doc} -export PYTHONPATH=./src/ # from tox.ini sphinx-build-3 -b html docs/html docs/build/html sphinx-build-3 -b man docs/man docs/build/man -c docs/html @@ -258,7 +259,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} # /usr/bin/pip yet, so we install using the wheel directly. # (This is not standard wheel usage, but the pip wheel supports it -- see # pip/__main__.py) -%{python3} dist/%{python_wheel_name}/pip install \ +%{python3} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \ --root %{buildroot} \ --no-deps \ --disable-pip-version-check \ @@ -268,7 +269,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} --no-warn-script-location \ --no-index \ --no-cache-dir \ - --find-links dist \ + --find-links %{_pyproject_wheeldir} \ 'pip==%{upstream_version}' %if %{with doc} @@ -305,7 +306,7 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INST rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD mkdir -p %{buildroot}%{python_wheel_dir} -install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} +install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %check From 3dcabb5165ed599d9df5522adc17e936c98893eb Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 27 Jun 2024 12:06:09 +0200 Subject: [PATCH 37/80] Update to 24.1.1 --- 12698.patch | 30 --------- dummy-certifi.patch | 26 +++++--- no-version-warning.patch | 16 ----- nowarn-pip._internal.main.patch | 19 +++--- python-pip.spec | 66 +++++++------------ ...existing-dist-only-if-path-conflicts.patch | 34 +++++----- sources | 2 +- 7 files changed, 68 insertions(+), 125 deletions(-) delete mode 100644 12698.patch delete mode 100644 no-version-warning.patch diff --git a/12698.patch b/12698.patch deleted file mode 100644 index 6251567..0000000 --- a/12698.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a2b23ffd477dcd90de6f1cb1f4cb75e0229d0e16 Mon Sep 17 00:00:00 2001 -From: Richard Si -Date: Sat, 11 May 2024 13:26:30 -0400 -Subject: [PATCH] Also patch time.time_ns() in unit tests - -The logging implementation in Python 3.13.0b1 uses time.time_ns() instead -of time.time(). ---- - tests/unit/test_base_command.py | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/tests/unit/test_base_command.py b/tests/unit/test_base_command.py -index 80c93799d94..f9fae651422 100644 ---- a/tests/unit/test_base_command.py -+++ b/tests/unit/test_base_command.py -@@ -17,8 +17,12 @@ - - @pytest.fixture - def fixed_time() -> Iterator[None]: -- with patch("time.time", lambda: 1547704837.040001 + time.timezone): -- yield -+ # Patch time so logs contain a constant timestamp. time.time_ns is used by -+ # logging starting with Python 3.13. -+ year2019 = 1547704837.040001 + time.timezone -+ with patch("time.time", lambda: year2019): -+ with patch("time.time_ns", lambda: int(year2019 * 1e9)): -+ yield - - - class FakeCommand(Command): diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 8896ce8..371a74c 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,30 +1,31 @@ -From 09c983fdeabe3fa0b90b73f32ddf84a61e498e09 Mon Sep 17 00:00:00 2001 +From 0741e5a665308184ddbd20900f92e4417204092f Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Tue, 15 Nov 2022 09:22:46 +0100 +Date: Thu, 27 Jun 2024 10:38:53 +0200 Subject: [PATCH] Dummy certifi patch --- - src/pip/_vendor/certifi/core.py | 105 ++------------------------------ - 1 file changed, 6 insertions(+), 99 deletions(-) + src/pip/_vendor/certifi/core.py | 110 ++------------------------------ + 1 file changed, 6 insertions(+), 104 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index c3e5466..eb297f7 100644 +index 70e0c3b..eaf4210 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -4,105 +4,12 @@ certifi.py +@@ -4,111 +4,13 @@ certifi.py This module returns the installation location of cacert.pem or its contents. """ -import sys +-import atexit + +-def exit_cacert_ctx() -> None: +- _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr] +# The RPM-packaged certifi always uses the system certificates +def where() -> str: + return '/etc/pki/tls/certs/ca-bundle.crt' -if sys.version_info >= (3, 11): -+def contents() -> str: -+ with open(where(), encoding='utf=8') as data: -+ return data.read() - from importlib.resources import as_file, files - @@ -52,6 +53,7 @@ index c3e5466..eb297f7 100644 - # we will also store that at the global level as well. - _CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem")) - _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- atexit.register(exit_cacert_ctx) - - return _CACERT_PATH - @@ -87,6 +89,7 @@ index c3e5466..eb297f7 100644 - # we will also store that at the global level as well. - _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem") - _CACERT_PATH = str(_CACERT_CTX.__enter__()) +- atexit.register(exit_cacert_ctx) - - return _CACERT_PATH - @@ -123,6 +126,9 @@ index c3e5466..eb297f7 100644 - - def contents() -> str: - return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") ++def contents() -> str: ++ with open(where(), encoding='utf=8') as data: ++ return data.read() -- -2.37.3 +2.45.1 diff --git a/no-version-warning.patch b/no-version-warning.patch deleted file mode 100644 index 6c34bec..0000000 --- a/no-version-warning.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/pip/_vendor/packaging/version.py b/src/pip/_vendor/packaging/version.py -index de9a09a..154e94d 100644 ---- a/src/pip/_vendor/packaging/version.py -+++ b/src/pip/_vendor/packaging/version.py -@@ -108,11 +108,6 @@ class LegacyVersion(_BaseVersion): - self._version = str(version) - self._key = _legacy_cmpkey(self._version) - -- warnings.warn( -- "Creating a LegacyVersion has been deprecated and will be " -- "removed in the next major release", -- DeprecationWarning, -- ) - - def __str__(self) -> str: - return self._version diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 68f5971..c8c98ed 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,6 +1,6 @@ -From 8dd3793d1bab226cec9c5c49b01718a9634bc403 Mon Sep 17 00:00:00 2001 +From 9d1e0a0e91cad143702b3a2d8c54bd765a5d9eb2 Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Mon, 10 May 2021 16:48:49 +0200 +Date: Thu, 27 Jun 2024 10:48:03 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint In Fedora, we use that in ensurepip and users cannot do anything about it, @@ -14,17 +14,17 @@ Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 6afb5c6..faf25af 100755 +index 1a5b7f8..682b9e4 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -16,4 +16,4 @@ def main(args: (Optional[List[str]]) = None) -> int: +@@ -15,4 +15,4 @@ def main(args: Optional[List[str]] = None) -> int: """ from pip._internal.utils.entrypoints import _wrapper - return _wrapper(args) + return _wrapper(args, _nowarn=True) diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index f292c64..2e29a5e 100644 +index 1501369..70034eb 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py @@ -20,7 +20,7 @@ if WINDOWS: @@ -61,16 +61,19 @@ index f292c64..2e29a5e 100644 diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index 3e85703..f86c392 100644 +index e1ccf04..30b8f74 100644 --- a/tests/functional/test_cli.py +++ b/tests/functional/test_cli.py -@@ -43,4 +43,5 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: +@@ -49,7 +49,8 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: result = script.pip("-V") result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) assert result.stdout == result2.stdout - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr + + + @pytest.mark.parametrize( -- -2.35.3 +2.45.1 diff --git a/python-pip.spec b/python-pip.spec index 5e35e5f..61662ba 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.0 +%global base_version 24.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -18,35 +18,27 @@ Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. # Here is the list of the libraries with corresponding licenses: -# appdirs: MIT # certifi: MPL-2.0 -# chardet: LGPL-2.1-only -# colorama: BSD-3-Clause # CacheControl: Apache-2.0 # distlib: Python-2.0.1 # distro: Apache-2.0 -# html5lib: MIT # idna: BSD-3-Clause -# ipaddress: Python-2.0.1 # msgpack: Apache-2.0 # packaging: Apache-2.0 OR BSD-2-Clause -# progress: ISC +# platformdirs: MIT # pygments: BSD-2-Clause -# pyparsing: MIT # pyproject-hooks: MIT # requests: Apache-2.0 # resolvelib: ISC # rich: MIT # setuptools: MIT -# six: MIT # tenacity: Apache-2.0 # truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT -# webencodings: BSD-3-Clause -License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) +License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz @@ -77,13 +69,6 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch -# Don't warn the user about packaging's LegacyVersion being deprecated. -# (This also breaks Python's test suite when warnings are treated as errors.) -# Upstream issue: https://github.com/pypa/packaging/issues/368 -Patch: no-version-warning.patch - -# Python 3.13 support: Also patch time.time_ns() in unit tests -Patch: https://github.com/pypa/pip/pull/12698.patch %description pip is a package management system used to install and manage software packages @@ -97,30 +82,25 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.13.1 -Provides: bundled(python%{1}dist(certifi)) = 2023.7.22 -Provides: bundled(python%{1}dist(chardet)) = 5.1 -Provides: bundled(python%{1}dist(colorama)) = 0.4.6 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 +Provides: bundled(python%{1}dist(certifi)) = 2024.2.2 Provides: bundled(python%{1}dist(distlib)) = 0.3.8 -Provides: bundled(python%{1}dist(distro)) = 1.8 -Provides: bundled(python%{1}dist(idna)) = 3.4 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.5 -Provides: bundled(python%{1}dist(packaging)) = 21.3 -Provides: bundled(python%{1}dist(platformdirs)) = 3.8.1 -Provides: bundled(python%{1}dist(pygments)) = 2.15.1 -Provides: bundled(python%{1}dist(pyparsing)) = 3.1 +Provides: bundled(python%{1}dist(distro)) = 1.9 +Provides: bundled(python%{1}dist(idna)) = 3.7 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 +Provides: bundled(python%{1}dist(packaging)) = 24.1 +Provides: bundled(python%{1}dist(platformdirs)) = 4.2.1 +Provides: bundled(python%{1}dist(pygments)) = 2.17.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 -Provides: bundled(python%{1}dist(requests)) = 2.31 +Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.4.2 -Provides: bundled(python%{1}dist(setuptools)) = 68 -Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.2.2 -Provides: bundled(python%{1}dist(truststore)) = 0.8 +Provides: bundled(python%{1}dist(rich)) = 13.7.1 +Provides: bundled(python%{1}dist(setuptools)) = 69.5.1 +Provides: bundled(python%{1}dist(tenacity)) = 8.2.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.7.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.17 -Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 +Provides: bundled(python%{1}dist(truststore)) = 0.9.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.11 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 } # Some manylinux1 wheels need libcrypt.so.1. @@ -224,14 +204,14 @@ ln -s %{python_wheel_dir} tests/data/common_wheels # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe -sed -i '/\.exe/d' setup.py +sed -i '/\.exe/d' pyproject.toml # Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt # https://github.com/pypa/pip/pull/12046 %{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' # Remove unused test requirements -sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt +sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt %if %{with tests} @@ -323,12 +303,14 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w # bash completion tests only work from installed package pytest_k='not completion' -# --deselect'ed tests are not compatible with the latest virtualenv +# --ignore'd tests are not compatible with the latest virtualenv # These files contain almost 500 tests so we should enable them back # as soon as pip will be compatible upstream # https://github.com/pypa/pip/pull/8441 +# among them, tests/functional/test_proxy.py needs proxy.py which is not +# yet packaged in Fedora %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --deselect tests/functional --deselect tests/lib/test_lib.py + --ignore tests/functional --ignore tests/lib/test_lib.py %endif diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 3a9ea25..20e5f28 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,11 +1,8 @@ -From 2c3f3a590ddfc151a456b44a5f96f0f603d178e9 Mon Sep 17 00:00:00 2001 -From: Lumir Balhar +From 9020f56e88a7dbaef688c147c281909f95b4e1d1 Mon Sep 17 00:00:00 2001 +From: Karolina Surma Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install --upgrade is executed. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit Resolves: rhbz#1550368 @@ -15,6 +12,7 @@ Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok Co-Authored-By: Karolina Surma + --- src/pip/_internal/metadata/base.py | 12 +++++++++++- src/pip/_internal/req/req_install.py | 2 +- @@ -23,11 +21,11 @@ Co-Authored-By: Karolina Surma 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py -index 151fd6d..f9109cd 100644 +index 9eabcdb..9816691 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName - from pip._vendor.packaging.version import LegacyVersion, Version +@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name + from pip._vendor.packaging.version import Version from pip._internal.exceptions import NoneMetadataError -from pip._internal.locations import site_packages, user_site @@ -35,7 +33,7 @@ index 151fd6d..f9109cd 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -560,6 +560,16 @@ class BaseDistribution(Protocol): +@@ -578,6 +578,16 @@ class BaseDistribution(Protocol): for extra in self._iter_egg_info_extras(): metadata["Provides-Extra"] = extra @@ -53,10 +51,10 @@ index 151fd6d..f9109cd 100644 class BaseEnvironment: """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index a1e376c..ed7facf 100644 +index 2132785..0340890 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -416,7 +416,7 @@ class InstallRequirement: +@@ -449,7 +449,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -66,13 +64,13 @@ index a1e376c..ed7facf 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index fb49d41..040f2c1 100644 +index 1dd0d70..414bdbe 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -325,7 +325,9 @@ class Resolver(BaseResolver): - """ +@@ -319,7 +319,9 @@ class Resolver(BaseResolver): # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. + assert req.satisfied_by is not None - if not self.use_user_site or req.satisfied_by.in_usersite: + if ((not self.use_user_site + or req.satisfied_by.in_usersite) @@ -81,7 +79,7 @@ index fb49d41..040f2c1 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index a4c24b5..e7e2da9 100644 +index 1f31d83..3804774 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -92,8 +90,8 @@ index a4c24b5..e7e2da9 100644 +import sysconfig from typing import ( TYPE_CHECKING, - Dict, -@@ -549,6 +551,16 @@ class Factory: + Callable, +@@ -617,6 +619,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -111,5 +109,5 @@ index a4c24b5..e7e2da9 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.35.3 +2.45.1 diff --git a/sources b/sources index 2a0559e..95d9fff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.0.tar.gz) = 0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df +SHA512 (pip-24.1.1.tar.gz) = 523e7273134b68252693ba7a032e7992c72075aebd2bcd895fbd90ad28d76f98b13ea1a7df0b6da1802650782ae977868177f740dc6f0a2eaccb95915c27b318 From bac2129304df292fd4eb6dcc94137afbb6baf1fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 14:03:51 +0000 Subject: [PATCH 38/80] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 454b4fe5620a30f94bdd40d710cae6277998ac09 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 26 Jul 2024 16:17:50 +0200 Subject: [PATCH 39/80] CI: Python 3.5 is gone from all Fedoras (removed in F35) https://fedoraproject.org/wiki/Changes/RetirePython3.5 --- tests/tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index cd36027..8f7ee62 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,9 +10,6 @@ - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" dest: "pyproject-rpm-macros" tests: - - smoke35_optional: - dir: python/smoke - run: VERSION=3.5 INSTALL_OR_SKIP=true ./venv.sh - smoke36: dir: python/smoke run: VERSION=3.6 ./venv.sh @@ -40,9 +37,6 @@ - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - - smoke35_virtualenv_optional: - dir: python/smoke - run: VERSION=3.5 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke36_virtualenv: dir: python/smoke run: VERSION=3.6 METHOD=virtualenv ./venv.sh From 77a1a20083a01470cb5f413db3d74d1a149cb0ba Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 26 Jul 2024 16:18:44 +0200 Subject: [PATCH 40/80] CI: Prepare for Python 2 removal https://fedoraproject.org/wiki/Changes/RetirePython2.7 --- tests/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 8f7ee62..ca2ecac 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -36,7 +36,7 @@ run: VERSION=3.13 ./venv.sh - smoke27: dir: python/smoke - run: VERSION=2.7 METHOD=virtualenv ./venv.sh + run: VERSION=2.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke36_virtualenv: dir: python/smoke run: VERSION=3.6 METHOD=virtualenv ./venv.sh @@ -77,7 +77,6 @@ required_packages: - gcc - virtualenv - - python2.7 - python3.6 - python3.8 - python3.9 @@ -85,7 +84,6 @@ - python3.11-devel - python3.12-devel - python3.13-devel - - python2-devel - python3-devel - python3-tox - mock From f7056f5f8a39baea78491d9b6aacc0409a024e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:22:10 +0200 Subject: [PATCH 41/80] Use %pyproject_install [skip changelog] --- python-pip.spec | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 61662ba..39df308 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -69,6 +69,9 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch +# Remove -s from Python shebang - ensure that packages installed with pip +# to user locations are seen by pip itself +%undefine _py3_shebang_s %description pip is a package management system used to install and manage software packages @@ -235,22 +238,9 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} %install -# The following is similar to %%pyproject_install, but we don't have -# /usr/bin/pip yet, so we install using the wheel directly. -# (This is not standard wheel usage, but the pip wheel supports it -- see -# pip/__main__.py) -%{python3} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \ - --root %{buildroot} \ - --no-deps \ - --disable-pip-version-check \ - --progress-bar off \ - --verbose \ - --ignore-installed \ - --no-warn-script-location \ - --no-index \ - --no-cache-dir \ - --find-links %{_pyproject_wheeldir} \ - 'pip==%{upstream_version}' +export PYTHONPATH=./src/ +%pyproject_install +%pyproject_save_files -l pip %if %{with doc} pushd docs/build/man @@ -280,11 +270,6 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 -# Make sure the INSTALLER is not pip and remove RECORD -# %%pyproject macros do this for all packages -echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER -rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD - mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} @@ -314,9 +299,8 @@ pytest_k='not completion' %endif -%files -n python%{python3_pkgversion}-%{srcname} +%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst -%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* @@ -328,7 +312,6 @@ pytest_k='not completion' %{_bindir}/pip-3 %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} -%{python3_sitelib}/pip* %dir %{bash_completions_dir} %{bash_completions_dir}/pip3 From f0db4e7df0e8801cc370f5921c1482c01d3e5da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:27:19 +0200 Subject: [PATCH 42/80] rpmlint: Ignore venv spelling error [skip changelog] --- python-pip.rpmlintrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index d32664b..afa5713 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -7,3 +7,6 @@ addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') + +# Spelling errors +addFilter(r"E: spelling-error .+'venv'") From 09c6b24cb016d793281ab504a962ee410aa616a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Aug 2024 14:41:53 +0200 Subject: [PATCH 43/80] Update to 24.2 - Fixes: rhbz#2296203 --- python-pip.spec | 14 ++++++-------- sources | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 39df308..bb84847 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.1.1 +%global base_version 24.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -32,7 +32,6 @@ Summary: A tool for installing and managing Python packages # resolvelib: ISC # rich: MIT # setuptools: MIT -# tenacity: Apache-2.0 # truststore: MIT # tomli: MIT # typing-extensions: Python-2.0.1 @@ -86,23 +85,22 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 -Provides: bundled(python%{1}dist(certifi)) = 2024.2.2 +Provides: bundled(python%{1}dist(certifi)) = 2024.7.4 Provides: bundled(python%{1}dist(distlib)) = 0.3.8 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.7 Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 Provides: bundled(python%{1}dist(packaging)) = 24.1 -Provides: bundled(python%{1}dist(platformdirs)) = 4.2.1 -Provides: bundled(python%{1}dist(pygments)) = 2.17.2 +Provides: bundled(python%{1}dist(platformdirs)) = 4.2.2 +Provides: bundled(python%{1}dist(pygments)) = 2.18 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 Provides: bundled(python%{1}dist(rich)) = 13.7.1 -Provides: bundled(python%{1}dist(setuptools)) = 69.5.1 -Provides: bundled(python%{1}dist(tenacity)) = 8.2.3 +Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 Provides: bundled(python%{1}dist(truststore)) = 0.9.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.11 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 } diff --git a/sources b/sources index 95d9fff..fb4d816 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.1.1.tar.gz) = 523e7273134b68252693ba7a032e7992c72075aebd2bcd895fbd90ad28d76f98b13ea1a7df0b6da1802650782ae977868177f740dc6f0a2eaccb95915c27b318 +SHA512 (pip-24.2.tar.gz) = 2c44881f62f7b89cedeb0b739409ad67c6144bfdffc347efeb7bcf85aed77bcd7ddd10868d24577fbba0ef84dd752473d6b6dff329b42841939fae2ff2f63d28 From 858b6685fac01550996ff8b0bbf8a824564ab108 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 6 Sep 2024 16:09:45 +0200 Subject: [PATCH 44/80] Verify no unwanted files are present in the package --- python-pip.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index bb84847..4748690 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -276,6 +276,10 @@ install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_w # Verify bundled provides are up to date %{_rpmconfigdir}/pythonbundles.py src/pip/_vendor/vendor.txt --compare-with '%{bundled 3}' +# Verify no unwanted files are present in the package +grep "exe$" %{pyproject_files} && exit 1 || true +grep "pem$" %{pyproject_files} && exit 1 || true + # Verify we can at least run basic commands without crashing %{py3_test_envvars} %{buildroot}%{_bindir}/pip --help %{py3_test_envvars} %{buildroot}%{_bindir}/pip list From 4965892859aa4ccc40c20c98772c7c8d588f1b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:20:12 +0100 Subject: [PATCH 45/80] CI: Disable Python 2.7 and 3.6 virtualenv tests virtualenv in Fedora 42+ no longer supports them [skip changelog] --- tests/tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index ca2ecac..af25af8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -12,7 +12,7 @@ tests: - smoke36: dir: python/smoke - run: VERSION=3.6 ./venv.sh + run: VERSION=3.6 TOX=false ./venv.sh - smoke37: dir: python/smoke run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh @@ -34,12 +34,6 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh - - smoke27: - dir: python/smoke - run: VERSION=2.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - - smoke36_virtualenv: - dir: python/smoke - run: VERSION=3.6 METHOD=virtualenv ./venv.sh - smoke37_virtualenv: dir: python/smoke run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh From 476f8247428b39f1faf254d344b654ce9bec46c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:23:06 +0100 Subject: [PATCH 46/80] CI: Drop Python 3.7 entirely It is not available in F40+ and the tests.yml is already diverged. [skip changelog] --- tests/tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index af25af8..a7ef2e7 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -13,9 +13,6 @@ - smoke36: dir: python/smoke run: VERSION=3.6 TOX=false ./venv.sh - - smoke37: - dir: python/smoke - run: VERSION=3.7 INSTALL_OR_SKIP=true ./venv.sh - smoke38: dir: python/smoke run: VERSION=3.8 ./venv.sh @@ -34,9 +31,6 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh - - smoke37_virtualenv: - dir: python/smoke - run: VERSION=3.7 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh From 533a4ecd2d7f04938b33ccadba88ea191a9dd68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Nov 2024 13:24:37 +0100 Subject: [PATCH 47/80] CI: Add Python 3.14 [skip changelog] --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index a7ef2e7..02b7040 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,6 +31,9 @@ - smoke313: dir: python/smoke run: VERSION=3.13 ./venv.sh + - smoke314: + dir: python/smoke + run: VERSION=3.14 ./venv.sh - smoke38_virtualenv: dir: python/smoke run: VERSION=3.8 METHOD=virtualenv ./venv.sh @@ -49,6 +52,9 @@ - smoke313_virtualenv: dir: python/smoke run: VERSION=3.13 METHOD=virtualenv ./venv.sh + - smoke314_virtualenv: + dir: python/smoke + run: VERSION=3.14 METHOD=virtualenv ./venv.sh - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -72,6 +78,7 @@ - python3.11-devel - python3.12-devel - python3.13-devel + - python3.14-devel - python3-devel - python3-tox - mock From 990a77f1c0d35f95e7a9f99dd445154857d4901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 6 Nov 2024 09:29:56 +0100 Subject: [PATCH 48/80] Update to 24.3.1 - Fixes: rhbz#2321997 --- python-pip.spec | 10 +++++----- sources | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4748690..4e3a41d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.2 +%global base_version 24.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -85,8 +85,8 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 -Provides: bundled(python%{1}dist(certifi)) = 2024.7.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.8 +Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 +Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.7 Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 @@ -99,9 +99,9 @@ Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 Provides: bundled(python%{1}dist(rich)) = 13.7.1 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.0.1 -Provides: bundled(python%{1}dist(truststore)) = 0.9.1 +Provides: bundled(python%{1}dist(truststore)) = 0.10 Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.18 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } # Some manylinux1 wheels need libcrypt.so.1. diff --git a/sources b/sources index fb4d816..2569c69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.2.tar.gz) = 2c44881f62f7b89cedeb0b739409ad67c6144bfdffc347efeb7bcf85aed77bcd7ddd10868d24577fbba0ef84dd752473d6b6dff329b42841939fae2ff2f63d28 +SHA512 (pip-24.3.1.tar.gz) = 9cf5f18eefd559cf27bc026e5206b0028ea77fd904a61fea9a6682b519305c962dd19170b841581bd05ff72192a9c458ec0eba173fa66db0438b046111ff5856 From 10e0ef58aa6f305a77d8226b3e550287adf98c05 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:14:20 +0000 Subject: [PATCH 49/80] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 048126313bd5dc5f856f2d5d1948641c6557f41b Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 27 Feb 2025 01:11:53 +0100 Subject: [PATCH 50/80] Update to 25.0.1 - Fixes: rhbz#2342135 --- python-pip.spec | 19 ++++++++++--------- sources | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 4e3a41d..69d9723 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 24.3.1 +%global base_version 25.0.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -84,21 +84,21 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.1 Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 -Provides: bundled(python%{1}dist(idna)) = 3.7 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.8 -Provides: bundled(python%{1}dist(packaging)) = 24.1 -Provides: bundled(python%{1}dist(platformdirs)) = 4.2.2 +Provides: bundled(python%{1}dist(idna)) = 3.10 +Provides: bundled(python%{1}dist(msgpack)) = 1.1 +Provides: bundled(python%{1}dist(packaging)) = 24.2 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.6 Provides: bundled(python%{1}dist(pygments)) = 2.18 -Provides: bundled(python%{1}dist(pyproject-hooks)) = 1 +Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 Provides: bundled(python%{1}dist(requests)) = 2.32.3 Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.7.1 +Provides: bundled(python%{1}dist(rich)) = 13.9.4 Provides: bundled(python%{1}dist(setuptools)) = 70.3 -Provides: bundled(python%{1}dist(tomli)) = 2.0.1 +Provides: bundled(python%{1}dist(tomli)) = 2.2.1 Provides: bundled(python%{1}dist(truststore)) = 0.10 Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 @@ -159,6 +159,7 @@ Summary: A documentation for a tool for installing and managing Python pa BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs +BuildRequires: python%{python3_pkgversion}-sphinx-issues BuildRequires: python%{python3_pkgversion}-sphinx-copybutton BuildRequires: python%{python3_pkgversion}-myst-parser diff --git a/sources b/sources index 2569c69..e92388f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-24.3.1.tar.gz) = 9cf5f18eefd559cf27bc026e5206b0028ea77fd904a61fea9a6682b519305c962dd19170b841581bd05ff72192a9c458ec0eba173fa66db0438b046111ff5856 +SHA512 (pip-25.0.1.tar.gz) = a6850c8567082bbf98483a45e523c4de12132136d2b0aa388ac619c02ffd0c8f6aea7d727f7d84167dadec5f1e56dd478b2233b0caa5d9b3e5cadc9e1f3dc12c From d681b5b429a32a5fd431eb6b37d9ade3474d947b Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 27 Feb 2025 02:39:37 +0100 Subject: [PATCH 51/80] Remove testing of retired python3.8 from the CI See https://fedoraproject.org/wiki/Changes/RetirePython3.8 [skip changelog] --- tests/tests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 02b7040..1448bc8 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -13,9 +13,6 @@ - smoke36: dir: python/smoke run: VERSION=3.6 TOX=false ./venv.sh - - smoke38: - dir: python/smoke - run: VERSION=3.8 ./venv.sh - smoke39: dir: python/smoke run: VERSION=3.9 ./venv.sh @@ -34,9 +31,6 @@ - smoke314: dir: python/smoke run: VERSION=3.14 ./venv.sh - - smoke38_virtualenv: - dir: python/smoke - run: VERSION=3.8 METHOD=virtualenv ./venv.sh - smoke39_virtualenv: dir: python/smoke run: VERSION=3.9 METHOD=virtualenv ./venv.sh @@ -72,7 +66,6 @@ - gcc - virtualenv - python3.6 - - python3.8 - python3.9 - python3.10-devel - python3.11-devel From 97a9e3e2155364562c2438142982fbb7afb4629a Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 6 Mar 2025 13:03:52 +0100 Subject: [PATCH 52/80] Fix CI tests to account for normalization of dist-info dirs (PEP 491) setuptools now normalizes the dist-info directory names to lowercase according to PEP 491 Also egg-info directories are not created anymore [skip changelog] --- tests/pip_install_upgrade/runtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pip_install_upgrade/runtest.sh b/tests/pip_install_upgrade/runtest.sh index 40e14a3..4c520f5 100755 --- a/tests/pip_install_upgrade/runtest.sh +++ b/tests/pip_install_upgrade/runtest.sh @@ -18,14 +18,14 @@ RPM_BUILD_ROOT=/ /usr/bin/pip install 'Pello==1.0.1' /usr/bin/pip freeze | grep '^Pello==1\.0\.2$' # Both installations should still exist -test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +test -d "${RPM_SITELIB}/pello-1.0.1.dist-info" test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" # Let's ditch the local one /usr/bin/pip uninstall --yes Pello # It should only remove one of them -test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info" +test -d "${RPM_SITELIB}/pello-1.0.1.dist-info" ! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" # And pip should still see the RPM-installed one From 8c346262d536ba9705940f456d765c4fa200fd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 24 Apr 2025 13:34:32 +0200 Subject: [PATCH 53/80] Bootstrap: wheel is not needed Also, test this on the CI. [skip changelog] --- python-pip.spec | 1 - tests/tests.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 69d9723..443c617 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -136,7 +136,6 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates diff --git a/tests/tests.yml b/tests/tests.yml index 1448bc8..69d8c0b 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,5 +1,13 @@ --- - hosts: localhost + tags: + - classic + pre_tasks: + - import_role: + name: standard-test-source + vars: + fetch_only: True + roles: - role: standard-test-basic tags: @@ -49,6 +57,9 @@ - smoke314_virtualenv: dir: python/smoke run: VERSION=3.14 METHOD=virtualenv ./venv.sh + - mock_bootstrap_build: + dir: . + run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without doc - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From d4edbde90247196d2d511e9e1af492b7a928b442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Mon, 28 Apr 2025 10:06:59 +0200 Subject: [PATCH 54/80] Update to 25.1.0 (rhbz#2362438) --- python-pip.spec | 24 ++++++++++++++---------- sources | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 443c617..06a11eb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond doc %[%{defined fedora} || %{defined epel}] %global srcname pip -%global base_version 25.0.1 +%global base_version 25.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -20,6 +20,7 @@ Summary: A tool for installing and managing Python packages # certifi: MPL-2.0 # CacheControl: Apache-2.0 +# dependency-groups: MIT # distlib: Python-2.0.1 # distro: Apache-2.0 # idna: BSD-3-Clause @@ -34,6 +35,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # truststore: MIT # tomli: MIT +# tomli-w: MIT # typing-extensions: Python-2.0.1 # urllib3: MIT @@ -84,23 +86,25 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.1 -Provides: bundled(python%{1}dist(certifi)) = 2024.8.30 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 +Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 +Provides: bundled(python%{1}dist(dependency-groups)) = 1.3 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 Provides: bundled(python%{1}dist(msgpack)) = 1.1 -Provides: bundled(python%{1}dist(packaging)) = 24.2 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.6 -Provides: bundled(python%{1}dist(pygments)) = 2.18 +Provides: bundled(python%{1}dist(packaging)) = 25 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.7 +Provides: bundled(python%{1}dist(pygments)) = 2.19.1 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 Provides: bundled(python%{1}dist(requests)) = 2.32.3 -Provides: bundled(python%{1}dist(resolvelib)) = 1.0.1 -Provides: bundled(python%{1}dist(rich)) = 13.9.4 +Provides: bundled(python%{1}dist(resolvelib)) = 1.1 +Provides: bundled(python%{1}dist(rich)) = 14 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.2.1 -Provides: bundled(python%{1}dist(truststore)) = 0.10 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.12.2 +Provides: bundled(python%{1}dist(tomli-w)) = 1.2 +Provides: bundled(python%{1}dist(truststore)) = 0.10.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.13.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } diff --git a/sources b/sources index e92388f..cacb27f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-25.0.1.tar.gz) = a6850c8567082bbf98483a45e523c4de12132136d2b0aa388ac619c02ffd0c8f6aea7d727f7d84167dadec5f1e56dd478b2233b0caa5d9b3e5cadc9e1f3dc12c +SHA512 (pip-25.1.tar.gz) = d6b93aeabe6a4e046caf85c028fca380936ab65cb3c5028a7fa7dbc61cef2cf7d0c46c499fe548dc0af8f7bc30f7ecace8f257b20a60c0cc905b531f193b5a9d From 274df105b5c43a4ce01e3f9f2be496681853c3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:43:56 +0200 Subject: [PATCH 55/80] Remove no longer needed RIGHT-TO-LEFT OVERRIDE stripping See https://github.com/pypa/pip/pull/12517 [skip changelog] --- python-pip.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 06a11eb..80ac098 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -211,10 +211,6 @@ ln -s %{python_wheel_dir} tests/data/common_wheels rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml -# Remove RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt -# https://github.com/pypa/pip/pull/12046 -%{python3} -c 'from pathlib import Path; p = Path("AUTHORS.txt"); p.write_text("".join(c for c in p.read_text() if c != "\u202e"))' - # Remove unused test requirements sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt From be112f861aec617af55b1372730287799a02d73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 11:09:49 +0200 Subject: [PATCH 56/80] Drop unused rpmlintrc filter python3-pip.noarch: E: unused-rpmlintrc-filter "E: spelling-error .+'venv'" [skip changelog] --- python-pip.rpmlintrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index afa5713..d32664b 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -7,6 +7,3 @@ addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b') # We ship README with the main package but not with the wheel addFilter(r'python-pip-wheel.noarch: W: no-documentation') - -# Spelling errors -addFilter(r"E: spelling-error .+'venv'") From 8390734c31b5dc35c33e8bfb4b714def0a0bb640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:56:03 +0200 Subject: [PATCH 57/80] Stop building the HTML documentation, only build manual pages - Also build manual pages on RHEL - The python-pip-doc package is gone but not Obsoleted, it has no dependencies Also: Rename the bcond, update the CI test, use sphinx-build without the -3 suffix, always BR python3-sphinx (for RHEL alternate Python versions where we don't package Sphinx). --- python-pip.spec | 51 +++++++++++++++---------------------------------- tests/tests.yml | 2 +- 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 80ac098..947b7ae 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,9 +1,10 @@ # The original RHEL N+1 content set is defined by (build)dependencies -# of the packages in Fedora ELN. Hence we disable tests and documentation here +# of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. # We intentionally keep this enabled on EPEL. %bcond tests %[%{defined fedora} || %{defined epel}] -%bcond doc %[%{defined fedora} || %{defined epel}] +# Whether to build the manual pages (useful for bootstrapping Sphinx) +%bcond man 1 %global srcname pip %global base_version 25.1 @@ -54,6 +55,14 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif +%if %{with man} +# docs/requirements.txt contains many sphinx extensions +# however, we only build the manual pages thanks to +# https://github.com/pypa/pip/pull/13168 +# We also always use the "main" Sphinx, not python%%{python3_pkgversion}-sphinx +BuildRequires: python3-sphinx +%endif + # Prevent removing of the system packages installed under /usr/lib # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 @@ -156,20 +165,6 @@ written in Python. Many packages can be found in the Python Package Index (PyPI). pip is a recursive acronym that can stand for either "Pip Installs Packages" or "Pip Installs Python". -%if %{with doc} -%package doc -Summary: A documentation for a tool for installing and managing Python packages - -BuildRequires: python%{python3_pkgversion}-sphinx -BuildRequires: python%{python3_pkgversion}-sphinx-inline-tabs -BuildRequires: python%{python3_pkgversion}-sphinx-issues -BuildRequires: python%{python3_pkgversion}-sphinx-copybutton -BuildRequires: python%{python3_pkgversion}-myst-parser - -%description doc -A documentation for a tool for installing and managing Python packages - -%endif %package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel Summary: The pip wheel @@ -197,13 +192,6 @@ A Python wheel of pip to use with venv. # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem -# Do not use furo as HTML theme in docs -# furo is not available in Fedora -sed -i '/html_theme = "furo"/d' docs/html/conf.py - -# towncrier extension for Sphinx is not yet available in Fedora -sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py - # tests expect wheels in here ln -s %{python_wheel_dir} tests/data/common_wheels @@ -227,11 +215,8 @@ sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt export PYTHONPATH=./src/ %pyproject_wheel -%if %{with doc} -# from tox.ini -sphinx-build-3 -b html docs/html docs/build/html -sphinx-build-3 -b man docs/man docs/build/man -c docs/html -rm -rf docs/build/html/{.doctrees,.buildinfo} +%if %{with man} +sphinx-build --tag man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man %endif @@ -240,7 +225,7 @@ export PYTHONPATH=./src/ %pyproject_install %pyproject_save_files -l pip -%if %{with doc} +%if %{with man} pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do @@ -303,7 +288,7 @@ pytest_k='not completion' %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst -%if %{with doc} +%if %{with man} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* %{_mandir}/man1/pip3.* @@ -317,12 +302,6 @@ pytest_k='not completion' %dir %{bash_completions_dir} %{bash_completions_dir}/pip3 -%if %{with doc} -%files doc -%license LICENSE.txt -%doc README.rst -%doc docs/build/html -%endif %files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel %license LICENSE.txt diff --git a/tests/tests.yml b/tests/tests.yml index 69d8c0b..b2347e3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -59,7 +59,7 @@ run: VERSION=3.14 METHOD=virtualenv ./venv.sh - mock_bootstrap_build: dir: . - run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without doc + run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without man - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest From 2fbd290be070a552e0c7861efd554b07770f9157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 3 May 2025 09:41:03 +0200 Subject: [PATCH 58/80] Update to 25.1.1 - Fixes: rhbz#2363801 --- python-pip.spec | 4 ++-- sources | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 947b7ae..1b953ec 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -7,7 +7,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.1 +%global base_version 25.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -97,7 +97,7 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 -Provides: bundled(python%{1}dist(dependency-groups)) = 1.3 +Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 Provides: bundled(python%{1}dist(distlib)) = 0.3.9 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 diff --git a/sources b/sources index cacb27f..8c41529 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-25.1.tar.gz) = d6b93aeabe6a4e046caf85c028fca380936ab65cb3c5028a7fa7dbc61cef2cf7d0c46c499fe548dc0af8f7bc30f7ecace8f257b20a60c0cc905b531f193b5a9d +SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc From f467900a68999f4695b94e29770e942de0a15332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 00:02:06 +0200 Subject: [PATCH 59/80] Remove Recommends only related to unsupported Pythons This pip version no longer supports Python 3.7 and 3.8. --- python-pip.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 1b953ec..6235e9f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -179,8 +179,6 @@ Requires: ca-certificates %{crypt_compat_recommends 3.11} %{crypt_compat_recommends 3.10} %{crypt_compat_recommends 3.9} -%{crypt_compat_recommends 3.8} -%{crypt_compat_recommends 3.7} %endif %description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel From b4fe5333a1342b62289749ef56a9e4dbc40b601c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 May 2025 23:33:04 +0200 Subject: [PATCH 60/80] Run functional tests - Drop test requirement of python-wheel-wheel - Use pytest-xdist to run tests faster The motivation for this was the need to drop python-wheel-wheel in wheel 0.46+. Due to newly gained runtime dependencies of wheel, such wheel cannot be used as is. I realized that when the explicit BuildRequires is removed, the package is brought in by python3-virtualenv. But even when python3-virtualenv drops the dependency, the tests still passed without python-wheel-wheel. Because the tests that require packaged wheels were all --ignored for obsolete reasons. When unignored, they errored due to missing coverage.whl. While attempting to fix this, I realized we cannot use the RPM packaged wheel anyway. When the functional tests run, it takes a while, hence pytest-xdist. --- For the record, the coverage-0-py3-none-any.whl was created as: [project] name = "coverage" version = "0" [build-system] requires = ["setuptools >= 77.0.3"] build-backend = "setuptools.build_meta" And coverage.py with: def process_startup(): pass Wheel generated by `python3 -m build` (with python3-build-1.2.1-4.fc41.noarch). --- .gitignore | 2 +- python-pip.spec | 55 +++++++++++++++++++++++++++++++++++++------------ sources | 3 +++ 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 8e24ed4..72d39d5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ /pip/ /results_python-pip/ *.rpm - +*.whl diff --git a/python-pip.spec b/python-pip.spec index 6235e9f..78219b9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -44,6 +44,28 @@ License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-C URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz +# The following sources are wheels used only for tests. +# They are not bundled in the built package and do not contribute to the overall license. +# They are pre-built but only contain text files, rebuilding them in %%build has very little benefit. + +# setuptools.whl +# We cannot use RPM-packaged python-setuptools-wheel because upstream pins to <80. +# See https://github.com/pypa/pip/pull/13357 for rationale. +Source1: https://files.pythonhosted.org/packages/0d/6d/b4752b044bf94cb802d88a888dc7d288baaf77d7910b7dedda74b5ceea0c/setuptools-79.0.1-py3-none-any.whl + +# wheel.whl +# We cannot use RPM-packaged python-wheel-wheel because we intent to drop that package in wheel 0.46+. +# That version of wheel has runtime dependencies and is generally useless as a standalone wheel. +# See https://github.com/pypa/pip/pull/13382 as an attempt to drop the requirement from pip tests. +Source2: https://files.pythonhosted.org/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl + +# coverage.whl +# There is no RPM-packaged python-coverage-wheel, the package is archful. +# Upstream uses this to measure coverage, which we don't. +# This is a dummy placeholder package that only contains empty coverage.process_startup(). +# That way, we don't need to patch the usage out of conftest.py. +Source3: coverage-0-py3-none-any.whl + BuildArch: noarch %if %{with tests} @@ -51,8 +73,7 @@ BuildRequires: /usr/bin/git BuildRequires: /usr/bin/hg BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/svn -BuildRequires: python-setuptools-wheel -BuildRequires: python-wheel-wheel +BuildRequires: python%{python3_pkgversion}-pytest-xdist %endif %if %{with man} @@ -190,9 +211,6 @@ A Python wheel of pip to use with venv. # this goes together with patch4 rm src/pip/_vendor/certifi/*.pem -# tests expect wheels in here -ln -s %{python_wheel_dir} tests/data/common_wheels - # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml @@ -200,6 +218,12 @@ sed -i '/\.exe/d' pyproject.toml # Remove unused test requirements sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt +%if %{with tests} +# tests expect wheels in here +mkdir tests/data/common_wheels +cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels +%endif + %if %{with tests} %generate_buildrequires @@ -272,15 +296,20 @@ grep "pem$" %{pyproject_files} && exit 1 || true # Upstream tests # bash completion tests only work from installed package pytest_k='not completion' +# this clashes with our PYTHONPATH +pytest_k="$pytest_k and not environments_with_no_pip" +# this seems to require internet (despite no network marker) +# added in https://github.com/pypa/pip/pull/13378 TODO drop this in the next release +pytest_k="$pytest_k and not test_prompt_for_keyring_if_needed and not test_double_install_fail and not test_install_sdist_links and not test_lock_vcs and not test_lock_archive and not test_backend_sees_config_via_sdist" +# this cannot import breezy, TODO investigate +pytest_k="$pytest_k and not (functional and bazaar)" +# failures to investigate +pytest_k="$pytest_k and not test_all_fields and not test_report_mixed_not_found and not test_basic_show" # "Editable project location" missing +pytest_k="$pytest_k and not test_basic_install_from_wheel" +pytest_k="$pytest_k and not test_check_unsupported" -# --ignore'd tests are not compatible with the latest virtualenv -# These files contain almost 500 tests so we should enable them back -# as soon as pip will be compatible upstream -# https://github.com/pypa/pip/pull/8441 -# among them, tests/functional/test_proxy.py needs proxy.py which is not -# yet packaged in Fedora -%pytest -m 'not network' -k "$(echo $pytest_k)" \ - --ignore tests/functional --ignore tests/lib/test_lib.py +%pytest -n auto -m 'not network' -k "$(echo $pytest_k)" \ + --ignore tests/functional/test_proxy.py # no proxy.py in Fedora %endif diff --git a/sources b/sources index 8c41529..4c3846d 100644 --- a/sources +++ b/sources @@ -1 +1,4 @@ SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc +SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a +SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d +SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e From 8e291b0b6ca0895ccb6c870c4f9bdc0a56e38a2c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 11:23:07 +0200 Subject: [PATCH 61/80] Bootstrap for Python 3.14 --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 78219b9..1035dbe 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_tests 1 +%global _without_man 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. From b0472d2883529db994ba95664ba9196e48d62162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Jun 2025 11:01:07 +0200 Subject: [PATCH 62/80] Rebuilt for Python 3.14 - Fix test failures - Fixes: rhbz#2335909 --- python-pip.spec | 6 ++-- python3.14-file-urls.patch | 67 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 python3.14-file-urls.patch diff --git a/python-pip.spec b/python-pip.spec index 1035dbe..29f46b3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_tests 1 -%global _without_man 1 # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. @@ -102,6 +100,10 @@ Patch: dummy-certifi.patch # this warning is juts moot. Also, the warning breaks CPython test suite. Patch: nowarn-pip._internal.main.patch +# Adjust path_to_url et al. to produce the same results on Python 3.14+ +# https://github.com/pypa/pip/pull/13423 +Patch: python3.14-file-urls.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/python3.14-file-urls.patch b/python3.14-file-urls.patch new file mode 100644 index 0000000..77e89de --- /dev/null +++ b/python3.14-file-urls.patch @@ -0,0 +1,67 @@ +From 03b4b94a0338d80d1f45697a5ea083a5e5c937db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 12 Jun 2025 23:36:24 +0200 +Subject: [PATCH] Adjust path_to_url et al. to produce the same results on + Python 3.14+ + +See https://github.com/python/cpython/issues/125974 +and https://github.com/pypa/pip/pull/13138#issuecomment-2567715303 +--- + src/pip/_internal/models/link.py | 6 +++++- + src/pip/_internal/utils/urls.py | 2 +- + tests/unit/test_urls.py | 2 +- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/pip/_internal/models/link.py b/src/pip/_internal/models/link.py +index f0560f6..38423d1 100644 +--- a/src/pip/_internal/models/link.py ++++ b/src/pip/_internal/models/link.py +@@ -4,6 +4,7 @@ import logging + import os + import posixpath + import re ++import sys + import urllib.parse + from dataclasses import dataclass + from typing import ( +@@ -134,7 +135,10 @@ def _clean_file_url_path(part: str) -> str: + # should not be quoted. On Linux where drive letters do not + # exist, the colon should be quoted. We rely on urllib.request + # to do the right thing here. +- return urllib.request.pathname2url(urllib.request.url2pathname(part)) ++ ret = urllib.request.pathname2url(urllib.request.url2pathname(part)) ++ if sys.version_info >= (3, 14): ++ ret = ret.removeprefix("//") ++ return ret + + + # percent-encoded: / +diff --git a/src/pip/_internal/utils/urls.py b/src/pip/_internal/utils/urls.py +index 9f34f88..e951a5e 100644 +--- a/src/pip/_internal/utils/urls.py ++++ b/src/pip/_internal/utils/urls.py +@@ -12,7 +12,7 @@ def path_to_url(path: str) -> str: + quoted path parts. + """ + path = os.path.normpath(os.path.abspath(path)) +- url = urllib.parse.urljoin("file:", urllib.request.pathname2url(path)) ++ url = urllib.parse.urljoin("file://", urllib.request.pathname2url(path)) + return url + + +diff --git a/tests/unit/test_urls.py b/tests/unit/test_urls.py +index 0c14525..2a56e45 100644 +--- a/tests/unit/test_urls.py ++++ b/tests/unit/test_urls.py +@@ -11,7 +11,7 @@ from pip._internal.utils.urls import path_to_url, url_to_path + def test_path_to_url_unix() -> None: + assert path_to_url("/tmp/file") == "file:///tmp/file" + path = os.path.join(os.getcwd(), "file") +- assert path_to_url("file") == "file://" + urllib.request.pathname2url(path) ++ assert path_to_url("file") == "file://" + path + + + @pytest.mark.skipif("sys.platform != 'win32'") +-- +2.49.0 + From 2b190b00bf65d1898b73b6b770eeb94270b24ef5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:06:18 +0200 Subject: [PATCH 63/80] We don't want to run tests on EPEL by default It adds unwanted complexity, and in some alternative stacks the dependencies are not available. [skip changelog] --- python-pip.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 29f46b3..0690d01 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,8 +1,7 @@ # The original RHEL N+1 content set is defined by (build)dependencies # of the packages in Fedora ELN. Hence we disable tests here # to prevent pulling many unwanted packages in. -# We intentionally keep this enabled on EPEL. -%bcond tests %[%{defined fedora} || %{defined epel}] +%bcond tests %{defined fedora} # Whether to build the manual pages (useful for bootstrapping Sphinx) %bcond man 1 From 1ae923743179e226ab75e08f9035c8fba6666bfb Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:08:00 +0200 Subject: [PATCH 64/80] Macronize the Python version of the bundled provides We build it in alternative Python stacks and want it to pick up the redefined %{python3_pkgversion}. For main Python it evaluates to 3, meaning no change in Fedora proper. It will result in a smaller diff when creating alternative package definitions. [skip changelog] --- python-pip.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 0690d01..9b1e25e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -178,7 +178,7 @@ BuildRequires: ca-certificates Requires: ca-certificates # Virtual provides for the packages bundled by pip: -%{bundled 3} +%{bundled %{python3_pkgversion}} Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} @@ -195,7 +195,7 @@ Summary: The pip wheel Requires: ca-certificates # Virtual provides for the packages bundled by pip: -%{bundled 3} +%{bundled %{python3_pkgversion}} # This is only relevant for Pythons that are older than 3.12 and don't use their own bundled wheels # It is also only relevant when this wheel is shared across multiple Pythons From 6c37700fd567226cefad01baee145c15741ec410 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 14:14:06 +0200 Subject: [PATCH 65/80] Remove the obsolete Conflicts from the Python 2 -> 3 transition [skip changelog] --- python-pip.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 9b1e25e..4d3221a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -181,7 +181,6 @@ Requires: ca-certificates %{bundled %{python3_pkgversion}} Provides: pip = %{version}-%{release} -Conflicts: python-pip < %{version}-%{release} %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages From 435a2e9aa1eaad128aed2d6ad0e9ad8bc525dc30 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 19 Jun 2025 15:06:04 +0200 Subject: [PATCH 66/80] Use the short -t CLI option for sphinx-build The long options were added in Sphinx 7.3.0, which is not available in RHEL 9 and 10. The short option works for each of the currently supported systems. Ref: https://www.sphinx-doc.org/en/master/changes/7.3.html [skip changelog] --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 4d3221a..ec68d37 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -240,7 +240,7 @@ export PYTHONPATH=./src/ %pyproject_wheel %if %{with man} -sphinx-build --tag man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man +sphinx-build -t man -b man -d docs/build/doctrees/man -c docs/html docs/man docs/build/man %endif From 5802dc6818d2387677ad31f3f51c52835836df23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 20 Jun 2025 19:12:08 +0200 Subject: [PATCH 67/80] Handle alternate executable names for cases this isn't the main Python This is based on work in https://gitlab.com/redhat/centos-stream/rpms/python3.12-pip/-/commit/f1b86318fc6f21d5514fb7933172798cb4ea3db4 and https://src.fedoraproject.org/rpms/python-pip/pull-request/71 (not merged) With one notable difference: The Bash completion function has no dot in it now. I believe that having a dot in it breaks it: https://issues.redhat.com/browse/RHEL-99083 [skip changelog] --- python-pip.spec | 59 ++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ec68d37..055999d 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -249,13 +249,28 @@ export PYTHONPATH=./src/ %pyproject_install %pyproject_save_files -l pip +# We'll install pip as pip3.X +# Later we'll provide symbolic links, manpage links and bashcompletion fixes for alternative names +%if "%{python3_pkgversion}" == "3" +%global alternate_names pip-%{python3_version} pip-3 pip3 pip +%else +%global alternate_names pip-%{python3_version} +%endif + +# Provide symlinks to executables +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip%{python3_version} +rm %{buildroot}%{_bindir}/pip3 +for pip in %{alternate_names}; do +ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/$pip +done + %if %{with man} pushd docs/build/man install -d %{buildroot}%{_mandir}/man1 for MAN in *1; do -install -pm0644 $MAN %{buildroot}%{_mandir}/man1/$MAN -for pip in "pip3" "pip-3" "pip%{python3_version}" "pip-%{python3_version}"; do -echo ".so $MAN" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip} +install -pm0644 $MAN %{buildroot}%{_mandir}/man1/${MAN/pip/pip%{python3_version}} +for pip in %{alternate_names}; do +echo ".so ${MAN/pip/pip%{python3_version}}" > %{buildroot}%{_mandir}/man1/${MAN/pip/$pip} done done popd @@ -263,19 +278,13 @@ popd mkdir -p %{buildroot}%{bash_completions_dir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ - %{buildroot}%{_bindir}/pip completion --bash \ - > %{buildroot}%{bash_completions_dir}/pip3 - -# Make bash completion apply to all the 5 symlinks we install -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip pip{,-}{3,%{python3_version}}/" \ - -e s/_pip_completion/_pip3_completion/ \ - %{buildroot}%{bash_completions_dir}/pip3 - - -# Provide symlinks to executables to comply with Fedora guidelines for Python -ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version} -ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 + %{buildroot}%{_bindir}/pip%{python3_version} completion --bash \ + > %{buildroot}%{bash_completions_dir}/pip%{python3_version} +# Make bash completion apply to all alternate names symlinks we install +sed -i -e "s/^\\(complete.*\\) pip%{python3_version}\$/\\1 pip%{python3_version} %{alternate_names}/" \ + -e s/_pip_completion/_pip%{python3_version_nodots}_completion/ \ + %{buildroot}%{bash_completions_dir}/pip%{python3_version} mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} @@ -290,9 +299,9 @@ grep "exe$" %{pyproject_files} && exit 1 || true grep "pem$" %{pyproject_files} && exit 1 || true # Verify we can at least run basic commands without crashing -%{py3_test_envvars} %{buildroot}%{_bindir}/pip --help -%{py3_test_envvars} %{buildroot}%{_bindir}/pip list -%{py3_test_envvars} %{buildroot}%{_bindir}/pip show pip +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} --help +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} list +%{py3_test_envvars} %{buildroot}%{_bindir}/pip%{python3_version} show pip %if %{with tests} # Upstream tests @@ -318,18 +327,22 @@ pytest_k="$pytest_k and not test_check_unsupported" %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst %if %{with man} -%{_mandir}/man1/pip.* -%{_mandir}/man1/pip-*.* -%{_mandir}/man1/pip3.* -%{_mandir}/man1/pip3-*.* +%if "%{python3_pkgversion}" == "3" +%{_mandir}/man1/pip{,3,-3}.1.* +%{_mandir}/man1/pip{,3,-3}-[^3]*.1.* %endif +%{_mandir}/man1/pip{,-}%{python3_version}.1.* +%{_mandir}/man1/pip{,-}%{python3_version}-*.1.* +%endif +%if "%{python3_pkgversion}" == "3" %{_bindir}/pip %{_bindir}/pip3 %{_bindir}/pip-3 +%endif %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %dir %{bash_completions_dir} -%{bash_completions_dir}/pip3 +%{bash_completions_dir}/pip%{python3_version} %files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel From c61c7b352ccc2d71cab41decb4d0ed0a99f6f1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 25 Mar 2025 15:14:31 +0100 Subject: [PATCH 68/80] Use /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem - https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile --- dummy-certifi.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 371a74c..01e8756 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -23,7 +23,7 @@ index 70e0c3b..eaf4210 100644 +# The RPM-packaged certifi always uses the system certificates +def where() -> str: -+ return '/etc/pki/tls/certs/ca-bundle.crt' ++ return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem' -if sys.version_info >= (3, 11): From 685d136d854f58a5e432f65142e1df9cb1b08f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Thu, 3 Jul 2025 07:58:05 +0200 Subject: [PATCH 69/80] CI: Test bash completion Originally generated by CursorAI, manually edited. [skip changelog] --- tests/bash_completion/main.fmf | 35 ++++++ .../pip_completion_full_test.sh | 88 +++++++++++++ tests/bash_completion/test_pip_completion.exp | 117 ++++++++++++++++++ tests/tests.yml | 4 + 4 files changed, 244 insertions(+) create mode 100644 tests/bash_completion/main.fmf create mode 100755 tests/bash_completion/pip_completion_full_test.sh create mode 100755 tests/bash_completion/test_pip_completion.exp diff --git a/tests/bash_completion/main.fmf b/tests/bash_completion/main.fmf new file mode 100644 index 0000000..cde6f68 --- /dev/null +++ b/tests/bash_completion/main.fmf @@ -0,0 +1,35 @@ +summary: PIP bash completion functionality smoke test +description: | + Comprehensive test for pip bash completion functionality on Fedora/RHEL systems. + + The test performs the following steps: + 1. Finds the bash completion script in the given (e.g. python3-pip) RPM package + 2. Discovers all pip executables in the package (e.g. /usr/bin/pip and /usr/bin/pip3.14) + 3. Sources the completion script and verifies completion for all executables is registered + 4. Runs functional TAB completion tests using expect (for regular and POSIX mode of Bash) + 5. Validates that completion works for basic pip commands + + This is a smoke test to ensure pip bash completion is properly + installed and functional after package installation. + +component: + - python3-pip + +test: ./pip_completion_full_test.sh + +framework: shell + +duration: 5m +tier: 1 + + +require: + - python3-pip + - bash-completion + - expect + - rpm + - bash + + +environment: + PACKAGE: python3-pip diff --git a/tests/bash_completion/pip_completion_full_test.sh b/tests/bash_completion/pip_completion_full_test.sh new file mode 100755 index 0000000..94fcdb9 --- /dev/null +++ b/tests/bash_completion/pip_completion_full_test.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +# Comprehensive PIP bash completion test for RHEL +# Finds completion scripts from RPM, tests all pip binaries, and runs functional tests + +PACKAGE="${PACKAGE:-python3-pip}" + + +# Step 1: Find bash completion scripts in python3-pip RPM package +echo "Step 1: Finding bash completion scripts in $PACKAGE RPM package..." + +COMPLETION_FILE=$(rpm -ql $PACKAGE 2>/dev/null | grep -E "/usr/share/bash-completion/completions/" || true) + +if [[ -z "$COMPLETION_FILE" ]]; then + echo "✗ No bash completion files found in $PACKAGE package" + exit 1 +fi + +# Check if there's exactly one completion file +COMPLETION_FILE_COUNT=$(echo "$COMPLETION_FILE" | wc -l) + +if [[ $COMPLETION_FILE_COUNT -gt 1 ]]; then + echo "✗ Multiple bash completion files found in $PACKAGE package:" + echo "$COMPLETION_FILE" | sed 's/^/ - /' + echo "Expected exactly one completion file, found $COMPLETION_FILE_COUNT" + exit 1 +fi + + +echo "✓ Found completion file from $PACKAGE package:" +echo "$COMPLETION_FILE" | sed 's/^/ - /' + +# Step 2: Find all pip binaries +echo +echo "Step 2: Finding all pip binaries..." +PIP_BINARIES=() +PIP_FILES=$(rpm -ql $PACKAGE | grep /bin/p) +for pip_file in $PIP_FILES; do + if [[ -x "$pip_file" ]]; then + pip_cmd=$(basename "$pip_file") + PIP_BINARIES+=("$pip_cmd") + echo "✓ Found: $pip_cmd -> $pip_file" + fi +done + +if [[ ${#PIP_BINARIES[@]} -eq 0 ]]; then + echo "✗ No pip binaries found" + exit 1 +fi + +echo "Total pip binaries found: ${#PIP_BINARIES[@]}" + +# Step 3: Source completion scripts and test each binary +echo +echo "Step 3: Testing completion for each pip binary..." + +for AS_POSIX in 0 1; do + if [[ $AS_POSIX -eq 1 ]]; then + echo "Testing in POSIX mode" + POSIX="--posix" + else + echo "Testing in non-POSIX mode" + POSIX="" + fi + + echo "Sourcing: $COMPLETION_FILE" + if bash --norc $POSIX -c "source $COMPLETION_FILE" ; then + echo "✓ Successfully sourced $COMPLETION_FILE" + else + echo "! Warning: Failed to source $COMPLETION_FILE" + exit 1 + fi + + export AS_POSIX + for pip_exec in "${PIP_BINARIES[@]}"; do + echo "Running expect test with $COMPLETION_FILE and $pip_exec..." + if ./test_pip_completion.exp "$COMPLETION_FILE" "$pip_exec"; then + echo "✓ Functional test passed" + else + echo "✗ Functional test failed" + exit 1 + fi + done + +done + + +echo "✓ All tests completed successfully!" diff --git a/tests/bash_completion/test_pip_completion.exp b/tests/bash_completion/test_pip_completion.exp new file mode 100755 index 0000000..4389174 --- /dev/null +++ b/tests/bash_completion/test_pip_completion.exp @@ -0,0 +1,117 @@ +#!/usr/bin/expect -f + +# PIP bash completion smoke test using expect +# Tests actual TAB completion functionality +# Usage: test_pip_completion.exp [completion_file] [pip_binary] + +set timeout 5 + + +set completion_file [lindex $argv 0] +set pip_exec [lindex $argv 1] + + +puts "=== PIP Bash Completion Test (using expect) ===" +puts "Testing completion file: $completion_file" +puts "Testing pip binary: $pip_exec" + +# Check if completion file exists first +if {![file exists $completion_file]} { + puts "✗ Completion file not found: $completion_file" + exit 1 +} +puts "✓ Completion file found: $completion_file" + +# Start bash shell +if {[info exists env(AS_POSIX)] && $env(AS_POSIX) == "1"} { + spawn bash --norc --posix +} else { + spawn bash --norc +} +expect "$ " + +# Source the completion file +send "source $completion_file\r" +expect "$ " +puts "Attempted to source completion file" + +# Test 1: Basic pip command completion +puts "\nTest 1: Testing '$pip_exec ' + TAB completion..." +send "$pip_exec " +sleep 0.1 +# Send TAB TAB using hex codes +send "\x09\x09" +expect { + -re "(install|uninstall|list|show)" { + puts "✓ Basic pip commands found in completion" + expect "$ " + } + -re "Display all" { + puts "✓ Completion showing options menu" + send "n\r" + expect "$ " + } + timeout { + puts "✗ Timeout waiting for completion - test failed" + exit 1 + } +} + +# Clear the line and ensure clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Test 2: Test partial command completion (simpler test) +puts "\nTest 2: Testing '$pip_exec insta' + TAB completion..." +send "$pip_exec insta" +sleep 0.1 +# Single TAB for completion +send "\x09" +expect { + -re "install" { + puts "✓ Partial command completion works (insta -> install)" + expect "$ " + } + timeout { + puts "✗ Timeout on partial completion test - test failed" + exit 1 + } +} + +# Clear the line and ensure clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Test 3: Test help completion +puts "\nTest 3: Testing '$pip_exec --' + TAB completion..." +send "$pip_exec --" +sleep 0.1 +send "\x09\x09" +expect { + -re "(--help|--version)" { + puts "✓ Command options found in completion" + expect "$ " + } + timeout { + puts "✗ Timeout on options completion test - test failed" + exit 1 + } +} + +# Final cleanup - make sure we're at clean prompt +send "\x03" +expect "$ " +send "\r" +expect "$ " + +# Exit bash cleanly +send "exit\r" +expect eof + +puts "\n=== Completion Test Complete ===" +puts "PIP bash completion functionality tested!" + diff --git a/tests/tests.yml b/tests/tests.yml index b2347e3..d1ff148 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -73,6 +73,9 @@ dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-clikit - pip_install_upgrade + - bash_completion: + dir: tests/bash_completion + run: ./pip_completion_full_test.sh required_packages: - gcc - virtualenv @@ -91,3 +94,4 @@ - grep - util-linux - shadow-utils + - expect From cea7bb935ff44be641518aa5e12f90fb0ff1357e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 22 Jul 2025 11:45:35 +0200 Subject: [PATCH 70/80] Use /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem even in truststore - https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile - Fixes: rhbz#2380441 --- python-pip.spec | 4 ++++ truststore-pem-path.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 truststore-pem-path.patch diff --git a/python-pip.spec b/python-pip.spec index 055999d..cc3f013 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -103,6 +103,10 @@ Patch: nowarn-pip._internal.main.patch # https://github.com/pypa/pip/pull/13423 Patch: python3.14-file-urls.patch +# https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile +# https://github.com/sethmlarson/truststore/pull/183 +Patch: truststore-pem-path.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/truststore-pem-path.patch b/truststore-pem-path.patch new file mode 100644 index 0000000..f771a33 --- /dev/null +++ b/truststore-pem-path.patch @@ -0,0 +1,26 @@ +From 2c8231f03987daaf9524f9568884a7b296480b32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 17 Jul 2025 09:50:35 +0200 +Subject: [PATCH] Fedora 43 removes some symbolic links + +See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile +--- + src/pip/_vendor/truststore/_openssl.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_vendor/truststore/_openssl.py b/src/pip/_vendor/truststore/_openssl.py +index 9951cf7..3e25a56 100644 +--- a/src/pip/_vendor/truststore/_openssl.py ++++ b/src/pip/_vendor/truststore/_openssl.py +@@ -6,8 +6,10 @@ + + # candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes + _CA_FILE_CANDIDATES = [ +- # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD ++ # Alpine, Arch, Fedora 34-42, OpenWRT, RHEL 9-10, BSD + "/etc/ssl/cert.pem", ++ # Fedora 43+, RHEL 11+ ++ "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + # Fedora <= 34, RHEL <= 9, CentOS <= 9 + "/etc/pki/tls/cert.pem", + # Debian, Ubuntu (requires ca-certificates) From 69759f29723c829766e59e5b6b52ff5bc652c839 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:21:56 +0000 Subject: [PATCH 71/80] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c830f0f9ae1466a7e72c70bd6d44612ce8c507d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Mon, 28 Jul 2025 17:57:26 +0200 Subject: [PATCH 72/80] CI: Drop STI and use tmt instead Use 'discovery --how shell' for bash completion test as well, even though it contains metadata, to be same as all other migrated plans. Resolves: rhbz#2383041 [skip changelog] --- .fmf/version | 1 + plan.fmf | 104 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 97 -------------------------------------------- 3 files changed, 105 insertions(+), 97 deletions(-) create mode 100644 .fmf/version create mode 100644 plan.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..79f9d9c --- /dev/null +++ b/plan.fmf @@ -0,0 +1,104 @@ +execute: + how: tmt + +discover: + - name: tests_python + how: shell + url: https://src.fedoraproject.org/tests/python.git + tests: + - name: smoke36 + path: /smoke + test: VERSION=3.6 TOX=false ./venv.sh + - name: smoke39 + path: /smoke + test: VERSION=3.9 ./venv.sh + - name: smoke310 + path: /smoke + test: VERSION=3.10 ./venv.sh + - name: smoke311 + path: /smoke + test: VERSION=3.11 ./venv.sh + - name: smoke312 + path: /smoke + test: VERSION=3.12 ./venv.sh + - name: smoke313 + path: /smoke + test: VERSION=3.13 ./venv.sh + - name: smoke314 + path: /smoke + test: VERSION=3.14 ./venv.sh + - name: smoke39_virtualenv + path: /smoke + test: VERSION=3.9 METHOD=virtualenv ./venv.sh + - name: smoke310_virtualenv + path: /smoke + test: VERSION=3.10 METHOD=virtualenv ./venv.sh + - name: smoke311_virtualenv + path: /smoke + test: VERSION=3.11 METHOD=virtualenv ./venv.sh + - name: smoke312_virtualenv + path: /smoke + test: VERSION=3.12 METHOD=virtualenv ./venv.sh + - name: smoke313_virtualenv + path: /smoke + test: VERSION=3.13 METHOD=virtualenv ./venv.sh + - name: smoke314_virtualenv + path: /smoke + test: VERSION=3.14 METHOD=virtualenv ./venv.sh + - name: rpms_pyproject-rpm-macros + how: shell + url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git + tests: + - name: pyproject_pytest + path: /tests + test: ./mocktest.sh python-pytest + - name: pyproject_entrypoints + path: /tests + test: ./mocktest.sh python-entrypoints + - name: pyproject_pluggy + path: /tests + test: ./mocktest.sh python-pluggy + - name: pyproject_clikit + path: /tests + test: ./mocktest.sh python-clikit + - name: same_repo + how: shell + dist-git-source: true + dist-git-download-only: true + tests: + - name: mock_bootstrap_build + test: | + cd $TMT_SOURCE_DIR && + $TMT_TREE/../discover/rpms_pyproject-rpm-macros/tests/tests/mocktest.sh python-pip --without tests --without man + - name: pip_install_upgrade + path: /tests/pip_install_upgrade/ + test: ./runtest.sh + - name: bash_completion + path: /tests/bash_completion + test: ./pip_completion_full_test.sh +prepare: + - name: Install dependencies + how: install + package: + - gcc + - virtualenv + - python3.6 + - python3.9 + - python3.10-devel + - python3.11-devel + - python3.12-devel + - python3.13-devel + - python3.14-devel + - python3-devel + - python3-tox + - mock + - rpmdevtools + - rpm-build + - grep + - util-linux + - shadow-utils + - expect + - dnf + - name: Update packages + how: shell + script: dnf upgrade -y diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d1ff148..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -- hosts: localhost - tags: - - classic - pre_tasks: - - import_role: - name: standard-test-source - vars: - fetch_only: True - - roles: - - role: standard-test-basic - tags: - - classic - repositories: - - repo: "https://src.fedoraproject.org/tests/python.git" - dest: "python" - - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" - dest: "pyproject-rpm-macros" - tests: - - smoke36: - dir: python/smoke - run: VERSION=3.6 TOX=false ./venv.sh - - smoke39: - dir: python/smoke - run: VERSION=3.9 ./venv.sh - - smoke310: - dir: python/smoke - run: VERSION=3.10 ./venv.sh - - smoke311: - dir: python/smoke - run: VERSION=3.11 ./venv.sh - - smoke312: - dir: python/smoke - run: VERSION=3.12 ./venv.sh - - smoke313: - dir: python/smoke - run: VERSION=3.13 ./venv.sh - - smoke314: - dir: python/smoke - run: VERSION=3.14 ./venv.sh - - smoke39_virtualenv: - dir: python/smoke - run: VERSION=3.9 METHOD=virtualenv ./venv.sh - - smoke310_virtualenv: - dir: python/smoke - run: VERSION=3.10 METHOD=virtualenv ./venv.sh - - smoke311_virtualenv: - dir: python/smoke - run: VERSION=3.11 METHOD=virtualenv ./venv.sh - - smoke312_virtualenv: - dir: python/smoke - run: VERSION=3.12 METHOD=virtualenv ./venv.sh - - smoke313_virtualenv: - dir: python/smoke - run: VERSION=3.13 METHOD=virtualenv ./venv.sh - - smoke314_virtualenv: - dir: python/smoke - run: VERSION=3.14 METHOD=virtualenv ./venv.sh - - mock_bootstrap_build: - dir: . - run: pyproject-rpm-macros/tests/mocktest.sh python-pip --without tests --without man - - pyproject_pytest: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pytest - - pyproject_entrypoints: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-entrypoints - - pyproject_pluggy: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pluggy - - pyproject_clikit: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-clikit - - pip_install_upgrade - - bash_completion: - dir: tests/bash_completion - run: ./pip_completion_full_test.sh - required_packages: - - gcc - - virtualenv - - python3.6 - - python3.9 - - python3.10-devel - - python3.11-devel - - python3.12-devel - - python3.13-devel - - python3.14-devel - - python3-devel - - python3-tox - - mock - - rpmdevtools - - rpm-build - - grep - - util-linux - - shadow-utils - - expect From 13d07e4daf7999d9be8595d9db9ddafd0af6479e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:23:19 +0200 Subject: [PATCH 73/80] Rebuilt for Python 3.14.0rc2 bytecode From 3a83d6ce5d289434a11516e18c5cee8dd0873449 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 7 Aug 2025 15:40:40 +0200 Subject: [PATCH 74/80] Update to 25.2 (rhbz#2385294) Drop nowarn-pip._internal.main.patch as the warning is no longer emitted via ensurepip in Fedora Pythons. --- downstream-remove-pytest-subket.patch | 54 +++++++++++++ dummy-certifi.patch | 49 +++--------- nowarn-pip._internal.main.patch | 79 ------------------- python-pip.spec | 43 +++++----- python3.14-file-urls.patch | 67 ---------------- ...existing-dist-only-if-path-conflicts.patch | 30 +++---- sources | 2 +- 7 files changed, 100 insertions(+), 224 deletions(-) create mode 100644 downstream-remove-pytest-subket.patch delete mode 100644 nowarn-pip._internal.main.patch delete mode 100644 python3.14-file-urls.patch diff --git a/downstream-remove-pytest-subket.patch b/downstream-remove-pytest-subket.patch new file mode 100644 index 0000000..564794c --- /dev/null +++ b/downstream-remove-pytest-subket.patch @@ -0,0 +1,54 @@ +From 35378ae02912d704d466e4809070e17a8d13ad0a Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Thu, 7 Aug 2025 15:05:34 +0200 +Subject: [PATCH] Downstream-Only: Remove pytest-subket from tests + +--- + tests/conftest.py | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index c98b871..ada7a7e 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -451,18 +451,6 @@ def coverage_install( + return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage") + + +-@pytest.fixture(scope="session") +-def socket_install(tmpdir_factory: pytest.TempPathFactory, common_wheels: Path) -> Path: +- lib_dir = _common_wheel_editable_install( +- tmpdir_factory, common_wheels, "pytest_subket" +- ) +- # pytest-subket is only included so it can intercept and block unexpected +- # network requests. It should NOT be visible to the pip under test. +- dist_info = next(lib_dir.glob("*.dist-info")) +- shutil.rmtree(dist_info) +- return lib_dir +- +- + def install_pth_link( + venv: VirtualEnvironment, project_name: str, lib_dir: Path + ) -> None: +@@ -480,7 +468,6 @@ def virtualenv_template( + setuptools_install: Path, + wheel_install: Path, + coverage_install: Path, +- socket_install: Path, + ) -> VirtualEnvironment: + venv_type: VirtualEnvironmentType + if request.config.getoption("--use-venv"): +@@ -495,10 +482,6 @@ def virtualenv_template( + # Install setuptools, wheel, pytest-subket, and pip. + install_pth_link(venv, "setuptools", setuptools_install) + install_pth_link(venv, "wheel", wheel_install) +- install_pth_link(venv, "pytest_subket", socket_install) +- # Also copy pytest-subket's .pth file so it can intercept socket calls. +- with open(venv.site / "pytest_socket.pth", "w") as f: +- f.write(socket_install.joinpath("pytest_socket.pth").read_text()) + + pth, dist_info = pip_editable_parts + +-- +2.50.1 + diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 01e8756..ce34415 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,17 +1,17 @@ -From 0741e5a665308184ddbd20900f92e4417204092f Mon Sep 17 00:00:00 2001 +From 7b5fbac83944e3a0dd975ff17b69358791b68721 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 27 Jun 2024 10:38:53 +0200 Subject: [PATCH] Dummy certifi patch --- - src/pip/_vendor/certifi/core.py | 110 ++------------------------------ - 1 file changed, 6 insertions(+), 104 deletions(-) + src/pip/_vendor/certifi/core.py | 80 +++------------------------------ + 1 file changed, 6 insertions(+), 74 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 70e0c3b..eaf4210 100644 +index 2f2f7e0..bec6595 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -4,111 +4,13 @@ certifi.py +@@ -4,80 +4,12 @@ certifi.py This module returns the installation location of cacert.pem or its contents. """ @@ -20,13 +20,13 @@ index 70e0c3b..eaf4210 100644 -def exit_cacert_ctx() -> None: - _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr] - +# The RPM-packaged certifi always uses the system certificates +def where() -> str: + return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem' --if sys.version_info >= (3, 11): +-if sys.version_info >= (3, 11): +- - from importlib.resources import as_file, files - - _CACERT_CTX = None @@ -60,7 +60,7 @@ index 70e0c3b..eaf4210 100644 - def contents() -> str: - return files("pip._vendor.certifi").joinpath("cacert.pem").read_text(encoding="ascii") - --elif sys.version_info >= (3, 7): +-else: - - from importlib.resources import path as get_path, read_text - @@ -95,40 +95,9 @@ index 70e0c3b..eaf4210 100644 - - def contents() -> str: - return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") -- --else: -- import os -- import types -- from typing import Union -- -- Package = Union[types.ModuleType, str] -- Resource = Union[str, "os.PathLike"] -- -- # This fallback will work for Python versions prior to 3.7 that lack the -- # importlib.resources module but relies on the existing `where` function -- # so won't address issues with environments like PyOxidizer that don't set -- # __file__ on modules. -- def read_text( -- package: Package, -- resource: Resource, -- encoding: str = 'utf-8', -- errors: str = 'strict' -- ) -> str: -- with open(where(), encoding=encoding) as data: -- return data.read() -- -- # If we don't have importlib.resources, then we will just do the old logic -- # of assuming we're on the filesystem and munge the path directly. -- def where() -> str: -- f = os.path.dirname(__file__) -- -- return os.path.join(f, "cacert.pem") -- -- def contents() -> str: -- return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") +def contents() -> str: + with open(where(), encoding='utf=8') as data: + return data.read() -- -2.45.1 +2.50.1 diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch deleted file mode 100644 index c8c98ed..0000000 --- a/nowarn-pip._internal.main.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 9d1e0a0e91cad143702b3a2d8c54bd765a5d9eb2 Mon Sep 17 00:00:00 2001 -From: Karolina Surma -Date: Thu, 27 Jun 2024 10:48:03 +0200 -Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint - -In Fedora, we use that in ensurepip and users cannot do anything about it, -this warning is juts moot. Also, the warning breaks CPython test suite. - -Co-Authored-By: =?UTF-8?q?Miro=20Hron=C4=8Dok?= ---- - src/pip/_internal/__init__.py | 2 +- - src/pip/_internal/utils/entrypoints.py | 19 ++++++++++--------- - tests/functional/test_cli.py | 3 ++- - 3 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 1a5b7f8..682b9e4 100755 ---- a/src/pip/_internal/__init__.py -+++ b/src/pip/_internal/__init__.py -@@ -15,4 +15,4 @@ def main(args: Optional[List[str]] = None) -> int: - """ - from pip._internal.utils.entrypoints import _wrapper - -- return _wrapper(args) -+ return _wrapper(args, _nowarn=True) -diff --git a/src/pip/_internal/utils/entrypoints.py b/src/pip/_internal/utils/entrypoints.py -index 1501369..70034eb 100644 ---- a/src/pip/_internal/utils/entrypoints.py -+++ b/src/pip/_internal/utils/entrypoints.py -@@ -20,7 +20,7 @@ if WINDOWS: - ] - - --def _wrapper(args: Optional[List[str]] = None) -> int: -+def _wrapper(args: Optional[List[str]] = None, _nowarn: bool = False) -> int: - """Central wrapper for all old entrypoints. - - Historically pip has had several entrypoints defined. Because of issues -@@ -32,14 +32,15 @@ def _wrapper(args: Optional[List[str]] = None) -> int: - directing them to an appropriate place for help, we now define all of - our old entrypoints as wrappers for the current one. - """ -- sys.stderr.write( -- "WARNING: pip is being invoked by an old script wrapper. This will " -- "fail in a future version of pip.\n" -- "Please see https://github.com/pypa/pip/issues/5599 for advice on " -- "fixing the underlying issue.\n" -- "To avoid this problem you can invoke Python with '-m pip' instead of " -- "running pip directly.\n" -- ) -+ if not _nowarn: -+ sys.stderr.write( -+ "WARNING: pip is being invoked by an old script wrapper. This will " -+ "fail in a future version of pip.\n" -+ "Please see https://github.com/pypa/pip/issues/5599 for advice on " -+ "fixing the underlying issue.\n" -+ "To avoid this problem you can invoke Python with '-m pip' instead of " -+ "running pip directly.\n" -+ ) - return main(args) - - -diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index e1ccf04..30b8f74 100644 ---- a/tests/functional/test_cli.py -+++ b/tests/functional/test_cli.py -@@ -49,7 +49,8 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None: - result = script.pip("-V") - result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) - assert result.stdout == result2.stdout -- assert "old script wrapper" in result2.stderr -+ if entrypoint[0] != "fake_pip = pip._internal:main": -+ assert "old script wrapper" in result2.stderr - - - @pytest.mark.parametrize( --- -2.45.1 - diff --git a/python-pip.spec b/python-pip.spec index cc3f013..fdea020 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.1.1 +%global base_version 25.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -36,7 +36,6 @@ Summary: A tool for installing and managing Python packages # truststore: MIT # tomli: MIT # tomli-w: MIT -# typing-extensions: Python-2.0.1 # urllib3: MIT License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) @@ -94,19 +93,15 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # The same patch is a part of the RPM-packaged python-certifi Patch: dummy-certifi.patch -# Don't warn the user about pip._internal.main() entrypoint -# In Fedora, we use that in ensurepip and users cannot do anything about it, -# this warning is juts moot. Also, the warning breaks CPython test suite. -Patch: nowarn-pip._internal.main.patch - -# Adjust path_to_url et al. to produce the same results on Python 3.14+ -# https://github.com/pypa/pip/pull/13423 -Patch: python3.14-file-urls.patch - # https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile # https://github.com/sethmlarson/truststore/pull/183 Patch: truststore-pem-path.patch +# pytest-subket has been introduced to intercept network calls +# https://github.com/pypa/pip/commit/a4b40f62332ccb3228b12cc5ae1493c75177247a +# We don't need a layer to check that, as we're by default in an offline environment +Patch: downstream-remove-pytest-subket.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s @@ -123,25 +118,24 @@ Packages" or "Pip Installs Python". # You can generate it with: # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: -Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 -Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.3 +Provides: bundled(python%{1}dist(certifi)) = 2025.7.14 Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 -Provides: bundled(python%{1}dist(distlib)) = 0.3.9 +Provides: bundled(python%{1}dist(distlib)) = 0.4 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 -Provides: bundled(python%{1}dist(msgpack)) = 1.1 +Provides: bundled(python%{1}dist(msgpack)) = 1.1.1 Provides: bundled(python%{1}dist(packaging)) = 25 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.7 -Provides: bundled(python%{1}dist(pygments)) = 2.19.1 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.8 +Provides: bundled(python%{1}dist(pygments)) = 2.19.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 -Provides: bundled(python%{1}dist(requests)) = 2.32.3 -Provides: bundled(python%{1}dist(resolvelib)) = 1.1 -Provides: bundled(python%{1}dist(rich)) = 14 +Provides: bundled(python%{1}dist(requests)) = 2.32.4 +Provides: bundled(python%{1}dist(resolvelib)) = 1.2 +Provides: bundled(python%{1}dist(rich)) = 14.1 Provides: bundled(python%{1}dist(setuptools)) = 70.3 Provides: bundled(python%{1}dist(tomli)) = 2.2.1 Provides: bundled(python%{1}dist(tomli-w)) = 1.2 Provides: bundled(python%{1}dist(truststore)) = 0.10.1 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.13.2 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } @@ -222,7 +216,10 @@ rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' pyproject.toml # Remove unused test requirements -sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt +sed -Ei '/(pytest-(cov|xdist|rerunfailures|subket)|proxy\.py)/d' pyproject.toml + +# Remove unused pytest-subket options +sed -Ei '/(--disable-socket|--allow-unix-socket|--allow-hosts=localhost)/d' pyproject.toml %if %{with tests} # tests expect wheels in here @@ -235,7 +232,7 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels %generate_buildrequires # we only use this to generate test requires # the "pyproject" part is explicitly disabled as it generates a requirement on pip -%pyproject_buildrequires -N tests/requirements.txt +%pyproject_buildrequires -N -g test %endif diff --git a/python3.14-file-urls.patch b/python3.14-file-urls.patch deleted file mode 100644 index 77e89de..0000000 --- a/python3.14-file-urls.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 03b4b94a0338d80d1f45697a5ea083a5e5c937db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 12 Jun 2025 23:36:24 +0200 -Subject: [PATCH] Adjust path_to_url et al. to produce the same results on - Python 3.14+ - -See https://github.com/python/cpython/issues/125974 -and https://github.com/pypa/pip/pull/13138#issuecomment-2567715303 ---- - src/pip/_internal/models/link.py | 6 +++++- - src/pip/_internal/utils/urls.py | 2 +- - tests/unit/test_urls.py | 2 +- - 3 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/pip/_internal/models/link.py b/src/pip/_internal/models/link.py -index f0560f6..38423d1 100644 ---- a/src/pip/_internal/models/link.py -+++ b/src/pip/_internal/models/link.py -@@ -4,6 +4,7 @@ import logging - import os - import posixpath - import re -+import sys - import urllib.parse - from dataclasses import dataclass - from typing import ( -@@ -134,7 +135,10 @@ def _clean_file_url_path(part: str) -> str: - # should not be quoted. On Linux where drive letters do not - # exist, the colon should be quoted. We rely on urllib.request - # to do the right thing here. -- return urllib.request.pathname2url(urllib.request.url2pathname(part)) -+ ret = urllib.request.pathname2url(urllib.request.url2pathname(part)) -+ if sys.version_info >= (3, 14): -+ ret = ret.removeprefix("//") -+ return ret - - - # percent-encoded: / -diff --git a/src/pip/_internal/utils/urls.py b/src/pip/_internal/utils/urls.py -index 9f34f88..e951a5e 100644 ---- a/src/pip/_internal/utils/urls.py -+++ b/src/pip/_internal/utils/urls.py -@@ -12,7 +12,7 @@ def path_to_url(path: str) -> str: - quoted path parts. - """ - path = os.path.normpath(os.path.abspath(path)) -- url = urllib.parse.urljoin("file:", urllib.request.pathname2url(path)) -+ url = urllib.parse.urljoin("file://", urllib.request.pathname2url(path)) - return url - - -diff --git a/tests/unit/test_urls.py b/tests/unit/test_urls.py -index 0c14525..2a56e45 100644 ---- a/tests/unit/test_urls.py -+++ b/tests/unit/test_urls.py -@@ -11,7 +11,7 @@ from pip._internal.utils.urls import path_to_url, url_to_path - def test_path_to_url_unix() -> None: - assert path_to_url("/tmp/file") == "file:///tmp/file" - path = os.path.join(os.getcwd(), "file") -- assert path_to_url("file") == "file://" + urllib.request.pathname2url(path) -+ assert path_to_url("file") == "file://" + path - - - @pytest.mark.skipif("sys.platform != 'win32'") --- -2.49.0 - diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 20e5f28..d280f34 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,8 +1,11 @@ -From 9020f56e88a7dbaef688c147c281909f95b4e1d1 Mon Sep 17 00:00:00 2001 +From d5cb806a14bb50a96484bca6536e81f2ac316b9d Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib when pip install --upgrade is executed. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Resolves: rhbz#1550368 @@ -12,7 +15,6 @@ Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok Co-Authored-By: Karolina Surma - --- src/pip/_internal/metadata/base.py | 12 +++++++++++- src/pip/_internal/req/req_install.py | 2 +- @@ -21,10 +23,10 @@ Co-Authored-By: Karolina Surma 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py -index 9eabcdb..9816691 100644 +index 230e114..8bd5d31 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +@@ -23,7 +23,7 @@ from pip._vendor.packaging.utils import NormalizedName, canonicalize_name from pip._vendor.packaging.version import Version from pip._internal.exceptions import NoneMetadataError @@ -33,7 +35,7 @@ index 9eabcdb..9816691 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -578,6 +578,16 @@ class BaseDistribution(Protocol): +@@ -575,6 +575,16 @@ class BaseDistribution(Protocol): for extra in self._iter_egg_info_extras(): metadata["Provides-Extra"] = extra @@ -51,10 +53,10 @@ index 9eabcdb..9816691 100644 class BaseEnvironment: """An environment containing distributions to introspect.""" diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 2132785..0340890 100644 +index c9f6bff..c101826 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -449,7 +449,7 @@ class InstallRequirement: +@@ -453,7 +453,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -64,10 +66,10 @@ index 2132785..0340890 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 1dd0d70..414bdbe 100644 +index 33a4fdc..1fe886e 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -319,7 +319,9 @@ class Resolver(BaseResolver): +@@ -322,7 +322,9 @@ class Resolver(BaseResolver): # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. assert req.satisfied_by is not None @@ -79,19 +81,19 @@ index 1dd0d70..414bdbe 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 1f31d83..3804774 100644 +index f23e4cd..1bada79 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,6 +1,8 @@ +@@ -3,6 +3,8 @@ from __future__ import annotations import contextlib import functools import logging +import sys +import sysconfig + from collections.abc import Iterable, Iterator, Mapping, Sequence from typing import ( TYPE_CHECKING, - Callable, -@@ -617,6 +619,16 @@ class Factory: +@@ -615,6 +617,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -109,5 +111,5 @@ index 1f31d83..3804774 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.45.1 +2.50.1 diff --git a/sources b/sources index 4c3846d..7230ff9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (pip-25.1.1.tar.gz) = ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc +SHA512 (pip-25.2.tar.gz) = 5cc65c9091fdda7905e26ce32ddaa3a1c2fd287d69fd3da67c814ba7e8e5be59301d8327c06cdca78c1b95f4a5b5f75c87f36a549022408cc0e8f9411c0db11e SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e From e2a1a1a9947c6f5b6ceff1148f2e32fe57249ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 27 Aug 2025 16:52:27 +0200 Subject: [PATCH 75/80] Include SBOM in the .whl file in python-pip-wheel --- python-pip.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index fdea020..91369d3 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -287,8 +287,10 @@ sed -i -e "s/^\\(complete.*\\) pip%{python3_version}\$/\\1 pip%{python3_version} -e s/_pip_completion/_pip%{python3_version_nodots}_completion/ \ %{buildroot}%{bash_completions_dir}/pip%{python3_version} +# Install the built wheel and inject SBOM into it (if the macro is available) mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} +%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{python_wheel_dir}/%{python_wheel_name}} %check From 8ddd39d6cd1ba1ee38a8ee0e8a31a511807b2b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 10 Sep 2025 19:11:16 +0200 Subject: [PATCH 76/80] Security fix for the bundled urllib3 for CVE-2025-50181 --- python-pip.spec | 5 ++++ urllib3-CVE-2025-50181.patch | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 urllib3-CVE-2025-50181.patch diff --git a/python-pip.spec b/python-pip.spec index 91369d3..de7e8db 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -102,6 +102,11 @@ Patch: truststore-pem-path.patch # We don't need a layer to check that, as we're by default in an offline environment Patch: downstream-remove-pytest-subket.patch +# Patch for the bundled urllib3 for CVE-2025-50181 +# Redirects are not disabled when retries are disabled on PoolManager instantiation +# Upstream fix: https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857 +Patch: urllib3-CVE-2025-50181.patch + # Remove -s from Python shebang - ensure that packages installed with pip # to user locations are seen by pip itself %undefine _py3_shebang_s diff --git a/urllib3-CVE-2025-50181.patch b/urllib3-CVE-2025-50181.patch new file mode 100644 index 0000000..05e6353 --- /dev/null +++ b/urllib3-CVE-2025-50181.patch @@ -0,0 +1,51 @@ +From b3d543d7e16af844394316360ef1bf0b9d10f1b1 Mon Sep 17 00:00:00 2001 +From: Illia Volochii +Date: Wed, 18 Jun 2025 16:25:01 +0300 +Subject: [PATCH] Security fix for CVE-2025-50181 + +Co-authored-by: Seth Michael Larson +Co-authored-by: Quentin Pradet +Co-authored-by: Seth Michael Larson +--- + src/pip/_vendor/urllib3/poolmanager.py | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_vendor/urllib3/poolmanager.py b/src/pip/_vendor/urllib3/poolmanager.py +index fb51bf7..a8de7c6 100644 +--- a/src/pip/_vendor/urllib3/poolmanager.py ++++ b/src/pip/_vendor/urllib3/poolmanager.py +@@ -170,6 +170,22 @@ class PoolManager(RequestMethods): + + def __init__(self, num_pools=10, headers=None, **connection_pool_kw): + RequestMethods.__init__(self, headers) ++ if "retries" in connection_pool_kw: ++ retries = connection_pool_kw["retries"] ++ if not isinstance(retries, Retry): ++ # When Retry is initialized, raise_on_redirect is based ++ # on a redirect boolean value. ++ # But requests made via a pool manager always set ++ # redirect to False, and raise_on_redirect always ends ++ # up being False consequently. ++ # Here we fix the issue by setting raise_on_redirect to ++ # a value needed by the pool manager without considering ++ # the redirect boolean. ++ raise_on_redirect = retries is not False ++ retries = Retry.from_int(retries, redirect=False) ++ retries.raise_on_redirect = raise_on_redirect ++ connection_pool_kw = connection_pool_kw.copy() ++ connection_pool_kw["retries"] = retries + self.connection_pool_kw = connection_pool_kw + self.pools = RecentlyUsedContainer(num_pools) + +@@ -389,7 +405,7 @@ class PoolManager(RequestMethods): + kw["body"] = None + kw["headers"] = HTTPHeaderDict(kw["headers"])._prepare_for_method_change() + +- retries = kw.get("retries") ++ retries = kw.get("retries", response.retries) + if not isinstance(retries, Retry): + retries = Retry.from_int(retries, redirect=redirect) + +-- +2.51.0 + From 566ed62a196ae263b08efb11f1389b83153876c6 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 13:59:29 +0200 Subject: [PATCH 77/80] Rebuilt for Python 3.14.0rc3 bytecode From 584939ebdd94304d085e21460ecb06063212713d Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 23 Oct 2025 15:14:18 +0200 Subject: [PATCH 78/80] CI: Run tests with Python 3.15 [skip changelog] --- plan.fmf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plan.fmf b/plan.fmf index 79f9d9c..b336d72 100644 --- a/plan.fmf +++ b/plan.fmf @@ -27,6 +27,9 @@ discover: - name: smoke314 path: /smoke test: VERSION=3.14 ./venv.sh + - name: smoke315 + path: /smoke + test: VERSION=3.15 ./venv.sh - name: smoke39_virtualenv path: /smoke test: VERSION=3.9 METHOD=virtualenv ./venv.sh @@ -45,6 +48,9 @@ discover: - name: smoke314_virtualenv path: /smoke test: VERSION=3.14 METHOD=virtualenv ./venv.sh + - name: smoke315_virtualenv + path: /smoke + test: VERSION=3.15 METHOD=virtualenv ./venv.sh - name: rpms_pyproject-rpm-macros how: shell url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git @@ -89,6 +95,7 @@ prepare: - python3.12-devel - python3.13-devel - python3.14-devel + - python3.15-devel - python3-devel - python3-tox - mock From 1f462a281f772282d8ade483860056f5175138c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 30 Nov 2025 10:13:45 +0100 Subject: [PATCH 79/80] CI: Ensure the devel subpackages for 3.6 and 3.9 are available See https://src.fedoraproject.org/rpms/python3.9/pull-request/213 and https://src.fedoraproject.org/rpms/python3.6/pull-request/153 [skip changelog] --- plan.fmf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plan.fmf b/plan.fmf index b336d72..72ad07b 100644 --- a/plan.fmf +++ b/plan.fmf @@ -88,8 +88,8 @@ prepare: package: - gcc - virtualenv - - python3.6 - - python3.9 + - python3.6-devel + - python3.9-devel - python3.10-devel - python3.11-devel - python3.12-devel From 2b2a030e77e9665b23c9b6d0e415556ec1b73a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 28 Nov 2025 12:16:06 +0100 Subject: [PATCH 80/80] Update to 25.3 - Fixes: rhbz#2406299 --- python-pip.spec | 32 ++++++++++++++++---------------- sources | 3 ++- truststore-pem-path.patch | 26 -------------------------- 3 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 truststore-pem-path.patch diff --git a/python-pip.spec b/python-pip.spec index de7e8db..8dc0aff 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ %bcond man 1 %global srcname pip -%global base_version 25.2 +%global base_version 25.3 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -57,12 +57,16 @@ Source1: https://files.pythonhosted.org/packages/0d/6d/b4752b044bf94cb802 # See https://github.com/pypa/pip/pull/13382 as an attempt to drop the requirement from pip tests. Source2: https://files.pythonhosted.org/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl +# flit_core.whl +# This is not built as RPM-packaged wheel in Fedora at all. +Source3: https://files.pythonhosted.org/packages/f2/65/b6ba90634c984a4fcc02c7e3afe523fef500c4980fec67cc27536ee50acf/flit_core-3.12.0-py3-none-any.whl + # coverage.whl # There is no RPM-packaged python-coverage-wheel, the package is archful. # Upstream uses this to measure coverage, which we don't. # This is a dummy placeholder package that only contains empty coverage.process_startup(). # That way, we don't need to patch the usage out of conftest.py. -Source3: coverage-0-py3-none-any.whl +Source4: coverage-0-py3-none-any.whl BuildArch: noarch @@ -93,10 +97,6 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # The same patch is a part of the RPM-packaged python-certifi Patch: dummy-certifi.patch -# https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile -# https://github.com/sethmlarson/truststore/pull/183 -Patch: truststore-pem-path.patch - # pytest-subket has been introduced to intercept network calls # https://github.com/pypa/pip/commit/a4b40f62332ccb3228b12cc5ae1493c75177247a # We don't need a layer to check that, as we're by default in an offline environment @@ -124,23 +124,23 @@ Packages" or "Pip Installs Python". # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt %global bundled() %{expand: Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.3 -Provides: bundled(python%{1}dist(certifi)) = 2025.7.14 +Provides: bundled(python%{1}dist(certifi)) = 2025.10.5 Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 Provides: bundled(python%{1}dist(distlib)) = 0.4 Provides: bundled(python%{1}dist(distro)) = 1.9 Provides: bundled(python%{1}dist(idna)) = 3.10 -Provides: bundled(python%{1}dist(msgpack)) = 1.1.1 +Provides: bundled(python%{1}dist(msgpack)) = 1.1.2 Provides: bundled(python%{1}dist(packaging)) = 25 -Provides: bundled(python%{1}dist(platformdirs)) = 4.3.8 +Provides: bundled(python%{1}dist(platformdirs)) = 4.5 Provides: bundled(python%{1}dist(pygments)) = 2.19.2 Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 -Provides: bundled(python%{1}dist(requests)) = 2.32.4 -Provides: bundled(python%{1}dist(resolvelib)) = 1.2 -Provides: bundled(python%{1}dist(rich)) = 14.1 +Provides: bundled(python%{1}dist(requests)) = 2.32.5 +Provides: bundled(python%{1}dist(resolvelib)) = 1.2.1 +Provides: bundled(python%{1}dist(rich)) = 14.2 Provides: bundled(python%{1}dist(setuptools)) = 70.3 -Provides: bundled(python%{1}dist(tomli)) = 2.2.1 +Provides: bundled(python%{1}dist(tomli)) = 2.3 Provides: bundled(python%{1}dist(tomli-w)) = 1.2 -Provides: bundled(python%{1}dist(truststore)) = 0.10.1 +Provides: bundled(python%{1}dist(truststore)) = 0.10.4 Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 } @@ -175,7 +175,7 @@ BuildRequires: python%{python3_pkgversion}-devel # The minimal version is for bundled provides verification script BuildRequires: python3-rpm-generators >= 11-8 BuildRequires: pyproject-rpm-macros -BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-flit-core BuildRequires: bash-completion BuildRequires: ca-certificates Requires: ca-certificates @@ -229,7 +229,7 @@ sed -Ei '/(--disable-socket|--allow-unix-socket|--allow-hosts=localhost)/d' pypr %if %{with tests} # tests expect wheels in here mkdir tests/data/common_wheels -cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/data/common_wheels +cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} tests/data/common_wheels %endif diff --git a/sources b/sources index 7230ff9..48867fb 100644 --- a/sources +++ b/sources @@ -1,4 +1,5 @@ -SHA512 (pip-25.2.tar.gz) = 5cc65c9091fdda7905e26ce32ddaa3a1c2fd287d69fd3da67c814ba7e8e5be59301d8327c06cdca78c1b95f4a5b5f75c87f36a549022408cc0e8f9411c0db11e +SHA512 (pip-25.3.tar.gz) = f50db092213ec3bb819d3da5669f73d119b5ec7f7ac5e8a587a17c27eafa32bc17a057df09389c526a3769ef3577f5553187d54ceffa89aed63f4b4498ff044e SHA512 (setuptools-79.0.1-py3-none-any.whl) = fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a SHA512 (wheel-0.45.1-py3-none-any.whl) = 86c16248ec804ee0ac95d43b03d47351dceb534d0cdc4025ca1eb073e39e539de44c870b9261f0373144e1537f0e42675a759a318a8d5d346bbd9efcb704061d +SHA512 (flit_core-3.12.0-py3-none-any.whl) = 790c12b1f43201e365fb3f8f2f0a54e1a578876799dfdf8bfeea679a25ea096bf62946d006618c1458ae6e37ce6d00998f37e9aba426d5ab80d32ef2d75da4e0 SHA512 (coverage-0-py3-none-any.whl) = e734192565347010efe68f8ba600254259c9b647f3c553fd4e5d87b1d7f955cb15d6f7d807716f4a6415d239beed945fbec7210feaf502e9cc849c332845926e diff --git a/truststore-pem-path.patch b/truststore-pem-path.patch deleted file mode 100644 index f771a33..0000000 --- a/truststore-pem-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2c8231f03987daaf9524f9568884a7b296480b32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 17 Jul 2025 09:50:35 +0200 -Subject: [PATCH] Fedora 43 removes some symbolic links - -See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile ---- - src/pip/_vendor/truststore/_openssl.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/pip/_vendor/truststore/_openssl.py b/src/pip/_vendor/truststore/_openssl.py -index 9951cf7..3e25a56 100644 ---- a/src/pip/_vendor/truststore/_openssl.py -+++ b/src/pip/_vendor/truststore/_openssl.py -@@ -6,8 +6,10 @@ - - # candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes - _CA_FILE_CANDIDATES = [ -- # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD -+ # Alpine, Arch, Fedora 34-42, OpenWRT, RHEL 9-10, BSD - "/etc/ssl/cert.pem", -+ # Fedora 43+, RHEL 11+ -+ "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", - # Fedora <= 34, RHEL <= 9, CentOS <= 9 - "/etc/pki/tls/cert.pem", - # Debian, Ubuntu (requires ca-certificates)