Fix test_alpn_protocols from test_ssl
This commit is contained in:
parent
3f280d64ad
commit
b5403ba5eb
@ -1,183 +0,0 @@
|
||||
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
|
||||
index 9f5d151..4dfa8a1 100644
|
||||
--- a/Lib/ensurepip/__init__.py
|
||||
+++ b/Lib/ensurepip/__init__.py
|
||||
@@ -8,13 +8,25 @@ import tempfile
|
||||
__all__ = ["version", "bootstrap"]
|
||||
|
||||
|
||||
-_SETUPTOOLS_VERSION = "28.8.0"
|
||||
+_SETUPTOOLS_VERSION = "34.2.0"
|
||||
|
||||
_PIP_VERSION = "9.0.1"
|
||||
|
||||
+_SIX_VERSION = "1.10.0"
|
||||
+
|
||||
+_APPDIRS_VERSION = "1.4.0"
|
||||
+
|
||||
+_PACKAGING_VERSION = "16.8"
|
||||
+
|
||||
+_PYPARSING_VERSION = "2.1.10"
|
||||
+
|
||||
_PROJECTS = [
|
||||
- ("setuptools", _SETUPTOOLS_VERSION),
|
||||
- ("pip", _PIP_VERSION),
|
||||
+ ("setuptools", _SETUPTOOLS_VERSION),
|
||||
+ ("pip", _PIP_VERSION),
|
||||
+ ("six", _SIX_VERSION),
|
||||
+ ("appdirs", _APPDIRS_VERSION),
|
||||
+ ("packaging", _PACKAGING_VERSION),
|
||||
+ ("pyparsing", _PYPARSING_VERSION)
|
||||
]
|
||||
|
||||
|
||||
diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py
|
||||
index 9b04c18..23664c4 100644
|
||||
--- a/Lib/test/test_ensurepip.py
|
||||
+++ b/Lib/test/test_ensurepip.py
|
||||
@@ -40,13 +40,14 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "setuptools", "pip",
|
||||
+ unittest.mock.ANY,
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
|
||||
additional_paths = self.run_pip.call_args[0][1]
|
||||
- self.assertEqual(len(additional_paths), 2)
|
||||
+ self.assertEqual(len(additional_paths), 6)
|
||||
|
||||
def test_bootstrapping_with_root(self):
|
||||
ensurepip.bootstrap(root="/foo/bar/")
|
||||
@@ -55,7 +56,7 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
unittest.mock.ANY, "--root", "/foo/bar/",
|
||||
- "setuptools", "pip",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -66,7 +67,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "--user", "setuptools", "pip",
|
||||
+ unittest.mock.ANY, "--user",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -77,7 +79,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "--upgrade", "setuptools", "pip",
|
||||
+ unittest.mock.ANY, "--upgrade",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -88,7 +91,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "-v", "setuptools", "pip",
|
||||
+ unittest.mock.ANY, "-v",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -99,7 +103,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "-vv", "setuptools", "pip",
|
||||
+ unittest.mock.ANY, "-vv",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -110,7 +115,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "-vvv", "setuptools", "pip",
|
||||
+ unittest.mock.ANY, "-vvv",
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
@@ -186,8 +192,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
|
||||
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
- "uninstall", "-y", "--disable-pip-version-check", "pip",
|
||||
- "setuptools",
|
||||
+ "uninstall", "-y", "--disable-pip-version-check",
|
||||
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -197,8 +203,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
|
||||
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
- "uninstall", "-y", "--disable-pip-version-check", "-v", "pip",
|
||||
- "setuptools",
|
||||
+ "uninstall", "-y", "--disable-pip-version-check", "-v",
|
||||
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -208,8 +214,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
|
||||
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
- "uninstall", "-y", "--disable-pip-version-check", "-vv", "pip",
|
||||
- "setuptools",
|
||||
+ "uninstall", "-y", "--disable-pip-version-check", "-vv",
|
||||
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -220,7 +226,7 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"uninstall", "-y", "--disable-pip-version-check", "-vvv",
|
||||
- "pip", "setuptools",
|
||||
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -260,13 +266,14 @@ class TestBootstrappingMainFunction(EnsurepipMixin, unittest.TestCase):
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
"install", "--no-index", "--find-links",
|
||||
- unittest.mock.ANY, "setuptools", "pip",
|
||||
+ unittest.mock.ANY,
|
||||
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
|
||||
],
|
||||
unittest.mock.ANY,
|
||||
)
|
||||
|
||||
additional_paths = self.run_pip.call_args[0][1]
|
||||
- self.assertEqual(len(additional_paths), 2)
|
||||
+ self.assertEqual(len(additional_paths), 6)
|
||||
|
||||
class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
|
||||
|
||||
@@ -284,8 +291,8 @@ class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
|
||||
|
||||
self.run_pip.assert_called_once_with(
|
||||
[
|
||||
- "uninstall", "-y", "--disable-pip-version-check", "pip",
|
||||
- "setuptools",
|
||||
+ "uninstall", "-y", "--disable-pip-version-check", "pyparsing", "packaging",
|
||||
+ "appdirs", "six", "pip", "setuptools",
|
||||
]
|
||||
)
|
||||
|
16
00270-fix-ssl-alpn-hook-test.patch
Normal file
16
00270-fix-ssl-alpn-hook-test.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
|
||||
index d203cdd..c128dae 100644
|
||||
--- a/Lib/test/test_ssl.py
|
||||
+++ b/Lib/test/test_ssl.py
|
||||
@@ -3256,8 +3256,9 @@ if _have_threads:
|
||||
except ssl.SSLError as e:
|
||||
stats = e
|
||||
|
||||
- if expected is None and IS_OPENSSL_1_1:
|
||||
- # OpenSSL 1.1.0 raises handshake error
|
||||
+ if (expected is None and IS_OPENSSL_1_1
|
||||
+ and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):
|
||||
+ # OpenSSL 1.1.0 to 1.1.0e raises handshake error
|
||||
self.assertIsInstance(stats, ssl.SSLError)
|
||||
else:
|
||||
msg = "failed trying %s (s) and %s (c).\n" \
|
13
python3.spec
13
python3.spec
@ -133,7 +133,7 @@
|
||||
Summary: Version 3 of the Python programming language aka Python 3000
|
||||
Name: python3
|
||||
Version: %{pybasever}.1
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: Python
|
||||
Group: Development/Languages
|
||||
|
||||
@ -453,6 +453,12 @@ Patch264: 00264-skip-test-failing-on-aarch64.patch
|
||||
# Fixed upstream: http://bugs.python.org/issue29243
|
||||
Patch269: 00269-fix-multiple-compilations-issue-with-pgo-builds.patch
|
||||
|
||||
# 00270 #
|
||||
# Fix test_alpn_protocols from test_ssl as openssl > 1.1.0f
|
||||
# changed the behaviour of the ALPN hook.
|
||||
# Fixed upstream: http://bugs.python.org/issue30714
|
||||
Patch270: 00270-fix-ssl-alpn-hook-test.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||
@ -728,6 +734,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
|
||||
%endif
|
||||
|
||||
%patch269 -p1
|
||||
%patch270 -p1
|
||||
|
||||
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
|
||||
# are many differences between 2.6 and the Python 3 library.
|
||||
@ -1688,6 +1695,10 @@ fi
|
||||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Fri Jun 23 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-8
|
||||
- Fix test_alpn_protocols from test_ssl
|
||||
- Do not require rebundled setuptools dependencies
|
||||
|
||||
* Tue May 16 2017 Tomas Orsava <torsava@redhat.com> - 3.6.1-7
|
||||
- Added a dependency to the devel subpackage on python3-rpm-generators which
|
||||
have been excised out of rpm-build
|
||||
|
Loading…
Reference in New Issue
Block a user