Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion graalpython/lib-graalpython/patches/metadata.toml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ dist-type = 'sdist'
version = '1.22.1'
url = 'https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.22.1.tar.gz'

[[optree.rules]]
patch = 'optree.patch'
license = 'Apache-2.0'

[[orjson.rules]]
version = '== 3.9.7'
patch = 'orjson-3.9.7.patch'
Expand Down Expand Up @@ -691,10 +695,15 @@ patch = 'pythran-0.15.patch'
license = 'BSD-3-Clause'

[[pythran.rules]]
version = '>= 0.16'
version = '>= 0.16, < 0.18.1'
patch = 'pythran-0.16.patch'
license = 'BSD-3-Clause'

[[pythran.rules]]
version = '== 0.18.1'
patch = 'pythran-0.18.1.patch'
license = 'BSD-3-Clause'

[[pyzmq.rules]]
version = '< 26'
install-priority = 0
Expand Down
13 changes: 13 additions & 0 deletions graalpython/lib-graalpython/patches/optree.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/include/optree/pymacros.h b/include/optree/pymacros.h
index 7f2ac9a..ecb6faf 100644
--- a/include/optree/pymacros.h
+++ b/include/optree/pymacros.h
@@ -52,7 +52,7 @@ namespace py = pybind11;
# define Py_IsFalse(x) Py_Is((x), Py_False)
#endif

-inline constexpr Py_ALWAYS_INLINE bool Py_IsConstant(PyObject *x) noexcept {
+inline Py_ALWAYS_INLINE bool Py_IsConstant(PyObject *x) noexcept {
return Py_IsNone(x) || Py_IsTrue(x) || Py_IsFalse(x);
}
#define Py_IsConstant(x) Py_IsConstant(x)
42 changes: 42 additions & 0 deletions graalpython/lib-graalpython/patches/pythran-0.18.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/pythran/pythonic/python/core.hpp b/pythran/pythonic/python/core.hpp
index 86d2f63..050fe21 100644
--- a/pythran/pythonic/python/core.hpp
+++ b/pythran/pythonic/python/core.hpp
@@ -50,7 +50,7 @@ PYTHONIC_NS_BEGIN
namespace python
{

-#ifdef Py_LIMITED_API
+#if defined(Py_LIMITED_API) || defined(GRAALVM_PYTHON)

struct ByteHolder {
PyObject *holder;
diff --git a/pythran/pythonic/types/str.hpp b/pythran/pythonic/types/str.hpp
index a7dd51a..09fdd59 100644
--- a/pythran/pythonic/types/str.hpp
+++ b/pythran/pythonic/types/str.hpp
@@ -732,7 +732,7 @@ namespace std
}())
#else
#ifndef PyString_Check
-#define PyString_Check(x) (PyUnicode_Check(x) && PyUnicode_IS_COMPACT_ASCII(x))
+#define PyString_Check(x) PyUnicode_Check(x)
#endif
#endif

diff --git a/pythran/tables.py b/pythran/tables.py
index a9f5712..5a0dff2 100644
--- a/pythran/tables.py
+++ b/pythran/tables.py
@@ -4633,7 +4633,10 @@ def save_arguments(module_name, elements):
# some function are actually forward function, detect those
# and accept to use our description instead.
if looks_like_a_forward_function(spec):
- assert signature.args.args, "{} require an explicit description".format(elem)
+ # GraalPy change: we have signatures for more builtins than
+ # CPython and this trips up on type constructors like `dict` or
+ # `BaseException`.
+ # assert signature.args.args, "{} require an explicit description".format(elem)
continue

args = [ast.Name(arg, ast.Param(), None, None)