diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2025-09-26 16:19:13 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-10-05 21:43:44 -0700 |
| commit | c723824e4dd166f0cb895c09ca3a485e05cad70a (patch) | |
| tree | c2651975565579d86f4b2a3c4d6025dfb31a1e11 /meta-python/recipes-devtools/python/python3-pandas | |
| parent | 4b589e4099ff4b57c349ccfd6c03993a9088c653 (diff) | |
| download | meta-openembedded-c723824e4dd166f0cb895c09ca3a485e05cad70a.tar.gz | |
python3-pandas: 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
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pandas')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch | 43 |
1 files changed, 43 insertions, 0 deletions
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 new file mode 100644 index 0000000000..deadacafa9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 80274cd3a0746ddc5421643dd40d47bdf3c6a68c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Fri, 26 Sep 2025 15:47:53 +0800 | ||
| 4 | Subject: [PATCH] fix reproducibility issue | ||
| 5 | |||
| 6 | The type of new_value is either `npy_timedelta' or `int64_t' | ||
| 7 | In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c | ||
| 8 | .. | ||
| 9 | npy_timedelta __pyx_v_new_value; | ||
| 10 | ... | ||
| 11 | |||
| 12 | In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c | ||
| 13 | ... | ||
| 14 | __pyx_t_5numpy_int64_t __pyx_v_new_value; | ||
| 15 | ... | ||
| 16 | |||
| 17 | Explicitly define it as int64_t to assure the generated source is | ||
| 18 | reproducibility between builds | ||
| 19 | |||
| 20 | Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/62459] | ||
| 21 | |||
| 22 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 23 | --- | ||
| 24 | pandas/_libs/tslibs/timedeltas.pyx | 3 +++ | ||
| 25 | 1 file changed, 3 insertions(+) | ||
| 26 | |||
| 27 | diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx | ||
| 28 | index f6c69cf..34ac9e7 100644 | ||
| 29 | --- a/pandas/_libs/tslibs/timedeltas.pyx | ||
| 30 | +++ b/pandas/_libs/tslibs/timedeltas.pyx | ||
| 31 | @@ -1820,6 +1820,9 @@ class Timedelta(_Timedelta): | ||
| 32 | |||
| 33 | disallow_ambiguous_unit(unit) | ||
| 34 | |||
| 35 | + cdef: | ||
| 36 | + int64_t new_value; | ||
| 37 | + | ||
| 38 | # GH 30543 if pd.Timedelta already passed, return it | ||
| 39 | # check that only value is passed | ||
| 40 | if isinstance(value, _Timedelta): | ||
| 41 | -- | ||
| 42 | 2.34.1 | ||
| 43 | |||
