The postgresql-upgrade RPM requires both Python 2 and Python 3. $ dnf repoquery --repo=rawhide --requires postgresql-upgrade | grep python libpython2.7.so.1.0 libpython2.7.so.1.0()(64bit) libpython3.6m.so.1.0 libpython3.6m.so.1.0()(64bit) Except in very special circumstances, there is no need for one package to drag in both Python stacks. Is this intended for this package or can it be fixed by splitting the package, or removing the stray dependencies? It's ok to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help investigating or fixing this issue!
(In reply to Iryna Shcherbina from comment #0) > Except in very special circumstances, there is no need for one package > to drag in both Python stacks. Is this intended for this package or can it > be fixed by splitting the package, or removing the stray dependencies? The plpython2.so file has been packaged recently in bug 1557490. It's intentional to have the plugin packaged plpython2.so also in postgresql-upgrade (not only in postgresql-plpython2). As long as (some) Python 2 will be in Fedora, I see no immediate need to drop python 2 support in plypython.
Pavel, could you please provide more information? I've read the linked bug and links in it, yet it says nothing about python and I lack context to understand this. Could you please explain to me why a dependency on multiple Pythons is desired here? I.e.: What happens if it only depends on Python 3? What user actions stop working? What happens if it only depends on Python 2? What user actions stop working?
We normally provide plpython2.so (postgresql-plpython2) and plpython3.so (in postgresql-plpython3). Those modules are both built against different python runtimes. To make the pg_upgrade (postgresql-setup --upgrade) work on Fedora 28 (when user upgraded from F26 and F27) it is best to have the same set of server modules in postgresql-upgrade package as were available in all subpackages on the previous server versions. Anyways, as I said -- there's no reason not to drop python2 support in Fedora's PostgreSQL package ... I have no problem to take care of that. And we really need to first discuss with PostgreSQL upstream future steps regarding plpython: https://www.postgresql.org/message-id/3775251.2SzJCDjjet%40nb.usersys.redhat.com
Shouldn't then postgresql-upgrade require postgresql-plpython2 and postgresql-plpython3 instead of shipping the so files? (Just curious.) I'll block postgresql-upgrade from taskotron-python-versions required Python version check, ok? https://github.com/fedora-python/taskotron-python-versions/pull/60
(In reply to Miro Hrončok from comment #4) > Shouldn't then postgresql-upgrade require postgresql-plpython2 and > postgresql-plpython3 instead of shipping the so files? (Just curious.) No; that would suck in the modules for the *current* server version, whereas what the upgrade package needs to contain is the modules for the *previous* version.
(In reply to Tom Lane from comment #5) > No; that would suck in the modules for the *current* server version, whereas > what the upgrade package needs to contain is the modules for the *previous* > version. Understood. Pavel, Tom, thank you both.
Given that Python 2 EOL has passed at the beginning of the year do we think that for fedora 34 this should be removed?
Well, *we* (Python maintainers) think that this should be removed, yes.
Can this position be reconsidered now? (Also wrt RHEL 9.)
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
(In reply to Miro Hrončok from comment #9) > Can this position be reconsidered now? (Also wrt RHEL 9.) We have a PR prepared: https://src.fedoraproject.org/rpms/postgresql/pull-request/28 The build is currently blocked on LLVM issue though: BZ#1940964
I'm currently trying to resolve the above mentioned LLVM issue. I will update with the results.
This is done now; thank you!