From 8212d3beef04a884e53d50d847664dd6759fa1e6 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 13:51:11 -0500 Subject: [PATCH 01/11] Relax meson pins in CI --- ci/deps/actions-310.yaml | 4 ++-- ci/deps/actions-311-downstream_compat.yaml | 4 ++-- ci/deps/actions-311-numpydev.yaml | 4 ++-- ci/deps/actions-311-pyarrownightly.yaml | 4 ++-- ci/deps/actions-311.yaml | 4 ++-- ci/deps/actions-312.yaml | 4 ++-- ci/deps/actions-pypy-39.yaml | 4 ++-- environment.yml | 4 ++-- pyproject.toml | 2 +- requirements-dev.txt | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index 74cab4e0970dc..4b6f22d39ce8a 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -7,8 +7,8 @@ dependencies: # build dependencies - versioneer - cython>=0.29.33 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml index 092ca18d61259..3d22047f4f15a 100644 --- a/ci/deps/actions-311-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -8,8 +8,8 @@ dependencies: # build dependencies - versioneer - cython>=0.29.33 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-numpydev.yaml b/ci/deps/actions-311-numpydev.yaml index 325a6d45d74fd..653aa78ece3ee 100644 --- a/ci/deps/actions-311-numpydev.yaml +++ b/ci/deps/actions-311-numpydev.yaml @@ -6,8 +6,8 @@ dependencies: # build dependencies - versioneer - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 - cython>=0.29.33 # test dependencies diff --git a/ci/deps/actions-311-pyarrownightly.yaml b/ci/deps/actions-311-pyarrownightly.yaml index 2d3d11c294e12..a65aee2eba8de 100644 --- a/ci/deps/actions-311-pyarrownightly.yaml +++ b/ci/deps/actions-311-pyarrownightly.yaml @@ -6,9 +6,9 @@ dependencies: # build dependencies - versioneer - - meson=1.2.1 + - meson>=1.2.1 - cython>=0.29.33 - - meson-python=0.13.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311.yaml b/ci/deps/actions-311.yaml index b6f515dceaea9..78b13edd47d6d 100644 --- a/ci/deps/actions-311.yaml +++ b/ci/deps/actions-311.yaml @@ -7,8 +7,8 @@ dependencies: # build dependencies - versioneer - cython>=0.29.33 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-312.yaml b/ci/deps/actions-312.yaml index bc66f8a5382c9..289184e8dac5b 100644 --- a/ci/deps/actions-312.yaml +++ b/ci/deps/actions-312.yaml @@ -7,8 +7,8 @@ dependencies: # build dependencies - versioneer - cython>=0.29.33 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-pypy-39.yaml b/ci/deps/actions-pypy-39.yaml index 90933b24b88db..d46b98c77fd87 100644 --- a/ci/deps/actions-pypy-39.yaml +++ b/ci/deps/actions-pypy-39.yaml @@ -10,8 +10,8 @@ dependencies: # build dependencies - versioneer - cython>=0.29.33 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/environment.yml b/environment.yml index 69647a436e3ad..9ba33052fb256 100644 --- a/environment.yml +++ b/environment.yml @@ -9,8 +9,8 @@ dependencies: # build dependencies - versioneer - cython~=3.0.5 - - meson=1.2.1 - - meson-python=0.13.1 + - meson>=1.2.1 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/pyproject.toml b/pyproject.toml index 7ab9cd2c17669..e6f50f1e81037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ "meson-python>=0.13.1", - "meson>=1.2.1,<2", + "meson>=1.2.1", "wheel", "Cython~=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json # Force numpy higher than 2.0rc1, so that built wheels are compatible diff --git a/requirements-dev.txt b/requirements-dev.txt index fb4d9cdb589ca..e6c9f631a6683 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,8 +4,8 @@ pip versioneer[toml] cython~=3.0.5 -meson[ninja]==1.2.1 -meson-python==0.13.1 +meson[ninja]>=1.2.1 +meson-python>=0.13.1 pytest>=7.3.2 pytest-cov pytest-xdist>=3.4.0 From 58ffe1da6b7a157ca8003bc604cfbd5351affe0f Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 18:24:20 -0500 Subject: [PATCH 02/11] Ignore Cython generated unused-function errors --- pandas/_libs/meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/meson.build b/pandas/_libs/meson.build index 5fb6f1118d648..9fb7de790c2f1 100644 --- a/pandas/_libs/meson.build +++ b/pandas/_libs/meson.build @@ -84,7 +84,10 @@ libs_sources = { 'sources': ['join.pyx', _khash_primitive_helper], 'deps': _khash_primitive_helper_dep, }, - 'lib': {'sources': ['lib.pyx', 'src/parser/tokenizer.c']}, + 'lib': { + 'sources': ['lib.pyx', 'src/parser/tokenizer.c'], + 'c_args': ['-Wno-unused-function'], # cython issue 6603 + }, 'missing': {'sources': ['missing.pyx']}, 'pandas_datetime': { 'sources': [ @@ -117,7 +120,10 @@ libs_sources = { 'ops': {'sources': ['ops.pyx']}, 'ops_dispatch': {'sources': ['ops_dispatch.pyx']}, 'properties': {'sources': ['properties.pyx']}, - 'reshape': {'sources': ['reshape.pyx']}, + 'reshape': { + 'sources': ['reshape.pyx'], + 'c_args': ['-Wno-unused-function'], # cython issue 6603 + }, 'sas': {'sources': ['sas.pyx']}, 'byteswap': {'sources': ['byteswap.pyx']}, 'sparse': {'sources': ['sparse.pyx', _sparse_op_helper]}, @@ -142,6 +148,7 @@ foreach ext_name, ext_dict : libs_sources cython_args: cython_args, include_directories: [inc_np, inc_pd], dependencies: ext_dict.get('deps', ''), + c_args: ext_dict.get('c_args', []), subdir: 'pandas/_libs', install: true, ) From 146f2a4891eac716d35ea1c257ea02624d2c0f50 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 17:48:12 -0500 Subject: [PATCH 03/11] Fix uninitialized warning --- pandas/_libs/hashtable_func_helper.pxi.in | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/_libs/hashtable_func_helper.pxi.in b/pandas/_libs/hashtable_func_helper.pxi.in index 5500fadb73b6d..fdb77a56541de 100644 --- a/pandas/_libs/hashtable_func_helper.pxi.in +++ b/pandas/_libs/hashtable_func_helper.pxi.in @@ -114,6 +114,7 @@ cdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna, const uint8 result_counts[i] = table.vals[k] if na_counter > 0: + assert n > 0 # val will be uninitialized without this result_counts[table.size] = na_counter result_keys.append(val) From bff51a21f95d240ea36bc882b825d92d8cab20a7 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 18:22:27 -0500 Subject: [PATCH 04/11] Help gcc-11.4 --- pandas/_libs/hashtable_func_helper.pxi.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pandas/_libs/hashtable_func_helper.pxi.in b/pandas/_libs/hashtable_func_helper.pxi.in index fdb77a56541de..9744b7f67502f 100644 --- a/pandas/_libs/hashtable_func_helper.pxi.in +++ b/pandas/_libs/hashtable_func_helper.pxi.in @@ -114,7 +114,15 @@ cdef value_count_{{dtype}}(const {{dtype}}_t[:] values, bint dropna, const uint8 result_counts[i] = table.vals[k] if na_counter > 0: - assert n > 0 # val will be uninitialized without this + # gcc-11.4 on ubuntu 22.04 cannot see that val won't be unassigned + # when we make it into this branch + assert n > 0 + {{if dtype == 'object'}} + val = values[n - 1] + {{else}} + val = {{to_c_type}}(values[n - 1]) + {{endif}} + result_counts[table.size] = na_counter result_keys.append(val) From 49d8d363f1bcd58506c442ccdd68d66e149b0b65 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 18:45:12 -0500 Subject: [PATCH 05/11] Ignore narrowing conversion warning on MSVC --- meson.build | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 66583095a6e77..b007f6b50bf3e 100644 --- a/meson.build +++ b/meson.build @@ -15,19 +15,25 @@ py = import('python').find_installation(pure: false) tempita = files('generate_pxi.py') versioneer = files('generate_version.py') - -add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language: 'c') -add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language: 'cpp') - -# Allow supporting older numpys than the version compiled against -# Set the define to the min supported version of numpy for pandas -# e.g. right now this is targeting numpy 1.21+ -add_project_arguments('-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION', language: 'c') -add_project_arguments( +cc = meson.get_compiler('c') +cp = meson.get_compiler('cpp') + +project_args = [ + '-DNPY_NO_DEPRECATED_API=0', + # Allow supporting older numpys than the version compiled against + # Set the define to the min supported version of numpy for pandas + # e.g. right now this is targeting numpy 1.21+ '-DNPY_TARGET_VERSION=NPY_1_21_API_VERSION', - language: 'cpp', -) + # ignore some MSVC warnings for narrowing + '/wd4244', + '/wd4267', +] + +c_args = cc.get_supported_arguments(project_args) +cpp_args = cp.get_supported_arguments(project_args) +add_project_arguments(c_args, language: 'c') +add_project_arguments(cpp_args, language: 'cpp') if fs.exists('_version_meson.py') py.install_sources('_version_meson.py', subdir: 'pandas') From 82d06136c7704ebdfec24ecbfe5ba3e72e7484df Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 19:00:23 -0500 Subject: [PATCH 06/11] Remove linker flags from windows --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e6f50f1e81037..1417814da008f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -149,7 +149,6 @@ setup = ['--vsenv'] # For Windows [tool.cibuildwheel] skip = "cp36-* cp37-* cp38-* cp39-* pp* *_i686 *_ppc64le *_s390x" build-verbosity = "3" -environment = {LDFLAGS="-Wl,--strip-all"} test-requires = "hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0" test-command = """ PANDAS_CI='1' python -c 'import pandas as pd; \ @@ -159,6 +158,12 @@ test-command = """ free-threaded-support = true before-build = "PACKAGE_DIR={package} bash {package}/scripts/cibw_before_build.sh" +[tool.cibuildwheel.macos] +environment = {LDFLAGS="-Wl,--strip-all"} + +[tool.cibuildwheel.linux] +environment = {LDFLAGS="-Wl,--strip-all"} + [tool.cibuildwheel.windows] before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build_windows.sh" before-test = "bash {package}/scripts/cibw_before_test_windows.sh" From 1bd4388c2f1a564b889abc20a5d92ddd5a90e273 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 19:09:01 -0500 Subject: [PATCH 07/11] More MSVC fix --- pandas/_libs/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/meson.build b/pandas/_libs/meson.build index 9fb7de790c2f1..d1f77dd14df73 100644 --- a/pandas/_libs/meson.build +++ b/pandas/_libs/meson.build @@ -86,7 +86,8 @@ libs_sources = { }, 'lib': { 'sources': ['lib.pyx', 'src/parser/tokenizer.c'], - 'c_args': ['-Wno-unused-function'], # cython issue 6603 + # cython issue 6603 + 'c_args': cc.get_supported_arguments(['-Wno-unused-function']), }, 'missing': {'sources': ['missing.pyx']}, 'pandas_datetime': { @@ -122,7 +123,8 @@ libs_sources = { 'properties': {'sources': ['properties.pyx']}, 'reshape': { 'sources': ['reshape.pyx'], - 'c_args': ['-Wno-unused-function'], # cython issue 6603 + # cython issue 6603 + 'c_args': cc.get_supported_arguments(['-Wno-unused-function']), }, 'sas': {'sources': ['sas.pyx']}, 'byteswap': {'sources': ['byteswap.pyx']}, From a5661343fbce4cffc44fd490ba64fc6d1b9bba8c Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 8 Jan 2025 19:34:10 -0500 Subject: [PATCH 08/11] More MSVC --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index b007f6b50bf3e..71d75c0ca1f07 100644 --- a/meson.build +++ b/meson.build @@ -27,6 +27,7 @@ project_args = [ # ignore some MSVC warnings for narrowing '/wd4244', '/wd4267', + '/wd4551', ] c_args = cc.get_supported_arguments(project_args) From 99d95f6928275ce397b3a6f03279268ae09d7e5a Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Thu, 9 Jan 2025 16:35:50 -0500 Subject: [PATCH 09/11] Upper bound for meson-python --- ci/deps/actions-310.yaml | 2 +- ci/deps/actions-311-downstream_compat.yaml | 2 +- ci/deps/actions-311-numpydev.yaml | 2 +- ci/deps/actions-311-pyarrownightly.yaml | 2 +- ci/deps/actions-311.yaml | 2 +- ci/deps/actions-312.yaml | 2 +- ci/deps/actions-pypy-39.yaml | 2 +- environment.yml | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index 4b6f22d39ce8a..a93393a8c76c3 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml index 3d22047f4f15a..94042d17dba1e 100644 --- a/ci/deps/actions-311-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -9,7 +9,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-numpydev.yaml b/ci/deps/actions-311-numpydev.yaml index 653aa78ece3ee..e60ca0b7dbb7d 100644 --- a/ci/deps/actions-311-numpydev.yaml +++ b/ci/deps/actions-311-numpydev.yaml @@ -7,7 +7,7 @@ dependencies: # build dependencies - versioneer - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 - cython>=0.29.33 # test dependencies diff --git a/ci/deps/actions-311-pyarrownightly.yaml b/ci/deps/actions-311-pyarrownightly.yaml index a65aee2eba8de..7c3688c5b0de5 100644 --- a/ci/deps/actions-311-pyarrownightly.yaml +++ b/ci/deps/actions-311-pyarrownightly.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - meson>=1.2.1 - cython>=0.29.33 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311.yaml b/ci/deps/actions-311.yaml index 78b13edd47d6d..ecf4e25daf8e0 100644 --- a/ci/deps/actions-311.yaml +++ b/ci/deps/actions-311.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-312.yaml b/ci/deps/actions-312.yaml index 289184e8dac5b..fcbf4914e47e8 100644 --- a/ci/deps/actions-312.yaml +++ b/ci/deps/actions-312.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-pypy-39.yaml b/ci/deps/actions-pypy-39.yaml index d46b98c77fd87..70282f0a421ff 100644 --- a/ci/deps/actions-pypy-39.yaml +++ b/ci/deps/actions-pypy-39.yaml @@ -11,7 +11,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/environment.yml b/environment.yml index 9ba33052fb256..4ffb4b1867612 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - versioneer - cython~=3.0.5 - meson>=1.2.1 - - meson-python>=0.13.1 + - meson-python>=0.13.1, <0.16.0 # test dependencies - pytest>=7.3.2 diff --git a/pyproject.toml b/pyproject.toml index 1417814da008f..9b3544c2c208b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Minimum requirements for the build system to execute. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ - "meson-python>=0.13.1", + "meson-python>=0.13.1, <0.16.0", "meson>=1.2.1", "wheel", "Cython~=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json diff --git a/requirements-dev.txt b/requirements-dev.txt index e6c9f631a6683..67efe84d1ec6c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ pip versioneer[toml] cython~=3.0.5 meson[ninja]>=1.2.1 -meson-python>=0.13.1 +meson-python>=0.13.1, <0.16.0 pytest>=7.3.2 pytest-cov pytest-xdist>=3.4.0 From 950b7e8acf3bb13a94fcd34d507c9769020cc075 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Fri, 10 Jan 2025 09:35:40 -0500 Subject: [PATCH 10/11] Revert "Upper bound for meson-python" This reverts commit 8d6d29cac345859cad3fd3b5bc914efb224720b8. --- ci/deps/actions-310.yaml | 2 +- ci/deps/actions-311-downstream_compat.yaml | 2 +- ci/deps/actions-311-numpydev.yaml | 2 +- ci/deps/actions-311-pyarrownightly.yaml | 2 +- ci/deps/actions-311.yaml | 2 +- ci/deps/actions-312.yaml | 2 +- ci/deps/actions-pypy-39.yaml | 2 +- environment.yml | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index a93393a8c76c3..4b6f22d39ce8a 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml index 94042d17dba1e..3d22047f4f15a 100644 --- a/ci/deps/actions-311-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -9,7 +9,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311-numpydev.yaml b/ci/deps/actions-311-numpydev.yaml index e60ca0b7dbb7d..653aa78ece3ee 100644 --- a/ci/deps/actions-311-numpydev.yaml +++ b/ci/deps/actions-311-numpydev.yaml @@ -7,7 +7,7 @@ dependencies: # build dependencies - versioneer - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 - cython>=0.29.33 # test dependencies diff --git a/ci/deps/actions-311-pyarrownightly.yaml b/ci/deps/actions-311-pyarrownightly.yaml index 7c3688c5b0de5..a65aee2eba8de 100644 --- a/ci/deps/actions-311-pyarrownightly.yaml +++ b/ci/deps/actions-311-pyarrownightly.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - meson>=1.2.1 - cython>=0.29.33 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-311.yaml b/ci/deps/actions-311.yaml index ecf4e25daf8e0..78b13edd47d6d 100644 --- a/ci/deps/actions-311.yaml +++ b/ci/deps/actions-311.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-312.yaml b/ci/deps/actions-312.yaml index fcbf4914e47e8..289184e8dac5b 100644 --- a/ci/deps/actions-312.yaml +++ b/ci/deps/actions-312.yaml @@ -8,7 +8,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/ci/deps/actions-pypy-39.yaml b/ci/deps/actions-pypy-39.yaml index 70282f0a421ff..d46b98c77fd87 100644 --- a/ci/deps/actions-pypy-39.yaml +++ b/ci/deps/actions-pypy-39.yaml @@ -11,7 +11,7 @@ dependencies: - versioneer - cython>=0.29.33 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/environment.yml b/environment.yml index 4ffb4b1867612..9ba33052fb256 100644 --- a/environment.yml +++ b/environment.yml @@ -10,7 +10,7 @@ dependencies: - versioneer - cython~=3.0.5 - meson>=1.2.1 - - meson-python>=0.13.1, <0.16.0 + - meson-python>=0.13.1 # test dependencies - pytest>=7.3.2 diff --git a/pyproject.toml b/pyproject.toml index 9b3544c2c208b..1417814da008f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Minimum requirements for the build system to execute. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ - "meson-python>=0.13.1, <0.16.0", + "meson-python>=0.13.1", "meson>=1.2.1", "wheel", "Cython~=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json diff --git a/requirements-dev.txt b/requirements-dev.txt index 67efe84d1ec6c..e6c9f631a6683 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ pip versioneer[toml] cython~=3.0.5 meson[ninja]>=1.2.1 -meson-python>=0.13.1, <0.16.0 +meson-python>=0.13.1 pytest>=7.3.2 pytest-cov pytest-xdist>=3.4.0 From 4ecfec05d44d714b4b58a8e94a4ff50dc102a625 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Fri, 10 Jan 2025 09:35:54 -0500 Subject: [PATCH 11/11] Use different jinja loader to work with meson-python --- pandas/io/formats/style_render.py | 5 ++++- pandas/tests/io/formats/style/test_html.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index c0f0608f1ab32..ab5e9cabfa099 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -6,6 +6,7 @@ Sequence, ) from functools import partial +import pathlib import re from typing import ( TYPE_CHECKING, @@ -71,7 +72,9 @@ class StylerRenderer: Base class to process rendering a Styler with a specified jinja2 template. """ - loader = jinja2.PackageLoader("pandas", "io/formats/templates") + thisdir = pathlib.Path(__file__).parent.resolve() + template_dir = thisdir / "templates" + loader = jinja2.FileSystemLoader(template_dir) env = jinja2.Environment(loader=loader, trim_blocks=True) template_html = env.get_template("html.tpl") template_html_table = env.get_template("html_table.tpl") diff --git a/pandas/tests/io/formats/style/test_html.py b/pandas/tests/io/formats/style/test_html.py index 752b9b391f9cb..e46a59197a3b7 100644 --- a/pandas/tests/io/formats/style/test_html.py +++ b/pandas/tests/io/formats/style/test_html.py @@ -1,3 +1,4 @@ +import pathlib from textwrap import ( dedent, indent, @@ -18,7 +19,9 @@ @pytest.fixture def env(): - loader = jinja2.PackageLoader("pandas", "io/formats/templates") + project_dir = pathlib.Path(__file__).parent.parent.parent.parent.parent.resolve() + template_dir = project_dir / "io" / "formats" / "templates" + loader = jinja2.FileSystemLoader(template_dir) env = jinja2.Environment(loader=loader, trim_blocks=True) return env