diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-05-23 10:10:50 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-05-23 10:33:21 +0200 |
commit | aba288aeb986c522c606de433288da3bd1ecb1a7 (patch) | |
tree | b38d3cd0a8a60340ffae7929706cd796dae5536d /dev-python | |
parent | dev-db/slony1: Support postgresql:14 (diff) | |
download | gentoo-aba288aeb986c522c606de433288da3bd1ecb1a7.tar.gz gentoo-aba288aeb986c522c606de433288da3bd1ecb1a7.tar.bz2 gentoo-aba288aeb986c522c606de433288da3bd1ecb1a7.zip |
dev-python/numpy: Enable py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/numpy/files/numpy-1.22.4-py311.patch | 31 | ||||
-rw-r--r-- | dev-python/numpy/numpy-1.22.4.ebuild | 10 |
2 files changed, 39 insertions, 2 deletions
diff --git a/dev-python/numpy/files/numpy-1.22.4-py311.patch b/dev-python/numpy/files/numpy-1.22.4-py311.patch new file mode 100644 index 000000000000..7af6431a5892 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.22.4-py311.patch @@ -0,0 +1,31 @@ +From 42f3203a45231b338cf1a4c77fe81ca4b7fef4ef Mon Sep 17 00:00:00 2001 +From: Bas van Beek <43369155+BvB93@users.noreply.github.com> +Date: Fri, 20 May 2022 02:42:37 +0200 +Subject: [PATCH] TST,TYP: Fix a python 3.11 failure for the `GenericAlias` + tests + +--- + numpy/typing/tests/test_generic_alias.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/numpy/typing/tests/test_generic_alias.py b/numpy/typing/tests/test_generic_alias.py +index 52d3deae4..267230a95 100644 +--- a/numpy/typing/tests/test_generic_alias.py ++++ b/numpy/typing/tests/test_generic_alias.py +@@ -20,11 +20,11 @@ + if sys.version_info >= (3, 9): + DType_ref = types.GenericAlias(np.dtype, (ScalarType,)) + NDArray_ref = types.GenericAlias(np.ndarray, (Any, DType_ref)) +- FuncType = Callable[[Union[_GenericAlias, types.GenericAlias]], Any] ++ FuncType = Callable[["_GenericAlias | types.GenericAlias"], Any] + else: + DType_ref = Any + NDArray_ref = Any +- FuncType = Callable[[_GenericAlias], Any] ++ FuncType = Callable[["_GenericAlias"], Any] + + GETATTR_NAMES = sorted(set(dir(np.ndarray)) - _GenericAlias._ATTR_EXCEPTIONS) + +-- +2.35.1 + diff --git a/dev-python/numpy/numpy-1.22.4.ebuild b/dev-python/numpy/numpy-1.22.4.ebuild index f3f3c53c5eb8..4797c2585d6c 100644 --- a/dev-python/numpy/numpy-1.22.4.ebuild +++ b/dev-python/numpy/numpy-1.22.4.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{8..11} ) PYTHON_REQ_USE="threads(+)" FORTRAN_NEEDED=lapack @@ -46,7 +46,8 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/${PN}-1.22.0-no-hardcode-blasv2.patch + "${FILESDIR}"/numpy-1.22.0-no-hardcode-blasv2.patch + "${FILESDIR}"/numpy-1.22.4-py311.patch ) distutils_enable_tests pytest @@ -152,6 +153,11 @@ python_test() { ) fi + [[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=( + # known problem + 'numpy/typing/tests/test_generic_alias.py::TestGenericAlias::test_pass[__dir__-<lambda>]' + ) + distutils_install_for_testing --single-version-externally-managed \ --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG} |