Re: What's our minimum supported Python version?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-04-22T15:04:55Z
Lists: pgsql-hackers
Attachments
- python-syntax-hack.patch (text/x-diff) patch
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 19 Apr 2025, at 18:17, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The reason I bring this up is that I found out the hard way
>> that src/test/modules/oauth_validator fails on RHEL8, because
>> its oauth_server.py script is not compatible with the 3.6.8
>> version of Python supplied by this distro.
> Do you have the error message/log for the failure handy?
The first problem is that this Python version seems not to
like assignments embedded in if statements:
File "t/oauth_server.py", line 319
if err := self._get_param("error_code", None):
^
SyntaxError: invalid syntax
I was able to work around that with the attached quick hack.
But then I get
Traceback (most recent call last):
File "t/oauth_server.py", line 19, in <module>
class OAuthHandler(http.server.BaseHTTPRequestHandler):
File "t/oauth_server.py", line 26, in OAuthHandler
JsonObject = dict[str, object] # TypeAlias is not available until 3.10
TypeError: 'type' object is not subscriptable
which I have no idea how to work around.
regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
plpython: Remove obsolete test expected file
- 1a857348e47d 18.0 landed
-
Bump the minimum supported Python version to 3.6.8
- 45363fca6372 18.0 landed
-
oauth: Support Python 3.6 in tests
- 005ccae0f2d6 18.0 landed