Make python-pip-wheel work with Python 3.9
This commit is contained in:
parent
f331d00c56
commit
46d2457dea
2 changed files with 56 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ Name: python-%{srcname}
|
|||
# When updating, update the bundled libraries versions bellow!
|
||||
# You can use vendor_meta.sh in the dist git repo
|
||||
Version: 19.0.3
|
||||
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.
|
||||
|
|
@ -101,6 +101,12 @@ Patch3: remove-existing-dist-only-if-path-conflicts.patch
|
|||
# https://bugzilla.redhat.com/show_bug.cgi?id=1655253
|
||||
Patch4: dummy-certifi.patch
|
||||
|
||||
#Patch5 intentionally skipped, not present in this branch
|
||||
|
||||
# Make pip compatible with Python 3.9, backported from pip 19.2+
|
||||
# https://github.com/pypa/pip/pull/6728
|
||||
Patch6: python39.patch
|
||||
|
||||
# Downstream only patch
|
||||
# Users might have local installations of pip from using
|
||||
# `pip install --user --upgrade pip` on older/newer versions.
|
||||
|
|
@ -293,6 +299,7 @@ popd
|
|||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch6 -p1
|
||||
|
||||
# this goes together with patch4
|
||||
rm src/pip/_vendor/certifi/*.pem
|
||||
|
|
@ -513,6 +520,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 25 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0.3-5
|
||||
- Make python-pip-wheel work with Python 3.9
|
||||
|
||||
* Mon Nov 11 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0.3-4
|
||||
- Make /usr/bin/pip(2|3) work with user-installed pip 19.3+ (#1767212)
|
||||
|
||||
|
|
|
|||
45
python39.patch
Normal file
45
python39.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
From ef7ca1472c1fdd085cffb8183b7ce8abbe9e2800 Mon Sep 17 00:00:00 2001
|
||||
From: Chih-Hsuan Yen <yan12125@gmail.com>
|
||||
Date: Thu, 18 Jul 2019 12:45:15 +0800
|
||||
Subject: [PATCH] Add an html5lib patch for Python 3.9 compatibility
|
||||
|
||||
The patch is adapted from https://github.com/html5lib/html5lib-python/commit/4f9235752cea29c5a31721440578b430823a1e69
|
||||
|
||||
Closes https://github.com/pypa/pip/issues/6407
|
||||
Closes https://github.com/pypa/pip/issues/6237
|
||||
---
|
||||
src/pip/_vendor/html5lib/_trie/_base.py | 5 +++-
|
||||
src/pip/_vendor/html5lib/treebuilders/dom.py | 5 +++-
|
||||
4 files changed, 40 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pip/_vendor/html5lib/_trie/_base.py b/src/pip/_vendor/html5lib/_trie/_base.py
|
||||
index a1158bbbf..6b71975f0 100644
|
||||
--- a/src/pip/_vendor/html5lib/_trie/_base.py
|
||||
+++ b/src/pip/_vendor/html5lib/_trie/_base.py
|
||||
@@ -1,6 +1,9 @@
|
||||
from __future__ import absolute_import, division, unicode_literals
|
||||
|
||||
-from collections import Mapping
|
||||
+try:
|
||||
+ from collections.abc import Mapping
|
||||
+except ImportError: # Python 2.7
|
||||
+ from collections import Mapping
|
||||
|
||||
|
||||
class Trie(Mapping):
|
||||
diff --git a/src/pip/_vendor/html5lib/treebuilders/dom.py b/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||
index dcfac220b..d8b530046 100644
|
||||
--- a/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||
+++ b/src/pip/_vendor/html5lib/treebuilders/dom.py
|
||||
@@ -1,7 +1,10 @@
|
||||
from __future__ import absolute_import, division, unicode_literals
|
||||
|
||||
|
||||
-from collections import MutableMapping
|
||||
+try:
|
||||
+ from collections.abc import MutableMapping
|
||||
+except ImportError: # Python 2.7
|
||||
+ from collections import MutableMapping
|
||||
from xml.dom import minidom, Node
|
||||
import weakref
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue