From 093cb73c53d88868b657774a6337de2504486390 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 16 Feb 2022 08:58:06 +0100 Subject: [PATCH 01/98] Update to 22.0.3 --- python-pip.spec | 39 +++-- ...existing-dist-only-if-path-conflicts.patch | 142 +++++++----------- sources | 2 +- 3 files changed, 80 insertions(+), 103 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f6cc58c..1c63666 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.3.1 +%global base_version 22.0.3 %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. @@ -41,13 +41,16 @@ Summary: A tool for installing and managing Python packages # packaging: ASL 2.0 or BSD # pep517: MIT # progress: ISC +# pygments: BSD # pyparsing: MIT # requests: ASL 2.0 # resolvelib: ISC +# rich: MIT # setuptools: MIT # six: MIT # tenacity: ASL 2.0 # tomli: MIT +# typing-extensions: Python # urllib3: MIT # webencodings: BSD @@ -121,27 +124,30 @@ 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.6 -Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.10 +Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.3 +Provides: bundled(python%{1}dist(distlib)) = 0.3.4 Provides: bundled(python%{1}dist(distro)) = 1.6 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 3.2 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 -Provides: bundled(python%{1}dist(packaging)) = 21 +Provides: bundled(python%{1}dist(idna)) = 3.3 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.3 +Provides: bundled(python%{1}dist(packaging)) = 21.3 Provides: bundled(python%{1}dist(pep517)) = 0.12 -Provides: bundled(python%{1}dist(platformdirs)) = 2.4 +Provides: bundled(python%{1}dist(platformdirs)) = 2.4.1 Provides: bundled(python%{1}dist(progress)) = 1.6 -Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.26 -Provides: bundled(python%{1}dist(resolvelib)) = 0.8 +Provides: bundled(python%{1}dist(pygments)) = 2.11.2 +Provides: bundled(python%{1}dist(pyparsing)) = 3.0.7 +Provides: bundled(python%{1}dist(requests)) = 2.27.1 +Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 +Provides: bundled(python%{1}dist(rich)) = 11 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 Provides: bundled(python%{1}dist(tomli)) = 1.0.3 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.7 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.0.1 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.8 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -184,6 +190,7 @@ 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 %endif BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: ca-certificates @@ -359,13 +366,11 @@ pytest_k='not completion and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha' -# test_pep517 and test_pep660 are ignored entirely, as they import tomli_w and we don't have that packaged yet # --deselect'ed 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 %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --ignore tests/functional/test_pep660.py --ignore tests/functional/test_pep517.py \ --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py %endif @@ -402,6 +407,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 7ff95e5..8f1e1b0 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,14 +1,12 @@ -From 517656ed4520b09ac6365467e459778f94ca2f0c Mon Sep 17 00:00:00 2001 -From: Karolina Surma -Date: Mon, 10 May 2021 18:16:20 +0200 +From d4c72aa37d16e19c0f157e86203a66cad32a9c80 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under - /usr/lib + /usr/lib when pip install --upgrade is executed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -when pip install --upgrade is executed. - Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian @@ -16,59 +14,74 @@ Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok +Co-Authored-By: Karolina Surma --- - src/pip/_internal/req/req_install.py | 3 ++- - src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/resolution/resolvelib/factory.py | 13 +++++++++++++ - src/pip/_internal/utils/misc.py | 11 +++++++++++ - 4 files changed, 30 insertions(+), 2 deletions(-) + src/pip/_internal/metadata/base.py | 12 +++++++++++- + src/pip/_internal/req/req_install.py | 2 +- + src/pip/_internal/resolution/legacy/resolver.py | 4 +++- + src/pip/_internal/resolution/resolvelib/factory.py | 12 ++++++++++++ + 4 files changed, 27 insertions(+), 3 deletions(-) +diff --git a/src/pip/_internal/metadata/base.py b/src/pip/_internal/metadata/base.py +index 1a5a781..3df4ab2 100644 +--- a/src/pip/_internal/metadata/base.py ++++ b/src/pip/_internal/metadata/base.py +@@ -24,7 +24,7 @@ from pip._vendor.packaging.utils import NormalizedName + from pip._vendor.packaging.version import LegacyVersion, Version + + from pip._internal.exceptions import NoneMetadataError +-from pip._internal.locations import site_packages, user_site ++from pip._internal.locations import get_scheme, site_packages, user_site + from pip._internal.models.direct_url import ( + DIRECT_URL_METADATA_NAME, + DirectUrl, +@@ -441,6 +441,16 @@ class BaseDistribution(Protocol): + or self._iter_declared_entries_from_legacy() + ) + ++ @property ++ def in_install_path(self) -> bool: ++ """ ++ Return True if given Distribution is installed in ++ path matching distutils_scheme layout. ++ """ ++ norm_path = normalize_path(self.installed_location) ++ return norm_path.startswith(normalize_path( ++ get_scheme("").purelib.split('python')[0])) ++ + + 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 ff0dd2f..a72aec8 100644 +index 02dbda1..a952357 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -46,6 +46,7 @@ from pip._internal.utils.misc import ( - ask_path_exists, - backup_dir, - display_path, -+ dist_in_install_path, - dist_in_site_packages, - dist_in_usersite, - get_distribution, -@@ -433,7 +434,7 @@ class InstallRequirement: - existing_dist.project_name, existing_dist.location - ) +@@ -406,7 +406,7 @@ class InstallRequirement: + f"lack sys.path precedence to {existing_dist.raw_name} " + f"in {existing_dist.location}" ) - else: -+ elif dist_in_install_path(existing_dist): ++ elif existing_dist.in_install_path: self.should_reinstall = True else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 09caaa6..c1542ec 100644 +index 8c149d4..a944906 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -44,6 +44,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid - from pip._internal.utils.compatibility_tags import get_supported - from pip._internal.utils.logging import indent_log - from pip._internal.utils.misc import dist_in_usersite, normalize_version_info -+from pip._internal.utils.misc import dist_in_install_path - from pip._internal.utils.packaging import check_requires_python - - logger = logging.getLogger(__name__) -@@ -203,7 +204,9 @@ class Resolver(BaseResolver): +@@ -203,7 +203,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. -- if not self.use_user_site or dist_in_usersite(req.satisfied_by): +- if not self.use_user_site or req.satisfied_by.in_usersite: + if ((not self.use_user_site -+ or dist_in_usersite(req.satisfied_by)) -+ and dist_in_install_path(req.satisfied_by)): ++ or req.satisfied_by.in_usersite) ++ and req.satisfied_by.in_install_path): req.should_reinstall = True req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 766dc26..c8c1cd8 100644 +index 261d8d5..d1b7728 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -80,32 +93,16 @@ index 766dc26..c8c1cd8 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -33,6 +34,7 @@ from pip._internal.exceptions import ( - UnsupportedWheel, - ) - from pip._internal.index.package_finder import PackageFinder -+from pip._internal.locations import get_scheme - from pip._internal.metadata import BaseDistribution, get_default_environment - from pip._internal.models.link import Link - from pip._internal.models.wheel import Wheel -@@ -45,6 +47,7 @@ from pip._internal.req.req_install import ( - from pip._internal.resolution.base import InstallRequirementProvider - from pip._internal.utils.compatibility_tags import get_supported - from pip._internal.utils.hashes import Hashes -+from pip._internal.utils.misc import dist_location - from pip._internal.utils.packaging import get_requirement - from pip._internal.utils.virtualenv import running_under_virtualenv - -@@ -526,6 +529,16 @@ class Factory: +@@ -564,6 +566,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None + # Prevent uninstalling packages from /usr + try: -+ if dist_location(dist._dist) in ( ++ if dist.installed_location in ( + sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), + sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ ): ++ ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet + pass @@ -113,35 +110,6 @@ index 766dc26..c8c1cd8 100644 # We're installing into global site. The current installation must # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py -index d3e9053..d25d1c3 100644 ---- a/src/pip/_internal/utils/misc.py -+++ b/src/pip/_internal/utils/misc.py -@@ -38,6 +38,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed - from pip import __version__ - from pip._internal.exceptions import CommandError - from pip._internal.locations import get_major_minor_version, site_packages, user_site -+from pip._internal.locations import get_scheme - from pip._internal.utils.compat import WINDOWS - from pip._internal.utils.egg_link import egg_link_path_from_location - from pip._internal.utils.virtualenv import running_under_virtualenv -@@ -354,6 +355,16 @@ def dist_in_site_packages(dist: Distribution) -> bool: - return dist_location(dist).startswith(normalize_path(site_packages)) - - -+def dist_in_install_path(dist): -+ """ -+ Return True if given Distribution is installed in -+ path matching distutils_scheme layout. -+ """ -+ norm_path = normalize_path(dist_location(dist)) -+ return norm_path.startswith(normalize_path( -+ get_scheme("").purelib.split('python')[0])) -+ -+ - def get_distribution(req_name: str) -> Optional[Distribution]: - """Given a requirement name, return the installed Distribution object. - -- -2.32.0 +2.35.1 diff --git a/sources b/sources index a6223f9..9efd73f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.3.1.tar.gz) = 2f50f95fe36cffc18821a70824f5b28d03598894f9ea5b02acc4921d16fc7739131814828a2159bcd577331cc780c7776a3669fa1ca2d4690c861add10a16f00 +SHA512 (pip-22.0.3.tar.gz) = 05f0807b298c2136842ad1cae3b003f81d85ca79103f12171e4c8d020d6add076848c1acfb6442c4ae2da6b834de0e87dffaec7bd24dfc403372cead94949326 From 590775acbf1549cd3cbfe022b8d15c7b7428cb40 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 21 Mar 2022 10:17:04 +0100 Subject: [PATCH 02/98] Update to 22.0.4 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 1c63666..25b8f85 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.0.3 +%global base_version 22.0.4 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -128,7 +128,7 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.10 Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.4 +Provides: bundled(python%{1}dist(distlib)) = 0.3.3 Provides: bundled(python%{1}dist(distro)) = 1.6 Provides: bundled(python%{1}dist(html5lib)) = 1.1 Provides: bundled(python%{1}dist(idna)) = 3.3 @@ -407,6 +407,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 diff --git a/sources b/sources index 9efd73f..7bec17a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.0.3.tar.gz) = 05f0807b298c2136842ad1cae3b003f81d85ca79103f12171e4c8d020d6add076848c1acfb6442c4ae2da6b834de0e87dffaec7bd24dfc403372cead94949326 +SHA512 (pip-22.0.4.tar.gz) = af6d1787b4fe97f2eec9c2e3e3f0f756efca8cb83f6ecdae797986fb6050ee60d872a8a8eb7502a32c4334fc0c7af8cf3c58ce980407d0e9f89eec28a4290093 From 1963d79695cd8faa193a49543b2b749be95cc172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Wed, 27 Apr 2022 08:27:55 +0200 Subject: [PATCH 03/98] Remove patch numbering --- python-pip.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 25b8f85..b5d0530 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -73,21 +73,21 @@ BuildRequires: python-wheel-wheel # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 # Could be replaced with https://www.python.org/dev/peps/pep-0668/ -Patch3: remove-existing-dist-only-if-path-conflicts.patch +Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 -Patch4: dummy-certifi.patch +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. -Patch5: nowarn-pip._internal.main.patch +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 -Patch6: no-version-warning.patch +Patch: no-version-warning.patch # Downstream only patch # Users might have local installations of pip from using From 5a8c8943b07514f993a08b4db2a021769da2dc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Tue, 26 Apr 2022 12:26:29 +0200 Subject: [PATCH 04/98] Fallback to pep517 if setup.py is present and setuptools cannot be imported --- 452d7da880.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 10 ++++++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 452d7da880.patch diff --git a/452d7da880.patch b/452d7da880.patch new file mode 100644 index 0000000..9333f7e --- /dev/null +++ b/452d7da880.patch @@ -0,0 +1,76 @@ +From 452d7da8801ca318f280bd1c1085c60b0b6f747f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Sat, 23 Apr 2022 16:56:59 +0200 +Subject: [PATCH] Fallback to pyproject.toml-based builds if setuptools cannot + be imported (#10717) + +This fallback is only triggered if the project has a `setup.py` file. + +Co-authored-by: Tzu-ping Chung +Co-authored-by: Pradyun Gedam +--- + news/10717.bugfix.rst | 1 + + src/pip/_internal/cli/cmdoptions.py | 7 +++++++ + src/pip/_internal/pyproject.py | 11 +++++++++-- + 3 files changed, 17 insertions(+), 2 deletions(-) + create mode 100644 news/10717.bugfix.rst + +diff --git a/news/10717.bugfix.rst b/news/10717.bugfix.rst +new file mode 100644 +index 00000000000..950a4521763 +--- /dev/null ++++ b/news/10717.bugfix.rst +@@ -0,0 +1 @@ ++Fallback to pyproject.toml-based builds if ``setup.py`` is present in a project, but ``setuptools`` cannot be imported. +diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py +index cd1e8a00f63..91b94e3028c 100644 +--- a/src/pip/_internal/cli/cmdoptions.py ++++ b/src/pip/_internal/cli/cmdoptions.py +@@ -10,6 +10,7 @@ + # The following comment should be removed at some point in the future. + # mypy: strict-optional=False + ++import importlib.util + import logging + import os + import textwrap +@@ -770,6 +771,12 @@ def _handle_no_use_pep517( + """ + raise_option_error(parser, option=option, msg=msg) + ++ # If user doesn't wish to use pep517, we check if setuptools is installed ++ # and raise error if it is not. ++ if not importlib.util.find_spec("setuptools"): ++ msg = "It is not possible to use --no-use-pep517 without setuptools installed." ++ raise_option_error(parser, option=option, msg=msg) ++ + # Otherwise, --no-use-pep517 was passed via the command-line. + parser.values.use_pep517 = False + +diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py +index e183eaf8658..1e9119f3e5c 100644 +--- a/src/pip/_internal/pyproject.py ++++ b/src/pip/_internal/pyproject.py +@@ -1,3 +1,4 @@ ++import importlib.util + import os + from collections import namedtuple + from typing import Any, List, Optional +@@ -89,9 +90,15 @@ def load_pyproject_toml( + + # If we haven't worked out whether to use PEP 517 yet, + # and the user hasn't explicitly stated a preference, +- # we do so if the project has a pyproject.toml file. ++ # we do so if the project has a pyproject.toml file ++ # or if we cannot import setuptools. ++ ++ # We fallback to PEP 517 when without setuptools, ++ # so setuptools can be installed as a default build backend. ++ # For more info see: ++ # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9 + elif use_pep517 is None: +- use_pep517 = has_pyproject ++ use_pep517 = has_pyproject or not importlib.util.find_spec("setuptools") + + # At this point, we know whether we're going to use PEP 517. + assert use_pep517 is not None diff --git a/python-pip.spec b/python-pip.spec index b5d0530..49e487b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,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. @@ -89,6 +89,10 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Fallback to pep517 if setup.py is present and setuptools cannot be imported +# https://bugzilla.redhat.com/show_bug.cgi?id=2020635 +Patch: https://github.com/pypa/pip/commit/452d7da880.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -407,6 +411,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 From b0f90f583c8888767d6f2c27380793a3c2bf27ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 27 Apr 2022 10:30:20 +0200 Subject: [PATCH 05/98] Spaces: Align all patches definitions consistently --- python-pip.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 49e487b..4517d23 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -73,21 +73,21 @@ BuildRequires: python-wheel-wheel # when pip install -U is executed. # https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24 # Could be replaced with https://www.python.org/dev/peps/pep-0668/ -Patch: remove-existing-dist-only-if-path-conflicts.patch +Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 -Patch: dummy-certifi.patch +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 +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 +Patch: no-version-warning.patch # Fallback to pep517 if setup.py is present and setuptools cannot be imported # https://bugzilla.redhat.com/show_bug.cgi?id=2020635 From 9f67b4d1a38f843f2cee843f2925ff600245625c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 13:19:54 +0200 Subject: [PATCH 06/98] Bootstrap for Python 3.11 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 4517d23..c5b639b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,3 +1,5 @@ +%global _without_doc 1 +%global _without_tests 1 # The original RHEL 9 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. @@ -21,7 +23,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. @@ -411,6 +413,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 From 2c59c720fb881fd12eebeba92bf3bd5f0ee0ef6e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 15 Jun 2022 15:03:57 +0200 Subject: [PATCH 07/98] Rebuilt for Python 3.11 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index c5b639b..cb487a5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,5 +1,3 @@ -%global _without_doc 1 -%global _without_tests 1 # The original RHEL 9 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. @@ -23,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. @@ -413,6 +411,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 From d6c837fe66f089d35df5de41de834136713a48f6 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 29 Jun 2022 15:34:21 +0200 Subject: [PATCH 08/98] Fedora CI: Fix Python 3.10 and 3.11 --- tests/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index a543138..8f0a5de 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -78,8 +78,8 @@ - python3.7 - python3.8 - python3.9 - - python3.10 - - python3.11 + - python3.10-devel + - python3.11-devel - python2-devel - python3-devel - python3-tox From 3e8bb707575713cdafb08561083c2883632f02fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 20:50:51 +0000 Subject: [PATCH 09/98] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_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 cb487a5..cbcc5c5 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,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. @@ -411,6 +411,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 From 6300db47baa42ea4e648483392dbc90976af2a35 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 29 Jun 2022 02:26:42 +0200 Subject: [PATCH 10/98] Update to 22.2 Resolves: rhbz#2109468 --- 452d7da880.patch | 76 ------------------- dummy-certifi.patch | 22 +++--- nowarn-pip._internal.main.patch | 18 +++-- python-pip.spec | 47 +++++------- ...existing-dist-only-if-path-conflicts.patch | 26 +++---- sources | 2 +- 6 files changed, 56 insertions(+), 135 deletions(-) delete mode 100644 452d7da880.patch diff --git a/452d7da880.patch b/452d7da880.patch deleted file mode 100644 index 9333f7e..0000000 --- a/452d7da880.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 452d7da8801ca318f280bd1c1085c60b0b6f747f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= -Date: Sat, 23 Apr 2022 16:56:59 +0200 -Subject: [PATCH] Fallback to pyproject.toml-based builds if setuptools cannot - be imported (#10717) - -This fallback is only triggered if the project has a `setup.py` file. - -Co-authored-by: Tzu-ping Chung -Co-authored-by: Pradyun Gedam ---- - news/10717.bugfix.rst | 1 + - src/pip/_internal/cli/cmdoptions.py | 7 +++++++ - src/pip/_internal/pyproject.py | 11 +++++++++-- - 3 files changed, 17 insertions(+), 2 deletions(-) - create mode 100644 news/10717.bugfix.rst - -diff --git a/news/10717.bugfix.rst b/news/10717.bugfix.rst -new file mode 100644 -index 00000000000..950a4521763 ---- /dev/null -+++ b/news/10717.bugfix.rst -@@ -0,0 +1 @@ -+Fallback to pyproject.toml-based builds if ``setup.py`` is present in a project, but ``setuptools`` cannot be imported. -diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py -index cd1e8a00f63..91b94e3028c 100644 ---- a/src/pip/_internal/cli/cmdoptions.py -+++ b/src/pip/_internal/cli/cmdoptions.py -@@ -10,6 +10,7 @@ - # The following comment should be removed at some point in the future. - # mypy: strict-optional=False - -+import importlib.util - import logging - import os - import textwrap -@@ -770,6 +771,12 @@ def _handle_no_use_pep517( - """ - raise_option_error(parser, option=option, msg=msg) - -+ # If user doesn't wish to use pep517, we check if setuptools is installed -+ # and raise error if it is not. -+ if not importlib.util.find_spec("setuptools"): -+ msg = "It is not possible to use --no-use-pep517 without setuptools installed." -+ raise_option_error(parser, option=option, msg=msg) -+ - # Otherwise, --no-use-pep517 was passed via the command-line. - parser.values.use_pep517 = False - -diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py -index e183eaf8658..1e9119f3e5c 100644 ---- a/src/pip/_internal/pyproject.py -+++ b/src/pip/_internal/pyproject.py -@@ -1,3 +1,4 @@ -+import importlib.util - import os - from collections import namedtuple - from typing import Any, List, Optional -@@ -89,9 +90,15 @@ def load_pyproject_toml( - - # If we haven't worked out whether to use PEP 517 yet, - # and the user hasn't explicitly stated a preference, -- # we do so if the project has a pyproject.toml file. -+ # we do so if the project has a pyproject.toml file -+ # or if we cannot import setuptools. -+ -+ # We fallback to PEP 517 when without setuptools, -+ # so setuptools can be installed as a default build backend. -+ # For more info see: -+ # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9 - elif use_pep517 is None: -- use_pep517 = has_pyproject -+ use_pep517 = has_pyproject or not importlib.util.find_spec("setuptools") - - # At this point, we know whether we're going to use PEP 517. - assert use_pep517 is not None diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 459eada..a691cad 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,4 +1,4 @@ -From 2c58d7301dd5a47570f782fe2fce7fbb1918f60c Mon Sep 17 00:00:00 2001 +From cacd6d2fa9a27b29415a4ce25d76406fe69fc398 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 16:38:50 +0200 Subject: [PATCH] Dummy certifi patch @@ -9,28 +9,28 @@ Co-Authored-By: Tomas Hrnciar 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index b8140cf..f1a0b01 100644 +index f34045b..a2ada08 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py @@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): - - + + try: + raise ImportError # force fallback # Return a certificate file on disk for a standalone pip zipapp running in # an isolated build environment to use. Passing --cert to the standalone # pip does not work since requests calls where() unconditionally on import. -@@ -67,9 +68,7 @@ except ImportError: +@@ -75,9 +76,7 @@ except ImportError: # 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(): + def where() -> str: - f = os.path.dirname(__file__) - - return os.path.join(f, "cacert.pem") + return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents(): --- -2.30.2 + + + def contents() -> str: +-- +2.35.3 diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 1490643..68f5971 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,4 +1,4 @@ -From 619782ad2d181fe2933ddf4edc7127fdc13dd0df Mon Sep 17 00:00:00 2001 +From 8dd3793d1bab226cec9c5c49b01718a9634bc403 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 16:48:49 +0200 Subject: [PATCH] Don't warn the user about pip._internal.main() entrypoint @@ -24,11 +24,11 @@ index 6afb5c6..faf25af 100755 - 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 1504a12..07d941b 100644 +index f292c64..2e29a5e 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py -@@ -4,7 +4,7 @@ from typing import List, Optional - from pip._internal.cli.main import main +@@ -20,7 +20,7 @@ if WINDOWS: + ] -def _wrapper(args: Optional[List[str]] = None) -> int: @@ -36,7 +36,7 @@ index 1504a12..07d941b 100644 """Central wrapper for all old entrypoints. Historically pip has had several entrypoints defined. Because of issues -@@ -16,12 +16,13 @@ def _wrapper(args: Optional[List[str]] = None) -> int: +@@ -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. """ @@ -58,11 +58,13 @@ index 1504a12..07d941b 100644 + "running pip directly.\n" + ) return main(args) + + diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py -index e416315..7f57f67 100644 +index 3e85703..f86c392 100644 --- a/tests/functional/test_cli.py +++ b/tests/functional/test_cli.py -@@ -31,4 +31,5 @@ def test_entrypoints_work(entrypoint, script): +@@ -43,4 +43,5 @@ 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 @@ -70,5 +72,5 @@ index e416315..7f57f67 100644 + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr -- -2.32.0 +2.35.3 diff --git a/python-pip.spec b/python-pip.spec index cbcc5c5..b3307f2 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.0.4 +%global base_version 22.2 %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: 5%{?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. @@ -89,10 +89,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Fallback to pep517 if setup.py is present and setuptools cannot be imported -# https://bugzilla.redhat.com/show_bug.cgi?id=2020635 -Patch: https://github.com/pypa/pip/commit/452d7da880.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -128,30 +124,28 @@ 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.10 -Provides: bundled(python%{1}dist(certifi)) = 2021.10.8 -Provides: bundled(python%{1}dist(chardet)) = 4 -Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.3 -Provides: bundled(python%{1}dist(distro)) = 1.6 -Provides: bundled(python%{1}dist(html5lib)) = 1.1 +Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.11 +Provides: bundled(python%{1}dist(certifi)) = 2022.6.15 +Provides: bundled(python%{1}dist(chardet)) = 5 +Provides: bundled(python%{1}dist(colorama)) = 0.4.5 +Provides: bundled(python%{1}dist(distlib)) = 0.3.5 +Provides: bundled(python%{1}dist(distro)) = 1.7 Provides: bundled(python%{1}dist(idna)) = 3.3 -Provides: bundled(python%{1}dist(msgpack)) = 1.0.3 +Provides: bundled(python%{1}dist(msgpack)) = 1.0.4 Provides: bundled(python%{1}dist(packaging)) = 21.3 Provides: bundled(python%{1}dist(pep517)) = 0.12 -Provides: bundled(python%{1}dist(platformdirs)) = 2.4.1 -Provides: bundled(python%{1}dist(progress)) = 1.6 -Provides: bundled(python%{1}dist(pygments)) = 2.11.2 -Provides: bundled(python%{1}dist(pyparsing)) = 3.0.7 -Provides: bundled(python%{1}dist(requests)) = 2.27.1 +Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 +Provides: bundled(python%{1}dist(pygments)) = 2.12 +Provides: bundled(python%{1}dist(pyparsing)) = 3.0.9 +Provides: bundled(python%{1}dist(requests)) = 2.28.1 Provides: bundled(python%{1}dist(resolvelib)) = 0.8.1 -Provides: bundled(python%{1}dist(rich)) = 11 +Provides: bundled(python%{1}dist(rich)) = 12.5.1 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 -Provides: bundled(python%{1}dist(tomli)) = 1.0.3 -Provides: bundled(python%{1}dist(typing-extensions)) = 4.0.1 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.8 +Provides: bundled(python%{1}dist(tomli)) = 2.0.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.3 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.10 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -270,9 +264,6 @@ sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here ln -s %{python_wheel_dir} tests/data/common_wheels -# Remove shebang from files in bundled chardet -grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d" - # Remove windows executable binaries rm -v src/pip/_vendor/distlib/*.exe sed -i '/\.exe/d' setup.py @@ -411,6 +402,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 8f1e1b0..d4497fd 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From d4c72aa37d16e19c0f157e86203a66cad32a9c80 Mon Sep 17 00:00:00 2001 +From 2c3f3a590ddfc151a456b44a5f96f0f603d178e9 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 16 Feb 2022 08:36:21 +0100 Subject: [PATCH] Prevent removing of the system packages installed under @@ -23,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 1a5a781..3df4ab2 100644 +index 151fd6d..f9109cd 100644 --- a/src/pip/_internal/metadata/base.py +++ b/src/pip/_internal/metadata/base.py -@@ -24,7 +24,7 @@ from pip._vendor.packaging.utils import NormalizedName +@@ -28,7 +28,7 @@ from pip._vendor.packaging.utils import NormalizedName from pip._vendor.packaging.version import LegacyVersion, Version from pip._internal.exceptions import NoneMetadataError @@ -35,9 +35,9 @@ index 1a5a781..3df4ab2 100644 from pip._internal.models.direct_url import ( DIRECT_URL_METADATA_NAME, DirectUrl, -@@ -441,6 +441,16 @@ class BaseDistribution(Protocol): - or self._iter_declared_entries_from_legacy() - ) +@@ -560,6 +560,16 @@ class BaseDistribution(Protocol): + for extra in self._iter_egg_info_extras(): + metadata["Provides-Extra"] = extra + @property + def in_install_path(self) -> bool: @@ -53,10 +53,10 @@ index 1a5a781..3df4ab2 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 02dbda1..a952357 100644 +index a1e376c..ed7facf 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -406,7 +406,7 @@ class InstallRequirement: +@@ -416,7 +416,7 @@ class InstallRequirement: f"lack sys.path precedence to {existing_dist.raw_name} " f"in {existing_dist.location}" ) @@ -66,10 +66,10 @@ index 02dbda1..a952357 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 8c149d4..a944906 100644 +index fb49d41..040f2c1 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -203,7 +203,9 @@ class Resolver(BaseResolver): +@@ -325,7 +325,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -81,7 +81,7 @@ index 8c149d4..a944906 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index 261d8d5..d1b7728 100644 +index a4c24b5..e7e2da9 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,8 @@ @@ -93,7 +93,7 @@ index 261d8d5..d1b7728 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -564,6 +566,16 @@ class Factory: +@@ -549,6 +551,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -111,5 +111,5 @@ index 261d8d5..d1b7728 100644 # be uninstalled, no matter it's in global or user site, because the # user site installation has precedence over global. -- -2.35.1 +2.35.3 diff --git a/sources b/sources index 7bec17a..05a18a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.0.4.tar.gz) = af6d1787b4fe97f2eec9c2e3e3f0f756efca8cb83f6ecdae797986fb6050ee60d872a8a8eb7502a32c4334fc0c7af8cf3c58ce980407d0e9f89eec28a4290093 +SHA512 (pip-22.2.tar.gz) = 2ff3f9c2dc84c65c14c978e8c58cd3cee6cfff9753655c726763d6d7780d147479f32c47873d402ad9e0821fef940b971a7df93fabd6b998f07dea5af1251c9b From 9361272bc97f6d8a01ae9ccda41feafefcf78d57 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Sat, 6 Aug 2022 02:50:54 +0200 Subject: [PATCH 11/98] Update to 22.2.2 Resolves: rhbz#2109468 --- python-pip.spec | 7 ++++++- sources | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index b3307f2..760c297 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.2 +%global base_version 22.2.2 %global upstream_version %{base_version}%{?prerel} %global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl @@ -189,6 +189,7 @@ 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: ca-certificates @@ -402,6 +403,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 diff --git a/sources b/sources index 05a18a7..026b677 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.2.tar.gz) = 2ff3f9c2dc84c65c14c978e8c58cd3cee6cfff9753655c726763d6d7780d147479f32c47873d402ad9e0821fef940b971a7df93fabd6b998f07dea5af1251c9b +SHA512 (pip-22.2.2.tar.gz) = bd59e28b55475b77a8f11ea771cbad3b2602ff974e219f9a55288963a9522c9279a5b00fde40fb65cfebefae0e905d3da3c06fe50b402aa5326b25f70a98a015 From ca7bb6bb4834f26a3586521afa948efe4fa9f963 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 5 Sep 2022 16:01:11 +0200 Subject: [PATCH 12/98] Fix crash when an empty dist-info/egg-info is present Resolves: rhbz#2115001 --- bad-metadata-fix.patch | 92 ++++++++++++++++++++++++++++++++++++++++++ python-pip.spec | 11 ++++- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 bad-metadata-fix.patch diff --git a/bad-metadata-fix.patch b/bad-metadata-fix.patch new file mode 100644 index 0000000..740dc71 --- /dev/null +++ b/bad-metadata-fix.patch @@ -0,0 +1,92 @@ +From 6817fbfb1fd389ad61009f0199db5670b146c8d3 Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Sat, 6 Aug 2022 06:18:59 +0800 +Subject: [PATCH] Skip dist if metadata does not have a valid name + +--- + news/11352.bugfix.rst | 2 ++ + src/pip/_internal/metadata/importlib/_compat.py | 14 +++++++++++++- + src/pip/_internal/metadata/importlib/_envs.py | 14 +++++++++++--- + 3 files changed, 26 insertions(+), 4 deletions(-) + create mode 100644 news/11352.bugfix.rst + +diff --git a/news/11352.bugfix.rst b/news/11352.bugfix.rst +new file mode 100644 +index 00000000000..78016c912ef +--- /dev/null ++++ b/news/11352.bugfix.rst +@@ -0,0 +1,2 @@ ++Ignore distributions with invalid ``Name`` in metadata instead of crashing, when ++using the ``importlib.metadata`` backend. +diff --git a/src/pip/_internal/metadata/importlib/_compat.py b/src/pip/_internal/metadata/importlib/_compat.py +index e0879807ab9..593bff23ede 100644 +--- a/src/pip/_internal/metadata/importlib/_compat.py ++++ b/src/pip/_internal/metadata/importlib/_compat.py +@@ -2,6 +2,15 @@ + from typing import Any, Optional, Protocol, cast + + ++class BadMetadata(ValueError): ++ def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None: ++ self.dist = dist ++ self.reason = reason ++ ++ def __str__(self) -> str: ++ return f"Bad metadata in {self.dist} ({self.reason})" ++ ++ + class BasePath(Protocol): + """A protocol that various path objects conform. + +@@ -40,4 +49,7 @@ def get_dist_name(dist: importlib.metadata.Distribution) -> str: + The ``name`` attribute is only available in Python 3.10 or later. We are + targeting exactly that, but Mypy does not know this. + """ +- return cast(Any, dist).name ++ name = cast(Any, dist).name ++ if not isinstance(name, str): ++ raise BadMetadata(dist, reason="invalid metadata entry 'name'") ++ return name +diff --git a/src/pip/_internal/metadata/importlib/_envs.py b/src/pip/_internal/metadata/importlib/_envs.py +index d5fcfdbfef2..cbec59e2c6d 100644 +--- a/src/pip/_internal/metadata/importlib/_envs.py ++++ b/src/pip/_internal/metadata/importlib/_envs.py +@@ -1,5 +1,6 @@ + import functools + import importlib.metadata ++import logging + import os + import pathlib + import sys +@@ -14,9 +15,11 @@ + from pip._internal.utils.deprecation import deprecated + from pip._internal.utils.filetypes import WHEEL_EXTENSION + +-from ._compat import BasePath, get_dist_name, get_info_location ++from ._compat import BadMetadata, BasePath, get_dist_name, get_info_location + from ._dists import Distribution + ++logger = logging.getLogger(__name__) ++ + + def _looks_like_wheel(location: str) -> bool: + if not location.endswith(WHEEL_EXTENSION): +@@ -56,11 +59,16 @@ def _find_impl(self, location: str) -> Iterator[FoundResult]: + # To know exactly where we find a distribution, we have to feed in the + # paths one by one, instead of dumping the list to importlib.metadata. + for dist in importlib.metadata.distributions(path=[location]): +- normalized_name = canonicalize_name(get_dist_name(dist)) ++ info_location = get_info_location(dist) ++ try: ++ raw_name = get_dist_name(dist) ++ except BadMetadata as e: ++ logger.warning("Skipping %s due to %s", info_location, e.reason) ++ continue ++ normalized_name = canonicalize_name(raw_name) + if normalized_name in self._found_names: + continue + self._found_names.add(normalized_name) +- info_location = get_info_location(dist) + yield dist, info_location + + def find(self, location: str) -> Iterator[BaseDistribution]: diff --git a/python-pip.spec b/python-pip.spec index 760c297..5beca9a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,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. @@ -89,6 +89,11 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch +# Ignore distributions with invalid name in metadata instead of crashing, when +# using the importlib.metadata backend. +# Resolved upstream: https://github.com/pypa/pip/pull/11353 +Patch: bad-metadata-fix.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -403,6 +408,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Mon Sep 05 2022 Charalampos Stratakis - 22.2.2-2 +- Fix crash when an empty dist-info/egg-info is present +Resolves: rhbz#2115001 + * Wed Aug 03 2022 Charalampos Stratakis - 22.2.2-1 - Update to 22.2.2 Resolves: rhbz#2109468 From a2dfa8738eef692a34a22cd3de5a24a197b706e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 Sep 2022 16:07:45 +0200 Subject: [PATCH 13/98] No longer use the rpm_install prefix to determine RPM-installed packages In https://src.fedoraproject.org/rpms/python3.11/c/d75ca77a64 the rpm_prefix scheme stopped being interesting. Instead, we make sure to properly set both {base} and {platbase} variables which was subtly wrong before. --- python-pip.spec | 10 +++++----- remove-existing-dist-only-if-path-conflicts.patch | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 5beca9a..1817621 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -214,10 +214,8 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# The python3.10 version that added the rpm_prefix sysconfig install scheme -# This pip can also function with the previous version, -# but it would remove RPM-installed packages during sudo pip install --upgrade. -Requires: python3-libs >= 3.10.0-2 +# The python3.11 version that stopped using the rpm_prefix scheme +Requires: python3-libs >= 3.11.0~rc1-2 %{crypt_compat_recommends 3} @@ -408,9 +406,11 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog -* Mon Sep 05 2022 Charalampos Stratakis - 22.2.2-2 +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index d4497fd..3a9ea25 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -100,8 +100,8 @@ index a4c24b5..e7e2da9 100644 + # Prevent uninstalling packages from /usr + try: + if dist.installed_location in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('purelib', scheme='posix_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet From 9c645a0ab6052c6a2027f8971c15ace14cfa54e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 Sep 2022 14:07:45 +0000 Subject: [PATCH 14/98] No longer use the rpm_install prefix to determine RPM-installed packages In https://src.fedoraproject.org/rpms/python3.11/c/d75ca77a64 the rpm_prefix scheme stopped being interesting. Instead, we make sure to properly set both {base} and {platbase} variables which was subtly wrong before. --- python-pip.spec | 12 +++++++----- remove-existing-dist-only-if-path-conflicts.patch | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f6cc58c..8fad97a 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. @@ -203,10 +203,8 @@ Recommends: python%{python3_pkgversion}-setuptools Provides: pip = %{version}-%{release} Conflicts: python-pip < %{version}-%{release} -# The python3.10 version that added the rpm_prefix sysconfig install scheme -# This pip can also function with the previous version, -# but it would remove RPM-installed packages during sudo pip install --upgrade. -Requires: python3-libs >= 3.10.0-2 +# The python3.10 version that stopped using the rpm_prefix scheme +Requires: python3-libs >= 3.10.6-2 %{crypt_compat_recommends 3} @@ -402,6 +400,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Tue Sep 06 2022 Miro Hrončok - 21.3.1-3 +- No longer use the rpm_install prefix to determine RPM-installed packages +- Related: rhbz#2026979 + * Fri Jan 21 2022 Fedora Release Engineering - 21.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 7ff95e5..a1265a0 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -103,8 +103,8 @@ index 766dc26..c8c1cd8 100644 + # Prevent uninstalling packages from /usr + try: + if dist_location(dist._dist) in ( -+ sysconfig.get_path('purelib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), -+ sysconfig.get_path('platlib', scheme='rpm_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('purelib', scheme='posix_prefix', vars={'base': sys.base_prefix}), ++ sysconfig.get_path('platlib', scheme='posix_prefix', vars={'platbase': sys.base_prefix}), + ): + return None + except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet From 7715939f2fce8cdb7382702114a4b2ca5dc3aab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 16 Nov 2022 01:03:03 +0100 Subject: [PATCH 15/98] Make python-pip-wheel compatible with Python 3.12.0a2+ Avoid importing distutils globally, backported from pip 22.3. --- avoid-importing-distutils-globally.patch | 260 +++++++++++++++++++++++ python-pip.spec | 14 +- 2 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 avoid-importing-distutils-globally.patch diff --git a/avoid-importing-distutils-globally.patch b/avoid-importing-distutils-globally.patch new file mode 100644 index 0000000..dfee223 --- /dev/null +++ b/avoid-importing-distutils-globally.patch @@ -0,0 +1,260 @@ +From 572694adc951836c60a92fe38c8612ad06a09da3 Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Mon, 18 Jul 2022 04:48:31 +0800 +Subject: [PATCH] Avoid importing distutils globally +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The distutils module is deprecated in 3.11 so we should avoid importing +it unless absolutely necessary to avoid emitting superfulous warnings. + +Rebased from https://github.com/pypa/pip/commit/0e06452530 + +Also includes: Import distutils only if needed, but sooner + +Rebased from: https://github.com/pypa/pip/commit/db47515958 + +Co-Authored-By: Stéphane Bidoul +--- + src/pip/_internal/locations/__init__.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/pip/_internal/locations/__init__.py b/src/pip/_internal/locations/__init__.py +index dba182d..4cb45dc 100644 +--- a/src/pip/_internal/locations/__init__.py ++++ b/src/pip/_internal/locations/__init__.py +@@ -11,7 +11,7 @@ from pip._internal.utils.compat import WINDOWS + from pip._internal.utils.deprecation import deprecated + from pip._internal.utils.virtualenv import running_under_virtualenv + +-from . import _distutils, _sysconfig ++from . import _sysconfig + from .base import ( + USER_CACHE_DIR, + get_major_minor_version, +@@ -47,6 +47,12 @@ _PLATLIBDIR: str = getattr(sys, "platlibdir", "lib") + + _USE_SYSCONFIG = sys.version_info >= (3, 10) + ++if not _USE_SYSCONFIG: ++ # Import distutils lazily to avoid deprecation warnings, ++ # but import it soon enough that it is in memory and available during ++ # a pip reinstall. ++ from . import _distutils ++ + + def _looks_like_bpo_44860() -> bool: + """The resolution to bpo-44860 will change this incorrect platlib. +-- +2.38.1 + +From 942f43f0bab6f8245f2597a4fd376702bffb88e9 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Fri, 17 Jun 2022 13:50:25 +0100 +Subject: [PATCH] Replace usage of `distutils.utils.change_root` with + copied-over logic + +This eliminates an import from distutils, by pulling in the relevant code +into pip itself. + +Rebased from https://github.com/pypa/pip/commit/c520ccf75d +--- + src/pip/_internal/locations/_sysconfig.py | 5 ++-- + src/pip/_internal/locations/base.py | 28 +++++++++++++++++++ + .../_internal/operations/install/legacy.py | 2 +- + 3 files changed, 31 insertions(+), 4 deletions(-) + +diff --git a/src/pip/_internal/locations/_sysconfig.py b/src/pip/_internal/locations/_sysconfig.py +index 5e141aa..0bbc928 100644 +--- a/src/pip/_internal/locations/_sysconfig.py ++++ b/src/pip/_internal/locations/_sysconfig.py +@@ -1,4 +1,3 @@ +-import distutils.util # FIXME: For change_root. + import logging + import os + import sys +@@ -9,7 +8,7 @@ from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationI + from pip._internal.models.scheme import SCHEME_KEYS, Scheme + from pip._internal.utils.virtualenv import running_under_virtualenv + +-from .base import get_major_minor_version, is_osx_framework ++from .base import change_root, get_major_minor_version, is_osx_framework + + logger = logging.getLogger(__name__) + +@@ -194,7 +193,7 @@ def get_scheme( + ) + if root is not None: + for key in SCHEME_KEYS: +- value = distutils.util.change_root(root, getattr(scheme, key)) ++ value = change_root(root, getattr(scheme, key)) + setattr(scheme, key, value) + return scheme + +diff --git a/src/pip/_internal/locations/base.py b/src/pip/_internal/locations/base.py +index 86dad4a..d73676d 100644 +--- a/src/pip/_internal/locations/base.py ++++ b/src/pip/_internal/locations/base.py +@@ -5,6 +5,7 @@ import sys + import sysconfig + import typing + ++from pip._internal.exceptions import InstallationError + from pip._internal.utils import appdirs + from pip._internal.utils.virtualenv import running_under_virtualenv + +@@ -22,6 +23,33 @@ def get_major_minor_version() -> str: + """ + return "{}.{}".format(*sys.version_info) + ++def change_root(new_root: str, pathname: str) -> str: ++ """Return 'pathname' with 'new_root' prepended. ++ ++ If 'pathname' is relative, this is equivalent to os.path.join(new_root, pathname). ++ Otherwise, it requires making 'pathname' relative and then joining the ++ two, which is tricky on DOS/Windows and Mac OS. ++ ++ This is borrowed from Python's standard library's distutils module. ++ """ ++ if os.name == "posix": ++ if not os.path.isabs(pathname): ++ return os.path.join(new_root, pathname) ++ else: ++ return os.path.join(new_root, pathname[1:]) ++ ++ elif os.name == "nt": ++ (drive, path) = os.path.splitdrive(pathname) ++ if path[0] == "\\": ++ path = path[1:] ++ return os.path.join(new_root, path) ++ ++ else: ++ raise InstallationError( ++ f"Unknown platform: {os.name}\n" ++ "Can not change root path prefix on unknown platform." ++ ) ++ + + def get_src_prefix() -> str: + if running_under_virtualenv(): +diff --git a/src/pip/_internal/operations/install/legacy.py b/src/pip/_internal/operations/install/legacy.py +index 2206c93..4281cb0 100644 +--- a/src/pip/_internal/operations/install/legacy.py ++++ b/src/pip/_internal/operations/install/legacy.py +@@ -3,11 +3,11 @@ + + import logging + import os +-from distutils.util import change_root + from typing import List, Optional, Sequence + + from pip._internal.build_env import BuildEnvironment + from pip._internal.exceptions import InstallationError ++from pip._internal.locations.base import change_root + from pip._internal.models.scheme import Scheme + from pip._internal.utils.logging import indent_log + from pip._internal.utils.misc import ensure_dir +-- +2.38.1 + +From 4ef5c7eac10bb1d88568af53373491fe6febfa63 Mon Sep 17 00:00:00 2001 +From: Pradyun Gedam +Date: Fri, 17 Jun 2022 15:30:50 +0100 +Subject: [PATCH] Replace `distutils.fancy_getopt` with `getopt` + +This eliminates one location where distutils may be imported on +Python 3.12+, by replacing the logic with mostly equivalent logic. + +Rebased from: https://github.com/pypa/pip/commit/8cbb89b6cc +--- + src/pip/_internal/utils/distutils_args.py | 51 ++++++++++++----------- + tests/unit/test_utils_distutils_args.py | 2 +- + 2 files changed, 27 insertions(+), 26 deletions(-) + +diff --git a/src/pip/_internal/utils/distutils_args.py b/src/pip/_internal/utils/distutils_args.py +index e4aa5b8..2fd1862 100644 +--- a/src/pip/_internal/utils/distutils_args.py ++++ b/src/pip/_internal/utils/distutils_args.py +@@ -1,42 +1,43 @@ +-from distutils.errors import DistutilsArgError +-from distutils.fancy_getopt import FancyGetopt ++from getopt import GetoptError, getopt + from typing import Dict, List + + _options = [ +- ("exec-prefix=", None, ""), +- ("home=", None, ""), +- ("install-base=", None, ""), +- ("install-data=", None, ""), +- ("install-headers=", None, ""), +- ("install-lib=", None, ""), +- ("install-platlib=", None, ""), +- ("install-purelib=", None, ""), +- ("install-scripts=", None, ""), +- ("prefix=", None, ""), +- ("root=", None, ""), +- ("user", None, ""), ++ "exec-prefix=", ++ "home=", ++ "install-base=", ++ "install-data=", ++ "install-headers=", ++ "install-lib=", ++ "install-platlib=", ++ "install-purelib=", ++ "install-scripts=", ++ "prefix=", ++ "root=", ++ "user", + ] + + +-# typeshed doesn't permit Tuple[str, None, str], see python/typeshed#3469. +-_distutils_getopt = FancyGetopt(_options) # type: ignore +- +- + def parse_distutils_args(args: List[str]) -> Dict[str, str]: +- """Parse provided arguments, returning an object that has the +- matched arguments. ++ """Parse provided arguments, returning an object that has the matched arguments. + + Any unknown arguments are ignored. + """ + result = {} + for arg in args: + try: +- _, match = _distutils_getopt.getopt(args=[arg]) +- except DistutilsArgError: ++ parsed_opt, _ = getopt(args=[arg], shortopts="", longopts=_options) ++ except GetoptError: + # We don't care about any other options, which here may be + # considered unrecognized since our option list is not + # exhaustive. +- pass +- else: +- result.update(match.__dict__) ++ continue ++ ++ if not parsed_opt: ++ continue ++ ++ option = parsed_opt[0] ++ name_from_parsed = option[0][2:].replace("-", "_") ++ value_from_parsed = option[1] or "true" ++ result[name_from_parsed] = value_from_parsed ++ + return result +diff --git a/tests/unit/test_utils_distutils_args.py b/tests/unit/test_utils_distutils_args.py +index e63c565..21f31e9 100644 +--- a/tests/unit/test_utils_distutils_args.py ++++ b/tests/unit/test_utils_distutils_args.py +@@ -60,4 +60,4 @@ def test_all_value_options_work(name: str, value: str) -> None: + + def test_user_option_works() -> None: + result = parse_distutils_args(["--user"]) +- assert result["user"] == 1 ++ assert result["user"] +-- +2.38.1 + diff --git a/python-pip.spec b/python-pip.spec index 8fad97a..935c1c0 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. @@ -86,6 +86,15 @@ Patch5: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch6: no-version-warning.patch +# Avoid importing distutils globally +# This is needed to make the pip wheel usable with Python 3.12+ +# Backported from pip 22.3 +# https://github.com/pypa/pip/commit/0e06452530 +# https://github.com/pypa/pip/commit/db47515958 +# https://github.com/pypa/pip/commit/c520ccf75d +# https://github.com/pypa/pip/commit/8cbb89b6cc +Patch7: avoid-importing-distutils-globally.patch + # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -400,6 +409,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* Wed Nov 16 2022 Miro Hrončok - 21.3.1-4 +- Make python-pip-wheel compatible with Python 3.12.0a2+ + * Tue Sep 06 2022 Miro Hrončok - 21.3.1-3 - No longer use the rpm_install prefix to determine RPM-installed packages - Related: rhbz#2026979 From 53513f5d182c98daf9d1844307c9d5fcce3dbde3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 15 Nov 2022 15:22:33 +0100 Subject: [PATCH 16/98] CI: Add Python 3.12 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index a543138..65e165e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,6 +31,9 @@ - smoke311: dir: python/smoke run: VERSION=3.11 ./venv.sh + - smoke312: + dir: python/smoke + run: VERSION=3.12 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -55,6 +58,9 @@ - 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 - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -80,6 +86,7 @@ - python3.9 - python3.10 - python3.11 + - python3.12-devel - python2-devel - python3-devel - python3-tox From c3f04d6b6d3bbdf461769aa1521cba2d266687c5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 15 Nov 2022 12:56:41 +0100 Subject: [PATCH 17/98] Update to 22.3.1 --- bad-metadata-fix.patch | 92 ---------------------------- dummy-certifi.patch | 134 ++++++++++++++++++++++++++++++++++------- python-pip.spec | 46 ++++++-------- sources | 2 +- 4 files changed, 131 insertions(+), 143 deletions(-) delete mode 100644 bad-metadata-fix.patch diff --git a/bad-metadata-fix.patch b/bad-metadata-fix.patch deleted file mode 100644 index 740dc71..0000000 --- a/bad-metadata-fix.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 6817fbfb1fd389ad61009f0199db5670b146c8d3 Mon Sep 17 00:00:00 2001 -From: Tzu-ping Chung -Date: Sat, 6 Aug 2022 06:18:59 +0800 -Subject: [PATCH] Skip dist if metadata does not have a valid name - ---- - news/11352.bugfix.rst | 2 ++ - src/pip/_internal/metadata/importlib/_compat.py | 14 +++++++++++++- - src/pip/_internal/metadata/importlib/_envs.py | 14 +++++++++++--- - 3 files changed, 26 insertions(+), 4 deletions(-) - create mode 100644 news/11352.bugfix.rst - -diff --git a/news/11352.bugfix.rst b/news/11352.bugfix.rst -new file mode 100644 -index 00000000000..78016c912ef ---- /dev/null -+++ b/news/11352.bugfix.rst -@@ -0,0 +1,2 @@ -+Ignore distributions with invalid ``Name`` in metadata instead of crashing, when -+using the ``importlib.metadata`` backend. -diff --git a/src/pip/_internal/metadata/importlib/_compat.py b/src/pip/_internal/metadata/importlib/_compat.py -index e0879807ab9..593bff23ede 100644 ---- a/src/pip/_internal/metadata/importlib/_compat.py -+++ b/src/pip/_internal/metadata/importlib/_compat.py -@@ -2,6 +2,15 @@ - from typing import Any, Optional, Protocol, cast - - -+class BadMetadata(ValueError): -+ def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None: -+ self.dist = dist -+ self.reason = reason -+ -+ def __str__(self) -> str: -+ return f"Bad metadata in {self.dist} ({self.reason})" -+ -+ - class BasePath(Protocol): - """A protocol that various path objects conform. - -@@ -40,4 +49,7 @@ def get_dist_name(dist: importlib.metadata.Distribution) -> str: - The ``name`` attribute is only available in Python 3.10 or later. We are - targeting exactly that, but Mypy does not know this. - """ -- return cast(Any, dist).name -+ name = cast(Any, dist).name -+ if not isinstance(name, str): -+ raise BadMetadata(dist, reason="invalid metadata entry 'name'") -+ return name -diff --git a/src/pip/_internal/metadata/importlib/_envs.py b/src/pip/_internal/metadata/importlib/_envs.py -index d5fcfdbfef2..cbec59e2c6d 100644 ---- a/src/pip/_internal/metadata/importlib/_envs.py -+++ b/src/pip/_internal/metadata/importlib/_envs.py -@@ -1,5 +1,6 @@ - import functools - import importlib.metadata -+import logging - import os - import pathlib - import sys -@@ -14,9 +15,11 @@ - from pip._internal.utils.deprecation import deprecated - from pip._internal.utils.filetypes import WHEEL_EXTENSION - --from ._compat import BasePath, get_dist_name, get_info_location -+from ._compat import BadMetadata, BasePath, get_dist_name, get_info_location - from ._dists import Distribution - -+logger = logging.getLogger(__name__) -+ - - def _looks_like_wheel(location: str) -> bool: - if not location.endswith(WHEEL_EXTENSION): -@@ -56,11 +59,16 @@ def _find_impl(self, location: str) -> Iterator[FoundResult]: - # To know exactly where we find a distribution, we have to feed in the - # paths one by one, instead of dumping the list to importlib.metadata. - for dist in importlib.metadata.distributions(path=[location]): -- normalized_name = canonicalize_name(get_dist_name(dist)) -+ info_location = get_info_location(dist) -+ try: -+ raw_name = get_dist_name(dist) -+ except BadMetadata as e: -+ logger.warning("Skipping %s due to %s", info_location, e.reason) -+ continue -+ normalized_name = canonicalize_name(raw_name) - if normalized_name in self._found_names: - continue - self._found_names.add(normalized_name) -- info_location = get_info_location(dist) - yield dist, info_location - - def find(self, location: str) -> Iterator[BaseDistribution]: diff --git a/dummy-certifi.patch b/dummy-certifi.patch index a691cad..8896ce8 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,36 +1,128 @@ -From cacd6d2fa9a27b29415a4ce25d76406fe69fc398 Mon Sep 17 00:00:00 2001 +From 09c983fdeabe3fa0b90b73f32ddf84a61e498e09 Mon Sep 17 00:00:00 2001 From: Karolina Surma -Date: Mon, 10 May 2021 16:38:50 +0200 +Date: Tue, 15 Nov 2022 09:22:46 +0100 Subject: [PATCH] Dummy certifi patch -Co-Authored-By: Tomas Hrnciar --- - src/pip/_vendor/certifi/core.py | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + src/pip/_vendor/certifi/core.py | 105 ++------------------------------ + 1 file changed, 6 insertions(+), 99 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index f34045b..a2ada08 100644 +index c3e5466..eb297f7 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): +@@ -4,105 +4,12 @@ certifi.py + This module returns the installation location of cacert.pem or its contents. + """ +-import sys - try: -+ raise ImportError # force fallback - # Return a certificate file on disk for a standalone pip zipapp running in - # an isolated build environment to use. Passing --cert to the standalone - # pip does not work since requests calls where() unconditionally on import. -@@ -75,9 +76,7 @@ except ImportError: - # 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: ++# 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 +- +- _CACERT_CTX = None +- _CACERT_PATH = None +- +- def where() -> str: +- # This is slightly terrible, but we want to delay extracting the file +- # in cases where we're inside of a zipimport situation until someone +- # actually calls where(), but we don't want to re-extract the file +- # on every call of where(), so we'll do it once then store it in a +- # global variable. +- global _CACERT_CTX +- global _CACERT_PATH +- if _CACERT_PATH is None: +- # This is slightly janky, the importlib.resources API wants you to +- # manage the cleanup of this file, so it doesn't actually return a +- # path, it returns a context manager that will give you the path +- # when you enter it and will do any cleanup when you leave it. In +- # the common case of not needing a temporary file, it will just +- # return the file system location and the __exit__() is a no-op. +- # +- # We also have to hold onto the actual context manager, because +- # it will do the cleanup whenever it gets garbage collected, so +- # 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__()) +- +- return _CACERT_PATH +- +- def contents() -> str: +- return files("pip._vendor.certifi").joinpath("cacert.pem").read_text(encoding="ascii") +- +-elif sys.version_info >= (3, 7): +- +- from importlib.resources import path as get_path, read_text +- +- _CACERT_CTX = None +- _CACERT_PATH = None +- +- def where() -> str: +- # This is slightly terrible, but we want to delay extracting the +- # file in cases where we're inside of a zipimport situation until +- # someone actually calls where(), but we don't want to re-extract +- # the file on every call of where(), so we'll do it once then store +- # it in a global variable. +- global _CACERT_CTX +- global _CACERT_PATH +- if _CACERT_PATH is None: +- # This is slightly janky, the importlib.resources API wants you +- # to manage the cleanup of this file, so it doesn't actually +- # return a path, it returns a context manager that will give +- # you the path when you enter it and will do any cleanup when +- # you leave it. In the common case of not needing a temporary +- # file, it will just return the file system location and the +- # __exit__() is a no-op. +- # +- # We also have to hold onto the actual context manager, because +- # it will do the cleanup whenever it gets garbage collected, so +- # 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__()) +- +- return _CACERT_PATH +- +- 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") -+ return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents() -> str: +- +- def contents() -> str: +- return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") -- -2.35.3 +2.37.3 diff --git a/python-pip.spec b/python-pip.spec index 1817621..dfdcfa4 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 22.2.2 +%global base_version 22.3.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. @@ -77,6 +77,7 @@ Patch: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi # https://bugzilla.redhat.com/show_bug.cgi?id=1655253 +# 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 @@ -89,11 +90,6 @@ Patch: nowarn-pip._internal.main.patch # Upstream issue: https://github.com/pypa/packaging/issues/368 Patch: no-version-warning.patch -# Ignore distributions with invalid name in metadata instead of crashing, when -# using the importlib.metadata backend. -# Resolved upstream: https://github.com/pypa/pip/pull/11353 -Patch: bad-metadata-fix.patch - # Downstream only patch # Users might have local installations of pip from using # `pip install --user --upgrade pip` on older/newer versions. @@ -130,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.6.15 +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(distlib)) = 0.3.5 +Provides: bundled(python%{1}dist(distlib)) = 0.3.6 Provides: bundled(python%{1}dist(distro)) = 1.7 -Provides: bundled(python%{1}dist(idna)) = 3.3 +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.12 +Provides: bundled(python%{1}dist(pep517)) = 0.13 Provides: bundled(python%{1}dist(platformdirs)) = 2.5.2 -Provides: bundled(python%{1}dist(pygments)) = 2.12 +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(resolvelib)) = 0.8.1 Provides: bundled(python%{1}dist(rich)) = 12.5.1 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.16 -Provides: bundled(python%{1}dist(tenacity)) = 8.0.1 +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.3 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.10 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.4 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.12 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -351,26 +347,14 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} # Upstream tests # bash completion tests only work from installed package -# needs unaltered sys.path and we cannot do that in %%check -# test_pep517_and_build_options -# test_config_file_venv_option -# Incompatible with the latest virtualenv -# test_from_link_vcs_with_source_dir_obtains_commit_id -# test_from_link_vcs_without_source_dir -# test_should_cache_git_sha -pytest_k='not completion and - not test_pep517_and_build_options and - not test_config_file_venv_option and - not test_from_link_vcs_with_source_dir_obtains_commit_id and - not test_from_link_vcs_without_source_dir and - not test_should_cache_git_sha' +pytest_k='not completion' # --deselect'ed 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 %pytest -m 'not network' -k "$(echo $pytest_k)" \ - --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py + --deselect tests/functional --deselect tests/lib/test_lib.py %endif @@ -406,6 +390,10 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 diff --git a/sources b/sources index 026b677..ac6d676 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-22.2.2.tar.gz) = bd59e28b55475b77a8f11ea771cbad3b2602ff974e219f9a55288963a9522c9279a5b00fde40fb65cfebefae0e905d3da3c06fe50b402aa5326b25f70a98a015 +SHA512 (pip-22.3.1.tar.gz) = c7865c4ce79b0fea7ba469fe593af3be205b3bdb574a6ae019842e0f82a0af406ec905d8c6ff02fbbafe01630c8899a398d071ce74501ca830249160f2f6df98 From 25bc125898ba86f8ed5cc1179d2f64c1096c09f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 15 Nov 2022 15:22:33 +0100 Subject: [PATCH 18/98] CI: Add Python 3.12 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index 8f0a5de..8278b55 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -31,6 +31,9 @@ - smoke311: dir: python/smoke run: VERSION=3.11 ./venv.sh + - smoke312: + dir: python/smoke + run: VERSION=3.12 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -55,6 +58,9 @@ - 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 - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -80,6 +86,7 @@ - python3.9 - python3.10-devel - python3.11-devel + - python3.12-devel - python2-devel - python3-devel - python3-tox From a1e1c1dfc94168da1d9130179a86297c64a9488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 16 Nov 2022 13:46:12 +0100 Subject: [PATCH 19/98] Convert the License tag to SPDX --- python-pip.spec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index dfdcfa4..2e4fbfd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -28,33 +28,33 @@ Summary: A tool for installing and managing Python packages # Here is the list of the libraries with corresponding licenses: # appdirs: MIT -# certifi: MPLv2.0 -# chardet: LGPLv2 -# colorama: BSD -# CacheControl: ASL 2.0 -# distlib: Python -# distro: ASL 2.0 +# 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 -# ipaddress: Python -# msgpack: ASL 2.0 -# packaging: ASL 2.0 or BSD +# idna: BSD-3-Clause +# ipaddress: Python-2.0.1 +# msgpack: Apache-2.0 +# packaging: Apache-2.0 OR BSD-2-Clause # pep517: MIT # progress: ISC -# pygments: BSD +# pygments: BSD-2-Clause # pyparsing: MIT -# requests: ASL 2.0 +# requests: Apache-2.0 # resolvelib: ISC # rich: MIT # setuptools: MIT # six: MIT -# tenacity: ASL 2.0 +# tenacity: Apache-2.0 # tomli: MIT -# typing-extensions: Python +# typing-extensions: Python-2.0.1 # urllib3: MIT -# webencodings: BSD +# webencodings: BSD-3-Clause -License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) +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) URL: https://pip.pypa.io/ Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz From 6cbe3a846c02eb63a751e294a3a2c44cc93db864 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 15:40:55 +0000 Subject: [PATCH 20/98] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_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 2e4fbfd..08aedb1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -21,7 +21,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. @@ -390,6 +390,9 @@ pytest_k='not completion' %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 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 21/98] 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 22/98] 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 23/98] 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 24/98] 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 25/98] 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 26/98] 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 27/98] 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 558f1a0e2bff5c4b41390447591ece53c2502e7c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 16:40:50 +0200 Subject: [PATCH 28/98] 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 29/98] 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 30/98] 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 31/98] 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 32/98] 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 33/98] 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 34/98] 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 35/98] 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 36/98] 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 37/98] 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 38/98] 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 39/98] 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 40/98] 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 41/98] 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 42/98] 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 43/98] 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 44/98] 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 45/98] 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 46/98] 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 47/98] 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 48/98] 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 49/98] 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 50/98] 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 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 51/98] 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 52/98] 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 53/98] 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 54/98] 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 55/98] 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 56/98] 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 57/98] 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 58/98] 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 59/98] 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 60/98] 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 61/98] 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 62/98] 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 63/98] 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 64/98] 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 65/98] 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 66/98] 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 67/98] 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 68/98] 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 69/98] 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 70/98] 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 71/98] 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 72/98] 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 73/98] 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 74/98] 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 75/98] 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 76/98] 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 77/98] 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 78/98] 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 79/98] 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 80/98] 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 81/98] 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 82/98] 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 83/98] 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 84/98] 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 85/98] 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 86/98] 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 87/98] 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 88/98] 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 89/98] 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 90/98] 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 91/98] 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 92/98] 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 93/98] 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 94/98] 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 95/98] 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 96/98] 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 97/98] 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 98/98] 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)