Re: Time to drop plpython2?

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Time to drop plpython2?
Date: 2021-11-10 10:56:10
Message-ID: 85eb62cd-76f3-d01f-79ef-144173c16edc@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.11.21 20:54, Andres Freund wrote:
>> Finally, morally related, there is some Python 2/3 compat code in
>> contrib/unaccent/generate_unaccent_rules.py that could be removed. Also,
>> arguably, change the shebang line in that script.
>
> Hm. So far the python used for plpython and python for code generation etc is
> independent. I don't know if plpython actually can be cross-compiled, but if
> so, they'd have to be independent. Otherwise I'd say we should just invoke
> contrib/unaccent/generate_unaccent_rules.py with a python chosen by
> configure/meson, rather than relying on a shebang that can't be adjusted
> without modifying source code.

We don't rely on the shebang for running this (see Makefile). I just
see some trend of people changing shebang lines as a sort of signal,
"this script has abandoned Python 2". It's not very important.

> Another thing I wondered about is what we want to do with the extension
> names. Do we want to leave it named plpython3u? Do we want to have a plpython
> that depends on plpython3u?

I would tend to mirror what the Python community does with
/usr/bin/python. Right now, most people are removing /usr/bin/python
and just provide /usr/bin/python3. This would be analogous to what your
patch does. Some time in the future, they may add /usr/bin/python back,
and then we could do the same, meaning add a plpythonu that depends on
plpython3u.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message chris 2021-11-10 10:59:44 Re: Confused with PostgreSQL on Synology NAS
Previous Message Amit Kapila 2021-11-10 10:51:30 Re: Parallel vacuum workers prevent the oldest xmin from advancing