summaryrefslogtreecommitdiff
path: root/dev-python/lark
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2025-05-12 07:00:13 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2025-05-12 07:00:13 +0000
commiteb4946f2b11f28f62389754fd8a9ae346f5d5af6 (patch)
treee8ed6f62eaa293e9ba13b69c27e9bfa36e95b95f /dev-python/lark
parent0175b1322595fb641282477da1302ac249c58a26 (diff)
downloadbaldeagleos-repo-eb4946f2b11f28f62389754fd8a9ae346f5d5af6.tar.gz
baldeagleos-repo-eb4946f2b11f28f62389754fd8a9ae346f5d5af6.tar.xz
baldeagleos-repo-eb4946f2b11f28f62389754fd8a9ae346f5d5af6.zip
Adding metadata
Diffstat (limited to 'dev-python/lark')
-rw-r--r--dev-python/lark/files/lark-1.2.2-py314.patch38
-rw-r--r--dev-python/lark/lark-1.2.2.ebuild5
2 files changed, 43 insertions, 0 deletions
diff --git a/dev-python/lark/files/lark-1.2.2-py314.patch b/dev-python/lark/files/lark-1.2.2-py314.patch
new file mode 100644
index 000000000000..aade3ae30229
--- /dev/null
+++ b/dev-python/lark/files/lark-1.2.2-py314.patch
@@ -0,0 +1,38 @@
+https://github.com/lark-parser/lark/issues/1480
+https://github.com/lark-parser/lark/pull/1483
+
+From 4809ce89ca005b71f6db930c4aabf6496a502795 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
+Date: Wed, 6 Nov 2024 16:47:11 +0100
+Subject: [PATCH] Wrap functools.partial in staticmethod() to add compatibility
+ with Python 3.14
+
+Fixes: #1480
+---
+ tests/test_trees.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_trees.py b/tests/test_trees.py
+index 1f69869e..07687ac0 100644
+--- a/tests/test_trees.py
++++ b/tests/test_trees.py
+@@ -254,7 +254,7 @@ def ab_method(self, a, b):
+ ab_partialmethod = partialmethod(ab_for_partialmethod, 1)
+ set_union = set(["a"]).union
+ static_add = staticmethod(add)
+- partial_reduce_mul = partial(reduce, mul)
++ partial_reduce_mul = staticmethod(partial(reduce, mul))
+
+ custom_callable = CustomCallable()
+
+@@ -355,8 +355,8 @@ def test(prefix, s, postfix):
+
+ @v_args(inline=True)
+ class T(Transformer):
+- a = functools.partial(test, "@", postfix="!")
+- b = functools.partial(lambda s: s + "!")
++ a = staticmethod(functools.partial(test, "@", postfix="!"))
++ b = staticmethod(functools.partial(lambda s: s + "!"))
+
+ res = T().transform(tree)
+ assert res.children == ["@TEST1!", "test2!"]
diff --git a/dev-python/lark/lark-1.2.2.ebuild b/dev-python/lark/lark-1.2.2.ebuild
index 469af8d10e69..ed8430b1143c 100644
--- a/dev-python/lark/lark-1.2.2.ebuild
+++ b/dev-python/lark/lark-1.2.2.ebuild
@@ -28,6 +28,11 @@ BDEPEND="
)
"
+PATCHES=(
+ # https://github.com/lark-parser/lark/pull/1483
+ "${FILESDIR}"/${P}-py314.patch
+)
+
distutils_enable_tests pytest
python_test() {