Re: minimum Meson version - Mailing list pgsql-hackers

From Nazir Bilal Yavuz
Subject Re: minimum Meson version
Date
Msg-id CAN55FZ3Km0qGMiqa8maG3DdxizV2cww0G04De+tm07Z27mhs5w@mail.gmail.com
Whole thread Raw
In response to Re: minimum Meson version  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
List pgsql-hackers
Hi,

On Thu, 19 Jun 2025 at 09:40, Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:
>
> Hi,
>
> On Wed, 18 Jun 2025 at 11:58, Peter Eisentraut <peter@eisentraut.org> wrote:
> >
> > On 17.06.25 19:36, Peter Eisentraut wrote:
> > > meson.build currently says
> > >
> > > # We want < 0.56 for python 3.5 compatibility on old platforms. EPEL for
> > > # RHEL 7 has 0.55. < 0.54 would require replacing some uses of the fs
> > > # module, < 0.53 all uses of fs. So far there's no need to go to >=0.56.
> > > meson_version: '>=0.54',
> > >
> > > Since the current minimum supported Python version is now actually 3.6,
> > > we could update this a bit.
> > >
> > > The first Meson version to require Python 3.7 is 0.62, so we should stay
> > > below that.
> > >
> > > Moving to 0.55 and 0.56 would get rid of some future-deprecated warnings.
> > >
> > > There is some conditional code for 0.57 and 0.59, so landing on either
> > > of these would allow getting rid of some of that.
> > >
> > > I see that Rocky Linux 8 ships with Meson 0.58.2 [0], so maybe that is a
> > > good target to aim for.  (I don't know if that carried over from RHEL 8
> > > or is their own doing.)  But there aren't any compelling features new in
> > > 0.58 (format strings seem nice but are pretty much cosmetic), so maybe
> > > setting the minimum to 0.57 is enough.
> >
> > Ok, let's make a small start.  Here is a patch set that moves the
> > requirement to >=0.57.  As explained above, this allows getting rid of a
> > bunch of conditional code and the future-deprecated warnings.
>
> Thanks for the patches! I didn't check them yet

All patches LGTM. I spent some time on using debug python interpreter
on Windows CI images to fix this warning:

    WARNING: Using a debug build type with MSVC or an MSVC-compatible compiler
    when the Python interpreter is not also a debug build will almost
    certainly result in a failed build. Prefer using a release build
    type or a debug Python interpreter.

I used the 'Include_debug' option [1] while installing python and
python_d.exe was created but a warning is still produced by meson.
Meson produces that warning if the 'Py_DEBUG' flag is not set in the
python build [2]. It seems that although it is a debug python build,
'Py_DEBUG' is not set.

I confirm it is a debug build because when I run python_d.exe with -d
flag, I can see the parser debugging output [3].

[1] https://docs.python.org/3/using/windows.html#installing-without-ui
[2]
https://github.com/mesonbuild/meson/blob/852a580ee6ed32bd21303e977556008de7918651/mesonbuild/dependencies/python.py#L257C1-L262C64
[3] https://docs.python.org/3/using/configure.html#python-debug-build
[3]
$ python3 -h
$ -d     : turn on parser debugging output (for experts only, only works on
           debug builds); also PYTHONDEBUG=x

--
Regards,
Nazir Bilal Yavuz
Microsoft



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Next
From: Peter Eisentraut
Date:
Subject: Re: Huge commitfest app update upcoming: Tags, Draft CF, Help page, and automated commitfest creat/open/close