dev-python/toolz: Enable py3.14

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-09-06 19:31:52 +02:00
parent 4f2a291077
commit 9ac89653e2
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
diff --git a/toolz/curried/operator.py b/toolz/curried/operator.py
index 35979a68..78e54f98 100644
--- a/toolz/curried/operator.py
+++ b/toolz/curried/operator.py
@@ -9,7 +9,7 @@
IGNORE = {
"__abs__", "__index__", "__inv__", "__invert__", "__neg__", "__not__",
"__pos__", "_abs", "abs", "attrgetter", "index", "inv", "invert",
- "itemgetter", "neg", "not_", "pos", "truth"
+ "is_none", "is_not_none", "itemgetter", "neg", "not_", "pos", "truth"
}
locals().update(
{name: f if name in IGNORE else curry(f)
diff --git a/toolz/tests/test_inspect_args.py b/toolz/tests/test_inspect_args.py
index f26dbc64..b7f623c4 100644
--- a/toolz/tests/test_inspect_args.py
+++ b/toolz/tests/test_inspect_args.py
@@ -286,7 +286,8 @@ def test_has_keywords():
assert has_keywords(int)
assert has_keywords(sorted)
assert has_keywords(max)
- assert has_keywords(map) is False
+ # map gained `strict=False` keyword in Python 3.14
+ assert has_keywords(map) == (sys.version_info[1] >= 14)
assert has_keywords(bytearray) is None

View File

@@ -0,0 +1,27 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 pypy3_11 python3_{11..14} )
inherit distutils-r1 pypi
DESCRIPTION="List processing tools and functional utilities"
HOMEPAGE="
https://github.com/pytoolz/toolz/
https://pypi.org/project/toolz/
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
PATCHES=(
# https://github.com/pytoolz/toolz/pull/592
"${FILESDIR}/${P}-py314.patch"
)