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.