Update to 20.2.2 (#1838553)
This commit is contained in:
parent
9a044bd673
commit
8825fe54dc
@ -1,75 +0,0 @@
|
||||
From b30dd1e04e1f37901733f1be0a5a1e02c466ad0c Mon Sep 17 00:00:00 2001
|
||||
From: gutsytechster <prashantsharma161198@gmail.com>
|
||||
Date: Wed, 15 Apr 2020 19:54:48 +0530
|
||||
Subject: [PATCH] fix(tests/unit): Update tests to be endian safe
|
||||
|
||||
This updates `test_path_to_display` and `test_str_to_display__encoding`
|
||||
to use the endian safe expected result instead of the hardcoded one.
|
||||
|
||||
This fixes https://github.com/pypa/pip/issues/7921
|
||||
---
|
||||
tests/unit/test_compat.py | 8 +++++++-
|
||||
tests/unit/test_utils.py | 16 +++++++++++++---
|
||||
2 files changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py
|
||||
index 1f31bc5ce8..b13087a1dd 100644
|
||||
--- a/tests/unit/test_compat.py
|
||||
+++ b/tests/unit/test_compat.py
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import locale
|
||||
import os
|
||||
+import sys
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -91,8 +92,13 @@ def test_str_to_display__decode_error(monkeypatch, caplog):
|
||||
# Encode with an incompatible encoding.
|
||||
data = u'ab'.encode('utf-16')
|
||||
actual = str_to_display(data)
|
||||
+ # Keep the expected value endian safe
|
||||
+ if sys.byteorder == "little":
|
||||
+ expected = "\\xff\\xfea\x00b\x00"
|
||||
+ elif sys.byteorder == "big":
|
||||
+ expected = "\\xfe\\xff\x00a\x00b"
|
||||
|
||||
- assert actual == u'\\xff\\xfea\x00b\x00', (
|
||||
+ assert actual == expected, (
|
||||
# Show the encoding for easier troubleshooting.
|
||||
'encoding: {!r}'.format(locale.getpreferredencoding())
|
||||
)
|
||||
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
|
||||
index 7d74a66498..ebabd29e26 100644
|
||||
--- a/tests/unit/test_utils.py
|
||||
+++ b/tests/unit/test_utils.py
|
||||
@@ -375,6 +375,18 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch):
|
||||
rmtree('foo')
|
||||
|
||||
|
||||
+if sys.byteorder == "little":
|
||||
+ expected_byte_string = (
|
||||
+ u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/"
|
||||
+ "\\x00d\\x00\\xe9\\x00f\\x00'"
|
||||
+ )
|
||||
+elif sys.byteorder == "big":
|
||||
+ expected_byte_string = (
|
||||
+ u"b'\\xfe\\xff\\x00/\\x00p\\x00a\\x00t\\x00h\\"
|
||||
+ "x00/\\x00d\\x00\\xe9\\x00f'"
|
||||
+ )
|
||||
+
|
||||
+
|
||||
@pytest.mark.parametrize('path, fs_encoding, expected', [
|
||||
(None, None, None),
|
||||
# Test passing a text (unicode) string.
|
||||
@@ -383,9 +395,7 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch):
|
||||
(u'/path/déf'.encode('utf-8'), 'utf-8', u'/path/déf'),
|
||||
# Test a bytes object with a character that can't be decoded.
|
||||
(u'/path/déf'.encode('utf-8'), 'ascii', u"b'/path/d\\xc3\\xa9f'"),
|
||||
- (u'/path/déf'.encode('utf-16'), 'utf-8',
|
||||
- u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/"
|
||||
- "\\x00d\\x00\\xe9\\x00f\\x00'"),
|
||||
+ (u'/path/déf'.encode('utf-16'), 'utf-8', expected_byte_string),
|
||||
])
|
||||
def test_path_to_display(monkeypatch, path, fs_encoding, expected):
|
||||
monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: fs_encoding)
|
@ -1,19 +1,27 @@
|
||||
From 09bf87d33141a5c06a1d410839d162262baa16c4 Mon Sep 17 00:00:00 2001
|
||||
From cf96ff346639d1b9f5efa3fd0976694e04df3f5f Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||
Date: Sun, 26 Apr 2020 21:38:44 +0200
|
||||
Subject: [PATCH] Dummy certifi patch
|
||||
|
||||
---
|
||||
src/pip/_vendor/certifi/core.py | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
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 56b52a3c..e99043f0 100644
|
||||
index 8987449..d174ced 100644
|
||||
--- a/src/pip/_vendor/certifi/core.py
|
||||
+++ b/src/pip/_vendor/certifi/core.py
|
||||
@@ -21,9 +21,7 @@ except ImportError:
|
||||
@@ -9,6 +9,7 @@ This module returns the installation location of cacert.pem or its contents.
|
||||
import os
|
||||
|
||||
try:
|
||||
+ raise ImportError # force fallback
|
||||
from importlib.resources import path as get_path, read_text
|
||||
|
||||
_CACERT_CTX = None
|
||||
@@ -51,9 +52,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():
|
||||
- f = os.path.dirname(__file__)
|
||||
-
|
||||
@ -23,5 +31,5 @@ index 56b52a3c..e99043f0 100644
|
||||
|
||||
def contents():
|
||||
--
|
||||
2.23.0
|
||||
2.25.4
|
||||
|
||||
|
@ -8,6 +8,10 @@ addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/appd
|
||||
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
|
||||
addFilter(r'zero-length .+/site-packages/.+\.dist-info/REQUESTED\b')
|
||||
|
||||
# We ship README with the main package but not with the wheel
|
||||
addFilter(r'python-pip-wheel.noarch: W: no-documentation')
|
||||
|
||||
|
@ -3,12 +3,13 @@
|
||||
%bcond_without doc
|
||||
|
||||
%global srcname pip
|
||||
%global base_version 20.1.1
|
||||
%global base_version 20.2.2
|
||||
%global upstream_version %{base_version}%{?prerel}
|
||||
%global python_wheelname %{srcname}-%{upstream_version}-py2.py3-none-any.whl
|
||||
%global python_wheeldir %{_datadir}/python-wheels
|
||||
|
||||
%if %{with doc}
|
||||
# Commit hash to use from the repo https://github.com/pypa/pypa-docs-theme
|
||||
%global pypa_theme_commit_hash d2e63fbfc62af3b7050f619b2f5bb8658985b931
|
||||
%endif
|
||||
|
||||
@ -18,7 +19,7 @@ Name: python-%{srcname}
|
||||
# When updating, update the bundled libraries versions bellow!
|
||||
# You can use vendor_meta.sh in the dist git repo
|
||||
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.
|
||||
@ -40,11 +41,12 @@ Summary: A tool for installing and managing Python packages
|
||||
# pep517: MIT
|
||||
# progress: ISC
|
||||
# pyparsing: MIT
|
||||
# pytoml: MIT
|
||||
# requests: ASL 2.0
|
||||
# resolvelib: ISC
|
||||
# retrying: ASL 2.0
|
||||
# setuptools: MIT
|
||||
# six: MIT
|
||||
# toml: MIT
|
||||
# urllib3: MIT
|
||||
# webencodings: BSD
|
||||
|
||||
@ -90,12 +92,6 @@ Patch4: dummy-certifi.patch
|
||||
# this warning is juts moot. Also, the warning breaks CPython test suite.
|
||||
Patch5: nowarn-pip._internal.main.patch
|
||||
|
||||
# Backport: Update tests to be endian safe
|
||||
# This updates `test_path_to_display` and `test_str_to_display__encoding`
|
||||
# to use the endian safe expected result instead of the hardcoded one.
|
||||
# This fixes https://github.com/pypa/pip/issues/7921
|
||||
Patch6: https://github.com/pypa/pip/commit/b30dd1e04e.patch
|
||||
|
||||
# Downstream only patch
|
||||
# Users might have local installations of pip from using
|
||||
# `pip install --user --upgrade pip` on older/newer versions.
|
||||
@ -131,29 +127,29 @@ 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.3
|
||||
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.4.5.1
|
||||
Provides: bundled(python%{1}dist(certifi)) = 2020.6.20
|
||||
Provides: bundled(python%{1}dist(chardet)) = 3.0.4
|
||||
Provides: bundled(python%{1}dist(colorama)) = 0.4.3
|
||||
Provides: bundled(python%{1}dist(contextlib2)) = 0.6^post1
|
||||
Provides: bundled(python%{1}dist(distlib)) = 0.3
|
||||
Provides: bundled(python%{1}dist(distlib)) = 0.3.1
|
||||
Provides: bundled(python%{1}dist(distro)) = 1.5
|
||||
Provides: bundled(python%{1}dist(html5lib)) = 1.0.1
|
||||
Provides: bundled(python%{1}dist(idna)) = 2.9
|
||||
Provides: bundled(python%{1}dist(html5lib)) = 1.1
|
||||
Provides: bundled(python%{1}dist(idna)) = 2.10
|
||||
Provides: bundled(python%{1}dist(ipaddress)) = 1.0.23
|
||||
Provides: bundled(python%{1}dist(msgpack)) = 1
|
||||
Provides: bundled(python%{1}dist(packaging)) = 20.3
|
||||
Provides: bundled(python%{1}dist(packaging)) = 20.4
|
||||
Provides: bundled(python%{1}dist(pep517)) = 0.8.2
|
||||
Provides: bundled(python%{1}dist(progress)) = 1.5
|
||||
Provides: bundled(python%{1}dist(pyparsing)) = 2.4.7
|
||||
Provides: bundled(python%{1}dist(requests)) = 2.23
|
||||
Provides: bundled(python%{1}dist(resolvelib)) = 0.3
|
||||
Provides: bundled(python%{1}dist(requests)) = 2.24
|
||||
Provides: bundled(python%{1}dist(resolvelib)) = 0.4
|
||||
Provides: bundled(python%{1}dist(retrying)) = 1.3.3
|
||||
Provides: bundled(python%{1}dist(setuptools)) = 44
|
||||
Provides: bundled(python%{1}dist(six)) = 1.14
|
||||
Provides: bundled(python%{1}dist(toml)) = 0.10
|
||||
Provides: bundled(python%{1}dist(urllib3)) = 1.25.8
|
||||
Provides: bundled(python%{1}dist(six)) = 1.15
|
||||
Provides: bundled(python%{1}dist(toml)) = 0.10.1
|
||||
Provides: bundled(python%{1}dist(urllib3)) = 1.25.9
|
||||
Provides: bundled(python%{1}dist(webencodings)) = 0.5.1
|
||||
}
|
||||
|
||||
@ -405,6 +401,9 @@ pytest_k='not completion and
|
||||
%{python_wheeldir}/%{python_wheelname}
|
||||
|
||||
%changelog
|
||||
* Wed Aug 05 2020 Tomas Orsava <torsava@redhat.com> - 20.2.2-1
|
||||
- Update to 20.2.2 (#1838553)
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 20.1.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d381c59fdc15949c4dc293bd92bbccb60289a703 Mon Sep 17 00:00:00 2001
|
||||
From 854fd7296bb9306d46ba3cc8bb7c6f18a7960ed6 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Hrnciar <thrnciar@redhat.com>
|
||||
Date: Sun, 26 Apr 2020 21:19:03 +0200
|
||||
Subject: [PATCH] Prevent removing of the system packages installed under
|
||||
@ -17,18 +17,18 @@ Co-Authored-By: Victor Stinner <vstinner@redhat.com>
|
||||
3 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
|
||||
index 3b28209b..d14217e9 100644
|
||||
index 4759f4a..2e76e35 100644
|
||||
--- a/src/pip/_internal/req/req_install.py
|
||||
+++ b/src/pip/_internal/req/req_install.py
|
||||
@@ -38,6 +38,7 @@ from pip._internal.utils.misc import (
|
||||
@@ -39,6 +39,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_installed_version,
|
||||
@@ -444,7 +445,7 @@ class InstallRequirement(object):
|
||||
get_distribution,
|
||||
@@ -446,7 +447,7 @@ class InstallRequirement(object):
|
||||
"lack sys.path precedence to {} in {}".format(
|
||||
existing_dist.project_name, existing_dist.location)
|
||||
)
|
||||
@ -36,12 +36,12 @@ index 3b28209b..d14217e9 100644
|
||||
+ elif dist_in_install_path(existing_dist):
|
||||
self.should_reinstall = True
|
||||
else:
|
||||
if self.editable and self.satisfied_by:
|
||||
if self.editable:
|
||||
diff --git a/src/pip/_internal/resolution/legacy/resolver.py b/src/pip/_internal/resolution/legacy/resolver.py
|
||||
index cdb44d19..52e122c6 100644
|
||||
index c9b4c66..ff361d8 100644
|
||||
--- a/src/pip/_internal/resolution/legacy/resolver.py
|
||||
+++ b/src/pip/_internal/resolution/legacy/resolver.py
|
||||
@@ -33,6 +33,7 @@ from pip._internal.resolution.base import BaseResolver
|
||||
@@ -34,6 +34,7 @@ from pip._internal.resolution.base import BaseResolver
|
||||
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
|
||||
@ -49,7 +49,7 @@ index cdb44d19..52e122c6 100644
|
||||
from pip._internal.utils.packaging import (
|
||||
check_requires_python,
|
||||
get_requires_python,
|
||||
@@ -203,7 +204,9 @@ class Resolver(BaseResolver):
|
||||
@@ -207,7 +208,9 @@ class Resolver(BaseResolver):
|
||||
"""
|
||||
# Don't uninstall the conflict if doing a user install and the
|
||||
# conflict is not a user install.
|
||||
@ -61,10 +61,10 @@ index cdb44d19..52e122c6 100644
|
||||
req.satisfied_by = None
|
||||
|
||||
diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py
|
||||
index 09031825..3c064f8f 100644
|
||||
index 24a7455..5fd48d3 100644
|
||||
--- a/src/pip/_internal/utils/misc.py
|
||||
+++ b/src/pip/_internal/utils/misc.py
|
||||
@@ -29,6 +29,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
|
||||
@@ -31,6 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
|
||||
from pip import __version__
|
||||
from pip._internal.exceptions import CommandError
|
||||
from pip._internal.locations import (
|
||||
@ -72,7 +72,7 @@ index 09031825..3c064f8f 100644
|
||||
get_major_minor_version,
|
||||
site_packages,
|
||||
user_site,
|
||||
@@ -400,6 +401,16 @@ def dist_in_site_packages(dist):
|
||||
@@ -403,6 +404,16 @@ def dist_in_site_packages(dist):
|
||||
return dist_location(dist).startswith(normalize_path(site_packages))
|
||||
|
||||
|
||||
@ -90,6 +90,5 @@ index 09031825..3c064f8f 100644
|
||||
# type: (Distribution) -> bool
|
||||
"""
|
||||
--
|
||||
2.23.0
|
||||
|
||||
2.25.4
|
||||
|
||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (pip-20.1.1.tar.gz) = ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658
|
||||
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
|
||||
SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d
|
||||
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
|
||||
SHA512 (pip-20.2.2.tar.gz) = 0b000977f169900eebd4afeabfc7bd59b104246bbb048ce5b4db7f701e20ef1caef22c7ca2311843eafc4a37abbb81a74beddddf655eeaf2e33e3949d5a811e6
|
||||
|
Loading…
Reference in New Issue
Block a user