From 695f7debe320adc7ce422ad71d041cd75b7c0a3f Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 11 May 2021 16:19:49 +0200 Subject: [PATCH 001/118] Remove unused patches --- local-dos.patch | 395 ------------------------- network-tests.patch | 683 -------------------------------------------- 2 files changed, 1078 deletions(-) delete mode 100644 local-dos.patch delete mode 100644 network-tests.patch diff --git a/local-dos.patch b/local-dos.patch deleted file mode 100644 index 721ca51..0000000 --- a/local-dos.patch +++ /dev/null @@ -1,395 +0,0 @@ -diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py -index 8ed3d91..01b2104 100644 ---- a/pip/cmdoptions.py -+++ b/pip/cmdoptions.py -@@ -9,7 +9,7 @@ To be consistent, all options will follow this design. - """ - import copy - from optparse import OptionGroup, SUPPRESS_HELP, Option --from pip.locations import build_prefix, default_log_file -+from pip.locations import default_log_file - - - def make_option_group(group, parser): -@@ -297,10 +297,8 @@ build_dir = OptionMaker( - '-b', '--build', '--build-dir', '--build-directory', - dest='build_dir', - metavar='dir', -- default=build_prefix, -- help='Directory to unpack packages into and build in. ' -- 'The default in a virtualenv is "/build". ' -- 'The default for global installs is "/pip_build_".') -+ help='Directory to unpack packages into and build in.', -+) - - install_options = OptionMaker( - '--install-option', -diff --git a/pip/commands/install.py b/pip/commands/install.py -index cbf22a0..cb7d0db 100644 ---- a/pip/commands/install.py -+++ b/pip/commands/install.py -@@ -10,6 +10,7 @@ from pip.basecommand import Command - from pip.index import PackageFinder - from pip.exceptions import InstallationError, CommandError, PreviousBuildDirError - from pip import cmdoptions -+from pip.util import BuildDirectory - - - class InstallCommand(Command): -@@ -188,7 +189,7 @@ class InstallCommand(Command): - if ( - options.no_install or - options.no_download or -- (options.build_dir != build_prefix) or -+ options.build_dir or - options.no_clean - ): - logger.deprecated('1.7', 'DEPRECATION: --no-install, --no-download, --build, ' -@@ -197,7 +198,16 @@ class InstallCommand(Command): - if options.download_dir: - options.no_install = True - options.ignore_installed = True -- options.build_dir = os.path.abspath(options.build_dir) -+ -+ # If we have --no-install or --no-download and no --build we use the -+ # legacy static build dir -+ if (options.build_dir is None -+ and (options.no_install or options.no_download)): -+ options.build_dir = build_prefix -+ -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - options.src_dir = os.path.abspath(options.src_dir) - install_options = options.install_options or [] - if options.use_user_site: -@@ -246,73 +256,75 @@ class InstallCommand(Command): - - finder = self._build_package_finder(options, index_urls, session) - -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=options.src_dir, -- download_dir=options.download_dir, -- download_cache=options.download_cache, -- upgrade=options.upgrade, -- as_egg=options.as_egg, -- ignore_installed=options.ignore_installed, -- ignore_dependencies=options.ignore_dependencies, -- force_reinstall=options.force_reinstall, -- use_user_site=options.use_user_site, -- target_dir=temp_target_dir, -- session=session, -- pycompile=options.compile, -- ) -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- for name in options.editables: -- requirement_set.add_requirement( -- InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -- for filename in options.requirements: -- for req in parse_requirements(filename, finder=finder, options=options, session=session): -- requirement_set.add_requirement(req) -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- if options.find_links: -- msg = ('You must give at least one requirement to %(name)s ' -- '(maybe you meant "pip %(name)s %(links)s"?)' % -- dict(opts, links=' '.join(options.find_links))) -- else: -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.warn(msg) -- return -- -- try: -- if not options.no_download: -- requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -- else: -- requirement_set.locate_files() -- -- if not options.no_install and not self.bundle: -- requirement_set.install( -- install_options, -- global_options, -- root=options.root_path, -- strip_file_prefix=options.strip_file_prefix) -- installed = ' '.join([req.name for req in -- requirement_set.successfully_installed]) -- if installed: -- logger.notify('Successfully installed %s' % installed) -- elif not self.bundle: -- downloaded = ' '.join([req.name for req in -- requirement_set.successfully_downloaded]) -- if downloaded: -- logger.notify('Successfully downloaded %s' % downloaded) -- elif self.bundle: -- requirement_set.create_bundle(self.bundle_filename) -- logger.notify('Created bundle in %s' % self.bundle_filename) -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- # Clean up -- if (not options.no_clean) and ((not options.no_install) or options.download_dir): -- requirement_set.cleanup_files(bundle=self.bundle) -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=options.src_dir, -+ download_dir=options.download_dir, -+ download_cache=options.download_cache, -+ upgrade=options.upgrade, -+ as_egg=options.as_egg, -+ ignore_installed=options.ignore_installed, -+ ignore_dependencies=options.ignore_dependencies, -+ force_reinstall=options.force_reinstall, -+ use_user_site=options.use_user_site, -+ target_dir=temp_target_dir, -+ session=session, -+ pycompile=options.compile, -+ ) -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ for name in options.editables: -+ requirement_set.add_requirement( -+ InstallRequirement.from_editable(name, default_vcs=options.default_vcs)) -+ for filename in options.requirements: -+ for req in parse_requirements(filename, finder=finder, options=options, session=session): -+ requirement_set.add_requirement(req) -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ if options.find_links: -+ msg = ('You must give at least one requirement to %(name)s ' -+ '(maybe you meant "pip %(name)s %(links)s"?)' % -+ dict(opts, links=' '.join(options.find_links))) -+ else: -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.warn(msg) -+ return -+ -+ try: -+ if not options.no_download: -+ requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) -+ else: -+ requirement_set.locate_files() -+ -+ if not options.no_install and not self.bundle: -+ requirement_set.install( -+ install_options, -+ global_options, -+ root=options.root_path, -+ strip_file_prefix=options.strip_file_prefix) -+ installed = ' '.join([req.name for req in -+ requirement_set.successfully_installed]) -+ if installed: -+ logger.notify('Successfully installed %s' % installed) -+ elif not self.bundle: -+ downloaded = ' '.join([req.name for req in -+ requirement_set.successfully_downloaded]) -+ if downloaded: -+ logger.notify('Successfully downloaded %s' % downloaded) -+ elif self.bundle: -+ requirement_set.create_bundle(self.bundle_filename) -+ logger.notify('Created bundle in %s' % self.bundle_filename) -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ # Clean up -+ if (not options.no_clean) and ((not options.no_install) or options.download_dir): -+ requirement_set.cleanup_files(bundle=self.bundle) - - if options.target_dir: - if not os.path.exists(options.target_dir): -diff --git a/pip/commands/wheel.py b/pip/commands/wheel.py -index 6527063..a96631a 100644 ---- a/pip/commands/wheel.py -+++ b/pip/commands/wheel.py -@@ -8,7 +8,7 @@ from pip.index import PackageFinder - from pip.log import logger - from pip.exceptions import CommandError, PreviousBuildDirError - from pip.req import InstallRequirement, RequirementSet, parse_requirements --from pip.util import normalize_path -+from pip.util import BuildDirectory, normalize_path - from pip.wheel import WheelBuilder - from pip import cmdoptions - -@@ -123,6 +123,9 @@ class WheelCommand(Command): - "--extra-index-url is suggested.") - index_urls += options.mirrors - -+ if options.build_dir: -+ options.build_dir = os.path.abspath(options.build_dir) -+ - session = self._build_session(options) - - finder = PackageFinder(find_links=options.find_links, -@@ -137,59 +140,60 @@ class WheelCommand(Command): - session=session, - ) - -- options.build_dir = os.path.abspath(options.build_dir) -- requirement_set = RequirementSet( -- build_dir=options.build_dir, -- src_dir=None, -- download_dir=None, -- download_cache=options.download_cache, -- ignore_dependencies=options.ignore_dependencies, -- ignore_installed=True, -- session=session, -- wheel_download_dir=options.wheel_dir -- ) -- -- # make the wheelhouse -- if not os.path.exists(options.wheel_dir): -- os.makedirs(options.wheel_dir) -- -- #parse args and/or requirements files -- for name in args: -- requirement_set.add_requirement( -- InstallRequirement.from_line(name, None)) -- -- for filename in options.requirements: -- for req in parse_requirements( -- filename, -- finder=finder, -- options=options, -- session=session): -- if req.editable: -- logger.notify("ignoring %s" % req.url) -- continue -- requirement_set.add_requirement(req) -- -- #fail if no requirements -- if not requirement_set.has_requirements: -- opts = {'name': self.name} -- msg = ('You must give at least one requirement ' -- 'to %(name)s (see "pip help %(name)s")' % opts) -- logger.error(msg) -- return -+ build_delete = (not (options.no_clean or options.build_dir)) -+ with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: -+ requirement_set = RequirementSet( -+ build_dir=build_dir, -+ src_dir=None, -+ download_dir=None, -+ download_cache=options.download_cache, -+ ignore_dependencies=options.ignore_dependencies, -+ ignore_installed=True, -+ session=session, -+ wheel_download_dir=options.wheel_dir -+ ) - -- try: -- #build wheels -- wb = WheelBuilder( -- requirement_set, -- finder, -- options.wheel_dir, -- build_options = options.build_options or [], -- global_options = options.global_options or [] -- ) -- wb.build() -- except PreviousBuildDirError: -- options.no_clean = True -- raise -- finally: -- if not options.no_clean: -- requirement_set.cleanup_files() -+ # make the wheelhouse -+ if not os.path.exists(options.wheel_dir): -+ os.makedirs(options.wheel_dir) -+ -+ #parse args and/or requirements files -+ for name in args: -+ requirement_set.add_requirement( -+ InstallRequirement.from_line(name, None)) -+ -+ for filename in options.requirements: -+ for req in parse_requirements( -+ filename, -+ finder=finder, -+ options=options, -+ session=session): -+ if req.editable: -+ logger.notify("ignoring %s" % req.url) -+ continue -+ requirement_set.add_requirement(req) -+ -+ #fail if no requirements -+ if not requirement_set.has_requirements: -+ opts = {'name': self.name} -+ msg = ('You must give at least one requirement ' -+ 'to %(name)s (see "pip help %(name)s")' % opts) -+ logger.error(msg) -+ return -+ -+ try: -+ #build wheels -+ wb = WheelBuilder( -+ requirement_set, -+ finder, -+ options.wheel_dir, -+ build_options = options.build_options or [], -+ global_options = options.global_options or [] -+ ) -+ wb.build() -+ except PreviousBuildDirError: -+ options.no_clean = True -+ raise -+ finally: -+ if not options.no_clean: -+ requirement_set.cleanup_files() -diff --git a/pip/util.py b/pip/util.py -index f459bb2..f5edeeb 100644 ---- a/pip/util.py -+++ b/pip/util.py -@@ -8,6 +8,7 @@ import zipfile - import tarfile - import subprocess - import textwrap -+import tempfile - - from pip.exceptions import InstallationError, BadCommand, PipError - from pip.backwardcompat import(WindowsError, string_types, raw_input, -@@ -718,3 +719,35 @@ def is_prerelease(vers): - - parsed = version._normalized_key(normalized) - return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed]) -+ -+ -+class BuildDirectory(object): -+ -+ def __init__(self, name=None, delete=None): -+ # If we were not given an explicit directory, and we were not given an -+ # explicit delete option, then we'll default to deleting. -+ if name is None and delete is None: -+ delete = True -+ -+ if name is None: -+ name = tempfile.mkdtemp(prefix="pip-build-") -+ # If we were not given an explicit directory, and we were not given -+ # an explicit delete option, then we'll default to deleting. -+ if delete is None: -+ delete = True -+ -+ self.name = name -+ self.delete = delete -+ -+ def __repr__(self): -+ return "<{} {!r}>".format(self.__class__.__name__, self.name) -+ -+ def __enter__(self): -+ return self.name -+ -+ def __exit__(self, exc, value, tb): -+ self.cleanup() -+ -+ def cleanup(self): -+ if self.delete: -+ rmtree(self.name) diff --git a/network-tests.patch b/network-tests.patch deleted file mode 100644 index 8acf694..0000000 --- a/network-tests.patch +++ /dev/null @@ -1,683 +0,0 @@ -From 621800d5c65aea36c6a1d9b685ff88f35cfce476 Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Fri, 15 Nov 2019 19:44:54 +0100 -Subject: [PATCH] Mark 6 tests as network tests - -=================================== FAILURES =================================== -_______________________________ test_freeze_path _______________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0') -script = -data = - def test_freeze_path(tmpdir, script, data): - """ - Test freeze with --path. - """ -> script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==2.0') -tests/functional/test_freeze.py:712: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -________________________ test_freeze_path_exclude_user _________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0') -script = -data = - def test_freeze_path_exclude_user(tmpdir, script, data): - """ - Test freeze with --path and make sure packages from --user are not picked - up. - """ - script.pip_install_local('--find-links', data.find_links, - '--user', 'simple2') -> script.pip('install', '--find-links', data.find_links, - '--target', tmpdir, 'simple==1.0') -tests/functional/test_freeze.py:728: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -__________________________ test_freeze_path_multiple ___________________________ -tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0') -script = -data = - def test_freeze_path_multiple(tmpdir, script, data): - """ - Test freeze with multiple --path arguments. - """ - path1 = tmpdir / "path1" - os.mkdir(path1) - path2 = tmpdir / "path2" - os.mkdir(path2) -> script.pip('install', '--find-links', data.find_links, - '--target', path1, 'simple==2.0') -tests/functional/test_freeze.py:750: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/lib/__init__.py:593: in run - _check_stderr( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n" -allow_stderr_warning = False, allow_stderr_error = False - def _check_stderr( - stderr, allow_stderr_warning, allow_stderr_error, - ): - """ - Check the given stderr for logged warnings and errors. - - :param stderr: stderr output as a string. - :param allow_stderr_warning: whether a logged warning (or deprecation - message) is allowed. Must be True if allow_stderr_error is True. - :param allow_stderr_error: whether a logged error is allowed. - """ - assert not (allow_stderr_error and not allow_stderr_warning) - - lines = stderr.splitlines() - for line in lines: - # First check for logging errors, which we don't allow during - # tests even if allow_stderr_error=True (since a logging error - # would signal a bug in pip's code). - # Unlike errors logged with logger.error(), these errors are - # sent directly to stderr and so bypass any configured log formatter. - # The "--- Logging error ---" string is used in Python 3.4+, and - # "Logged from file " is used in Python 2. - if (line.startswith('--- Logging error ---') or - line.startswith('Logged from file ')): - reason = 'stderr has a logging error, which is never allowed' - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_error: - continue - - if line.startswith('ERROR: '): - reason = ( - 'stderr has an unexpected error ' - '(pass allow_stderr_error=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) - raise RuntimeError(msg) - if allow_stderr_warning: - continue - - if (line.startswith('WARNING: ') or - line.startswith(DEPRECATION_MSG_PREFIX)): - reason = ( - 'stderr has an unexpected warning ' - '(pass allow_stderr_warning=True to permit this)' - ) - msg = make_check_stderr_message(stderr, line=line, reason=reason) -> raise RuntimeError(msg) -E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): -E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/" -E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/ -tests/lib/__init__.py:404: RuntimeError -_________________ test_install_no_binary_builds_pep_517_wheel __________________ -script = -data = , with_wheel = None - def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): - to_install = data.packages.joinpath('pep517_setup_and_pyproject') -> res = script.pip( - 'install', '--no-binary=:all:', '-f', data.find_links, to_install - ) -tests/functional/test_install.py:1279: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...) -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject - return code: 1 --- stderr: -------------------- - ERROR: Command errored out with exit status 1: - command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools - cwd: None - Complete output (28 lines): - Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages - WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/ - Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz - ERROR: Command errored out with exit status 1: - command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info - cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/ - Complete output (15 lines): - Traceback (most recent call last): - File "", line 1, in - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in - from setuptools.extension import Extension, Library - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in - from setuptools.dist import _get_unpatched - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in - from setuptools.command.install import install - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in - from setuptools.command import install_scripts - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in - from pkg_resources import Distribution, PathMetadata, ensure_directory - File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in - register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) - AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' - ---------------------------------------- - ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. - ---------------------------------------- -ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output. --- stdout: -------------------- -Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject - Installing build dependencies: started - Installing build dependencies: finished with status 'error' -_______________________ test_config_file_override_stack ________________________ -script = -virtualenv = - def test_config_file_override_stack(script, virtualenv): - """ - Test config files (global, overriding a global config with a - local, overriding all with a command line flag). - - """ - fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-') - try: -> _test_config_file_override_stack(script, virtualenv, config_file) -tests/functional/test_install_config.py:144: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -tests/functional/test_install_config.py:172: in _test_config_file_override_stack - result = script.pip( -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...) -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools - return code: 1 --- stderr: -------------------- -WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -ERROR: Could not find a version that satisfies the requirement INITools (from versions: none) -ERROR: No matching distribution found for INITools --- stdout: -------------------- -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc -Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' -Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df -Looking in indexes: https://pypi.org/simple/ -1 location(s) to search for versions of INITools: -* https://pypi.org/simple/initools/ -Getting page https://pypi.org/simple/initools/ -Found index url https://pypi.org/simple/ -Looking up "https://pypi.org/simple/initools/" in the cache -Request header has "max_age" as 0, cache bypassed -Starting new HTTPS connection (1): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (2): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (3): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (4): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (5): pypi.org:443 -Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) -Starting new HTTPS connection (6): pypi.org:443 -Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping -Given no hashes to check 0 links for project 'INITools': discarding no candidates -Cleaning up... -Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc' -Exception information: -Traceback (most recent call last): - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main - status = self.run(options, args) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run - resolver.resolve(requirement_set) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve - self._resolve_one(requirement_set, req) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one - abstract_dist = self._get_abstract_dist_for(req_to_install) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for - req.populate_link(self.finder, upgrade_allowed, self.require_hashes) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link - self.link = finder.find_requirement(self, upgrade) - File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement - raise DistributionNotFound( -pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools -_______________________ test_no_upgrade_unless_requested _______________________ -script = - def test_no_upgrade_unless_requested(script): - """ - No upgrade if not specifically requested. - - """ -> script.pip('install', 'INITools==0.1') -tests/functional/test_install_upgrade.py:16: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -self = -args = ('python', '-m', 'pip', 'install', 'INITools==0.1') -kw = {'expect_stderr': True} -cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch') -run_from = None, allow_stderr_error = False, allow_stderr_warning = False -expect_error = None - def run(self, *args, **kw): - """ - :param allow_stderr_error: whether a logged error is allowed in - stderr. Passing True for this argument implies - `allow_stderr_warning` since warnings are weaker than errors. - :param allow_stderr_warning: whether a logged warning (or - deprecation message) is allowed in stderr. - :param expect_error: if False (the default), asserts that the command - exits with 0. Otherwise, asserts that the command exits with a - non-zero exit code. Passing True also implies allow_stderr_error - and allow_stderr_warning. - :param expect_stderr: whether to allow warnings in stderr (equivalent - to `allow_stderr_warning`). This argument is an abbreviated - version of `allow_stderr_warning` and is also kept for backwards - compatibility. - """ - if self.verbose: - print('>> running %s %s' % (args, kw)) - - cwd = kw.pop('cwd', None) - run_from = kw.pop('run_from', None) - assert not cwd or not run_from, "Don't use run_from; it's going away" - cwd = cwd or run_from or self.cwd - if sys.platform == 'win32': - # Partial fix for ScriptTest.run using `shell=True` on Windows. - args = [str(a).replace('^', '^^').replace('&', '^&') for a in args] - - # Remove `allow_stderr_error` and `allow_stderr_warning` before - # calling run() because PipTestEnvironment doesn't support them. - allow_stderr_error = kw.pop('allow_stderr_error', None) - allow_stderr_warning = kw.pop('allow_stderr_warning', None) - - # Propagate default values. - expect_error = kw.get('expect_error') - if expect_error: - # Then default to allowing logged errors. - if allow_stderr_error is not None and not allow_stderr_error: - raise RuntimeError( - 'cannot pass allow_stderr_error=False with ' - 'expect_error=True' - ) - allow_stderr_error = True - - elif kw.get('expect_stderr'): - # Then default to allowing logged warnings. - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'expect_stderr=True' - ) - allow_stderr_warning = True - - if allow_stderr_error: - if allow_stderr_warning is not None and not allow_stderr_warning: - raise RuntimeError( - 'cannot pass allow_stderr_warning=False with ' - 'allow_stderr_error=True' - ) - - # Default values if not set. - if allow_stderr_error is None: - allow_stderr_error = False - if allow_stderr_warning is None: - allow_stderr_warning = allow_stderr_error - - # Pass expect_stderr=True to allow any stderr. We do this because - # we do our checking of stderr further on in check_stderr(). - kw['expect_stderr'] = True -> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw) -E AssertionError: Script returned code: 1 -tests/lib/__init__.py:586: AssertionError ------------------------------ Captured stdout call ----------------------------- -Script result: python -m pip install INITools==0.1 - return code: 1 --- stderr: -------------------- -WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/ -ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none) -ERROR: No matching distribution found for INITools==0.1 ---- - tests/functional/test_freeze.py | 3 +++ - tests/functional/test_install.py | 1 + - tests/functional/test_install_config.py | 1 + - tests/functional/test_install_upgrade.py | 1 + - 4 files changed, 6 insertions(+) - -diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py -index 546a482..aabb0ca 100644 ---- a/tests/functional/test_freeze.py -+++ b/tests/functional/test_freeze.py -@@ -705,6 +705,7 @@ def test_freeze_user(script, virtualenv, data): - assert 'simple2' not in result.stdout - - -+@pytest.mark.network - def test_freeze_path(tmpdir, script, data): - """ - Test freeze with --path. -@@ -718,6 +719,7 @@ def test_freeze_path(tmpdir, script, data): - _check_output(result.stdout, expected) - - -+@pytest.mark.network - def test_freeze_path_exclude_user(tmpdir, script, data): - """ - Test freeze with --path and make sure packages from --user are not picked -@@ -739,6 +741,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data): - _check_output(result.stdout, expected) - - -+@pytest.mark.network - def test_freeze_path_multiple(tmpdir, script, data): - """ - Test freeze with multiple --path arguments. -diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py -index 0bea054..b816df6 100644 ---- a/tests/functional/test_install.py -+++ b/tests/functional/test_install.py -@@ -1274,6 +1274,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel): - assert "Running setup.py install for upper" in str(res), str(res) - - -+@pytest.mark.network - def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel): - to_install = data.packages.joinpath('pep517_setup_and_pyproject') - res = script.pip( -diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py -index bcf83f1..c9c60a2 100644 ---- a/tests/functional/test_install_config.py -+++ b/tests/functional/test_install_config.py -@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data): - ), 'stdout: {}'.format(result.stdout) - - -+@pytest.mark.network - def test_config_file_override_stack(script, virtualenv): - """ - Test config files (global, overriding a global config with a -diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py -index 36b518b..c34a961 100644 ---- a/tests/functional/test_install_upgrade.py -+++ b/tests/functional/test_install_upgrade.py -@@ -8,6 +8,7 @@ from tests.lib import assert_all_changes, pyversion - from tests.lib.local_repos import local_checkout - - -+@pytest.mark.network - def test_no_upgrade_unless_requested(script): - """ - No upgrade if not specifically requested. --- -2.20.1 - From 5afdc00b06e0272c5551f3f4afd53e69091aa54e Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 11 May 2021 16:58:03 +0200 Subject: [PATCH 002/118] Update to 21.1.1 Changes: - dropped emit-a-warning-when-running-with-root-privileges.patch (fixed in upstream) - rebased dummy-certifi.patch, remove-existing-dist-only-if-path-conflicts.patch, nowarn-pip._internal.main.patch --- dummy-certifi.patch | 33 ++++----- ...ng-when-running-with-root-privileges.patch | 51 ------------- nowarn-pip._internal.main.patch | 32 +++++---- python-pip.rpmlintrc | 4 -- python-pip.spec | 31 ++++---- ...existing-dist-only-if-path-conflicts.patch | 72 ++++++++++--------- sources | 2 +- 7 files changed, 86 insertions(+), 139 deletions(-) delete mode 100644 emit-a-warning-when-running-with-root-privileges.patch diff --git a/dummy-certifi.patch b/dummy-certifi.patch index 992aed4..459eada 100644 --- a/dummy-certifi.patch +++ b/dummy-certifi.patch @@ -1,25 +1,26 @@ -From cf96ff346639d1b9f5efa3fd0976694e04df3f5f Mon Sep 17 00:00:00 2001 -From: Tomas Hrnciar -Date: Sun, 26 Apr 2020 21:38:44 +0200 +From 2c58d7301dd5a47570f782fe2fce7fbb1918f60c Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 10 May 2021 16:38:50 +0200 Subject: [PATCH] Dummy certifi patch +Co-Authored-By: Tomas Hrnciar --- src/pip/_vendor/certifi/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py -index 8987449..d174ced 100644 +index b8140cf..f1a0b01 100644 --- a/src/pip/_vendor/certifi/core.py +++ b/src/pip/_vendor/certifi/core.py -@@ -9,6 +9,7 @@ This module returns the installation location of cacert.pem or its contents. - import os - +@@ -14,6 +14,7 @@ class _PipPatchedCertificate(Exception): + + try: + raise ImportError # force fallback - from importlib.resources import path as get_path, read_text - - _CACERT_CTX = None -@@ -51,9 +52,7 @@ except ImportError: + # 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: # 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(): @@ -27,9 +28,9 @@ index 8987449..d174ced 100644 - - return os.path.join(f, "cacert.pem") + return '/etc/pki/tls/certs/ca-bundle.crt' - - - def contents(): --- -2.25.4 + + + def contents(): +-- +2.30.2 diff --git a/emit-a-warning-when-running-with-root-privileges.patch b/emit-a-warning-when-running-with-root-privileges.patch deleted file mode 100644 index 7c6a390..0000000 --- a/emit-a-warning-when-running-with-root-privileges.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 74bb5d26e232493de43adfa1f4b42b66fd701294 Mon Sep 17 00:00:00 2001 -From: Tomas Hrnciar -Date: Sun, 26 Apr 2020 13:52:24 +0200 -Subject: [PATCH] Downstream only patch - -Emit a warning to the user if pip install is run with root privileges -Issue upstream: https://github.com/pypa/pip/issues/4288 ---- - src/pip/_internal/commands/install.py | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 70bda2e2..1e750ae1 100644 ---- a/src/pip/_internal/commands/install.py -+++ b/src/pip/_internal/commands/install.py -@@ -13,6 +13,8 @@ import operator - import os - import shutil - import site -+import sys -+from os import path - from optparse import SUPPRESS_HELP - - from pip._vendor import pkg_resources -@@ -241,6 +243,23 @@ class InstallCommand(RequirementCommand): - raise CommandError("Can not combine '--user' and '--target'") - - cmdoptions.check_install_build_global(options) -+ -+ def is_venv(): -+ return (hasattr(sys, 'real_prefix') or -+ (hasattr(sys, 'base_prefix') and -+ sys.base_prefix != sys.prefix)) -+ -+ # Check whether we have root privileges and aren't in venv/virtualenv -+ if os.getuid() == 0 and not is_venv() and not options.root_path: -+ command = path.basename(sys.argv[0]) -+ if command == "__main__.py": -+ command = path.basename(sys.executable) + " -m pip" -+ logger.warning( -+ "Running pip install with root privileges is " -+ "generally not a good idea. Try `%s install --user` instead." -+ % command -+ ) -+ - upgrade_strategy = "to-satisfy-only" - if options.upgrade: - upgrade_strategy = options.upgrade_strategy --- -2.23.0 - diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 7027cf5..23b615b 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,10 +1,12 @@ -From 7c36cb21910b415e0eb171d0f6c4dbf72382fdaf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 10 Mar 2020 11:03:22 +0100 +From 8519679166122b7482a70f6c10d303520e5f83c9 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 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 ++++++++++--------- @@ -12,29 +14,29 @@ this warning is juts moot. Also, the warning breaks CPython test suite. 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py -index 3aa8a46..0ec017b 100755 +index 41071cd..c7b4e65 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -15,4 +15,4 @@ def main(args=None): +@@ -12,4 +12,4 @@ def main(args=None): """ 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 befd01c..d6f3632 100644 +index 879bf21..584e8b5 100644 --- a/src/pip/_internal/utils/entrypoints.py +++ b/src/pip/_internal/utils/entrypoints.py -@@ -7,7 +7,7 @@ if MYPY_CHECK_RUNNING: - from typing import List, Optional - - +@@ -4,7 +4,7 @@ from typing import List, Optional + from pip._internal.cli.main import main + + -def _wrapper(args=None): +def _wrapper(args=None, _nowarn=False): # type: (Optional[List[str]]) -> int """Central wrapper for all old entrypoints. - -@@ -20,12 +20,13 @@ def _wrapper(args=None): + +@@ -17,12 +17,13 @@ def _wrapper(args=None): directing them to an appropriate place for help, we now define all of our old entrypoints as wrappers for the current one. """ @@ -67,6 +69,6 @@ index e416315..7f57f67 100644 - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr --- -2.24.1 +-- +2.30.2 diff --git a/python-pip.rpmlintrc b/python-pip.rpmlintrc index 39079e3..3a17d79 100644 --- a/python-pip.rpmlintrc +++ b/python-pip.rpmlintrc @@ -1,12 +1,8 @@ # This is just temporary, when upstream merges PRs it can be removed -# https://github.com/pypa/pip/pull/7959 # https://github.com/ActiveState/appdirs/pull/144 # https://github.com/psf/requests/pull/5410 -# https://github.com/chardet/chardet/pull/192 -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_internal/__init__.py\b') 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') -addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/chardet/cli/chardetect.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 diff --git a/python-pip.spec b/python-pip.spec index 12bf85d..e285ebb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.0.1 +%global base_version 21.1.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,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. @@ -33,7 +33,6 @@ Summary: A tool for installing and managing Python packages # chardet: LGPLv2 # colorama: BSD # CacheControl: ASL 2.0 -# contextlib2: Python # distlib: Python # distro: ASL 2.0 # html5lib: MIT @@ -46,9 +45,9 @@ Summary: A tool for installing and managing Python packages # pyparsing: MIT # requests: ASL 2.0 # resolvelib: ISC -# retrying: ASL 2.0 # setuptools: MIT # six: MIT +# tenacity: ASL 2.0 # toml: MIT # urllib3: MIT # webencodings: BSD @@ -68,12 +67,6 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif -# Downstream only patch -# Emit a warning to the user if pip install is run with root privileges -# Upstream discussion: -# https://discuss.python.org/t/playing-nice-with-external-package-managers/1968/20 -Patch1: emit-a-warning-when-running-with-root-privileges.patch - # 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 @@ -133,23 +126,22 @@ Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 Provides: bundled(python%{1}dist(certifi)) = 2020.12.5 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1 Provides: bundled(python%{1}dist(distlib)) = 0.3.1 Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 2.10 +Provides: bundled(python%{1}dist(idna)) = 3.1 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 20.9 -Provides: bundled(python%{1}dist(pep517)) = 0.9.1 +Provides: bundled(python%{1}dist(pep517)) = 0.10 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 Provides: bundled(python%{1}dist(requests)) = 2.25.1 -Provides: bundled(python%{1}dist(resolvelib)) = 0.5.4 -Provides: bundled(python%{1}dist(retrying)) = 1.3.3 +Provides: bundled(python%{1}dist(resolvelib)) = 0.7 Provides: bundled(python%{1}dist(setuptools)) = 44 Provides: bundled(python%{1}dist(six)) = 1.15 +Provides: bundled(python%{1}dist(tenacity)) = 7 Provides: bundled(python%{1}dist(toml)) = 0.10.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.2 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.4 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -225,6 +217,8 @@ 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-copybutton +BuildRequires: python%{python3_pkgversion}-myst-parser %description doc A documentation for a tool for installing and managing Python packages @@ -254,7 +248,7 @@ rm src/pip/_vendor/certifi/*.pem 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 +sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here ln -s %{python_wheeldir} tests/data/common_wheels @@ -396,6 +390,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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) diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 3913557..91985cb 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,6 +1,6 @@ -From f83eacf40f1506418e74d747906b8f108401f91d Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Tue, 26 Jan 2021 09:05:07 +0100 +From d8df1b9010bc69bfdb606cb51aa3a8a5c6ae6d4c Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib @@ -11,6 +11,7 @@ Resolves: rhbz#1550368 Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin +Co-Authored-By: Lumir Balhar --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- @@ -19,10 +20,10 @@ Co-Authored-By: Petr Viktorin 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 6d0aa30..0a5f8ed 100644 +index 55c17ac..9f6ba44 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -39,6 +39,7 @@ from pip._internal.utils.misc import ( +@@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -30,7 +31,7 @@ index 6d0aa30..0a5f8ed 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -445,7 +446,7 @@ class InstallRequirement: +@@ -440,7 +441,7 @@ class InstallRequirement: "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -40,18 +41,18 @@ index 6d0aa30..0a5f8ed 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 665dba1..a219e63 100644 +index 17de7f0..3dd872d 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver +@@ -42,6 +42,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, get_requires_python - from pip._internal.utils.typing import MYPY_CHECK_RUNNING - -@@ -204,7 +205,9 @@ class Resolver(BaseResolver): + + logger = logging.getLogger(__name__) +@@ -199,7 +200,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -61,36 +62,37 @@ index 665dba1..a219e63 100644 + and dist_in_install_path(req.satisfied_by)): 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 be0729e..bc2912b 100644 +index 6e3f195..bf07c1b 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,5 +1,6 @@ +@@ -1,6 +1,7 @@ + import contextlib import functools import logging +import sys - - from pip._vendor.packaging.utils import canonicalize_name - -@@ -19,7 +20,9 @@ from pip._internal.utils.misc import ( + from typing import ( + TYPE_CHECKING, + Dict, +@@ -46,7 +47,9 @@ from pip._internal.utils.misc import ( dist_in_site_packages, dist_in_usersite, get_installed_distributions, + dist_location, ) -+from pip._internal.locations import distutils_scheme - from pip._internal.utils.typing import MYPY_CHECK_RUNNING ++from pip._internal.locations import get_scheme from pip._internal.utils.virtualenv import running_under_virtualenv - -@@ -362,6 +365,13 @@ class Factory: + + from .base import Candidate, CandidateVersion, Constraint, Requirement +@@ -479,6 +482,13 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None - + + # Prevent uninstalling packages from /usr + if dist_location(dist) in ( -+ distutils_scheme('', prefix=sys.base_prefix)['purelib'], -+ distutils_scheme('', prefix=sys.base_prefix)['platlib'], ++ get_scheme('', prefix=sys.base_prefix).purelib, ++ get_scheme('', prefix=sys.base_prefix).platlib, + ): + return None + @@ -98,21 +100,21 @@ index be0729e..bc2912b 100644 # 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 6dd94e2..7925518 100644 +index 26037db..11b918d 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -27,6 +27,7 @@ from pip._vendor.retrying import retry # type: ignore +@@ -40,6 +40,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 distutils_scheme, get_major_minor_version, site_packages, user_site ++from pip._internal.locations import get_scheme from pip._internal.utils.compat import WINDOWS, stdlib_pkgs - from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast from pip._internal.utils.virtualenv import ( -@@ -398,6 +399,16 @@ def dist_in_site_packages(dist): + running_under_virtualenv, +@@ -379,6 +380,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) - - + + +def dist_in_install_path(dist): + """ + Return True if given Distribution is installed in @@ -120,12 +122,12 @@ index 6dd94e2..7925518 100644 + """ + norm_path = normalize_path(dist_location(dist)) + return norm_path.startswith(normalize_path( -+ distutils_scheme("")['purelib'].split('python')[0])) ++ get_scheme("").purelib.split('python')[0])) + + def dist_is_editable(dist): # type: (Distribution) -> bool """ --- -2.29.2 +-- +2.30.2 diff --git a/sources b/sources index 13d89e7..9a3e5d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.0.1.tar.gz) = 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664 +SHA512 (pip-21.1.1.tar.gz) = 05157ed586597f16948afdad43d98cc095803d2d22b1427ac1028ca2a73a26d65e597446808194343ed36f9eb7cb910ac89e73a6a9a90ee868ec822fdbe641c5 From 34ceb80d614ebf97ed5daffff20f8c87a719da40 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 17 May 2021 12:00:40 +0200 Subject: [PATCH 003/118] Resolve rpmlint warnings & fix changelog typos --- python-pip.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e285ebb..14ecedd 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -413,9 +413,6 @@ Resolves: rhbz#1922592 - New resolver - Fixes: rhbz#1893470 -* Fri Dec 04 2020 Miro Hrončok - 20.2.4-2 -- Disable tests and documentation in Fedora ELN (and RHEL) - * Mon Oct 19 2020 Lumír Balhar - 20.2.4-1 - Update to 20.2.4 (#1889112) @@ -529,7 +526,7 @@ Resolves: rhbz#1922592 - Create python-pip-wheel package with the wheel * Tue Jul 31 2018 Miro Hrončok - 18.0-2 -- Remove redundant "Unicode"" from License +- Remove redundant "Unicode" from License * Mon Jul 23 2018 Marcel Plch - 18.0-7 - Update to 18.0 @@ -746,7 +743,7 @@ Resolves: rhbz#1406922 * 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 +- 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 From 4e92c5da5ba962f152aa16752481c83c01c40f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 25 May 2021 00:50:46 +0200 Subject: [PATCH 004/118] Fedora CI: Cleanup for Fedora 32 EOL and prepare for Python 3.5 retirement Fedora 32 was the last one to include Python 3.4 https://fedoraproject.org/wiki/Changes/RetirePython34 Fedora 35 will be the first one not to include Python 3.5 https://fedoraproject.org/wiki/Changes/RetirePython3.5 --- tests/tests.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 1383612..b29f39e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,12 +10,9 @@ - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" dest: "pyproject-rpm-macros" tests: - - smoke34_optional: + - smoke35_optional: dir: python/smoke - run: VERSION=3.4 INSTALL_OR_SKIP=true ./venv.sh - - smoke35: - dir: python/smoke - run: VERSION=3.5 ./venv.sh + run: VERSION=3.5 INSTALL_OR_SKIP=true ./venv.sh - smoke36: dir: python/smoke run: VERSION=3.6 ./venv.sh @@ -34,12 +31,9 @@ - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - - smoke34_virtualenv_optional: + - smoke35_virtualenv_optional: dir: python/smoke - run: VERSION=3.4 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh - - smoke35_virtualenv: - dir: python/smoke - run: VERSION=3.5 METHOD=virtualenv ./venv.sh + 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 @@ -73,7 +67,6 @@ - gcc - virtualenv - python2.7 - - python3.5 - python3.6 - python3.7 - python3.8 From ec8cee20b2c4820c7082493445da4a7ed50f0d37 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 1 Jun 2021 16:35:15 +0200 Subject: [PATCH 005/118] Bootstrap for Python 3.10 --- python-pip.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 14ecedd..290b33c 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. @@ -22,7 +24,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 +392,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 From d2309d3f09fa21fef8d339363e45cba42e12c5e2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 02:57:58 +0200 Subject: [PATCH 006/118] Rebuilt for Python 3.10 --- python-pip.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 290b33c..676979a 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. @@ -24,7 +22,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. @@ -392,6 +390,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 From de909508e7ac8d33f0aa6c1310afcbcd660f7494 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 8 Jun 2021 08:59:55 +0200 Subject: [PATCH 007/118] Update to 21.1.2 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 676979a..07d309f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.1 +%global base_version 21.1.2 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 3%{?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. @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/sources b/sources index 9a3e5d8..2b78f39 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.1.tar.gz) = 05157ed586597f16948afdad43d98cc095803d2d22b1427ac1028ca2a73a26d65e597446808194343ed36f9eb7cb910ac89e73a6a9a90ee868ec822fdbe641c5 +SHA512 (pip-21.1.2.tar.gz) = 54a2b6074fcb2640868dedcabb5087b79a53a8ad57ec4ab5acf2862b8037403d8f156c2853ab60c2f10c6af999a0a90774f0bc3eca2978a82590935d37af167f From 44c83538123458bb630f317fba97f217746cc5c2 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 29 Jun 2021 12:18:34 +0200 Subject: [PATCH 008/118] Update to 21.1.3 --- python-pip.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 07d309f..bd1c90a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.2 +%global base_version 21.1.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/sources b/sources index 2b78f39..71de84e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.2.tar.gz) = 54a2b6074fcb2640868dedcabb5087b79a53a8ad57ec4ab5acf2862b8037403d8f156c2853ab60c2f10c6af999a0a90774f0bc3eca2978a82590935d37af167f +SHA512 (pip-21.1.3.tar.gz) = 21bdc78f24751981ae49c9fda0430fc92b8d33eb7a546bc344e8cea4aa85dcd42191ef8eb3fdfb4f3d1cb5921698f819d73e6e190d8745cf7ddfa52732d95999 From 08464d3bcd7641c6bf5186c0b3d8695ef5f85e70 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 08:14:14 +0000 Subject: [PATCH 009/118] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_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 bd1c90a..ca56208 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,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 and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 From d39c4964731d5811a49929782a0a791cbb52a732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:33:45 +0200 Subject: [PATCH 010/118] Update to 21.2.3 The bundled toml was replaced by tomli, same license (MIT). --- no-version-warning.patch | 13 ++--- nowarn-pip._internal.main.patch | 28 +++++------ python-pip.spec | 32 ++++++------ ...existing-dist-only-if-path-conflicts.patch | 50 +++++++++++-------- sources | 2 +- 5 files changed, 68 insertions(+), 57 deletions(-) diff --git a/no-version-warning.patch b/no-version-warning.patch index 6d7268f..6c34bec 100644 --- a/no-version-warning.patch +++ b/no-version-warning.patch @@ -1,7 +1,8 @@ -diff -rU3 pip-20.3-orig/src/pip/_vendor/packaging/version.py pip-20.3/src/pip/_vendor/packaging/version.py ---- pip-20.3-orig/src/pip/_vendor/packaging/version.py 2020-11-30 12:58:32.000000000 +0100 -+++ pip-20.3/src/pip/_vendor/packaging/version.py 2020-12-16 21:25:15.818221608 +0100 -@@ -124,11 +124,6 @@ +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) @@ -11,5 +12,5 @@ diff -rU3 pip-20.3-orig/src/pip/_vendor/packaging/version.py pip-20.3/src/pip/_v - DeprecationWarning, - ) - def __str__(self): - # type: () -> str + def __str__(self) -> str: + return self._version diff --git a/nowarn-pip._internal.main.patch b/nowarn-pip._internal.main.patch index 23b615b..1490643 100644 --- a/nowarn-pip._internal.main.patch +++ b/nowarn-pip._internal.main.patch @@ -1,4 +1,4 @@ -From 8519679166122b7482a70f6c10d303520e5f83c9 Mon Sep 17 00:00:00 2001 +From 619782ad2d181fe2933ddf4edc7127fdc13dd0df 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 @@ -14,29 +14,29 @@ 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 41071cd..c7b4e65 100755 +index 6afb5c6..faf25af 100755 --- a/src/pip/_internal/__init__.py +++ b/src/pip/_internal/__init__.py -@@ -12,4 +12,4 @@ def main(args=None): +@@ -16,4 +16,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 879bf21..584e8b5 100644 +index 1504a12..07d941b 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 - - --def _wrapper(args=None): -+def _wrapper(args=None, _nowarn=False): - # type: (Optional[List[str]]) -> int + + +-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. - -@@ -17,12 +17,13 @@ def _wrapper(args=None): + + Historically pip has had several entrypoints defined. Because of issues +@@ -16,12 +16,13 @@ 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. """ @@ -69,6 +69,6 @@ index e416315..7f57f67 100644 - assert "old script wrapper" in result2.stderr + if entrypoint[0] != "fake_pip = pip._internal:main": + assert "old script wrapper" in result2.stderr --- -2.30.2 +-- +2.32.0 diff --git a/python-pip.spec b/python-pip.spec index ca56208..50a2677 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.1.3 +%global base_version 21.2.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,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. @@ -48,7 +48,7 @@ Summary: A tool for installing and managing Python packages # setuptools: MIT # six: MIT # tenacity: ASL 2.0 -# toml: MIT +# tomli: MIT # urllib3: MIT # webencodings: BSD @@ -123,25 +123,25 @@ Packages" or "Pip Installs Python". %global bundled() %{expand: Provides: bundled(python%{1}dist(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 -Provides: bundled(python%{1}dist(certifi)) = 2020.12.5 +Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.1 +Provides: bundled(python%{1}dist(distlib)) = 0.3.2 Provides: bundled(python%{1}dist(distro)) = 1.5 Provides: bundled(python%{1}dist(html5lib)) = 1.1 -Provides: bundled(python%{1}dist(idna)) = 3.1 +Provides: bundled(python%{1}dist(idna)) = 3.2 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 -Provides: bundled(python%{1}dist(packaging)) = 20.9 -Provides: bundled(python%{1}dist(pep517)) = 0.10 +Provides: bundled(python%{1}dist(packaging)) = 21 +Provides: bundled(python%{1}dist(pep517)) = 0.11 Provides: bundled(python%{1}dist(progress)) = 1.5 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 -Provides: bundled(python%{1}dist(requests)) = 2.25.1 -Provides: bundled(python%{1}dist(resolvelib)) = 0.7 +Provides: bundled(python%{1}dist(requests)) = 2.26 +Provides: bundled(python%{1}dist(resolvelib)) = 0.7.1 Provides: bundled(python%{1}dist(setuptools)) = 44 -Provides: bundled(python%{1}dist(six)) = 1.15 -Provides: bundled(python%{1}dist(tenacity)) = 7 -Provides: bundled(python%{1}dist(toml)) = 0.10.2 -Provides: bundled(python%{1}dist(urllib3)) = 1.26.4 +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.6 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -390,6 +390,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 91985cb..56c7e2f 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From d8df1b9010bc69bfdb606cb51aa3a8a5c6ae6d4c Mon Sep 17 00:00:00 2001 +From a722cbefa5e1a4bf5357f13852fa927a46fcd624 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -20,7 +20,7 @@ Co-Authored-By: Lumir Balhar 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 55c17ac..9f6ba44 100644 +index 4c58cdb..3570e17 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( @@ -31,7 +31,7 @@ index 55c17ac..9f6ba44 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -440,7 +441,7 @@ class InstallRequirement: +@@ -426,7 +427,7 @@ class InstallRequirement: "lack sys.path precedence to {} in {}".format( existing_dist.project_name, existing_dist.location) ) @@ -41,7 +41,7 @@ index 55c17ac..9f6ba44 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 17de7f0..3dd872d 100644 +index 4df8f7e..dda2292 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py @@ -42,6 +42,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid @@ -50,9 +50,9 @@ index 17de7f0..3dd872d 100644 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, get_requires_python - + logger = logging.getLogger(__name__) -@@ -199,7 +200,9 @@ class Resolver(BaseResolver): +@@ -194,7 +195,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -62,9 +62,9 @@ index 17de7f0..3dd872d 100644 + and dist_in_install_path(req.satisfied_by)): 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 6e3f195..bf07c1b 100644 +index e7fd344..e36f025 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -75,20 +75,26 @@ index 6e3f195..bf07c1b 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -46,7 +47,9 @@ from pip._internal.utils.misc import ( - dist_in_site_packages, - dist_in_usersite, - get_installed_distributions, -+ dist_location, +@@ -34,6 +35,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 +@@ -46,6 +48,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.virtualenv import running_under_virtualenv - + from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -479,6 +482,13 @@ class Factory: +@@ -525,6 +528,13 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None - + + # Prevent uninstalling packages from /usr + if dist_location(dist) in ( + get_scheme('', prefix=sys.base_prefix).purelib, @@ -100,7 +106,7 @@ index 6e3f195..bf07c1b 100644 # 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 26037db..11b918d 100644 +index 99ebea3..5901687 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -40,6 +40,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed @@ -111,10 +117,10 @@ index 26037db..11b918d 100644 from pip._internal.utils.compat import WINDOWS, stdlib_pkgs from pip._internal.utils.virtualenv import ( running_under_virtualenv, -@@ -379,6 +380,16 @@ def dist_in_site_packages(dist): +@@ -382,6 +383,16 @@ def dist_in_site_packages(dist): return dist_location(dist).startswith(normalize_path(site_packages)) - - + + +def dist_in_install_path(dist): + """ + Return True if given Distribution is installed in @@ -128,6 +134,6 @@ index 26037db..11b918d 100644 def dist_is_editable(dist): # type: (Distribution) -> bool """ --- -2.30.2 +-- +2.32.0 diff --git a/sources b/sources index 71de84e..8be331c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.1.3.tar.gz) = 21bdc78f24751981ae49c9fda0430fc92b8d33eb7a546bc344e8cea4aa85dcd42191ef8eb3fdfb4f3d1cb5921698f819d73e6e190d8745cf7ddfa52732d95999 +SHA512 (pip-21.2.3.tar.gz) = 9df888c871040d3812a2bf358013e3af976ede1e6aebf6747527be470674bb55ca1312d54021a7913630c04b09981cf481202c8405faf08b1b37e29272adf547 From 8f31f816cc11076e2c6335af87357bfc988e1a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:37:32 +0200 Subject: [PATCH 011/118] Mark the installed LICENSE.txt as %license instead of duplicating it --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 50a2677..f92bb33 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -359,8 +359,8 @@ pytest_k='not completion and %files -n python%{python3_pkgversion}-%{srcname} -%license LICENSE.txt %doc README.rst +%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt %if %{with doc} %{_mandir}/man1/pip.* %{_mandir}/man1/pip-*.* From d3f6b95d9ce73fc6e947fae0ad423572be447654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:47:13 +0200 Subject: [PATCH 012/118] Adapt wheel installation to be more like %pyproject_install, use %python3 --- python-pip.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index f92bb33..63d21cb 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -270,16 +270,20 @@ rm -rf docs/build/html/{.doctrees,.buildinfo} %install -# The following is similar to %%py3_install_wheel, but we don't have +# 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} dist/%{python_wheelname}/pip install \ +%{python3} dist/%{python_wheelname}/pip install \ --root %{buildroot} \ --no-deps \ - --no-cache-dir \ - --no-index \ + --disable-pip-version-check \ + --progress-bar off \ + --verbose \ --ignore-installed \ + --no-warn-script-location \ + --no-index \ + --no-cache-dir \ --find-links dist \ 'pip==%{upstream_version}' From d7a96d26f431c32787c80af06b8bb7b8ca4b2237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Aug 2021 20:48:52 +0200 Subject: [PATCH 013/118] Enable previously failing test --- python-pip.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 63d21cb..31998f9 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -339,8 +339,6 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} # needs unaltered sys.path and we cannot do that in %%check # test_pep517_and_build_options # test_config_file_venv_option -# TODO investigate failures -# test_uninstall_non_local_distutils # Incompatible with the latest virtualenv # test_from_link_vcs_with_source_dir_obtains_commit_id # test_from_link_vcs_without_source_dir @@ -348,7 +346,6 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} pytest_k='not completion and not test_pep517_and_build_options and not test_config_file_venv_option and - not test_uninstall_non_local_distutils 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' From 192c4aebdf21c26c83b2580a978c9ece4a8d2352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Aug 2021 12:26:06 +0200 Subject: [PATCH 014/118] Fix broken uninstallation by a bogus downstream patch In pip 21.2, the Distribution here is a wrapper around the regular Distribution. It has a limited set of API defined by the BaseDistribution protocol. dist_location() uses the project_name attribute under the hood -- and that is not part of the API. If we ever upstream this, we should make this check a property of BaseDistribution. But, for now, we hotfix it by accessing the private wrapped Distribution object directly. Yes, this is ugly. --- python-pip.spec | 5 ++++- remove-existing-dist-only-if-path-conflicts.patch | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 31998f9..261ab3e 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,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. @@ -391,6 +391,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index 56c7e2f..e68e892 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From a722cbefa5e1a4bf5357f13852fa927a46fcd624 Mon Sep 17 00:00:00 2001 +From aca0c9df4ef54f70a3fedb07f4faac463f88a331 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -12,6 +12,7 @@ Co-Authored-By: Michal Cyprian Co-Authored-By: Victor Stinner Co-Authored-By: Petr Viktorin Co-Authored-By: Lumir Balhar +Co-Authored-By: Miro Hrončok --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- @@ -64,7 +65,7 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..e36f025 100644 +index e7fd344..555e657 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -96,7 +97,7 @@ index e7fd344..e36f025 100644 return None + # Prevent uninstalling packages from /usr -+ if dist_location(dist) in ( ++ if dist_location(dist._dist) in ( + get_scheme('', prefix=sys.base_prefix).purelib, + get_scheme('', prefix=sys.base_prefix).platlib, + ): From 27c255ce814fe6a65f48c022e78570b0dda42b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Aug 2021 13:00:49 +0200 Subject: [PATCH 015/118] Fedora CI: Add pip-upgrade tests --- tests/pip_install_upgrade/runtest.sh | 40 ++++++++++++++++++++++++++++ tests/tests.yml | 4 +++ 2 files changed, 44 insertions(+) create mode 100755 tests/pip_install_upgrade/runtest.sh diff --git a/tests/pip_install_upgrade/runtest.sh b/tests/pip_install_upgrade/runtest.sh new file mode 100755 index 0000000..40e14a3 --- /dev/null +++ b/tests/pip_install_upgrade/runtest.sh @@ -0,0 +1,40 @@ +#!/bin/sh -eux +# This script requires root privileges and you should never run it on your own machine +test $EUID -eq 0 + +PYTHON_VERSION=$(/usr/bin/python3 -c 'import sys; print("{}.{}".format(*sys.version_info))') +RPM_SITELIB="/usr/lib/python${PYTHON_VERSION}/site-packages" +LOCAL_SITELIB="/usr/local/lib/python${PYTHON_VERSION}/site-packages" +USER_SITELIB="/home/fedora-test-user/.local/lib/python${PYTHON_VERSION}/site-packages" + +# First, let's install older Pello with pip as if it was installed by RPM +# This is an approximation, but it usually works +RPM_BUILD_ROOT=/ /usr/bin/pip install 'Pello==1.0.1' + +# Now, we'll upgrade it with regular pip +/usr/bin/pip install --upgrade 'Pello==1.0.2' + +# pip should see it +/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 "${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 "${LOCAL_SITELIB}/Pello-1.0.2.dist-info" + +# And pip should still see the RPM-installed one +/usr/bin/pip freeze | grep '^Pello==1\.0\.1$' + +# Again, but as regular user +useradd fedora-test-user +su fedora-test-user -c '/usr/bin/pip install "Pello==1.0.2"' +test -d "${USER_SITELIB}/Pello-1.0.2.dist-info" +su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.2$' +su fedora-test-user -c '/usr/bin/pip uninstall --yes Pello' +su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.1$' diff --git a/tests/tests.yml b/tests/tests.yml index b29f39e..fcbc430 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -63,6 +63,7 @@ - pyproject_clikit: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-clikit + - pip_install_upgrade required_packages: - gcc - virtualenv @@ -79,3 +80,6 @@ - mock - rpmdevtools - rpm-build + - grep + - util-linux + - shadow-utils From 8b7935f5a8476e3fdfef91e9484afccea4418709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 23 Sep 2021 14:56:56 +0200 Subject: [PATCH 016/118] Detect paths not to uninstall from via sysconfig's rpm_prefix install scheme --- python-pip.spec | 12 +++++++- ...existing-dist-only-if-path-conflicts.patch | 30 +++++++++++-------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 261ab3e..ec7f00a 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,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. @@ -70,6 +70,7 @@ BuildRequires: python-wheel-wheel # 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 +# Could be replaced with https://www.python.org/dev/peps/pep-0668/ Patch3: remove-existing-dist-only-if-path-conflicts.patch # Use the system level root certificate instead of the one bundled in certifi @@ -203,6 +204,12 @@ 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 + + %{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} @@ -391,6 +398,9 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index e68e892..a6cdc1c 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,10 +1,13 @@ -From aca0c9df4ef54f70a3fedb07f4faac463f88a331 Mon Sep 17 00:00:00 2001 +From 03fe2f1a674d8a8dfbd7da5bef2a6ae123670092 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under /usr/lib +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -when pip install -U is executed. +when pip install --upgrade is executed. Resolves: rhbz#1550368 @@ -16,9 +19,9 @@ Co-Authored-By: Miro Hrončok --- src/pip/_internal/req/req_install.py | 3 ++- src/pip/_internal/resolution/legacy/resolver.py | 5 ++++- - src/pip/_internal/resolution/resolvelib/factory.py | 10 ++++++++++ + src/pip/_internal/resolution/resolvelib/factory.py | 13 +++++++++++++ src/pip/_internal/utils/misc.py | 11 +++++++++++ - 4 files changed, 27 insertions(+), 2 deletions(-) + 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index 4c58cdb..3570e17 100644 @@ -65,14 +68,14 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..555e657 100644 +index e7fd344..73b83fb 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ import contextlib import functools import logging -+import sys ++import sysconfig from typing import ( TYPE_CHECKING, Dict, @@ -92,16 +95,19 @@ index e7fd344..555e657 100644 from pip._internal.utils.virtualenv import running_under_virtualenv from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -525,6 +528,13 @@ class Factory: +@@ -525,6 +528,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None + # Prevent uninstalling packages from /usr -+ if dist_location(dist._dist) in ( -+ get_scheme('', prefix=sys.base_prefix).purelib, -+ get_scheme('', prefix=sys.base_prefix).platlib, -+ ): -+ return None ++ try: ++ if dist_location(dist._dist) in ( ++ sysconfig.get_path('purelib', scheme='rpm_prefix'), ++ sysconfig.get_path('platlib', scheme='rpm_prefix'), ++ ): ++ return None ++ except KeyError: # this Python doesn't have 'rpm_prefix' scheme yet ++ pass + # We're installing into global site. The current installation must # be uninstalled, no matter it's in global or user site, because the From 05b44649bb7b306833cf22db8b400fc1cb91300d Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 6 Oct 2021 16:07:04 +0200 Subject: [PATCH 017/118] Remove bundled windows executables Resolves: rhbz#2005453 --- python-pip.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index ec7f00a..530ea14 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -22,7 +22,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. @@ -263,6 +263,9 @@ ln -s %{python_wheeldir} 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 %build %py3_build_wheel @@ -398,6 +401,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 From 54943ebf8ab1f3aa9ffcc9da361f7c71b39176c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Oct 2021 13:34:37 +0200 Subject: [PATCH 018/118] Update to 21.3 --- python-pip.spec | 22 +++++---- ...existing-dist-only-if-path-conflicts.patch | 48 +++++++++---------- sources | 2 +- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 530ea14..ff1412f 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.2.3 +%global base_version 21.3 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -22,7 +22,7 @@ Name: python-%{srcname} Version: %{base_version}%{?prerel:~%{prerel}} -Release: 4%{?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. @@ -122,27 +122,27 @@ 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(appdirs)) = 1.4.4 Provides: bundled(python%{1}dist(cachecontrol)) = 0.12.6 Provides: bundled(python%{1}dist(certifi)) = 2021.5.30 Provides: bundled(python%{1}dist(chardet)) = 4 Provides: bundled(python%{1}dist(colorama)) = 0.4.4 -Provides: bundled(python%{1}dist(distlib)) = 0.3.2 -Provides: bundled(python%{1}dist(distro)) = 1.5 +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.2 Provides: bundled(python%{1}dist(msgpack)) = 1.0.2 Provides: bundled(python%{1}dist(packaging)) = 21 Provides: bundled(python%{1}dist(pep517)) = 0.11 -Provides: bundled(python%{1}dist(progress)) = 1.5 +Provides: bundled(python%{1}dist(platformdirs)) = 2.4 +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.7.1 +Provides: bundled(python%{1}dist(resolvelib)) = 0.8 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.6 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.7 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } @@ -360,11 +360,13 @@ 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 @@ -401,6 +403,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* Wed Oct 13 2021 Miro Hrončok - 21.3-1 +- Update to 21.3 +- Resolves: rhbz#2013026 + * Wed Oct 06 2021 Charalampos Stratakis - 21.2.3-4 - Remove bundled windows executables - Resolves: rhbz#2005453 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index a6cdc1c..f04257c 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -1,4 +1,4 @@ -From 03fe2f1a674d8a8dfbd7da5bef2a6ae123670092 Mon Sep 17 00:00:00 2001 +From 517656ed4520b09ac6365467e459778f94ca2f0c Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 10 May 2021 18:16:20 +0200 Subject: [PATCH] Prevent removing of the system packages installed under @@ -24,10 +24,10 @@ Co-Authored-By: Miro Hrončok 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py -index 4c58cdb..3570e17 100644 +index ff0dd2f..a72aec8 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py -@@ -43,6 +43,7 @@ from pip._internal.utils.misc import ( +@@ -46,6 +46,7 @@ from pip._internal.utils.misc import ( ask_path_exists, backup_dir, display_path, @@ -35,9 +35,9 @@ index 4c58cdb..3570e17 100644 dist_in_site_packages, dist_in_usersite, get_distribution, -@@ -426,7 +427,7 @@ class InstallRequirement: - "lack sys.path precedence to {} in {}".format( - existing_dist.project_name, existing_dist.location) +@@ -433,7 +434,7 @@ class InstallRequirement: + existing_dist.project_name, existing_dist.location + ) ) - else: + elif dist_in_install_path(existing_dist): @@ -45,18 +45,18 @@ index 4c58cdb..3570e17 100644 else: if self.editable: diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py -index 4df8f7e..dda2292 100644 +index 09caaa6..c1542ec 100644 --- a/src/pip/_internal/resolution/legacy/resolver.py +++ b/src/pip/_internal/resolution/legacy/resolver.py -@@ -42,6 +42,7 @@ from pip._internal.resolution.base import BaseResolver, InstallRequirementProvid +@@ -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, get_requires_python + from pip._internal.utils.packaging import check_requires_python logger = logging.getLogger(__name__) -@@ -194,7 +195,9 @@ class Resolver(BaseResolver): +@@ -203,7 +204,9 @@ class Resolver(BaseResolver): """ # Don't uninstall the conflict if doing a user install and the # conflict is not a user install. @@ -68,7 +68,7 @@ index 4df8f7e..dda2292 100644 req.satisfied_by = None diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py -index e7fd344..73b83fb 100644 +index 766dc26..c8c1cd8 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py @@ -1,6 +1,7 @@ @@ -79,7 +79,7 @@ index e7fd344..73b83fb 100644 from typing import ( TYPE_CHECKING, Dict, -@@ -34,6 +35,7 @@ from pip._internal.exceptions import ( +@@ -33,6 +34,7 @@ from pip._internal.exceptions import ( UnsupportedWheel, ) from pip._internal.index.package_finder import PackageFinder @@ -87,15 +87,15 @@ index e7fd344..73b83fb 100644 from pip._internal.metadata import BaseDistribution, get_default_environment from pip._internal.models.link import Link from pip._internal.models.wheel import Wheel -@@ -46,6 +48,7 @@ from pip._internal.req.req_install import ( +@@ -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 - from .base import Candidate, CandidateVersion, Constraint, Requirement -@@ -525,6 +528,16 @@ class Factory: +@@ -526,6 +529,16 @@ class Factory: if dist is None: # Not installed, no uninstallation required. return None @@ -113,18 +113,18 @@ index e7fd344..73b83fb 100644 # 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 99ebea3..5901687 100644 +index d3e9053..d25d1c3 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py -@@ -40,6 +40,7 @@ from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed +@@ -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, stdlib_pkgs - from pip._internal.utils.virtualenv import ( - running_under_virtualenv, -@@ -382,6 +383,16 @@ def dist_in_site_packages(dist): + 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)) @@ -138,9 +138,9 @@ index 99ebea3..5901687 100644 + get_scheme("").purelib.split('python')[0])) + + - def dist_is_editable(dist): - # type: (Distribution) -> bool - """ + def get_distribution(req_name: str) -> Optional[Distribution]: + """Given a requirement name, return the installed Distribution object. + -- 2.32.0 diff --git a/sources b/sources index 8be331c..b0c8764 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.2.3.tar.gz) = 9df888c871040d3812a2bf358013e3af976ede1e6aebf6747527be470674bb55ca1312d54021a7913630c04b09981cf481202c8405faf08b1b37e29272adf547 +SHA512 (pip-21.3.tar.gz) = 7106bfdf5ea651c6c69823e8033825378c0f212513c23361f7d4b158ecf4b54752b45ff15a313a2426d38c9e16dbe4f8c3fd39fc7dbda77db1ab791702ddd6f8 From 20ae7fd4408aeca421584935e64e15c3e40d653e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 13 Oct 2021 13:50:30 +0200 Subject: [PATCH 019/118] Fedora CI: Add Python 3.11 --- tests/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.yml b/tests/tests.yml index fcbc430..a543138 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -28,6 +28,9 @@ - smoke310: dir: python/smoke run: VERSION=3.10 ./venv.sh + - smoke311: + dir: python/smoke + run: VERSION=3.11 ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh @@ -49,6 +52,9 @@ - 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 - pipenv: run: pipenv --three && pipenv install six - pyproject_pytest: @@ -73,6 +79,7 @@ - python3.8 - python3.9 - python3.10 + - python3.11 - python2-devel - python3-devel - python3-tox From 5e3e97d02bd7cfab73f6811eb2b2ce7d990f0082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 15 Oct 2021 09:36:43 +0200 Subject: [PATCH 020/118] Fix incomplete pip-updates in virtual environments --- python-pip.spec | 1 + remove-existing-dist-only-if-path-conflicts.patch | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index ff1412f..e899c46 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -406,6 +406,7 @@ pytest_k='not completion and * 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 diff --git a/remove-existing-dist-only-if-path-conflicts.patch b/remove-existing-dist-only-if-path-conflicts.patch index f04257c..7ff95e5 100644 --- a/remove-existing-dist-only-if-path-conflicts.patch +++ b/remove-existing-dist-only-if-path-conflicts.patch @@ -71,10 +71,11 @@ diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_inter index 766dc26..c8c1cd8 100644 --- a/src/pip/_internal/resolution/resolvelib/factory.py +++ b/src/pip/_internal/resolution/resolvelib/factory.py -@@ -1,6 +1,7 @@ +@@ -1,6 +1,8 @@ import contextlib import functools import logging ++import sys +import sysconfig from typing import ( TYPE_CHECKING, @@ -102,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'), -+ sysconfig.get_path('platlib', scheme='rpm_prefix'), ++ 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 From 931a7e69a1785765ceff16f2641188af0eff9f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 25 Oct 2021 21:36:52 +0200 Subject: [PATCH 021/118] Update to 21.3.1 --- python-pip.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index e899c46..d07f790 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -13,7 +13,7 @@ %endif %global srcname pip -%global base_version 21.3 +%global base_version 21.3.1 %global upstream_version %{base_version}%{?prerel} %global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl %global python_wheeldir %{_datadir}/python-wheels @@ -132,7 +132,7 @@ 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(pep517)) = 0.11 +Provides: bundled(python%{1}dist(pep517)) = 0.12 Provides: bundled(python%{1}dist(platformdirs)) = 2.4 Provides: bundled(python%{1}dist(progress)) = 1.6 Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7 @@ -403,6 +403,10 @@ pytest_k='not completion and %{python_wheeldir}/%{python_wheelname} %changelog +* 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 diff --git a/sources b/sources index b0c8764..a6223f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pip-21.3.tar.gz) = 7106bfdf5ea651c6c69823e8033825378c0f212513c23361f7d4b158ecf4b54752b45ff15a313a2426d38c9e16dbe4f8c3fd39fc7dbda77db1ab791702ddd6f8 +SHA512 (pip-21.3.1.tar.gz) = 2f50f95fe36cffc18821a70824f5b28d03598894f9ea5b02acc4921d16fc7739131814828a2159bcd577331cc780c7776a3669fa1ca2d4690c861add10a16f00 From b4e24c5cb6bcee150136e785c07fb291306ddb47 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Wed, 29 Sep 2021 12:56:21 +0200 Subject: [PATCH 022/118] Use new macros %python_wheel_dir and %python_wheel_pkg_prefix ..when creating the wheel subpackage. This does not actually change the name or the contents of the subpackage. --- python-pip.spec | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index d07f790..18b5187 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,8 +15,7 @@ %global srcname pip %global base_version 21.3.1 %global upstream_version %{base_version}%{?prerel} -%global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl -%global python_wheeldir %{_datadir}/python-wheels +%global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) @@ -232,7 +231,7 @@ A documentation for a tool for installing and managing Python packages %endif -%package wheel +%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel Summary: The pip wheel Requires: ca-certificates @@ -241,7 +240,7 @@ Requires: ca-certificates %{crypt_compat_recommends 3} -%description wheel +%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel A Python wheel of pip to use with venv. %prep @@ -258,7 +257,7 @@ sed -i '/html_theme = "furo"/d' docs/html/conf.py sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py # tests expect wheels in here -ln -s %{python_wheeldir} tests/data/common_wheels +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" @@ -284,7 +283,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_wheelname}/pip install \ +%{python3} dist/%{python_wheel_name}/pip install \ --root %{buildroot} \ --no-deps \ --disable-pip-version-check \ @@ -335,8 +334,8 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3 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_wheeldir} -install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} +mkdir -p %{buildroot}%{python_wheel_dir} +install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %if %{with tests} @@ -396,11 +395,11 @@ pytest_k='not completion and %doc docs/build/html %endif -%files wheel +%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel %license LICENSE.txt # we own the dir for simplicity -%dir %{python_wheeldir}/ -%{python_wheeldir}/%{python_wheelname} +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} %changelog * Mon Oct 25 2021 Miro Hrončok - 21.3.1-1 From 636f3bf0bdc364530aeaaa5a3b590b92ccda8d47 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:11:18 +0000 Subject: [PATCH 023/118] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_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 18b5187..f6cc58c 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. @@ -402,6 +402,9 @@ pytest_k='not completion and %{python_wheel_dir}/%{python_wheel_name} %changelog +* 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 From 093cb73c53d88868b657774a6337de2504486390 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 16 Feb 2022 08:58:06 +0100 Subject: [PATCH 024/118] 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 025/118] 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 026/118] 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 027/118] 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 028/118] 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 029/118] 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 030/118] 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 031/118] 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 032/118] 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 033/118] 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 034/118] 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 035/118] 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 036/118] 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 c3f04d6b6d3bbdf461769aa1521cba2d266687c5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 15 Nov 2022 12:56:41 +0100 Subject: [PATCH 037/118] 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 038/118] 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 039/118] 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 040/118] 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 041/118] 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 042/118] 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 043/118] 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 044/118] 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 045/118] 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 046/118] 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 047/118] 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 048/118] 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 049/118] 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 050/118] 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 051/118] 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 052/118] 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 053/118] 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 054/118] 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 055/118] 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 056/118] 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 057/118] 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 058/118] 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 059/118] 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 060/118] 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 061/118] 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 062/118] 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 063/118] 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 064/118] 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 065/118] 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 066/118] 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 067/118] 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 068/118] 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 069/118] 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 070/118] 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 071/118] 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 072/118] 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 073/118] 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 074/118] 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 075/118] 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 076/118] 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 077/118] 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 078/118] 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 079/118] 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 080/118] 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 081/118] 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 082/118] 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 083/118] 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 084/118] 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 085/118] 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 086/118] 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 087/118] 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 088/118] 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 089/118] 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 090/118] 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 091/118] 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 092/118] 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 093/118] 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 094/118] 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 095/118] 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 096/118] 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 097/118] 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 098/118] 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 099/118] 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 100/118] 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 101/118] 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 102/118] 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 103/118] 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 104/118] 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 105/118] 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 106/118] 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 107/118] 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 108/118] 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 109/118] 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 110/118] 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 111/118] 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 112/118] 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 113/118] 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 114/118] 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 115/118] 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 116/118] 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 117/118] 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 118/118] 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)