#16 Use bundled wheels because the latest pip no longer supports Python 3.5
Merged 3 years ago by lbalhar. Opened 3 years ago by lbalhar.
rpms/ lbalhar/python3.5 master  into  master

@@ -31,7 +31,7 @@ 

   /* For size_t? */

   #ifdef HAVE_STDDEF_H

  diff --git a/configure b/configure

- index 93f332f54a..ed37d5d36a 100755

+ index 562f20278a..2ad2f59635 100755

  --- a/configure

  +++ b/configure

  @@ -7709,7 +7709,7 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
@@ -44,7 +44,7 @@ 

   ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \

   sched.h shadow.h signal.h stdint.h stropts.h termios.h \

  diff --git a/configure.ac b/configure.ac

- index d071dde414..937bb6536e 100644

+ index 133b43d29f..933488b645 100644

  --- a/configure.ac

  +++ b/configure.ac

  @@ -1949,7 +1949,7 @@ dnl AC_MSG_RESULT($cpp_type)

@@ -29,7 +29,7 @@ 

                             -1, resource.RLIMIT_AS)

           limit = resource.getrlimit(resource.RLIMIT_AS)

  diff --git a/configure b/configure

- index ed37d5d36a..a00eb5572c 100755

+ index 2ad2f59635..8872cb85ae 100755

  --- a/configure

  +++ b/configure

  @@ -783,6 +783,7 @@ infodir
@@ -114,7 +114,7 @@ 

   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>

          #include <dirent.h>

  diff --git a/configure.ac b/configure.ac

- index 937bb6536e..6c7813b44c 100644

+ index 933488b645..5331de50c0 100644

  --- a/configure.ac

  +++ b/configure.ac

  @@ -3370,7 +3370,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \

file modified
+7
@@ -71,3 +71,10 @@ 

  

  # SPELLING ERRORS

  addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ')

+ 

+ # These bundled provides are declared twice, as they're bundled twice

+ # separately in pip and setuptools.

+ addFilter(r'useless-provides bundled\(python3dist\(appdirs\)\)')

+ addFilter(r'useless-provides bundled\(python3dist\(packaging\)\)')

+ addFilter(r'useless-provides bundled\(python3dist\(pyparsing\)\)')

+ addFilter(r'useless-provides bundled\(python3dist\(six\)\)')

file modified
+31 -10
@@ -113,12 +113,14 @@ 

  #global prerel ...

  %global upstream_version %{general_version}%{?prerel}

  Version: %{general_version}%{?prerel:~%{prerel}}

- Release: 2%{?dist}

+ Release: 3%{?dist}

  License: Python

  

  # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package

  # Uses upstream bundled prebuilt wheels otherwise

- %bcond_without rpmwheels

+ # pip 20.2.3 deprecated support for Python 3.5 and

+ # pip 21.0 will stop support it in January 2021

+ %bcond_with rpmwheels

  

  # =======================

  # Build-time requirements
@@ -374,12 +376,6 @@ 

  #

  # We keep them in /usr/share/python-wheels

  Patch189: 00189-use-rpm-wheels.patch

- # The following versions of setuptools/pip are bundled when this patch is not applied.

- # The versions are written in Lib/ensurepip/__init__.py, this patch removes them.

- # When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly.

- # In such cases, the patch needs to be amended and the versions updated here:

- %global pip_version 9.0.1

- %global setuptools_version 28.8.0

  

  # 00205 # acb31cbf04decda6abbf87ab7682dfcba07433c8

  # Make LIBPL respect lib64
@@ -502,8 +498,30 @@ 

  Requires: python-setuptools-wheel

  Requires: python-pip-wheel

  %else

- Provides: bundled(python3dist(pip)) = %{pip_version}

- Provides: bundled(python3dist(setuptools)) = %{setuptools_version}

+ # pip, setuptools and their bundled dependencies

+ Provides: bundled(python3dist(pip)) = 9.0.1

+ Provides: bundled(python3dist(appdirs)) = 1.4.0

+ Provides: bundled(python3dist(CacheControl)) = 0.11.7

+ Provides: bundled(python3dist(colorama)) = 0.3.7

+ Provides: bundled(python3dist(distlib)) = 0.2.4

+ Provides: bundled(python3dist(distro)) = 1.0.1

+ Provides: bundled(python3dist(html5lib)) = 1.0~b10

+ Provides: bundled(python3dist(ipaddress)) = 1.0.17

+ Provides: bundled(python3dist(lockfile)) = 0.12.2

+ Provides: bundled(python3dist(ordereddict)) = 1.1

+ Provides: bundled(python3dist(packaging)) = 16.8

+ Provides: bundled(python3dist(progress)) = 1.2

+ Provides: bundled(python3dist(pyparsing)) = 2.1.10

+ Provides: bundled(python3dist(requests)) = 2.11.1

+ Provides: bundled(python3dist(retrying)) = 1.3.3

+ Provides: bundled(python3dist(six)) = 1.10.0

+ Provides: bundled(python3dist(webencodings)) = 0.5

+ 

+ Provides: bundled(python3dist(setuptools)) = 28.8.0

+ Provides: bundled(python3dist(appdirs)) = 1.4.0

+ Provides: bundled(python3dist(packaging)) = 16.7

+ Provides: bundled(python3dist(pyparsing)) = 2.1.10

+ Provides: bundled(python3dist(six)) = 1.10.0

  %endif

  

  %description
@@ -1117,6 +1135,9 @@ 

  # ======================================================

  

  %changelog

+ * Thu Oct 22 2020 Lumír Balhar <lbalhar@redhat.com> - 3.5.10-3

+ - Use bundled wheels because the latest pip no longer supports Python 3.5

+ 

  * Mon Oct 05 2020 Miro Hrončok <mhroncok@redhat.com> - 3.5.10-2

  - Use upstream architecture names on Fedora 34+

  - https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names

Related to the latest update of pip: https://src.fedoraproject.org/rpms/python-pip/pull-request/72

Let's see whether CI will work.

If this works, we should add the "second level" of bundled provides (see Python 2.7 and 3.4).

Build succeeded.

Zuul is green and Fedora CI seems to fail for an unrelated reason. Adding bundled provides and we should be good to go.

rebased onto f987ecd

3 years ago

What is a plan wrt backports? I see several options:

  1. We backport this everywhere for a consistent spec and consistent experience.
  2. We only backport this to Fedora 33, where we have not yet diverged the branches.
  3. We add %{?fedora} based conditional to this, so it can safely be backported everywhere without changing the behavior.
  4. We diverge the rawhide branch.

Could you please run importpatches with https://github.com/fedora-python/importpatches/pull/9 to avoid confusing unused macros? That would make this consistent with 3.4 and 2.7 (and also test the PR).

Build failed.

1 new commit added

  • [FIXUP] Importpatches
3 years ago

Build failed.

The new functionality of importpatches works well but it seems that we have many more patches upstream than here and patch 353 seems to be newer here that on github. Anyway, if we are sure that the github is correct, we are in sync now.

I'd backport this to F33 together with the newest pip. It can be backported later to older branches if needed.

Anyway, if we are sure that the github is correct, we are in sync now.

No, not sure at all. The patches look to go backwards. Let me check.

I've updated github. I guess I forgot to push after https://src.fedoraproject.org/rpms/python3.5/pull-request/14 - mea culpa.

rebased onto cbe6309

3 years ago

I've realized that the previous state might be my fault as well, sorry. Nonetheless, importpatches updated some hashes and removed global macros as expected, let's wait what CI will tell us.

Build failed.

Well, rpmlint complains about duplicated provides :( My intention was to have them there twice if they are bundled twice (pip and setuptools both bundle packaging, six, appdirs, pyparsing). They are all the same versions except packaging (pip has 16.8, setuptools 16.7). Is there any way how to handle that?

Yes. We could:

  1. disable rpmlint (or make it non-voting)
  2. add filters like this one https://src.fedoraproject.org/rpms/pipenv/blob/master/f/pipenv.rpmlintrc

rebased onto a3cda1d

3 years ago

Build succeeded.

Technically, this looks good. I'll check the exact lists of versions.

https://github.com/pypa/pip/blob/9.0.1/pip/_vendor/vendor.txt

appdirs==1.4.0
distlib==0.2.4
distro==1.0.1
html5lib==1.0b10
six==1.10.0
colorama==0.3.7
requests==2.11.1
CacheControl==0.11.7
lockfile==0.12.2
ordereddict==1.1 # Only needed on 2.6
progress==1.2
ipaddress==1.0.17 # Only needed on 2.6 and 2.7
packaging==16.8
pyparsing==2.1.10
retrying==1.3.3
webencodings==0.5

Provides: bundled(python3dist(html5lib)) = 1.0b10

Consider using 1.0~b10.

Otherwise ack.

rebased onto cca08c8

3 years ago

Consider using 1.0~b10.

Fixed.

Build succeeded.

Awesome, please ship it.

Pull-Request has been merged by lbalhar

3 years ago