Bug 1571215 - postgresql: postgresql-upgrade requires both Python 2 and Python 3
Summary: postgresql: postgresql-upgrade requires both Python 2 and Python 3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Filip Januš
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1940964
Blocks: PYTHON3 PYTHON3-PYTHON2 1913681
TreeView+ depends on / blocked
 
Reported: 2018-04-24 10:42 UTC by Iryna Shcherbina
Modified: 2021-07-13 12:57 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-13 12:57:40 UTC
Type: Bug


Attachments (Terms of Use)

Description Iryna Shcherbina 2018-04-24 10:42:01 UTC
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!

Comment 1 Pavel Raiskup 2018-04-24 11:09:13 UTC
(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.

Comment 2 Miro Hrončok 2018-04-24 11:35:19 UTC
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?

Comment 3 Pavel Raiskup 2018-04-24 11:46:29 UTC
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

Comment 4 Miro Hrončok 2018-04-24 12:31:09 UTC
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

Comment 5 Tom Lane 2018-04-24 14:05:46 UTC
(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.

Comment 6 Miro Hrončok 2018-04-24 14:16:36 UTC
(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.

Comment 7 hdost3 2020-12-01 12:31:38 UTC
Given that Python 2 EOL has passed at the beginning of the year do we think that for fedora 34 this should be removed?

Comment 8 Miro Hrončok 2020-12-01 16:05:08 UTC
Well, *we* (Python maintainers) think that this should be removed, yes.

Comment 9 Miro Hrončok 2021-01-06 16:05:34 UTC
Can this position be reconsidered now? (Also wrt RHEL 9.)

Comment 10 Ben Cotton 2021-02-09 15:06:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 11 Honza Horak 2021-03-19 16:32:22 UTC
(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

Comment 12 Patrik Novotný 2021-03-24 11:44:52 UTC
I'm currently trying to resolve the above mentioned LLVM issue. I will update with the results.

Comment 13 Petr Viktorin 2021-07-13 12:57:40 UTC
This is done now; thank you!


Note You need to log in before you can comment on or make changes to this bug.