diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-11 12:25:19 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-11 12:25:19 +0100 |
commit | 496ef6155c315ac3628b472dc9b4146fa2684286 (patch) | |
tree | a0201d7a6c3a6e30410307544281465381970f4b /dev-python/pandas | |
parent | e810ac4a0e6af9f763f4433863042b34609075a7 (diff) |
gentoo auto-resync : 11:07:2024 - 12:25:19
Diffstat (limited to 'dev-python/pandas')
-rw-r--r-- | dev-python/pandas/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pandas/files/pandas-2.2.2-py313.patch | 117 | ||||
-rw-r--r-- | dev-python/pandas/pandas-2.2.2-r1.ebuild | 7 |
3 files changed, 125 insertions, 2 deletions
diff --git a/dev-python/pandas/Manifest b/dev-python/pandas/Manifest index 986e927f4ba3..ca3271c5e2d2 100644 --- a/dev-python/pandas/Manifest +++ b/dev-python/pandas/Manifest @@ -1,4 +1,5 @@ +AUX pandas-2.2.2-py313.patch 4927 BLAKE2B f6704f593f87e3095ff2c70b28a1142d62b4e78b51c3e259803184cb51a7dd900bf975d46613e9c844ce114203871471ef032c28011038641abdd08d5dcc8f21 SHA512 3765a7e00926f7cbf53d66c8e501d3bc30e9bf4f7459aa7d8153d58d66a75cf430854259eb2e81377e21ef4187a459964b87e91e1626754fcdafc53bbb86370d DIST pandas-2.2.2.tar.gz 4398391 BLAKE2B 6b723d85c500abaca4d833e4fb329d9a495e3e8ae51c74632111b139ed38ca9e26087ba43ecc40d68f66613352dc140bb2f1b0cbb92915bb027548886072fc79 SHA512 85b006f96bd6400aeea2ec29df3557ea6c4bfee0a7aebb172547a43171dc0e7682d15f798081846a4f464559ab83f579cfe06d66d4b5c0cb0fb2975c2ef98f9c -EBUILD pandas-2.2.2-r1.ebuild 10036 BLAKE2B 6b83170f8235b83ba883265ca14a57f6b62fdbfcc38c1bfe4e83f5e77dc44557d8b8361df808099b4c6c79aa0bc5912253b9b7f2b7275127f3ab5b508f4ae39b SHA512 39f96cb63194d44917ad369e7b8c29c16d23ac67e23e167986501e6657f4b01f1ca087589b9c5c96b67bbecda061df6c9a9fdf4b559b59f7c860e453a7650844 +EBUILD pandas-2.2.2-r1.ebuild 10132 BLAKE2B b62a3013dcb181aeb38080383e279ea6407b796f4b69d7e5736f0a5c19022f258f03f2ed8b928a48e05c350243ebf85c06f99f19e0b2cfdd8749a5c3431091b1 SHA512 2dd9883a7fd7fc8269d53ef9cf00ff4f1c7251ef7b93c84511d1f9acf9475ca6d2cf45d363181bd71f6032a4dff1b5fa9de8361494d987294f1ecd66240b2944 EBUILD pandas-2.2.2.ebuild 9236 BLAKE2B f85c90f215e84d87b4bc5c42b8593645900acea5dc2f717ae24aa0d2e6f8251cf04893069ad5174afa472c477b709c6db61f82bdae7cb4c0060227a3b314e544 SHA512 ca0d35c759c86cbf6856ee3cb95167d3fee4dce79f3b83f675a28a049b4705bd8aa5de29e2c4bbc9c07036d2b546107f542e645383c73ed0e6018cb804cf2b27 MISC metadata.xml 920 BLAKE2B d6bd854acdd851d578038657d91adaedf4f220dbdc5905ebba5e35e74437c6d5bc2384061f7796a6f359aa128c526485635debfd0e1a9646d09daed740167c87 SHA512 dcd949e89cae9df918acb3cf8be5ad8c396ee5e646d2179aa2b646fafa15ffc11e9ccf853df8d7fdcc787f88ce7063639d8d87715aaba943774edc8ad98b540a diff --git a/dev-python/pandas/files/pandas-2.2.2-py313.patch b/dev-python/pandas/files/pandas-2.2.2-py313.patch new file mode 100644 index 000000000000..3fe6f7d89367 --- /dev/null +++ b/dev-python/pandas/files/pandas-2.2.2-py313.patch @@ -0,0 +1,117 @@ +From ad0ef9233f4e6366faf9512d512ec5248ade6d5e Mon Sep 17 00:00:00 2001 +From: Lysandros Nikolaou <lisandrosnik@gmail.com> +Date: Tue, 25 Jun 2024 03:40:22 +0200 +Subject: [PATCH] ENH: Fix Python 3.13 test failures & enable CI (#59065) + +* ENH: Fix Python 3.13 test failures & enable CI + +x-ref #58734 + +Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> + +* Cast npy_intp to int to fix Windows CI + +--------- + +Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> +--- + .github/workflows/unit-tests.yml | 4 ++-- + pandas/_libs/src/vendored/ujson/python/objToJSON.c | 12 ++++++------ + pandas/_libs/tslibs/offsets.pyx | 7 ++++++- + pandas/tests/groupby/test_groupby.py | 4 +++- + pandas/tests/io/parser/test_dialect.py | 2 +- + pandas/tests/io/test_common.py | 5 ++++- + pandas/tests/io/xml/test_xml.py | 2 +- + pandas/tests/scalar/timedelta/test_arithmetic.py | 1 + + 8 files changed, 24 insertions(+), 13 deletions(-) + +diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx +index c37a4b285d..5dacd7dd55 100644 +--- a/pandas/_libs/tslibs/offsets.pyx ++++ b/pandas/_libs/tslibs/offsets.pyx +@@ -4960,7 +4960,12 @@ cpdef to_offset(freq, bint is_period=False): + if result is None: + raise ValueError(INVALID_FREQ_ERR_MSG.format(freq)) + +- if is_period and not hasattr(result, "_period_dtype_code"): ++ try: ++ has_period_dtype_code = hasattr(result, "_period_dtype_code") ++ except ValueError: ++ has_period_dtype_code = False ++ ++ if is_period and not has_period_dtype_code: + if isinstance(freq, str): + raise ValueError(f"{result.name} is not supported as period frequency") + else: +diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py +index ed9acdd0c9..44d6340e55 100644 +--- a/pandas/tests/groupby/test_groupby.py ++++ b/pandas/tests/groupby/test_groupby.py +@@ -2816,7 +2816,9 @@ def test_rolling_wrong_param_min_period(): + test_df = DataFrame([name_l, val_l]).T + test_df.columns = ["name", "val"] + +- result_error_msg = r"__init__\(\) got an unexpected keyword argument 'min_period'" ++ result_error_msg = ( ++ r"^[a-zA-Z._]*\(\) got an unexpected keyword argument 'min_period'" ++ ) + with pytest.raises(TypeError, match=result_error_msg): + test_df.groupby("name")["val"].rolling(window=2, min_period=1).sum() + +diff --git a/pandas/tests/io/parser/test_dialect.py b/pandas/tests/io/parser/test_dialect.py +index 7a72e66996..803114723b 100644 +--- a/pandas/tests/io/parser/test_dialect.py ++++ b/pandas/tests/io/parser/test_dialect.py +@@ -26,7 +26,7 @@ def custom_dialect(): + "escapechar": "~", + "delimiter": ":", + "skipinitialspace": False, +- "quotechar": "~", ++ "quotechar": "`", + "quoting": 3, + } + return dialect_name, dialect_kwargs +diff --git a/pandas/tests/io/test_common.py b/pandas/tests/io/test_common.py +index 0740338686..e51f865630 100644 +--- a/pandas/tests/io/test_common.py ++++ b/pandas/tests/io/test_common.py +@@ -485,7 +485,10 @@ class TestMMapWrapper: + df.to_csv(path, compression=compression_, encoding=encoding) + + # reading should fail (otherwise we wouldn't need the warning) +- msg = r"UTF-\d+ stream does not start with BOM" ++ msg = ( ++ r"UTF-\d+ stream does not start with BOM|" ++ r"'utf-\d+' codec can't decode byte" ++ ) + with pytest.raises(UnicodeError, match=msg): + pd.read_csv(path, compression=compression_, encoding=encoding) + +diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py +index 6f429c1ecb..900734e9f0 100644 +--- a/pandas/tests/io/xml/test_xml.py ++++ b/pandas/tests/io/xml/test_xml.py +@@ -1044,7 +1044,7 @@ def test_utf16_encoding(xml_baby_names, parser): + UnicodeError, + match=( + "UTF-16 stream does not start with BOM|" +- "'utf-16-le' codec can't decode byte" ++ "'utf-16(-le)?' codec can't decode byte" + ), + ): + read_xml(xml_baby_names, encoding="UTF-16", parser=parser) +diff --git a/pandas/tests/scalar/timedelta/test_arithmetic.py b/pandas/tests/scalar/timedelta/test_arithmetic.py +index d2fa0f722c..33ac121076 100644 +--- a/pandas/tests/scalar/timedelta/test_arithmetic.py ++++ b/pandas/tests/scalar/timedelta/test_arithmetic.py +@@ -622,6 +622,7 @@ class TestTimedeltaMultiplicationDivision: + [ + r"Invalid dtype datetime64\[D\] for __floordiv__", + "'dtype' is an invalid keyword argument for this function", ++ "this function got an unexpected keyword argument 'dtype'", + r"ufunc '?floor_divide'? cannot use operands with types", + ] + ) +-- +2.45.2 + diff --git a/dev-python/pandas/pandas-2.2.2-r1.ebuild b/dev-python/pandas/pandas-2.2.2-r1.ebuild index a251b3924eb6..4778a765850a 100644 --- a/dev-python/pandas/pandas-2.2.2-r1.ebuild +++ b/dev-python/pandas/pandas-2.2.2-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=meson-python -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) PYTHON_REQ_USE="threads(+)" VIRTUALX_REQUIRED="manual" @@ -101,6 +101,11 @@ RDEPEND=" EPYTEST_XDIST=1 distutils_enable_tests pytest +PATCHES=( + # https://github.com/pandas-dev/pandas/pull/59065 + "${FILESDIR}/${P}-py313.patch" +) + src_test() { virtx distutils-r1_src_test } |