Cython 3.2.6__py3-none-any.whl → 3.3.0a2.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Cython might be problematic. Click here for more details.
- Cython/Build/BuildExecutable.py +1 -14
- Cython/Build/Dependencies.py +6 -44
- Cython/Build/Inline.py +7 -3
- Cython/Build/IpythonMagic.py +0 -1
- Cython/Build/SharedModule.py +1 -2
- Cython/Build/Tests/TestCythonizeArgsParser.py +6 -6
- Cython/Build/Tests/TestDependencies.py +3 -3
- Cython/Build/Tests/TestInline.py +3 -3
- Cython/Build/Tests/TestIpythonMagic.py +35 -19
- Cython/Build/Tests/TestStripLiterals.py +2 -2
- Cython/Compiler/Buffer.py +5 -5
- Cython/Compiler/Builtin.py +57 -46
- Cython/Compiler/Code.pxd +12 -9
- Cython/Compiler/Code.py +220 -94
- Cython/Compiler/Dataclass.py +78 -52
- Cython/Compiler/Errors.py +21 -8
- Cython/Compiler/ExprNodes.py +871 -459
- Cython/Compiler/FlowControl.pxd +8 -6
- Cython/Compiler/FlowControl.py +111 -8
- Cython/Compiler/FusedNode.py +17 -12
- Cython/Compiler/Lexicon.py +123 -122
- Cython/Compiler/Main.py +3 -4
- Cython/Compiler/MatchCaseNodes.py +1948 -10
- Cython/Compiler/MemoryView.py +62 -33
- Cython/Compiler/ModuleNode.py +559 -283
- Cython/Compiler/Naming.py +4 -0
- Cython/Compiler/Nodes.py +333 -197
- Cython/Compiler/Optimize.py +268 -112
- Cython/Compiler/Options.py +0 -5
- Cython/Compiler/ParseTreeTransforms.pxd +2 -1
- Cython/Compiler/ParseTreeTransforms.py +180 -76
- Cython/Compiler/Parsing.py +55 -38
- Cython/Compiler/PyrexTypes.py +364 -128
- Cython/Compiler/Scanning.pxd +27 -5
- Cython/Compiler/Scanning.py +24 -14
- Cython/Compiler/StringEncoding.py +1 -2
- Cython/Compiler/Symtab.py +27 -19
- Cython/Compiler/Tests/TestBuiltin.py +41 -6
- Cython/Compiler/Tests/TestCmdLine.py +3 -2
- Cython/Compiler/Tests/TestCode.py +4 -3
- Cython/Compiler/Tests/TestFlowControl.py +2 -2
- Cython/Compiler/Tests/TestParseTreeTransforms.py +2 -2
- Cython/Compiler/Tests/TestScanning.py +2 -4
- Cython/Compiler/Tests/TestSignatureMatching.py +3 -3
- Cython/Compiler/Tests/TestStringEncoding.py +2 -3
- Cython/Compiler/Tests/TestTypes.py +46 -3
- Cython/Compiler/Tests/TestUtilityLoad.py +4 -4
- Cython/Compiler/TypeInference.py +20 -0
- Cython/Compiler/TypeSlots.py +171 -16
- Cython/Compiler/UtilNodes.py +24 -0
- Cython/Compiler/UtilityCode.py +1 -0
- Cython/Compiler/Visitor.pxd +1 -1
- Cython/Compiler/Visitor.py +3 -2
- Cython/Debugger/Tests/TestLibCython.py +7 -2
- Cython/Debugger/Tests/test_libcython_in_gdb.py +4 -2
- Cython/Debugger/Tests/test_libpython_in_gdb.py +1 -1
- Cython/Includes/cpython/array.pxd +5 -5
- Cython/Includes/cpython/dict.pxd +1 -6
- Cython/Includes/cpython/float.pxd +19 -10
- Cython/Includes/cpython/frozendict.pxd +37 -0
- Cython/Includes/cpython/long.pxd +31 -0
- Cython/Includes/cpython/object.pxd +9 -12
- Cython/Includes/cpython/sentinel.pxd +17 -0
- Cython/Includes/cpython/type.pxd +93 -0
- Cython/Includes/libcpp/exception.pxd +90 -0
- Cython/LZSS.py +170 -0
- Cython/Shadow.py +550 -73
- Cython/StringIOTree.py +1 -2
- Cython/Tempita/_tempita.py +45 -46
- Cython/TestUtils.py +50 -8
- Cython/Tests/TestCythonUtils.py +2 -2
- Cython/Tests/TestJediTyper.py +1 -1
- Cython/Tests/TestShadow.py +7 -5
- Cython/Tests/TestStringIOTree.py +4 -3
- Cython/Tests/TestTestUtils.py +2 -3
- Cython/Utility/AsyncGen.c +59 -19
- Cython/Utility/Buffer.c +4 -3
- Cython/Utility/Builtins.c +139 -17
- Cython/Utility/CConvert.pyx +27 -12
- Cython/Utility/CommonStructures.c +55 -37
- Cython/Utility/Coroutine.c +112 -68
- Cython/Utility/CythonFunction.c +607 -330
- Cython/Utility/Embed.c +8 -0
- Cython/Utility/Exceptions.c +20 -3
- Cython/Utility/ExtensionTypes.c +414 -224
- Cython/Utility/FunctionArguments.c +83 -81
- Cython/Utility/ImportExport.c +72 -61
- Cython/Utility/MatchCase.c +979 -0
- Cython/Utility/MatchCase_Cy.pyx +12 -0
- Cython/Utility/MemoryView.pxd +9 -88
- Cython/Utility/MemoryView.pyx +173 -61
- Cython/Utility/MemoryView_C.c +3 -3
- Cython/Utility/ModuleSetupCode.c +306 -157
- Cython/Utility/ObjectHandling.c +483 -404
- Cython/Utility/Optimize.c +1117 -164
- Cython/Utility/Overflow.c +3 -9
- Cython/Utility/Profile.c +4 -0
- Cython/Utility/StringTools.c +187 -149
- Cython/Utility/Synchronization.c +39 -0
- Cython/Utility/TString.c +24 -13
- Cython/Utility/TypeConversion.c +405 -250
- Cython/Utility/arrayarray.h +24 -22
- Cython/Utils.py +11 -23
- Cython/__init__.py +3 -1
- {cython-3.2.6.dist-info → cython-3.3.0a2.dev0.dist-info}/METADATA +14 -33
- {cython-3.2.6.dist-info → cython-3.3.0a2.dev0.dist-info}/RECORD +109 -107
- {cython-3.2.6.dist-info → cython-3.3.0a2.dev0.dist-info}/WHEEL +1 -1
- Cython/Shadow.pyi +0 -521
- Cython/Utility/Printing.c +0 -86
- Cython/__init__.pyi +0 -7
- {cython-3.2.6.dist-info → cython-3.3.0a2.dev0.dist-info}/entry_points.txt +0 -0
- {cython-3.2.6.dist-info → cython-3.3.0a2.dev0.dist-info}/top_level.txt +0 -0
Cython/Utility/TString.c
CHANGED
|
@@ -35,10 +35,13 @@ static PyObject* __Pyx_GetObjectFromTemplateLib(int is_template); /* proto */
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
//////////////////////////// InitializeTemplateLib ///////////////////////////
|
|
38
|
+
//@requires: Exceptions.c::IgnoreException
|
|
38
39
|
|
|
39
40
|
#if __PYX_LIMITED_VERSION_HEX < 0x030E0000
|
|
40
41
|
static PyObject *__Pyx_TemplateLibFallback(void) {
|
|
41
|
-
|
|
42
|
+
if (!__Pyx_IgnoreException(PyExc_Exception)) {
|
|
43
|
+
return NULL; // BaseException
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
// The assumption here is that Interpolation and Template are fairly simple classes
|
|
44
47
|
// and the cost of compiling them with Cython (for all Python versions) is probably
|
|
@@ -268,7 +271,6 @@ static PyObject* __Pyx_MakeTemplateLibTemplate(PyObject *strings, PyObject *inte
|
|
|
268
271
|
|
|
269
272
|
//////////////////////////// MakeTemplateLibTemplate ////////////////////////
|
|
270
273
|
//@requires: InitializeTemplateLib
|
|
271
|
-
//@requires: ObjectHandling.c::PyObjectVectorCallKwBuilder
|
|
272
274
|
|
|
273
275
|
#if PY_VERSION_HEX >= 0x030E0000 && CYTHON_COMPILING_IN_CPYTHON
|
|
274
276
|
#ifndef Py_BUILD_CORE
|
|
@@ -293,23 +295,32 @@ static PyObject* __Pyx_MakeTemplateLibTemplate(PyObject *strings, PyObject *inte
|
|
|
293
295
|
// There's a high chance (but not certain) that we're using our internal
|
|
294
296
|
// fallback version of template. In this case we can try to use a better
|
|
295
297
|
// constructor.
|
|
296
|
-
PyObject *
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
298
|
+
PyObject *kwds = NULL;
|
|
299
|
+
{
|
|
300
|
+
#if CYTHON_VECTORCALL
|
|
301
|
+
PyObject *args[] = { strings, interpolations };
|
|
302
|
+
kwds = PyTuple_Pack(2, PYIDENT("strings"), PYIDENT("interpolations"));
|
|
303
|
+
if (unlikely(!kwds)) goto failed_shortcut;
|
|
304
|
+
result = PyObject_Vectorcall(tp, args, 0, kwds);
|
|
305
|
+
#else
|
|
306
|
+
kwds = PyDict_New();
|
|
307
|
+
if (unlikely(!kwds)) goto failed_shortcut;
|
|
308
|
+
if (unlikely(PyDict_SetItem(kwds, PYIDENT("strings"), strings) < 0)) goto failed_shortcut;
|
|
309
|
+
if (unlikely(PyDict_SetItem(kwds, PYIDENT("interpolations"), interpolations) < 0)) goto failed_shortcut;
|
|
310
|
+
result = PyObject_Call(tp, EMPTY(tuple), kwds);
|
|
311
|
+
#endif
|
|
312
|
+
}
|
|
304
313
|
if (result) {
|
|
305
|
-
Py_DECREF(
|
|
314
|
+
Py_DECREF(kwds);
|
|
306
315
|
Py_DECREF(tp);
|
|
307
316
|
return result;
|
|
308
317
|
}
|
|
309
318
|
|
|
310
319
|
failed_shortcut:
|
|
311
|
-
|
|
312
|
-
|
|
320
|
+
Py_XDECREF(kwds);
|
|
321
|
+
if (!__Pyx_IgnoreException(PyExc_Exception)) {
|
|
322
|
+
return NULL; // BaseException
|
|
323
|
+
}
|
|
313
324
|
}
|
|
314
325
|
#endif
|
|
315
326
|
|