Re: Time to drop plpython2?
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org
Date: 2021-11-04T18:58:54Z
Lists: pgsql-hackers
I see you have posted a patch for this in the meson thread (https://www.postgresql.org/message-id/attachment/127770/v5-0003-plpython-Drop-support-python2.patch). Here is my review of that. I would change the search order in configure from PGAC_PATH_PROGS(PYTHON, [python python3 python2]) to PGAC_PATH_PROGS(PYTHON, [python3 python]) This makes sure you don't accidentally pick up a "python" binary that points to Python 2. This would otherwise immediately generate lots of build failures on older platforms that still have Python 2 around. You left two FIXME sections in plpython.h. AFAICT, we can make the substitutions corresponding to those #define's in the source code and remove those blocks. src/pl/plpython/expected/README should be updated for the removed files. Some documentation updates are needed. I see possibly relevant text in the following files: hstore.sgml install-windows.sgml installation.sgml json.sgml libpq.sgml plpython.sgml ref/comment.sgml (examples) ref/create_transform.sgml (examples) ref/drop_transform.sgml (examples) standalone-profile.xsl src/tools/msvc/ has lots of Python-related content. More stuff to clean up: contrib/hstore_plpython/.gitignore contrib/jsonb_plpython/.gitignore contrib/ltree_plpython/.gitignore src/pl/plpython/.gitignore 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.
Commits
-
plpython: add missing plpython.h include to plpy_plpymodule.h
- 54c72eb5e5e6 15.0 landed
-
plpython: Adjust docs after removal of Python 2 support.
- 4228cabb72bb 15.0 landed
-
plpython: Code cleanup related to removal of Python 2 support.
- 9b7e24a2cb37 15.0 landed
-
plpython: Remove regression test infrastructure for Python 2.
- db23464715f4 15.0 landed
-
plpython: Remove plpythonu, plpython2u and associated transform extensions.
- 76a29adee749 15.0 landed
-
plpython: Reject Python 2 during build configuration.
- 19252e8ec938 15.0 landed
-
Add traceback information to PL/Python errors
- 2bd78eb8d51c 9.1.0 cited