summaryrefslogtreecommitdiff
path: root/dev-python/makefun
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-29 08:00:25 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-29 08:00:25 +0100
commitd855918b46ba8714cf1320fe63b55fd0ed1748a6 (patch)
tree4d7d0e86122a07796a660310d507f93e1b7747b9 /dev-python/makefun
parentb8325835c82367d22428eb41afa0f2d375338d3c (diff)
gentoo auto-resync : 29:06:2024 - 08:00:25
Diffstat (limited to 'dev-python/makefun')
-rw-r--r--dev-python/makefun/Manifest5
-rw-r--r--dev-python/makefun/files/makefun-1.15.2-test.patch98
-rw-r--r--dev-python/makefun/makefun-1.15.2.ebuild13
-rw-r--r--dev-python/makefun/metadata.xml6
4 files changed, 114 insertions, 8 deletions
diff --git a/dev-python/makefun/Manifest b/dev-python/makefun/Manifest
index 6a7d5cac7f92..d672d10f949b 100644
--- a/dev-python/makefun/Manifest
+++ b/dev-python/makefun/Manifest
@@ -1,3 +1,4 @@
+AUX makefun-1.15.2-test.patch 2871 BLAKE2B b36b8e8e40ab126e6875625a6584ae3eb78237203d426b3d2e7650c30c96e213d46c24980936d56868686fbdde93526e28d5a8b3f41330a2e398c00228097d34 SHA512 0a41884ac53c0efbbcf668aebf8119c096bddea6fe1a2ce66efc5a020d2bb3e4ce5a1cf2e02d7e4d65adfae8c45252e395f7458f5eb331adc618aa0407050bdd
DIST makefun-1.15.2.tar.gz 74602 BLAKE2B 1992eebfdbff6062ed60e1f66891995a91b7155792ef7b6e701d1d3ee5939ab40d3ab976674e25a5b97030cd7de59db2c69f3c215681cef2f80f2b64523f822b SHA512 b6cb588ebf491176b06e97201846b2a5cee65f60e34b5dbcc4878d8a55e7f9fcf4b58126cb3a4ca47f5d2726422dff9ee685566c5d093dbd8fd75119ecc796b2
-EBUILD makefun-1.15.2.ebuild 612 BLAKE2B 458cbd8bf1b0b8e88d994ad9ebf82285b08ad51f30c662160d803492cc466aa124e2beb32d83ccded103a25789553a2a20e4a983dabb8f06a802856db6bfc792 SHA512 40c8d8bbd746e15f54990d4196390b0afccaf5051a6a86beca80e2405664fe5593fe44ef08faf6e79c2e4f87c6464ea1047afd160ba69ab5e39ca84ff212b853
-MISC metadata.xml 401 BLAKE2B 0657deb821edfdf648e5bb0a95255b87df0c090c6e719a5ad94a6d3f6e2e64f36d4093a2bfddb5e8592d3d38741e8d0251c8331133113766ef2fc4caa48e88ad SHA512 cda21fbaa9b62896ba3389cf281ae35bd9a59fb0d0604e61fb3b046061de47a2535d7a98d335b66f44483ae43deadf05abde0a2285902c1c3fab2762b080dbad
+EBUILD makefun-1.15.2.ebuild 774 BLAKE2B ac501bbadc947f37a39138bf0f27d8958e20d16346e530f944ec098ee767995daa5fd14b06590c919999bdfe7b1d7a8129dcecef5e43a8461ef6301e2b0fe014 SHA512 0749c2d29d4e5f023c9e6527a7d8fac38d5dcc0674e65470b91fad4bf5d497f854e695e9a950c8e69474740fde495e721eb9778ca6956a2e9343cd9fe5560dad
+MISC metadata.xml 396 BLAKE2B 541c5e69fc3236d1aaf79505272c9bdf2a295524bb9bb04e782a4cd15c022e74651a9c4ebaa244672418e5fafaed97a48568538fcd527b135c279576f09350d2 SHA512 a500a2a8b23673ea11ffdd81cae9c96fc1368121cd6ce7955fb61bc59319cf87607b134f6b5d04aa6aa564eab9c2c1248c47d0ccc624cdd8ae58f5f12d96e279
diff --git a/dev-python/makefun/files/makefun-1.15.2-test.patch b/dev-python/makefun/files/makefun-1.15.2-test.patch
new file mode 100644
index 000000000000..ab43045809d9
--- /dev/null
+++ b/dev-python/makefun/files/makefun-1.15.2-test.patch
@@ -0,0 +1,98 @@
+diff --git a/tests/test_partial_and_macros.py b/tests/test_partial_and_macros.py
+index 6fd4503..3ce0a33 100644
+--- a/tests/test_partial_and_macros.py
++++ b/tests/test_partial_and_macros.py
+@@ -1,5 +1,6 @@
+ import functools
+ import pytest
++import re
+ import sys
+
+ import makefun
+@@ -11,6 +12,11 @@ except ImportError:
+
+ PY2 = sys.version_info < (3, )
+
++# Python 3.13 dedents docstrings, earlier versions just strip initial
++# whitespace. Use a regexp to get a consistently dedented docstring
++# for comparison across Python versions.
++DOCSTRING_NORMALIZE_RE = re.compile(r"^ +", re.MULTILINE)
++
+
+ def test_doc():
+ def foo(x, y):
+@@ -41,15 +47,15 @@ def test_doc():
+
+ sig_actual_call = ref_sig_str.replace("*, ", "")
+
+- assert bar.__doc__ \
++ assert DOCSTRING_NORMALIZE_RE.sub("", bar.__doc__) \
+ == """<This function is equivalent to 'foo%s', see original 'foo' doc below.>
+
+- a `foo` function
++a `foo` function
+
+- :param x:
+- :param y:
+- :return:
+- """ % sig_actual_call
++:param x:
++:param y:
++:return:
++""" % sig_actual_call
+
+
+ def test_partial():
+@@ -78,16 +84,16 @@ def test_partial():
+
+ sig_actual_call = "(x, y='hello', a)" # if PY2 else "(x, *, y='hello', a)"
+
+- assert foo.__doc__.replace("=KW_ONLY_ARG!", "") \
++ assert DOCSTRING_NORMALIZE_RE.sub("", foo.__doc__.replace("=KW_ONLY_ARG!", "")) \
+ == """<This function is equivalent to 'foo%s', see original 'foo' doc below.>
+
+- a `foo` function
++a `foo` function
+
+- :param x:
+- :param y:
+- :param a:
+- :return:
+- """ % sig_actual_call
++:param x:
++:param y:
++:param a:
++:return:
++""" % sig_actual_call
+
+
+ def test_issue_57():
+@@ -127,9 +133,7 @@ def test_create_with_partial():
+ assert m() == -1
+ assert m.i == 1
+ # the doc remains untouched in create_function as opposed to wraps, this is normal
+- assert m.__doc__ == """partial(func, *args, **keywords) - new function with partial application
+- of the given arguments and keywords.
+-"""
++ assert m.__doc__ == functools.partial.__doc__
+
+
+ def test_args_order_and_kind():
+@@ -161,11 +165,12 @@ def test_args_order_and_kind():
+ # it is possible to keyword-partialize a positional-only argument...
+ fp_ref = functools.partial(f, b=0)
+
+- # but 'signature' does not support it !
+- with pytest.raises(ValueError):
+- signature(fp_ref)
+-
+- # assert str(signature(fp_ref)) == "(c, /, *, d, **e)"
++ # but 'signature' does not support it before Python 3.12.4 !
++ if sys.version_info < (3, 12, 4):
++ with pytest.raises(ValueError):
++ signature(fp_ref)
++ else:
++ assert str(signature(fp_ref)) == "(a, c, /, *, d, **e)"
+
+ # so we do not support it
+ with pytest.raises(NotImplementedError):
diff --git a/dev-python/makefun/makefun-1.15.2.ebuild b/dev-python/makefun/makefun-1.15.2.ebuild
index e422b0555e2d..29cd2d63889b 100644
--- a/dev-python/makefun/makefun-1.15.2.ebuild
+++ b/dev-python/makefun/makefun-1.15.2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
@@ -25,6 +25,13 @@ BDEPEND="
distutils_enable_tests pytest
src_prepare() {
- sed -e '/pytest-runner/d' -i setup.cfg || die
+ local PATCHES=(
+ # https://github.com/smarie/python-makefun/pull/103
+ # https://github.com/smarie/python-makefun/pull/104
+ "${FILESDIR}/${P}-test.patch"
+ )
+
distutils-r1_src_prepare
+
+ sed -e '/pytest-runner/d' -i setup.cfg || die
}
diff --git a/dev-python/makefun/metadata.xml b/dev-python/makefun/metadata.xml
index 0a2fbcffabe0..b2d6c0fc7615 100644
--- a/dev-python/makefun/metadata.xml
+++ b/dev-python/makefun/metadata.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>marecki@gentoo.org</email>
- <name>Marek Szuba</name>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>