Cython 3.3.1__py3-none-any.whl → 3.3.2__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.
Cython/Build/Cache.py CHANGED
@@ -221,6 +221,11 @@ class Cache:
221
221
  pass
222
222
 
223
223
  def _cachedir_looks_small_enough(self):
224
+ if sys.platform == "win32":
225
+ # sysinternals du exists and behaves mostly like unix du.
226
+ # However, at least on Arm, it sometimes modifies the access time of the contained files
227
+ # which makes it completely unsuitable for a quick cache size check.
228
+ return False
224
229
  try:
225
230
  # Quick check for total directory size (on unixy systems).
226
231
  completed_process = subprocess.run(
Cython/Build/Cythonize.py CHANGED
@@ -79,6 +79,9 @@ def _interruptible_pool(pool_cm):
79
79
 
80
80
 
81
81
  def _build(ext_modules, parallel):
82
+ if parallel is None and sys.implementation.name == 'graalpy':
83
+ # Each GraalPy worker has a substantial memory footprint.
84
+ parallel = 1
82
85
  modcount = sum(len(modules) for _, modules in ext_modules)
83
86
  if not modcount:
84
87
  return
Cython/Compiler/Errors.py CHANGED
@@ -156,6 +156,7 @@ def close_listing_file():
156
156
  if threadlocal.cython_errors_listing_file:
157
157
  threadlocal.cython_errors_listing_file.close()
158
158
  threadlocal.cython_errors_listing_file = None
159
+ threadlocal.cython_errors_echo_file = None
159
160
 
160
161
  def report_error(err, use_stack=True):
161
162
  error_stack = threadlocal.cython_errors_stack
Cython/Compiler/Nodes.py CHANGED
@@ -5938,11 +5938,6 @@ class CClassDefNode(ClassDefNode):
5938
5938
  break
5939
5939
  base_type = base_type.base_type
5940
5940
 
5941
- if type.has_sequence_flag or type.has_mapping_flag:
5942
- code.globalstate.use_utility_code(
5943
- UtilityCode.load_cached("ApplySequenceOrMappingFlag", "ExtensionTypes.c"))
5944
- code.put_error_if_neg(
5945
- entry.pos, f"__Pyx_ApplySequenceOrMappingFlag({typeptr_cname}, {type.has_sequence_flag:d})")
5946
5941
  code.putln("#if !CYTHON_COMPILING_IN_LIMITED_API")
5947
5942
  # FIXME: these still need to get initialised even with the limited-API
5948
5943
  for slot in TypeSlots.get_slot_table(code.globalstate.directives):
@@ -5956,6 +5951,12 @@ class CClassDefNode(ClassDefNode):
5956
5951
  code.putln("#endif")
5957
5952
  code.put_make_object_deferred(f"(PyObject*){typeptr_cname}")
5958
5953
 
5954
+ if type.has_sequence_flag or type.has_mapping_flag:
5955
+ code.globalstate.use_utility_code(
5956
+ UtilityCode.load_cached("ApplySequenceOrMappingFlag", "ExtensionTypes.c"))
5957
+ code.put_error_if_neg(
5958
+ entry.pos, f"__Pyx_ApplySequenceOrMappingFlag({typeptr_cname}, {type.has_sequence_flag:d})")
5959
+
5959
5960
  # Use specialised attribute lookup for types with generic lookup but no instance dict.
5960
5961
  getattr_slot_func = TypeSlots.get_slot_code_by_name(scope, 'tp_getattro')
5961
5962
  dictoffset_slot_func = TypeSlots.get_slot_code_by_name(scope, 'tp_dictoffset')
@@ -11045,6 +11046,15 @@ class ParallelRangeNode(ParallelStatNode):
11045
11046
 
11046
11047
  self.release_closure_privates(code)
11047
11048
 
11049
+ def ends_parallel_block(self):
11050
+ # The else clause runs after the loop and may read its variables.
11051
+ if not self.parent or self.parent.is_prange or self.else_clause:
11052
+ return False
11053
+ stat = self.parent.body
11054
+ while isinstance(stat, StatListNode) and stat.stats:
11055
+ stat = stat.stats[-1]
11056
+ return stat is self
11057
+
11048
11058
  def generate_loop(self, code, fmt_dict):
11049
11059
  if self.is_nested_prange:
11050
11060
  code.putln("#if 0")
@@ -11052,6 +11062,8 @@ class ParallelRangeNode(ParallelStatNode):
11052
11062
  code.putln("#ifdef _OPENMP")
11053
11063
 
11054
11064
  if not self.is_parallel:
11065
+ # The loop never waits at its end. When code follows it in a parallel
11066
+ # block, an explicit barrier is put after the loop (see below).
11055
11067
  acquire_gil_deadlock_avoidance_point = code.insertion_point()
11056
11068
  code.put("#pragma omp for nowait")
11057
11069
  self.privatization_insertion_point = code.insertion_point()
@@ -11077,6 +11089,8 @@ class ParallelRangeNode(ParallelStatNode):
11077
11089
  else:
11078
11090
  code.putln("#ifdef _OPENMP")
11079
11091
  acquire_gil_deadlock_avoidance_point = code.insertion_point()
11092
+ # The end of the parallel region follows, so the loop needs no
11093
+ # barrier of its own.
11080
11094
  code.put("#pragma omp for nowait")
11081
11095
 
11082
11096
  if self.acquire_gil:
@@ -11160,6 +11174,14 @@ class ParallelRangeNode(ParallelStatNode):
11160
11174
  code.putln("#pragma omp barrier")
11161
11175
  code.putln(f"PyEval_RestoreThread({Naming.parallel_loop_threadstate});")
11162
11176
  code.putln("#endif")
11177
+ elif not (self.is_parallel or self.is_nested_prange or self.ends_parallel_block()):
11178
+ # Code after a prange in a parallel block must see all of its iterations.
11179
+ # A "parallel for" or the last statement of a parallel block needs no
11180
+ # barrier, the end of the parallel region follows. In a nested prange,
11181
+ # the barrier would end up inside the outer loop.
11182
+ code.putln("#ifdef _OPENMP")
11183
+ code.putln("#pragma omp barrier")
11184
+ code.putln("#endif")
11163
11185
 
11164
11186
  if self.is_parallel:
11165
11187
  # Release the GIL and deallocate the thread state
@@ -4108,7 +4108,7 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
4108
4108
 
4109
4109
  if string_node.has_constant_result():
4110
4110
  try:
4111
- constant_result = string_node.constant_result.decode(encoding, error_handling)
4111
+ constant_result = string_node.constant_result.decode(encoding or 'utf-8', error_handling)
4112
4112
  except (AttributeError, ValueError, UnicodeDecodeError):
4113
4113
  pass
4114
4114
  else:
@@ -4366,7 +4366,11 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
4366
4366
  int_node = ExprNodes.IntNode.for_int(node.pos, int(default_value))
4367
4367
  else:
4368
4368
  int_node = ExprNodes.IntNode(node.pos, value=str(default_value), type=type)
4369
- args.append(int_node)
4369
+ # Replace None by default value, or append the default.
4370
+ if len(args) == arg_index:
4371
+ args.append(int_node)
4372
+ else:
4373
+ args[arg_index] = int_node
4370
4374
  else:
4371
4375
  arg = args[arg_index].coerce_to(type, self.current_env())
4372
4376
  if isinstance(arg, ExprNodes.CoerceFromPyTypeNode):
@@ -2402,11 +2402,11 @@ if VALUE is not None:
2402
2402
  with CRITICAL_SECTION(self):
2403
2403
  state = ({members})
2404
2404
  _dict = getattr(self, '__dict__', None)
2405
- if _dict is not None and _dict:
2406
- state += (_dict,)
2407
- use_setstate = True
2408
- else:
2409
- use_setstate = {any_notnone_members}
2405
+ if _dict is not None and _dict:
2406
+ state += (_dict,)
2407
+ use_setstate = True
2408
+ else:
2409
+ use_setstate = {any_notnone_members}
2410
2410
  if use_setstate:
2411
2411
  return {unpickle_func_name}, (type(self), {checksums[0]}, None), state
2412
2412
  else:
Cython/Shadow.py CHANGED
@@ -2,7 +2,7 @@
2
2
  from __future__ import annotations
3
3
 
4
4
  # Possible version formats: "3.1.0", "3.1.0a1", "3.1.0a1.dev0"
5
- __version__ = "3.3.1"
5
+ __version__ = "3.3.2"
6
6
 
7
7
  from types import TracebackType
8
8
  from typing import (
@@ -997,7 +997,7 @@ int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence);
997
997
 
998
998
  /////////////////// ApplySequenceOrMappingFlag //////////////////////
999
999
 
1000
- #if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_PYPY && CYTHON_USE_TYPE_SPECS)
1000
+ #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
1001
1001
  int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence) {
1002
1002
  PyObject *abc;
1003
1003
  PyObject *collections_abc = PyImport_ImportModule("collections.abc");
@@ -1012,16 +1012,6 @@ int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence) {
1012
1012
  Py_DECREF(register_result);
1013
1013
  return 0;
1014
1014
  }
1015
- #elif CYTHON_COMPILING_IN_PYPY // && !CYTHON_USE_TYPE_SPECS
1016
- int __Pyx_ApplySequenceOrMappingFlag(PyTypeObject *tp, int is_sequence) {
1017
- CYTHON_UNUSED_VAR(tp);
1018
- CYTHON_UNUSED_VAR(is_sequence);
1019
- return PyErr_WarnEx(
1020
- PyExc_RuntimeWarning,
1021
- "cython.collection_type only works on PyPy with the C flag CYTHON_USE_TYPE_SPECS=1",
1022
- 1
1023
- );
1024
- }
1025
1015
  #endif
1026
1016
 
1027
1017
  ////////////////////////////// CallNewInitFromVectorcall.proto //////////////////////
@@ -717,6 +717,25 @@ class __Pyx_FakeReference {
717
717
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
718
718
  #define __Pyx_DefaultClassType PyType_Type
719
719
 
720
+ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
721
+ // Use Py_IncRef/Py_DecRef to avoid issues with unbalanced reference counting
722
+ // on higher runtime versions with immortal objects.
723
+ #undef Py_INCREF
724
+ #undef Py_DECREF
725
+ #undef Py_XINCREF
726
+ #undef Py_XDECREF
727
+
728
+ #define Py_XINCREF(op) Py_IncRef(_PyObject_CAST(op))
729
+ #define Py_XDECREF(op) Py_DecRef(_PyObject_CAST(op))
730
+ #if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
731
+ #define Py_INCREF(op) _Py_IncRef(_PyObject_CAST(op))
732
+ #define Py_DECREF(op) _Py_DecRef(_PyObject_CAST(op))
733
+ #else
734
+ #define Py_INCREF(op) Py_IncRef(_PyObject_CAST(op))
735
+ #define Py_DECREF(op) Py_DecRef(_PyObject_CAST(op))
736
+ #endif
737
+ #endif
738
+
720
739
  #if CYTHON_COMPILING_IN_LIMITED_API
721
740
  // Cython uses these constants but they are not available in the limited API.
722
741
  // Therefore define them as static variables and look them up at module init.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: Cython
3
+ Version: 3.3.2
4
+ Summary: The Cython compiler for writing C extensions in the Python language.
5
+ Home-page: https://cython.org/
6
+ Author: Robert Bradshaw, Stefan Behnel, David Woods, Greg Ewing, et al.
7
+ Author-email: cython-devel@python.org
8
+ License: Apache-2.0
9
+ Project-URL: Documentation, https://cython.readthedocs.io/
10
+ Project-URL: Donate, https://cython.readthedocs.io/en/latest/src/donating.html
11
+ Project-URL: Source Code, https://github.com/cython/cython
12
+ Project-URL: Bug Tracker, https://github.com/cython/cython/issues/
13
+ Project-URL: User Group, https://groups.google.com/g/cython-users
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
27
+ Classifier: Programming Language :: Python :: Implementation :: GraalPy
28
+ Classifier: Programming Language :: C
29
+ Classifier: Programming Language :: C++
30
+ Classifier: Programming Language :: Cython
31
+ Classifier: Topic :: Software Development :: Code Generators
32
+ Classifier: Topic :: Software Development :: Compilers
33
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
34
+ Classifier: Typing :: Typed
35
+ Requires-Python: >=3.9
36
+ Description-Content-Type: text/x-rst
37
+ Dynamic: author
38
+ Dynamic: author-email
39
+ Dynamic: classifier
40
+ Dynamic: description
41
+ Dynamic: description-content-type
42
+ Dynamic: home-page
43
+ Dynamic: license
44
+ Dynamic: project-url
45
+ Dynamic: requires-python
46
+ Dynamic: summary
47
+
48
+ The Cython language makes writing C extensions for the Python language as
49
+ easy as Python itself. Cython is a source code translator based on Pyrex_,
50
+ but supports more cutting edge functionality and optimizations.
51
+
52
+ The Cython language is a superset of the Python language (almost all Python
53
+ code is also valid Cython code), but Cython additionally supports optional
54
+ static typing to natively call C functions, operate with C++ classes and
55
+ declare fast C types on variables and class attributes. This allows the
56
+ compiler to generate very efficient C code from Cython code.
57
+
58
+ This makes Cython the ideal language for writing glue code for external
59
+ C/C++ libraries, and for fast C modules that speed up the execution of
60
+ Python code.
61
+
62
+ The newest Cython release can always be downloaded from https://cython.org/.
63
+ Unpack the tarball or zip file, enter the directory, and then run::
64
+
65
+ pip install .
66
+
67
+ Note that for one-time builds, e.g. for CI/testing, on platforms that are not
68
+ covered by one of the wheel packages provided on PyPI *and* the pure Python wheel
69
+ that we provide is not used, it is substantially faster than a full source build
70
+ to install an uncompiled (slower) version of Cython with::
71
+
72
+ NO_CYTHON_COMPILE=true pip install .
73
+
74
+ .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
75
+
76
+ 3.3.2 (2026-11-25)
77
+ ==================
78
+
79
+ Bugs fixed
80
+ ----------
81
+
82
+ * Since Cython 3.3.0, parallel code following a ``prange()`` for-loop could start executing
83
+ before all loop iterations had finished.
84
+ Patch by Arthur Lacote. (Github issue https://github.com/cython/cython/issues/8120)
85
+
86
+ * A race condition in the auto-pickle code was fixed for freethreading builds.
87
+ (Github issue https://github.com/cython/cython/issues/8107)
88
+
89
+ * ``None`` default values passed into optimised string methods (as start/end position)
90
+ were mishandled and let the call fail.
91
+ (Github issue https://github.com/cython/cython/issues/8098)
92
+
93
+ * Decoding bytes literals in place crashed Cython.
94
+ Patch by 0z5a. (Github issue https://github.com/cython/cython/issues/8134)
95
+
96
+ * ``cython.collection_type()`` did not work in PyPy.
97
+ (Github issue https://github.com/cython/cython/issues/8133)
98
+
99
+ * Warnings about "implicit ``__init__.py`` creation" in Bazel builds were resolved.
100
+ Patch by David Sanderson. (Github issue https://github.com/cython/cython/issues/8132)
101
+
102
+ * ``Errors.close_listing_file()`` failed to clear the echo file reference,
103
+ allowing later writes to closed files.
104
+ Patch by Lumír Balhar. (Github issue https://github.com/cython/cython/issues/8128)
105
+
106
+ Other changes
107
+ -------------
108
+
109
+ * Limited API builds now explicitly use the ``Py_IncRef()`` / ``Py_DecRef()`` functions
110
+ instead of the respective macros to make it safer to use modules built for old Limited API
111
+ versions in CPython 3.14 and later.
112
+ (Github issue https://github.com/cython/cython/issues/8125)
113
+
114
+ * Cythonizing under GraalPython now avoids parallel jobs by default to limit the memory usage.
115
+ Patch by Michael Šimáček. (Github issue https://github.com/cython/cython/issues/8143)
@@ -3,15 +3,15 @@ Cython/CodeWriter.py,sha256=2h3dbuJl1iPr9OUwSgLsuK6mrqhQQOir7yOzt8a0Imk,24604
3
3
  Cython/Coverage.py,sha256=WGY5BW1nBcJ86f4Lrs6ZZIuFKCdngsEizs4Kor0iRsc,18783
4
4
  Cython/Debugging.py,sha256=vFtJhn7QstMf5gnYru2qHIz5ZjPg1KSlZVGHr-pBCwM,552
5
5
  Cython/LZSS.py,sha256=XLf-i3lspvdpmD7KHQ5i556WXqD4yNI0mXoIyhMzRFE,6191
6
- Cython/Shadow.py,sha256=0jAjZPADgURV57gwean2w1onAsEhStx3u78lyxhbR1M,38979
6
+ Cython/Shadow.py,sha256=tiR3VQ32Ypzx_RRr9WavaTKmbx5WQvV6Ox1EvYnD3ao,38979
7
7
  Cython/StringIOTree.py,sha256=xg-sJreuZwfvxEZyyHpL1spF_z3aWM4nRzV_JBSlq4c,5510
8
8
  Cython/TestUtils.py,sha256=gZZCxOHQm1iqUPMv-7DJlKEFwnylj9pR9BB6D6Gj-xg,16944
9
9
  Cython/Utils.py,sha256=Uc5J2pPPfP6PAgxsy8qc-Y7ecjOSQmjeTyFX5-ox4G0,21092
10
10
  Cython/__init__.py,sha256=tFVse8Xfs_LJndJtujyQy8-egoz-A9C7avOsmAZEkb0,355
11
11
  Cython/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  Cython/Build/BuildExecutable.py,sha256=yrxLJgTIXqHg3n3nfu8vy5Vk95SWmNngAWQvTma82C0,4376
13
- Cython/Build/Cache.py,sha256=jATXpq9yCVOqK7a5vT89Gksku-xinP6-qQbVTVmL3wU,8827
14
- Cython/Build/Cythonize.py,sha256=9dYCW_To76B0wZA5GO3DNWjZn8PllkFvef-X7d-nbRc,13475
13
+ Cython/Build/Cache.py,sha256=8-PkIsjnOFyxpq-SIsr91PWpX52SlWSQX6PSPJjrbQo,9140
14
+ Cython/Build/Cythonize.py,sha256=SGU0MlZLtf508049RKXgUuT_RaG8uaJXoog4dGB430w,13628
15
15
  Cython/Build/Dependencies.py,sha256=tlZMMKhgbbCpWHyCHaMAnuHehmtdXdRP03UP21_UdT8,50612
16
16
  Cython/Build/Distutils.py,sha256=iO5tPX84Kc-ZWMocfuQbl_PqyC9HGGIRS-NiKI60-ZE,49
17
17
  Cython/Build/Inline.py,sha256=aOgcD_ohfhgvr-OdxogYzk_QLH_MDVMkM76Rn3vpj_o,16473
@@ -38,7 +38,7 @@ Cython/Compiler/CodeGeneration.py,sha256=aEW8IwXvwEOsde0-RxvAi_cb8_qdaDGxH_nS_VF
38
38
  Cython/Compiler/CythonScope.py,sha256=1XV-CjNLLZTyUf8dy3gBLeJaaqb_IqbRH6SwxeSuJGE,7922
39
39
  Cython/Compiler/Dataclass.py,sha256=QsmGDL7XeZc-mmAeFuqb7WZUnCRQwqVg6UujVBIebcI,38510
40
40
  Cython/Compiler/DebugFlags.py,sha256=-ht7qWQyoJO6H5o0XJgwVjj5gWayuol-H2HoLqiCXsE,713
41
- Cython/Compiler/Errors.py,sha256=siD1PF-V8le5w4EVlOCTz0EiOyK6FN8bmk7k_OKGqH0,9415
41
+ Cython/Compiler/Errors.py,sha256=6st3NKdTMVWYrg_R2UBfwBf7Q6lFcCK-QDIaRJHGSYI,9462
42
42
  Cython/Compiler/ExprNodes.py,sha256=fVWpGU8QB_OaB1nKmdXqNQTQxEI_1SofEc8IXEzVS2A,667209
43
43
  Cython/Compiler/FlowControl.pxd,sha256=oUlvomOWA2DOteoGryNl0RLt3U9-FlwP6rWUrnwQrAs,3025
44
44
  Cython/Compiler/FlowControl.py,sha256=8UzfRchu12WUgMNsEjs_UDMleeApgo3wOigNx_z7320,55593
@@ -52,11 +52,11 @@ Cython/Compiler/MatchCaseNodes.py,sha256=mLC98hyVNd4XHrf0fD8LIdBoDrs-oBpAHp73Ro9
52
52
  Cython/Compiler/MemoryView.py,sha256=BP_hYO9bd9zbnoHLtcLzBGYftTcMahjZCicqCIDt8y0,33219
53
53
  Cython/Compiler/ModuleNode.py,sha256=C32u7V_wnEI7OJ-c6UukW4wfVOwjxs36Gf3bHdVYPus,210266
54
54
  Cython/Compiler/Naming.py,sha256=sXrbamVV6tvVdXDrNDmOn-lj5RrAwuUXN7e4LJvNdNQ,11505
55
- Cython/Compiler/Nodes.py,sha256=tcXGzG8duSm_8WLvjG7ONHzOYABXj3NijrYsvusH5LM,478179
56
- Cython/Compiler/Optimize.py,sha256=2GhAwEAx40tnejf5XqWxb_SDsOj8Jo5IuqWMc8cxeKs,238912
55
+ Cython/Compiler/Nodes.py,sha256=qsJ0-r0iaf_QKt-AwTlFuh8AJtnZFUvT7SeyjO4GJyo,479335
56
+ Cython/Compiler/Optimize.py,sha256=DPmxVv8Si1Ou2biQOjjJ5APwMbI0B_uNhBPp7ozVFgI,239095
57
57
  Cython/Compiler/Options.py,sha256=ZWcDM8u0gjBpO-uBOlCuLxxYmGQzwQcAa-83OVy3XJc,32187
58
58
  Cython/Compiler/ParseTreeTransforms.pxd,sha256=xhb_8rIEHO2klbCHX8FCgdAwmkxQsBaVCO6qpkjHyco,2358
59
- Cython/Compiler/ParseTreeTransforms.py,sha256=Egnv5c2a_eEiYPZrukTszwIY2rE9ffVXYXiM6OxaVr8,195307
59
+ Cython/Compiler/ParseTreeTransforms.py,sha256=xaHwuDkTWsikAlXX3ki-rFhSXWp3345fSefV4b-yWAM,195327
60
60
  Cython/Compiler/Parsing.pxd,sha256=QKXWdj34xwo5X-1bDzEeBjQctSmZEOK4D7nxnohyhlM,347
61
61
  Cython/Compiler/Parsing.py,sha256=lcYrcf_DEBkOlTpZcfs88b4C9F7TkOs9J4CNDC3SDtg,158188
62
62
  Cython/Compiler/Pipeline.py,sha256=QoPvQI_b99zCXIIhh8AEa-zGvbBZvVD7snv87DSLmT4,16457
@@ -285,7 +285,7 @@ Cython/Utility/Dataclasses.c,sha256=eCa9JHHg6bj-WSKw1xTDjazghmXAkMd9J5TnELNTVOI,
285
285
  Cython/Utility/Embed.c,sha256=lGOiz05yR0nQ574hqIkDHd3S-imJiVDAApH3maaH0dg,3846
286
286
  Cython/Utility/Exceptions.c,sha256=LXe3Vld56EtMVO4lQIYsK_-vTtAlYZzXxbOun4MJbuc,47738
287
287
  Cython/Utility/Exceptions_Cy.pyx,sha256=fBx9KryF_lDjlAVNf52P_WHIECZUtB_HuGb7ynZREFw,4246
288
- Cython/Utility/ExtensionTypes.c,sha256=ihvzOGFW7l9m32mHUuYmJr4eDP_w_OKgjj4Km1iffBA,44432
288
+ Cython/Utility/ExtensionTypes.c,sha256=zVYMYesNwQlSp152Zv56HfxWaAeiRnK-b-pRjGbtavM,44041
289
289
  Cython/Utility/FunctionArguments.c,sha256=lDv-qQM3oOh5b5OtW3l-iLgij9Xjqk1hIxcOY83NQeQ,34486
290
290
  Cython/Utility/FusedFunction.pyx,sha256=3reL7n6L2M3gU_OXSYAvoDEVVjJxMWvpiesvGmRAEc8,1494
291
291
  Cython/Utility/ImportExport.c,sha256=cQKJ8yFjxBwP81MPh7IJ4dz7lVeJ1FBA-nO1GjW3bUc,32545
@@ -294,7 +294,7 @@ Cython/Utility/MatchCase_Cy.pyx,sha256=61HjgHeQe14EA1WD-QqJXnMgvJNsXqJo3vDS-kasZ
294
294
  Cython/Utility/MemoryView.pxd,sha256=CzRLTrQoDPPoU3cBXtEqiVbl9rTzq5lnc52b8ZGCZ4Q,3439
295
295
  Cython/Utility/MemoryView.pyx,sha256=6QlTN_bmnWvCWpZoIy3u1tmJKrvWUkzekQmJjaOJdqQ,51049
296
296
  Cython/Utility/MemoryView_C.c,sha256=lpbZBqCQ0rvFzUu8D0hoCTToGO0DRtvnh7VxmS_PKzY,33047
297
- Cython/Utility/ModuleSetupCode.c,sha256=f9dRzXU3WaASzpxiQ3ZPMCHoL9l8NcqOvP-Oh_PkD7E,125323
297
+ Cython/Utility/ModuleSetupCode.c,sha256=mB8loztXYfBfh1EiO3XLOWXDUGkfm68-CkLzJWPoK0I,125984
298
298
  Cython/Utility/NumpyImportArray.c,sha256=Gwo493DF8JxUxhTTjJYIdyHHJ9TEwFKqDmKsdk_uPyw,2033
299
299
  Cython/Utility/ObjectHandling.c,sha256=F-zT5xyl4oPjqBaLbk5xZTa7Zwx4_w2ZKhyy7vBYGN0,123944
300
300
  Cython/Utility/Optimize.c,sha256=-hzTurhKt4RIBbYQNYDe85uM8NKCaK2GXgTWn8r8wwk,95231
@@ -314,8 +314,8 @@ Cython/Utility/arrayarray.h,sha256=0hfnKOyxWQErdg5mjkj4gMGkOEEaDotg-WnMi1gt1-w,5
314
314
  pyximport/__init__.py,sha256=9hOyKolFtOerPiVEyktKrT1VtzbGexq9UmORzo52iHI,79
315
315
  pyximport/pyxbuild.py,sha256=AsL1tyLxG61Mj7Ah-DxtDBuaXF94W2Tb6KTos7r0w8I,5702
316
316
  pyximport/pyximport.py,sha256=BnXVwq1cwo1EYRjPU0J-RUDcwzGjUlzKWZOOMDNcu-s,18510
317
- cython-3.3.1.dist-info/METADATA,sha256=SBB85Zbl3LRhsdjMf3UfmPlb6pmw0DlNsVlv_sJ_9dA,13108
318
- cython-3.3.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
319
- cython-3.3.1.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
320
- cython-3.3.1.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
321
- cython-3.3.1.dist-info/RECORD,,
317
+ cython-3.3.2.dist-info/METADATA,sha256=6tuMEn9AuMNowpIJ_QHw8I2wMW-bC90Ka8W9GfCzgfA,5036
318
+ cython-3.3.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
319
+ cython-3.3.2.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
320
+ cython-3.3.2.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
321
+ cython-3.3.2.dist-info/RECORD,,
@@ -1,264 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: Cython
3
- Version: 3.3.1
4
- Summary: The Cython compiler for writing C extensions in the Python language.
5
- Home-page: https://cython.org/
6
- Author: Robert Bradshaw, Stefan Behnel, David Woods, Greg Ewing, et al.
7
- Author-email: cython-devel@python.org
8
- License: Apache-2.0
9
- Project-URL: Documentation, https://cython.readthedocs.io/
10
- Project-URL: Donate, https://cython.readthedocs.io/en/latest/src/donating.html
11
- Project-URL: Source Code, https://github.com/cython/cython
12
- Project-URL: Bug Tracker, https://github.com/cython/cython/issues/
13
- Project-URL: User Group, https://groups.google.com/g/cython-users
14
- Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python
18
- Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Programming Language :: Python :: 3.13
24
- Classifier: Programming Language :: Python :: 3.14
25
- Classifier: Programming Language :: Python :: Implementation :: CPython
26
- Classifier: Programming Language :: Python :: Implementation :: PyPy
27
- Classifier: Programming Language :: Python :: Implementation :: GraalPy
28
- Classifier: Programming Language :: C
29
- Classifier: Programming Language :: C++
30
- Classifier: Programming Language :: Cython
31
- Classifier: Topic :: Software Development :: Code Generators
32
- Classifier: Topic :: Software Development :: Compilers
33
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
34
- Classifier: Typing :: Typed
35
- Requires-Python: >=3.9
36
- Description-Content-Type: text/x-rst
37
- Dynamic: author
38
- Dynamic: author-email
39
- Dynamic: classifier
40
- Dynamic: description
41
- Dynamic: description-content-type
42
- Dynamic: home-page
43
- Dynamic: license
44
- Dynamic: project-url
45
- Dynamic: requires-python
46
- Dynamic: summary
47
-
48
- The Cython language makes writing C extensions for the Python language as
49
- easy as Python itself. Cython is a source code translator based on Pyrex_,
50
- but supports more cutting edge functionality and optimizations.
51
-
52
- The Cython language is a superset of the Python language (almost all Python
53
- code is also valid Cython code), but Cython additionally supports optional
54
- static typing to natively call C functions, operate with C++ classes and
55
- declare fast C types on variables and class attributes. This allows the
56
- compiler to generate very efficient C code from Cython code.
57
-
58
- This makes Cython the ideal language for writing glue code for external
59
- C/C++ libraries, and for fast C modules that speed up the execution of
60
- Python code.
61
-
62
- The newest Cython release can always be downloaded from https://cython.org/.
63
- Unpack the tarball or zip file, enter the directory, and then run::
64
-
65
- pip install .
66
-
67
- Note that for one-time builds, e.g. for CI/testing, on platforms that are not
68
- covered by one of the wheel packages provided on PyPI *and* the pure Python wheel
69
- that we provide is not used, it is substantially faster than a full source build
70
- to install an uncompiled (slower) version of Cython with::
71
-
72
- NO_CYTHON_COMPILE=true pip install .
73
-
74
- .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
75
-
76
- 3.3.1 (2026-11-01)
77
- ==================
78
-
79
- Features added
80
- --------------
81
-
82
- * Declarations for the C99 ``bool`` type in ``<stdbool.h>`` were added.
83
- (Github issue https://github.com/cython/cython/issues/8011)
84
-
85
- * Fused function objects are slightly smaller in the Limited API.
86
- (Github issue https://github.com/cython/cython/issues/7967)
87
-
88
- * Cython warns when enabling subinterpreter support for modules that cannot
89
- currently support it for technical reasons.
90
- (Github issue https://github.com/cython/cython/issues/8006)
91
-
92
- * The shared module is now automatically declared as ``freethreading_compatible`` and sets
93
- ``subinterpretes_compatible`` as applicable (currently depending on memoryview usage).
94
- Both are overridable by users as usual.
95
- (Github issue https://github.com/cython/cython/issues/8037)
96
-
97
- Bugs fixed
98
- ----------
99
-
100
- * Constant folding of multiplied sequences could return incorrect results.
101
- Patch by orztrickster. (Github issue https://github.com/cython/cython/issues/8021)
102
-
103
- * Cython 3.3.0 incorrectly assumed that Python integer powers always return integers.
104
- Patch by Clay Dugo. (Github issue https://github.com/cython/cython/issues/7989)
105
-
106
- * The return value of optimised calls to ``dict.get()``, ``dict.pop()`` and ``dict.setdefault()``
107
- were inferred independent of their default values, leading to incorrect C code being generated.
108
- (Github issue https://github.com/cython/cython/issues/7991)
109
-
110
- * Some redeclarations of annotated variables were incorrectly rejected.
111
- They are now generally allowed and Cython only warns about obviously incorrect cases.
112
- (Github issue https://github.com/cython/cython/issues/7920)
113
-
114
- * Type inference now respects ``annotation_typing=False`` for local variable annotations.
115
- Patch by GruffElixir. (Github issue https://github.com/cython/cython/issues/7994)
116
-
117
- * Type inference depended on arbitrary set ordering when circular references are involved.
118
- As an effect, the ``Cython.Compiler.FlowControl`` module was translated to slightly
119
- non-deterministic C code.
120
- (Github issue https://github.com/cython/cython/issues/8002)
121
-
122
- * Assigning different slices of the same memoryview to different extension type attributes
123
- could generate incorrect refcounting code.
124
- (Github issue https://github.com/cython/cython/issues/8016)
125
-
126
- * Enabling vectorcall for a class with a base class that doesn't have it incorrectly called
127
- up to the non-existing base class vectorcall slot.
128
- (Github issue https://github.com/cython/cython/issues/7936)
129
-
130
- * Cascaded assignments to differently type-inferred variables could generate incorrect C code.
131
- (Github issue https://github.com/cython/cython/issues/7937)
132
-
133
- * Method calls on typed containers with unused results could generate incorrect C code.
134
- (Github issue https://github.com/cython/cython/issues/7922)
135
-
136
- * Using ``None``-returning builtin methods as part of expressions could generate incorrect C code.
137
- (Github issue https://github.com/cython/cython/issues/7946)
138
-
139
- * The C code generated for exception groups could lack a C variable declaration.
140
- Patch by bwenstar. (Github issue https://github.com/cython/cython/issues/8043)
141
-
142
- * Exporting fused functions generated invalid C code in API header files.
143
- Patch by Ardi Loot. (Github issue https://github.com/cython/cython/issues/7972)
144
-
145
- * With ``CYTHON_USE_MODULE_STATE=1``, using a memoryview typed argument with default generated incorrect C code.
146
- Patch by demrom. (Github issue https://github.com/cython/cython/issues/7981)
147
-
148
- * Non-trivially generated keyword arguments (e.g. ``**{dict}``) could fail to compile.
149
- (Github issue https://github.com/cython/cython/issues/7921)
150
-
151
- * Builtin method calls on dicts from non-trivial expressions could fail to compile.
152
- (Github issue https://github.com/cython/cython/issues/7931)
153
-
154
- * Some builtin optimisations could fail to compile on non-trivial expressions.
155
- (Github issue https://github.com/cython/cython/issues/7957)
156
-
157
- * Typing a global variable with an unknown type could fail to compile.
158
- (Github issue https://github.com/cython/cython/issues/7970)
159
-
160
- * Declaring a C array of extension types crashed Cython after reporting the error.
161
- Patch by Vladimir Saraikin. (Github issue https://github.com/cython/cython/issues/1993)
162
-
163
- * Optimised string comparison to single-character text strings accidentally allowed bytes.
164
- (Github issue https://github.com/cython/cython/issues/7924)
165
-
166
- * Errors while testing object attributes in match statements were ignored.
167
- Patch by Vineet Kumar. (Github issue https://github.com/cython/cython/issues/8029)
168
-
169
- * A dangling pointer was fixed when assigning to attributes of extension types.
170
- (Github issue https://github.com/cython/cython/issues/7907)
171
-
172
- * Re-raising an exception from an awaited Python coroutine could leak a frame reference.
173
- Patch by bwenstar. (Github issue https://github.com/cython/cython/issues/8042)
174
-
175
- * Trying to reimport a module compiled with module state now raises an exception instead of
176
- returning the original module, which let CPython overwrite the module state and crash.
177
- Patch by Max Azatian. (Github issue https://github.com/cython/cython/issues/8048)
178
-
179
- * Throwing into a pending async generator's ``aclose()`` could crash.
180
- Patch by Arthur Villeneuve. (Github issue https://github.com/cython/cython/issues/8027)
181
-
182
- * A crash was resolved when mixing Cython modules compiled with different Limited API versions.
183
- (Github issue https://github.com/cython/cython/issues/7914)
184
-
185
- * A GCC LTO-related compile/link problem was resolved when comparing Python ints.
186
- (Github issue https://github.com/cython/cython/issues/7908)
187
-
188
- * ``isfinite()`` was used for Python float comparisons but not defined in NetBSD in C++ compile mode.
189
- (Github issue https://github.com/cython/cython/issues/7915)
190
-
191
- * The ``__Pyx_pretend_to_initialize()`` function could fail to compile in C code that doesn't even need it.
192
- (Github issue https://github.com/cython/cython/issues/7941)
193
-
194
- * Modules containing only the empty string as single bytes literal generated invalid C code.
195
- (Github issue https://github.com/cython/cython/issues/7965)
196
-
197
- * User cimports of C++ names could break the internally generated C++ conversion functions
198
- and lead to compile failures or incorrect C++ code.
199
- (Github issue https://github.com/cython/cython/issues/7939)
200
-
201
- * The C code generated for the shared module was not deterministic.
202
- Patch by Ralf Gommers. (Github issue https://github.com/cython/cython/issues/7982)
203
-
204
- * Special .pxd file names like ``__init__.pxd`` and version file suffixes were mishandled
205
- when stripping file paths.
206
- Patch by Ralf Gommers. (Github issue https://github.com/cython/cython/issues/7984)
207
-
208
- * Non-standard type initialisation in SageMath allowed repeated initialisation
209
- of Cython's internal types, overwriting the previous types and leaking memory.
210
- Patch by Chenxin Zhong. (Github issue https://github.com/cython/cython/issues/7976)
211
-
212
- * Single-phase module initialisation in freethreading Python didn't allow overriding the
213
- FT-compatibility flag from a C macro (as supported for multi-phase initialisation).
214
- (Github issue https://github.com/cython/cython/issues/8036)
215
-
216
- * A C compiler warning in MSVC was resolved.
217
- (Github issue https://github.com/cython/cython/issues/7911)
218
-
219
- * A C compiler warning for an unused variable was resolved.
220
- Patch by WyattBlue. (Github issue https://github.com/cython/cython/issues/8087)
221
-
222
- * PyPy now uses type specs by default.
223
- Patch by Matti Picus. (Github issue https://github.com/cython/cython/issues/7947)
224
-
225
- * Some older PyPy C-API workarounds were disabled for newer versions.
226
- Patch by Matti Picus. (Github issue https://github.com/cython/cython/issues/7974)
227
-
228
- * GraalPython now uses the Limited API for Cython functions.
229
- Patch by Michael Šimáček. (Github issue https://github.com/cython/cython/issues/7971)
230
-
231
- * The C-API of the ``array`` module is supported in GraalPython.
232
- (Github issue https://github.com/cython/cython/issues/7964)
233
-
234
- * Older Android builds no longer use C ``complex`` (which they only partially implemented).
235
- (Github issue https://github.com/cython/cython/issues/8026)
236
-
237
- * Copying the ``Shadow.py`` module into user packages could fail due to internal re-imports.
238
- Patch by Vincent Fazio. (Github issue https://github.com/cython/cython/issues/7999)
239
-
240
- * Several issues were resolved when using the Cython file cache directory in concurrent processes.
241
- The cache is also more effective now because it previously deleted the most recent instead of
242
- the oldest file on cleanup.
243
- Patches by Lawrence Mitchell and Samuel Hills.
244
- (Github issues https://github.com/cython/cython/issues/7983, https://github.com/cython/cython/issues/7985, https://github.com/cython/cython/issues/8090)
245
-
246
- * The Cython file cache key didn't take the compiler directives into account.
247
- Patch by Robert Dazi. (Github issue https://github.com/cython/cython/issues/7532)
248
-
249
- * The encoding line detection at the start of source files was too eager to search also non-comments.
250
- (Github issue https://github.com/cython/cython/issues/7935)
251
-
252
- * Enabling annotated HTML file generation together with the shared module could fail to compile.
253
- (Github issue https://github.com/cython/cython/issues/7910)
254
-
255
- Other changes
256
- -------------
257
-
258
- * Generating a shared utility module no longer embeds its destination directory
259
- in the generated C code, making the output reproducible across build directories.
260
- It is now recommended to pass the ``--module-name`` option to ``cython generate-shared``
261
- to provide the fully qualified module name explicitly. This option was ignored
262
- for the shared module in earlier versions of Cython.
263
- This is a follow-up fix to the one in 3.3.0, for ``generate-shared /path/to/_{sharedname}.c``.
264
- Patch by Ralf Gommers. (Github issue https://github.com/cython/cython/issues/7723)
File without changes