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/Embed.c
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
//////////////////// MainFunction ////////////////////
|
|
2
2
|
|
|
3
|
+
#ifdef Py_LIMITED_API
|
|
4
|
+
// The purpose of the Limited API is to allow building extension modules
|
|
5
|
+
// that import on different Python versions. It is quite useless
|
|
6
|
+
// (and unnecessarily constraining) to set it up for an embedded Python build
|
|
7
|
+
// against a specific Python implementation and version.
|
|
8
|
+
#error Do not use the Limited API for embedding. Build for the specific Python target version instead.
|
|
9
|
+
#endif
|
|
10
|
+
|
|
3
11
|
#ifdef __FreeBSD__
|
|
4
12
|
#include <floatingpoint.h>
|
|
5
13
|
#endif
|
Cython/Utility/Exceptions.c
CHANGED
|
@@ -868,7 +868,6 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject
|
|
|
868
868
|
Py_DECREF(replace);
|
|
869
869
|
return result;
|
|
870
870
|
}
|
|
871
|
-
PyErr_Clear();
|
|
872
871
|
|
|
873
872
|
return NULL;
|
|
874
873
|
}
|
|
@@ -889,7 +888,7 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
|
|
|
889
888
|
// frame, and then customizing the details of the code to match.
|
|
890
889
|
// We then run the code object and use the generated frame to set the traceback.
|
|
891
890
|
|
|
892
|
-
|
|
891
|
+
__Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
|
|
893
892
|
|
|
894
893
|
code_object = $global_code_object_cache_find(c_line ? -c_line : py_line);
|
|
895
894
|
if (!code_object) {
|
|
@@ -929,7 +928,7 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
|
|
|
929
928
|
success = 1;
|
|
930
929
|
|
|
931
930
|
bad:
|
|
932
|
-
|
|
931
|
+
__Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
|
|
933
932
|
Py_XDECREF(code_object);
|
|
934
933
|
Py_XDECREF(py_py_line);
|
|
935
934
|
Py_XDECREF(py_funcname);
|
|
@@ -1019,3 +1018,21 @@ bad:
|
|
|
1019
1018
|
((error_value) == (error_value) ? \
|
|
1020
1019
|
(value) == (error_value) : \
|
|
1021
1020
|
(value) != (value))
|
|
1021
|
+
|
|
1022
|
+
//////////////////// IgnoreException.proto /////////////////////////////////
|
|
1023
|
+
|
|
1024
|
+
// Returns 1 if the exception was ignored, 0, otherwise.
|
|
1025
|
+
// given_exception may be NULL, in which case PyErr_Occurred() is used.
|
|
1026
|
+
static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception); /* proto */
|
|
1027
|
+
|
|
1028
|
+
#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
|
|
1029
|
+
|
|
1030
|
+
//////////////////// IgnoreException /////////////////////////////////
|
|
1031
|
+
|
|
1032
|
+
static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
|
|
1033
|
+
if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
|
|
1034
|
+
PyErr_Clear();
|
|
1035
|
+
return 1;
|
|
1036
|
+
}
|
|
1037
|
+
return 0;
|
|
1038
|
+
}
|