Re: plpythonu -> python3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: plpythonu -> python3
Date
Msg-id 14186.1573147925@sss.pgh.pa.us
Whole thread Raw
In response to plpythonu -> python3  (Christoph Berg <myon@debian.org>)
Responses Re: plpythonu -> python3  (Christoph Berg <myon@debian.org>)
Re: plpythonu -> python3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Christoph Berg <myon@debian.org> writes:
> The docs currently say
>       The language named <literal>plpythonu</literal> implements
>       PL/Python based on the default Python language variant, which is
>       currently Python 2.  (This default is independent of what any
>       local Python installations might consider to be
>       their <quote>default</quote>, for example,
>       what <filename>/usr/bin/python</filename> might be.)  The
>       default will probably be changed to Python 3 in a distant future
>       release of PostgreSQL, depending on the progress of the
>       migration to Python 3 in the Python community.

> As python2 is EOL very soon, I'd say that point is now, i.e. we should
> make plpythonu.control point at plpython3u in PG13+.

We're starting to work on that; it's not a trivial change.  Among other
things, pg_pltemplate has got pointers at plpython2 as well.  See [1]
for one preliminary step, and there are other discussions in the archives
about things we could do to make this smoother.

> And probably drop python2 support altogether.

I think it'll be quite some time before that happens.  People who
are still using ancient versions of Postgres are not likely to be
impressed by arguments about how python2 is out of support.

> For PG12, I have the problem that I don't want to keep supporting
> python2 (Debian is already working hard on removing all python2
> references), and have therefore already disabled building the
> plpython2 packages for Debian, shipping only plpython3.

You're fully within your rights to stop building plpython2 in what you
ship.  That's not an argument for removing the upstream support.

> Would it be ok to make plpythonu.control point at python3 in PG12 in
> Debian, even the upstream default is still python2?

I do not think you should do that.  This transition is going to be
painful enough without distributions making their own ad-hoc changes
that are different from what other people are doing.

Right at the moment, given that Debian and others have already stopped
shipping "/usr/bin/python", I'd say that the equivalent thing is just to
stop building plpython2, and force users to deal with the change manually.
If you didn't decide to symlink /usr/bin/python to python3 instead of
python2, what's the justification for doing the moral equivalent of that
with plpython?

            regards, tom lane

[1] https://www.postgresql.org/message-id/flat/5889.1566415762@sss.pgh.pa.us



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: ssl passphrase callback
Next
From: Jesper Pedersen
Date:
Subject: Re: Application name for pg_basebackup and friends