Skip to content

Commit 6d2c981

Browse files
cosminbascatimfel
authored andcommitted
update Cython-0.29.32.patch
1 parent 72d5647 commit 6d2c981

File tree

3 files changed

+78
-73
lines changed

3 files changed

+78
-73
lines changed

graalpython/lib-graalpython/patches/Cython/sdist/Cython-0.29.30.patch

Whitespace-only changes.

graalpython/lib-graalpython/patches/Cython/sdist/Cython-0.29.32.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.

graalpython/lib-graalpython/patches/Cython/whl/Cython-0.29.32.patch

Lines changed: 78 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
diff -u -r a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
2-
--- a/Cython/Build/Dependencies.py 2023-01-04 11:56:12.000000000 +0100
3-
+++ b/Cython/Build/Dependencies.py 2023-01-04 11:56:11.000000000 +0100
4-
@@ -1094,6 +1094,8 @@
1+
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
2+
index 7eb55e2..76d4857 100644
3+
--- a/Cython/Build/Dependencies.py
4+
+++ b/Cython/Build/Dependencies.py
5+
@@ -1094,6 +1094,8 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
56
progress = progress_fmt.format(i+1, N)
67
to_compile[i] = to_compile[i][1:] + (progress,)
78

@@ -10,10 +11,11 @@ diff -u -r a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
1011
if N <= 1:
1112
nthreads = 0
1213
if nthreads:
13-
diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
14-
--- a/Cython/Compiler/Builtin.py 2023-01-04 11:56:12.000000000 +0100
15-
+++ b/Cython/Compiler/Builtin.py 2023-01-04 11:56:11.000000000 +0100
16-
@@ -51,11 +51,12 @@
14+
diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
15+
index e0d203a..22bd406 100644
16+
--- a/Cython/Compiler/Builtin.py
17+
+++ b/Cython/Compiler/Builtin.py
18+
@@ -51,11 +51,12 @@ class _BuiltinOverride(object):
1719

1820

1921
class BuiltinAttribute(object):
@@ -27,7 +29,7 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
2729

2830
def declare_in_type(self, self_type):
2931
if self.field_type_name is not None:
30-
@@ -63,7 +64,7 @@
32+
@@ -63,7 +64,7 @@ class BuiltinAttribute(object):
3133
field_type = builtin_scope.lookup(self.field_type_name).type
3234
else:
3335
field_type = self.field_type or PyrexTypes.py_object_type
@@ -36,7 +38,7 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
3638
entry.is_variable = True
3739

3840

39-
@@ -316,9 +317,9 @@
41+
@@ -316,9 +317,9 @@ builtin_types_table = [
4042
utility_code=UtilityCode.load("py_dict_clear", "Optimize.c")),
4143
BuiltinMethod("copy", "T", "T", "PyDict_Copy")]),
4244

@@ -49,10 +51,11 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
4951
]),
5052
# ("file", "PyFile_Type", []), # not in Py3
5153

52-
diff -u -r a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
53-
--- a/Cython/Compiler/ExprNodes.py 2023-01-04 11:56:12.000000000 +0100
54-
+++ b/Cython/Compiler/ExprNodes.py 2023-01-04 11:56:11.000000000 +0100
55-
@@ -7208,6 +7208,8 @@
54+
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
55+
index 2c5d709..5827fe1 100644
56+
--- a/Cython/Compiler/ExprNodes.py
57+
+++ b/Cython/Compiler/ExprNodes.py
58+
@@ -7208,6 +7208,8 @@ class AttributeNode(ExprNode):
5659
if obj.type.is_builtin_type and self.entry and self.entry.is_variable:
5760
# accessing a field of a builtin type, need to cast better than result_as() does
5861
obj_code = obj.type.cast_code(obj.result(), to_object_struct = True)
@@ -61,18 +64,19 @@ diff -u -r a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
6164
return "%s%s%s" % (obj_code, self.op, self.member)
6265

6366
def generate_result_code(self, code):
64-
diff -u -r a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
65-
--- a/Cython/Compiler/Symtab.py 2023-01-04 11:56:12.000000000 +0100
66-
+++ b/Cython/Compiler/Symtab.py 2023-01-04 11:56:11.000000000 +0100
67-
@@ -203,6 +203,7 @@
67+
diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
68+
index 7361a55..6c4d9d9 100644
69+
--- a/Cython/Compiler/Symtab.py
70+
+++ b/Cython/Compiler/Symtab.py
71+
@@ -203,6 +203,7 @@ class Entry(object):
6872
error_on_uninitialized = False
6973
cf_used = True
7074
outer_entry = None
7175
+ getter = None
7276

7377
def __init__(self, name, cname, type, pos = None, init = None):
7478
self.name = name
75-
@@ -436,7 +437,7 @@
79+
@@ -436,7 +437,7 @@ class Scope(object):
7680
for scope in sorted(self.subscopes, key=operator.attrgetter('scope_prefix')):
7781
yield scope
7882

@@ -81,18 +85,19 @@ diff -u -r a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
8185
# Create new entry, and add to dictionary if
8286
# name is not None. Reports a warning if already
8387
# declared.
84-
@@ -475,6 +476,7 @@
88+
@@ -475,6 +476,7 @@ class Scope(object):
8589
error(pos, "'%s' redeclared " % name)
8690
entries[name].already_declared_here()
8791
entry = Entry(name, cname, type, pos = pos)
8892
+ entry.getter = getter
8993
entry.in_cinclude = self.in_cinclude
9094
entry.create_wrapper = create_wrapper
9195
if name:
92-
diff -u -r a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.pxd
93-
--- a/Cython/Includes/cpython/slice.pxd 2023-01-04 11:56:12.000000000 +0100
94-
+++ b/Cython/Includes/cpython/slice.pxd 2023-01-04 11:56:11.000000000 +0100
95-
@@ -48,6 +48,13 @@
96+
diff --git a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.pxd
97+
index 202dea7..1e83e66 100644
98+
--- a/Cython/Includes/cpython/slice.pxd
99+
+++ b/Cython/Includes/cpython/slice.pxd
100+
@@ -48,6 +48,13 @@ cdef extern from "Python.h":
96101

97102
int PySlice_Unpack(object slice, Py_ssize_t *start, Py_ssize_t *stop,
98103
Py_ssize_t *step) except -1
@@ -106,10 +111,24 @@ diff -u -r a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.p
106111
# Extract the start, stop and step data members from a slice object as C
107112
# integers. Silently reduce values larger than PY_SSIZE_T_MAX to
108113
# PY_SSIZE_T_MAX, silently boost the start and stop values less than
109-
diff -u -r a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
110-
--- a/Cython/Utility/CythonFunction.c 2023-01-04 11:56:12.000000000 +0100
111-
+++ b/Cython/Utility/CythonFunction.c 2023-01-04 11:56:11.000000000 +0100
112-
@@ -1324,9 +1324,9 @@
114+
diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c
115+
index 1ad27df..0965cb2 100644
116+
--- a/Cython/Utility/Coroutine.c
117+
+++ b/Cython/Utility/Coroutine.c
118+
@@ -1299,7 +1299,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
119+
_Py_NewReference(self);
120+
__Pyx_SET_REFCNT(self, refcnt);
121+
}
122+
-#if CYTHON_COMPILING_IN_CPYTHON
123+
+#if CYTHON_COMPILING_IN_CPYTHON && !GRAALVM_PYTHON
124+
assert(PyType_IS_GC(Py_TYPE(self)) &&
125+
_Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
126+
127+
diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
128+
index b2c67dc..ad80ca4 100644
129+
--- a/Cython/Utility/CythonFunction.c
130+
+++ b/Cython/Utility/CythonFunction.c
131+
@@ -1324,9 +1324,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
113132
#if PY_VERSION_HEX < 0x03020000
114133
PyTypeObject *d_type = descr->d_type;
115134
#else
@@ -121,10 +140,20 @@ diff -u -r a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
121140
}
122141
#endif
123142
else if (PyMethod_Check(method)) {
124-
diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
125-
--- a/Cython/Utility/ModuleSetupCode.c 2023-01-04 11:56:12.000000000 +0100
126-
+++ b/Cython/Utility/ModuleSetupCode.c 2023-01-04 11:56:11.000000000 +0100
127-
@@ -591,7 +591,7 @@
143+
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
144+
index f8bf885..62fec57 100644
145+
--- a/Cython/Utility/ModuleSetupCode.c
146+
+++ b/Cython/Utility/ModuleSetupCode.c
147+
@@ -265,6 +265,8 @@
148+
#endif
149+
#endif
150+
151+
+#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
152+
+
153+
#if !defined(CYTHON_FAST_PYCCALL)
154+
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
155+
#endif
156+
@@ -591,7 +593,7 @@ class __Pyx_FakeReference {
128157
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
129158
#else
130159
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
@@ -133,7 +162,7 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
133162
#endif
134163

135164
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
136-
@@ -767,7 +767,7 @@
165+
@@ -767,7 +769,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
137166
#endif
138167

139168

@@ -142,7 +171,7 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
142171
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
143172
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
144173
#else
145-
@@ -1076,7 +1076,7 @@
174+
@@ -1076,7 +1078,7 @@ PyEval_InitThreads();
146175
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
147176
#if PY_VERSION_HEX >= 0x030700A1
148177
static PY_INT64_T main_interpreter_id = -1;
@@ -151,10 +180,11 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
151180
if (main_interpreter_id == -1) {
152181
main_interpreter_id = current_id;
153182
return (unlikely(current_id == -1)) ? -1 : 0;
154-
diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
155-
--- a/Cython/Utility/ObjectHandling.c 2023-01-04 11:56:12.000000000 +0100
156-
+++ b/Cython/Utility/ObjectHandling.c 2023-01-04 11:56:11.000000000 +0100
157-
@@ -717,7 +717,7 @@
183+
diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
184+
index 864b658..119f363 100644
185+
--- a/Cython/Utility/ObjectHandling.c
186+
+++ b/Cython/Utility/ObjectHandling.c
187+
@@ -717,7 +717,7 @@ bad:
158188

159189
/////////////// SliceTupleAndList.proto ///////////////
160190

@@ -163,7 +193,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
163193
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
164194
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
165195
#else
166-
@@ -727,7 +727,7 @@
196+
@@ -727,7 +727,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t
167197

168198
/////////////// SliceTupleAndList ///////////////
169199

@@ -172,7 +202,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
172202
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
173203
Py_ssize_t start = *_start, stop = *_stop, length = *_length;
174204
if (start < 0) {
175-
@@ -1152,7 +1152,7 @@
205+
@@ -1152,7 +1152,7 @@ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
176206

177207
/////////////// SetNameInClass.proto ///////////////
178208

@@ -181,7 +211,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
181211
// Identifier names are always interned and have a pre-calculated hash value.
182212
#define __Pyx_SetNameInClass(ns, name, value) \
183213
(likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
184-
@@ -1201,7 +1201,7 @@
214+
@@ -1201,7 +1201,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
185215
{
186216
PyObject *result;
187217
#if !CYTHON_AVOID_BORROWED_REFS
@@ -190,7 +220,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
190220
// Identifier names are always interned and have a pre-calculated hash value.
191221
result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash);
192222
__PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version)
193-
@@ -1592,8 +1592,8 @@
223+
@@ -1592,8 +1592,8 @@ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
194224
#endif
195225
{
196226
PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
@@ -201,10 +231,11 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
201231
}
202232
#endif
203233
return 0;
204-
diff -u -r a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
205-
--- a/Cython/Utility/StringTools.c 2023-01-04 11:56:12.000000000 +0100
206-
+++ b/Cython/Utility/StringTools.c 2023-01-04 11:56:11.000000000 +0100
207-
@@ -183,7 +183,7 @@
234+
diff --git a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
235+
index 98b5e26..0f44675 100644
236+
--- a/Cython/Utility/StringTools.c
237+
+++ b/Cython/Utility/StringTools.c
238+
@@ -183,7 +183,7 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
208239
//@requires: BytesEquals
209240

210241
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
@@ -213,7 +244,7 @@ diff -u -r a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
213244
return PyObject_RichCompareBool(s1, s2, equals);
214245
#else
215246
#if PY_MAJOR_VERSION < 3
216-
@@ -294,7 +294,7 @@
247+
@@ -294,7 +294,7 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq
217248
//@requires: IncludeStringH
218249

219250
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {

0 commit comments

Comments
 (0)