Support Python 3 tests under MSVC

Started by Andrew Dunstanover 8 years ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t38631
psql -h localhost -U postgres

Built from patchset v4 (message #4), July 27, 2026 at 08:31 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t38631_4 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t38631_4 && git checkout t38631_4

Patchset v4 (message #4) is on t38631_4

Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Here are a couple of patches, one for master and one for the back
branches from 9.5 to 10 to allow testing of plpython3 and associated
contrib modules when building with MSVC.

I've tested this out on a Windows 2016 machine with Visual Studio 2017.

I'd like to apply these - they only affect the testing script
vcregress.pl, so they should be very low risk.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

plpython3.master.patchtext/x-patch; name=plpython3.master.patchDownload+61-10
plpython3.9_5-10.patchtext/x-patch; name=plpython3.9_5-10.patchDownload+61-8
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#1)
Re: Support Python 3 tests under MSVC

On 4/30/18 15:52, Andrew Dunstan wrote:

I'd like to apply these - they only affect the testing script
vcregress.pl, so they should be very low risk.

In case there are concerns about maintaining a second copy of the
"mangle" script: The obvious answer is to rewrite that script in Python.
I tried that once upon a time but it got too complicated.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Yuriy Zhuravlev
stalkerg@gmail.com
In reply to: Andrew Dunstan (#1)
Re: Support Python 3 tests under MSVC

Interesting, this working fine more than year with CMake build version.

On Tue, 1 May 2018, 04:53 Andrew Dunstan, <andrew.dunstan@2ndquadrant.com>
wrote:

Show quoted text

Here are a couple of patches, one for master and one for the back
branches from 9.5 to 10 to allow testing of plpython3 and associated
contrib modules when building with MSVC.

I've tested this out on a Windows 2016 machine with Visual Studio 2017.

I'd like to apply these - they only affect the testing script
vcregress.pl, so they should be very low risk.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#2)
Re: Support Python 3 tests under MSVC

On Mon, Apr 30, 2018 at 4:52 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/30/18 15:52, Andrew Dunstan wrote:

I'd like to apply these - they only affect the testing script
vcregress.pl, so they should be very low risk.

In case there are concerns about maintaining a second copy of the
"mangle" script: The obvious answer is to rewrite that script in Python.
I tried that once upon a time but it got too complicated.

Well, as you can see I have rewritten it in perl :-) We could extract
that into a perl package and centralize it, but I'm not sure it's
worth the trouble.

Here's a new version of the master patch. I wasn't able to resist the
temptation to do a little cleaning up. In particular, we really don't
need to call python to tell us which version we have - we can do what
we do elsewhere and look to see what python build directory we have. I
also removed the completely redundant first parameter of
subdircheck().

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t38631_4
plpython3.v3.patchapplication/octet-stream; name=plpython3.v3.patchDownload+68-34