[PATCH] Support older Pythons in oauth_server.py
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Daniel Gustafsson <daniel@yesql.se>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-04-22T19:25:09Z
Lists: pgsql-hackers
Attachments
- 0001-oauth-Support-Python-3.6-in-tests.patch (application/octet-stream) patch 0001
On Tue, Apr 22, 2025 at 8:29 AM Jacob Champion <jacob.champion@enterprisedb.com> wrote: > On Tue, Apr 22, 2025 at 8:05 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > The first problem is that this Python version seems not to > > like assignments embedded in if statements: [...] > > > > I was able to work around that with the attached quick hack. > > But then I get [...] > > Thanks, I'll put a patch together. Sorry -- IIRC, both of those > features are probably too new for me to have used, regardless of what > we decide is the minimum version for 18. Splitting this off into its own $SUBJECT. I coupled oauth_server to new Python stuff without realizing it, sorry: - urllib's reclassification of `~` as a safe URL character (3.7) - walrus operator `:=` (3.8) - dict[type, type] annotations (3.9) - str.removeprefix/suffix() (3.9) Attached patch gets rid of all that. This is tested against Python 3.6.15 (3.6 went EOL at the end of 2021). I'm working on getting Rocky 8 installed locally to test against. If it's decided we want to support downwards to 3.5, I will test there too (but I hope we don't; see parent thread). Thanks, --Jacob
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