From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Resolving the python 2 -> python 3 mess |
Date: | 2020-02-19 04:39:28 |
Message-ID: | 21257.1582087168@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
After thinking about this awhile longer, I'm starting to believe
we should do some of each. That is, the stub replacement for
plpython2.so should redirect "plpythonu" functions to plpython3.so,
but throw errors for "plpython2u" functions. This is not because
of any technical difference between plpythonu and plpython2u ---
up to now, there wasn't any --- but because it seems like users
would be expecting that if they've read what we have said in
https://www.postgresql.org/docs/current/plpython-python23.html
Admittedly, what it says there is that plpythonu might become
Python 3 in some "distant" future release, not next year.
But at least there's a direct line between that documentation
and this behavior.
So attached is a pair of draft patches that do it like that.
0001 creates an extension with two conversion functions, based
on the script I showed in the other thread. Almost independently
of that, 0002 provides code to generate a stub version of
plpython2.so that behaves as stated above. 0002 is incomplete,
because I haven't looked into what is needed in the MSVC build
scripts. Maybe we could create some regression tests, too.
But I think these are potentially committable with those additions,
if people approve of this approach.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
0001-add-convert-python3-extension-1.patch | text/x-diff | 11.0 KB |
0002-add-stub-plpython2-1.patch | text/x-diff | 14.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-02-19 05:25:19 | pg_regress cleans up tablespace twice. |
Previous Message | Michael Paquier | 2020-02-19 04:28:04 | Re: Print physical file path when checksum check fails |