Skip to content

DEPS: Bump meson-python, lower pin Cython #62086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

mroeschke
Copy link
Member

Since we recently adopted building with Cython 3 a while back, we don't want to allow users to build pandas with a Cython version lower than that

@mroeschke mroeschke added Build Library building on various platforms Dependencies Required and optional dependencies labels Aug 10, 2025
@jbrockmendel
Copy link
Member

pandas/_libs/tslibs/ccalendar.cp313-win_amd64.pyd.p/pandas/_libs/tslibs/ccalendar.pyx.c(9749): error C2220: the following warning is treated as an error
pandas/_libs/tslibs/ccalendar.cp313-win_amd64.pyd.p/pandas/_libs/tslibs/ccalendar.pyx.c(9749): warning C4244: '=': conversion from 'Py_ssize_t' to 'long', possible loss of data

@jbrockmendel
Copy link
Member

Is it just me or is the meson system harder to debug than the old system?

@mroeschke
Copy link
Member Author

Is it just me or is the meson system harder to debug than the old system?

Yeah there's a little more indirection than before (meson-python -> meson vs just setuptools), but I understand the "standardization" of meson/cmake is better than the wild-west of using setuptools

fi
pip install $EDITABLE . --no-build-isolation -v --no-deps --config-settings=setup-args="-Werror" --config-settings=setup-args="-Wno-error=unused-parameter"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillAyd any advice on how to pass -Werror -Wno-error=unused-parameter though meson(-python) during the build step? I was trying to follow https://mesonbuild.com/meson-python/how-to-guides/meson-args.html

Copy link
Member

@WillAyd WillAyd Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to pass it as -Ccompile-args="-Wno-error=unused-parameter

The -C is short for --config-settings in relatively more modern versions of pip, so that cuts down on the verbosity. Also, the argument you are providing is something that the compiler will process, hence the change of setup-args to compile-args

However, I'd suggest just putting this directly in the Meson configuration rather than controlling via the pip frontend:

cc = meson.get_compiler('c')
add_project_arguments(
    cc.get_supported_arguments(['-Wno-error=unused-parameter']),
    language: 'c',
)

That will suppress it for end users who probably don't care about these warnings anyway, while also working cross-platform (i.e. it will be ignored with an MSVC toolchain)

@WillAyd
Copy link
Member

WillAyd commented Aug 11, 2025

I don't have a strong point of view on bumping Meson, although I think it would be good to keep the lower bound as is until a new feature is required. (I definitely agree with un-pinning)

If we do need the 1.6 bump, you will also want to add that change to the meson_version key in the project function call in meson.build

@mroeschke mroeschke changed the title DEPS: Bump Meson, lower pin Cython DEPS: Bump meson-python, lower pin Cython Aug 13, 2025
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit - otherwise lgtm

run: |
if [[ ${{ inputs.editable }} == "true" ]]; then
EDITABLE="-e"
else
EDITABLE=""
fi
pip install $EDITABLE . --no-build-isolation -v --no-deps --config-settings=setup-args="-Werror" --config-settings=setup-args="-Wno-error=unused-parameter"
pip install $EDITABLE . --no-build-isolation -v --no-deps -Ccompile-args="-Werror"
Copy link
Member

@WillAyd WillAyd Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually should stay as setup-args not compile-args. Although it will work in either case on Unix platforms, -Werror is a setup argument in Meson as well. Passing it as a setup argument is portable across platforms, whereas this same command will fail with MSVC compilers

See also https://mesonbuild.com/Commands.html#setup

@mroeschke mroeschke requested a review from attack68 as a code owner August 14, 2025 15:56
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mroeschke you un-bumped meson on Will's request, but should the same then be done for meson-python. Or is there a good reason to still bump that one? (I don't really have an opinion here, just asking)

Comment on lines +12 to +13
- meson>=1.2.1,<2
- meson-python>=0.17.1,<1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep the pin here since this is the build with minimum versions?

@jorisvandenbossche
Copy link
Member

mesonbuild/meson-python#716 suggested to use the jinja2 FileSystemLoader instead of PackageLoader, and it seems that @WillAyd tried that in #60681. @WillAyd do you remember if that worked?

@jorisvandenbossche
Copy link
Member

mesonbuild/meson-python#716 suggested to use the jinja2 FileSystemLoader instead of PackageLoader, and it seems that @WillAyd tried that in #60681. @WillAyd do you remember if that worked?

Just testing it out directly, seems to work fine -> #62123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants