Skip to content

Commit 93821c0

Browse files
committed
Add patch for pythran-0.18.1
1 parent a7f22a5 commit 93821c0

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,15 @@ patch = 'pythran-0.15.patch'
691691
license = 'BSD-3-Clause'
692692

693693
[[pythran.rules]]
694-
version = '>= 0.16'
694+
version = '>= 0.16, < 0.18.1'
695695
patch = 'pythran-0.16.patch'
696696
license = 'BSD-3-Clause'
697697

698+
[[pythran.rules]]
699+
version = '== 0.18.1'
700+
patch = 'pythran-0.18.1.patch'
701+
license = 'BSD-3-Clause'
702+
698703
[[pyzmq.rules]]
699704
version = '< 26'
700705
install-priority = 0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff --git a/pythran/pythonic/python/core.hpp b/pythran/pythonic/python/core.hpp
2+
index 86d2f63..050fe21 100644
3+
--- a/pythran/pythonic/python/core.hpp
4+
+++ b/pythran/pythonic/python/core.hpp
5+
@@ -50,7 +50,7 @@ PYTHONIC_NS_BEGIN
6+
namespace python
7+
{
8+
9+
-#ifdef Py_LIMITED_API
10+
+#if defined(Py_LIMITED_API) || defined(GRAALVM_PYTHON)
11+
12+
struct ByteHolder {
13+
PyObject *holder;
14+
diff --git a/pythran/pythonic/types/str.hpp b/pythran/pythonic/types/str.hpp
15+
index a7dd51a..09fdd59 100644
16+
--- a/pythran/pythonic/types/str.hpp
17+
+++ b/pythran/pythonic/types/str.hpp
18+
@@ -732,7 +732,7 @@ namespace std
19+
}())
20+
#else
21+
#ifndef PyString_Check
22+
-#define PyString_Check(x) (PyUnicode_Check(x) && PyUnicode_IS_COMPACT_ASCII(x))
23+
+#define PyString_Check(x) PyUnicode_Check(x)
24+
#endif
25+
#endif
26+
27+
diff --git a/pythran/tables.py b/pythran/tables.py
28+
index a9f5712..5a0dff2 100644
29+
--- a/pythran/tables.py
30+
+++ b/pythran/tables.py
31+
@@ -4633,7 +4633,10 @@ def save_arguments(module_name, elements):
32+
# some function are actually forward function, detect those
33+
# and accept to use our description instead.
34+
if looks_like_a_forward_function(spec):
35+
- assert signature.args.args, "{} require an explicit description".format(elem)
36+
+ # GraalPy change: we have signatures for more builtins than
37+
+ # CPython and this trips up on type constructors like `dict` or
38+
+ # `BaseException`.
39+
+ # assert signature.args.args, "{} require an explicit description".format(elem)
40+
continue
41+
42+
args = [ast.Name(arg, ast.Param(), None, None)

0 commit comments

Comments
 (0)