Mingw-packages: Drop Python 2 packages

Created on 20 Feb 2019  路  35Comments  路  Source: msys2/MINGW-packages

Here is a list of leaf packages containing "python2" for starters.

Any thoughts on dropping them?

edit: removed, outdated
python

Most helpful comment

In preparation for this, could we rename all the python3 packages to just python?

I was more thinking that this might reduce the amount of work, and renaming everything goes a bit against that :)

All 35 comments

Can we wait until after python2 is EOLed? (2020)

Sure, I just wanted to get the discussion started with a first target (Arch is doing the same right now).

Do you need any package of the list above?

An alternative to dropping packages might be to stop accepting Python 2 packages without a good reason i.e. only build new Python packages for Python 3.

Do you need any package of the list above?

Yes - OTOH:

  • mingw-w64-gst-python2
  • mingw-w64-python2-PyOpenGL
  • mingw-w64-python2-comtypes
  • mingw-w64-python2-cx_Freeze
  • mingw-w64-python2-ldap
  • mingw-w64-python2-ldap3
  • mingw-w64-python2-lz4
  • mingw-w64-python2-nvidia-ml
  • mingw-w64-python2-paramiko
  • mingw-w64-python2-pkginfo (indirectly)
  • mingw-w64-python2-pyu2f
  • mingw-w64-python2-setproctitle
  • mingw-w64-python2-zeroconf

And when they get removed... we'll probably have to maintain them by hand for a little while.
(same as centos6 and python2.6... some things move slowly)

An alternative to dropping packages might be to stop accepting Python 2 packages without a good reason

I'm fine with that, got mine in just in time ;)

OK, thanks for the list.

Let's try to be a bit stricter on adding new packages for starters and re-evaluate next year.

In preparation for this, could we rename all the python3 packages to just python?

Disambiguation from upcoming python 4?

In preparation for this, could we rename all the python3 packages to just python?

I was more thinking that this might reduce the amount of work, and renaming everything goes a bit against that :)

What is our strategy for packages whose new versions do not support anymore python2 (e.g. sphinx)? Arch has simply dropped python2, but not sure what we shall do with those?

In case of matplotlib I've split things up into a python2 and a python3 PKGBUILD: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python2-matplotlib https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python3-matplotlib (and adjusted pkgbase accordingly)

Thanks @lazka this makes sense to me

@totaam any progress on your side? Just wondering.. :)

@totaam any progress on your side? Just wondering.. :)

Sort of. Xpra LTS 3.0 has been released.
I'm waiting for some fixes from 3.0.1 to submit a pull request for mingw.
It supports both python2 and python3, though python3 is now the default.
So I will be supporting both for about 3 years. :(
Which means that I would be glad to help when a package needs to be split into 2 because newer versions have dropped support for python2 then I'll do that. (just like matplotlib)
If and when python2 packages are removed from the tree, it would be nice to create a tag that I can quickly switch to in case I need to rebuild something.

Sort of. Xpra LTS 3.0 has been released.
I'm waiting for some fixes from 3.0.1 to submit a pull request for mingw.
It supports both python2 and python3, though python3 is now the default.
So I will be supporting both for about 3 years. :(

That's a start at least :)

Which means that I would be glad to help when a package needs to be split into 2 because newer versions have dropped support for python2 then I'll do that. (just like matplotlib)
If and when python2 packages are removed from the tree, it would be nice to create a tag that I can quickly switch to in case I need to rebuild something.

ok, thanks, I'll ping you if needed. It's probably better to create your own repo and collect py2 variants there.

@totaam just wondering.. I assume you ship self contained Windows packages, so why can't just use Python 3 there?

I've started something in #6009

@totaam just wondering.. I assume you ship self contained Windows packages, so why can't just use Python 3 there?

Yes, we ship self-contained installers on MS Windows and MacOS.
We have both Python2 and Python3 builds from the same codebase. I wished we could drop the Python2 version sooner rather than later, but this looks unlikely:

  • we support centos, including centos7, which means supporting python2 until that is EOL
  • GTK2, which is Python2 only, is still way more stable and reliable that GTK3 on some platforms, including MS Windows and MacOS.

Here is an auto-updating list of packages that depend on Python 2: https://packages.msys2.org/python2

About 140 packages are done now. I'll continue this next year.

It seems in contrast to the initial announcement to "remove a few leaf packages" this has now become a mission to completely purge python2?

I've just noticed, as you've removed python2-pip, which effectively crippled the build system for Inkscape's stable branch (0.92.x) that was also supposed to become kind of a "long-term support" release for people to facilitate the move to the upcoming Inkscape 1.0.

The idea was to keep 0.92.x on Python 2 for backwards-compatibility; 1.0 will obviously be using Python 3. However I'm having doubts if I can still keep my promise to offer a working 0.92.x LTS branch if my build system is falling apart...

It wasn't my plan to drop pip at least..

Maybe we can add setuptools/pip back with vendored dependencies.

That would be nice - especially as installing an old package is not easily possible either as python3-pip has now files that are conflicting with python2-pip, so basically there currently would be no feasible way to keep python2.

Yeah, alexey was a bit overzealous there, but I'm also quite happy he helped as removing all those package was quite a lot of work.

If we are going to keep Python2, is someone signing up to downstream patch Python2 if a security vulnerability is found? 2.7.18 is the final release.

is someone signing up to downstream patch Python2 if a security vulnerability is found?

Sure, why not.
There's clearly more than enough people who will be needing that, not even counting the distros that will do it themselves - ie: RHEL7 / CentOS7.

I've started something in #6070 to add back setuptools with vendored dependencies, which seems to work OK based on some limited testing.

pip2 is back now. Please give it a try.

First tests look promising, thanks @lazka !

Short status update, we are down to 21 packages: https://packages.msys2.org/python2

There are a few things which probably can still be removed, like build rust/qt/graphviz with Python3. Then there is wxpython 4 (and in turn kicad) which in theory supports Python 3 but it has it's own build system which hardcodes msvc, so unlikely for now. And then there are the cases where things are not libraries and don't support Python 3 yet.

I'd say that this is more or less done, so closing :)

I've opened a PR to remove the cygwin version of Python 2, including pip and setuptools. Is anyone using that still? -> https://github.com/msys2/MSYS2-packages/pull/2131

For Inkscape we depend on it indirectly via "gnome-doc-utils" (which already broke before due to libxml2 / libxml2-python not being compatible anymore).

It's all scheduled for replacement but without a due date yet. Will it still be possible to install those packages manually for the time being?

By 'manually', if you mean downloading .tar.xz from Pacman repository then I think yes.

Yes, that's what I mean. The problem with the mingw64 update was that there were conflicting files, so you could not install the old Python 2 and Python 3 side-by-side.

If gnome-doc-utils doesn't work, please file a bug here.

Was this page helpful?
0 / 5 - 0 ratings