From 48dd13d3748a8a931a863d63e1b93f49e6d0ceed Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Mon, 26 Jan 2026 13:23:18 +0200 Subject: python3-pandas: Upgrade 2.2.3 -> 3.0.0 Upgrade to release 3.0.0: - Dedicated string data type by default - Consistent copy/view behaviour with Copy-on-Write (CoW) (a.k.a. getting rid of the SettingWithCopyWarning) - New default resolution for datetime-like data - Initial support for the new pd.col syntax License-Update: Update license year to 2026 Signed-off-by: Leon Anavi Signed-off-by: Khem Raj --- ...d-option-to-specify-numpy-header-location.patch | 30 +++++++----- .../0001-fix-reproducibility-issue.patch | 43 ------------------ ...roject.toml-don-t-pin-dependency-versions.patch | 32 ------------- .../python/python3-pandas_2.2.3.bb | 53 ---------------------- .../python/python3-pandas_3.0.0.bb | 48 ++++++++++++++++++++ 5 files changed, 67 insertions(+), 139 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch delete mode 100644 meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch delete mode 100644 meta-python/recipes-devtools/python/python3-pandas_2.2.3.bb create mode 100644 meta-python/recipes-devtools/python/python3-pandas_3.0.0.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch index e83576eb62..ed5eb767e9 100644 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch +++ b/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch @@ -1,4 +1,4 @@ -From 16dd09e6c79768a24f5a50ec5985e0b6fdf17f35 Mon Sep 17 00:00:00 2001 +From 65db03f03dbb61172c6eea8b34d11ea9eb0c6d77 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Mon, 10 Mar 2025 13:52:11 +0100 Subject: [PATCH] BLD: add option to specify numpy header location @@ -19,24 +19,29 @@ include folder location, fall back to the value of this meson option. Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/61095] Signed-off-by: Gyorgy Sarvari +Signed-off-by: Leon Anavi --- meson.options | 1 + - pandas/meson.build | 13 ++++++++++--- - 2 files changed, 11 insertions(+), 3 deletions(-) + pandas/meson.build | 12 +++++++++--- + 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 meson.options +diff --git a/meson.options b/meson.options +new file mode 100644 +index 0000000..3d3a18d --- /dev/null +++ b/meson.options @@ -0,0 +1 @@ +option('numpy_inc_dir', type : 'string', description : 'The absolute path to the numpy headers') +diff --git a/pandas/meson.build b/pandas/meson.build +index 840ac25..2c3423e 100644 --- a/pandas/meson.build +++ b/pandas/meson.build -@@ -3,17 +3,24 @@ incdir_numpy = run_command(py, - '-c', - ''' +@@ -4,17 +4,23 @@ incdir_numpy = run_command( + '-c', + ''' import os -import numpy as np -+ +try: + import numpy as np + base_incdir = np.get_include() @@ -53,9 +58,12 @@ Signed-off-by: Gyorgy Sarvari - incdir = np.get_include() + incdir = base_incdir print(incdir) - ''' - ], -+ env: {'NUMPY_INC_DIR': get_option('numpy_inc_dir')}, - check: true + ''', + ], ++ env: {'NUMPY_INC_DIR': get_option('numpy_inc_dir')}, + check: true, ).stdout().strip() +-- +2.47.3 + diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch deleted file mode 100644 index deadacafa9..0000000000 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 80274cd3a0746ddc5421643dd40d47bdf3c6a68c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Fri, 26 Sep 2025 15:47:53 +0800 -Subject: [PATCH] fix reproducibility issue - -The type of new_value is either `npy_timedelta' or `int64_t' -In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c -.. -npy_timedelta __pyx_v_new_value; -... - -In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c -... -__pyx_t_5numpy_int64_t __pyx_v_new_value; -... - -Explicitly define it as int64_t to assure the generated source is -reproducibility between builds - -Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/62459] - -Signed-off-by: Hongxu Jia ---- - pandas/_libs/tslibs/timedeltas.pyx | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx -index f6c69cf..34ac9e7 100644 ---- a/pandas/_libs/tslibs/timedeltas.pyx -+++ b/pandas/_libs/tslibs/timedeltas.pyx -@@ -1820,6 +1820,9 @@ class Timedelta(_Timedelta): - - disallow_ambiguous_unit(unit) - -+ cdef: -+ int64_t new_value; -+ - # GH 30543 if pd.Timedelta already passed, return it - # check that only value is passed - if isinstance(value, _Timedelta): --- -2.34.1 - diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch deleted file mode 100644 index 950f25303f..0000000000 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d46b8720a6bccb345f6bdd7ee2f5c357e7eb227b Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin -Date: Mon, 12 Aug 2024 11:27:36 -0400 -Subject: [PATCH] pyproject.toml: don't pin dependency versions - -Pandas will fail to build if the exact versions aren't found, but newer -ones actually work. Since newer versions of pandas are adjusting the -requires section of pyproject toml further, just patch it for us. - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Trevor Gamblin ---- - pyproject.toml | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -2,10 +2,10 @@ - # 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==1.2.1", -+ "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 -+ "Cython>=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json - # Force numpy higher than 2.0, so that built wheels are compatible - # with both numpy 1 and 2 - "numpy>=2.0", diff --git a/meta-python/recipes-devtools/python/python3-pandas_2.2.3.bb b/meta-python/recipes-devtools/python/python3-pandas_2.2.3.bb deleted file mode 100644 index 91333d129d..0000000000 --- a/meta-python/recipes-devtools/python/python3-pandas_2.2.3.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "pandas library for high-performance data analysis tools" -DESCRIPTION = "pandas is an open source, BSD-licensed library providing \ -high-performance, easy-to-use data structures and data analysis tools for \ -the Python programming language." -HOMEPAGE = "https://pandas.pydata.org/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cb819092901ddb13a7d0a4f5e05f098a" - -SRC_URI += " \ - file://0001-pyproject.toml-don-t-pin-dependency-versions.patch \ - file://0001-fix-reproducibility-issue.patch \ - " - -SRC_URI:append:class-target = " file://0001-BLD-add-option-to-specify-numpy-header-location.patch " - -SRC_URI[sha256sum] = "4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667" - -CVE_PRODUCT = "pandas" - -inherit pkgconfig pypi python_mesonpy cython - -DEPENDS += " \ - python3-numpy \ - python3-versioneer-native \ -" - -CFLAGS:append:toolchain-clang = " -Wno-error=deprecated-declarations" - -RDEPENDS:${PN} += " \ - python3-json \ - python3-numpy \ - python3-dateutil \ - python3-dateutil-zoneinfo \ - python3-pytz \ - python3-profile \ -" - -PYTHONPATH:prepend:class-target = "${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}:" -export PYTHONPATH - -do_compile:append() { - # Fix absolute paths in generated files - find ${B} -name "*.c" -o -name "*.cpp" | xargs -r \ - sed -i 's|${WORKDIR}/pandas-${PV}/|${TARGET_DBGSRC_DIR}/|g' -} - -do_install:prepend() { - sed -i -e 's;${S};;g' ${B}/pandas/_libs/sparse.cpython-*/pandas/_libs/sparse.pyx.c -} - -EXTRA_OEMESON:append:class-target = " -Dnumpy_inc_dir=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}/numpy/_core/include " - -BBCLASSEXTEND = "native" diff --git a/meta-python/recipes-devtools/python/python3-pandas_3.0.0.bb b/meta-python/recipes-devtools/python/python3-pandas_3.0.0.bb new file mode 100644 index 0000000000..01f57b9aa9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pandas_3.0.0.bb @@ -0,0 +1,48 @@ +SUMMARY = "pandas library for high-performance data analysis tools" +DESCRIPTION = "pandas is an open source, BSD-licensed library providing \ +high-performance, easy-to-use data structures and data analysis tools for \ +the Python programming language." +HOMEPAGE = "https://pandas.pydata.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e98642e1210ade884e5254ab18d55b7d" + +SRC_URI:append:class-target = " file://0001-BLD-add-option-to-specify-numpy-header-location.patch " + +SRC_URI[sha256sum] = "0facf7e87d38f721f0af46fe70d97373a37701b1c09f7ed7aeeb292ade5c050f" + +CVE_PRODUCT = "pandas" + +inherit pkgconfig pypi python_mesonpy cython + +DEPENDS += " \ + python3-numpy \ + python3-versioneer-native \ +" + +CFLAGS:append:toolchain-clang = " -Wno-error=deprecated-declarations" + +RDEPENDS:${PN} += " \ + python3-json \ + python3-numpy \ + python3-dateutil \ + python3-dateutil-zoneinfo \ + python3-pytz \ + python3-profile \ +" + +PYTHONPATH:prepend:class-target = "${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}:" +export PYTHONPATH + +do_compile:append() { + # Fix absolute paths in generated files + find ${B} -name "*.c" -o -name "*.cpp" | xargs -r \ + sed -i 's|${WORKDIR}/pandas-${PV}/|${TARGET_DBGSRC_DIR}/|g' +} + +do_install:prepend() { + sed -i -e 's;${S};;g' ${B}/pandas/_libs/sparse.cpython-*/pandas/_libs/sparse.pyx.c +} + +EXTRA_OEMESON:append:class-target = " -Dnumpy_inc_dir=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}/numpy/_core/include " + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf