#29 Fedora 30: Make python-setuptools-wheel work with Python 3.9 (+ sync a bit with f31)
Merged 4 years ago by pviktori. Opened 4 years ago by churchyard.
rpms/ churchyard/python-setuptools f30-python39  into  f30

file modified
+11 -2
@@ -19,7 +19,7 @@ 

  Name:           python-setuptools

  # When updating, update the bundled libraries versions bellow!

  Version:        40.8.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Easily build and distribute Python packages

  # setuptools is MIT

  # packaging is BSD or ASL 2.0
@@ -35,6 +35,10 @@ 

  # https://bugzilla.redhat.com/show_bug.cgi?id=1576924

  Patch0:         create-site-packages.patch

  

+ # Make setuptools compatible with Python 3.9, backported from setuptools 41.1+

+ # https://github.com/pypa/setuptools/pull/1788

+ Patch1:         python39.patch

+ 

  BuildArch:      noarch

  

  BuildRequires:  gcc
@@ -49,7 +53,6 @@ 

  BuildRequires:  python2-pip

  BuildRequires:  python2-pytest

  BuildRequires:  python2-mock

- BuildRequires:  python2-backports-unittest_mock

  BuildRequires:  python2-pytest-fixture-config

  BuildRequires:  python2-pytest-virtualenv

  %endif # with tests
@@ -66,6 +69,9 @@ 

  %if %{without bootstrap}

  BuildRequires:  python3-pip

  BuildRequires:  python3-wheel

+ # python3 bootstrap: this is built before the final build of python3, which

+ # adds the dependency on python3-rpm-generators, so we require it manually

+ BuildRequires:  python3-rpm-generators

  %endif # without bootstrap

  

  %description
@@ -253,6 +259,9 @@ 

  

  

  %changelog

+ * Tue Nov 26 2019 Miro Hrončok <mhroncok@redhat.com> - 40.8.0-2

+ - Make python-setuptools-wheel work with Python 3.9

+ 

  * Tue Feb 05 2019 Miro Hrončok <mhroncok@redhat.com>

  - Update to 40.8.0 (#1672756)

  - https://github.com/pypa/setuptools/blob/v40.8.0/CHANGES.rst

file added
+26
@@ -0,0 +1,26 @@ 

+ From 53b8db359378f436bfd88f90a90aaf01b650d3a6 Mon Sep 17 00:00:00 2001

+ From: Inada Naoki <songofacandy@gmail.com>

+ Date: Tue, 18 Jun 2019 16:15:25 +0900

+ Subject: [PATCH] Stop using deprecated HTMLParser.unescape

+ 

+ HTMLParser.unescape is accessed even when unused - this will cause an

+ exception when `HTMLParser.unescape` is removed in Python 3.9.

+ ---

+  setuptools/py33compat.py    | 6 +++++-

+  2 files changed, 6 insertions(+), 1 deletion(-)

+  create mode 100644 changelog.d/1788.change.rst

+ 

+ diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py

+ index 87cf53983..cb6944363 100644

+ --- a/setuptools/py33compat.py

+ +++ b/setuptools/py33compat.py

+ @@ -52,4 +52,8 @@ def __iter__(self):

+  Bytecode = getattr(dis, 'Bytecode', Bytecode_compat)

+  

+  

+ -unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)

+ +unescape = getattr(html, 'unescape', None)

+ +if unescape is None:

+ +    # HTMLParser.unescape is deprecated since Python 3.4, and will be removed

+ +    # from 3.9.

+ +    unescape = html_parser.HTMLParser().unescape

file modified
+8 -1
@@ -20,6 +20,9 @@ 

      - smoke37:

          dir: python/smoke

          run: VERSION=3.7 ./venv.sh

+     - smoke38:

+         dir: python/smoke

+         run: VERSION=3.8 ./venv.sh

      - smoke26:

          dir: python/smoke

          run: VERSION=2.6 METHOD=virtualenv TOX=false ./venv.sh
@@ -38,15 +41,19 @@ 

      - smoke37_virtualenv:

          dir: python/smoke

          run: VERSION=3.7 METHOD=virtualenv ./venv.sh

+     - smoke38_virtualenv:

+         dir: python/smoke

+         run: VERSION=3.8 METHOD=virtualenv ./venv.sh

      required_packages:

      - gcc

-     - /usr/bin/virtualenv

+     - virtualenv

      - python26

      - python27

      - python34

      - python35

      - python36

      - python37

+     - python38

      - python2-devel

      - python3-devel

      - python3-tox