Cython 3.2.1__py3-none-any.whl → 3.2.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.
@@ -20,9 +20,16 @@ pyexec_globals_utility_code = UtilityCode.load("PyExecGlobals", "Builtins.c")
20
20
  globals_utility_code = UtilityCode.load("Globals", "Builtins.c")
21
21
  range_utility_code = UtilityCode.load("PyRange_Check", "Builtins.c")
22
22
  include_std_lib_h_utility_code = UtilityCode.load("IncludeStdlibH", "ModuleSetupCode.c")
23
- pysequence_multiply_utility_code = UtilityCode.load("PySequenceMultiply", "ObjectHandling.c")
24
23
  slice_accessor_utility_code = UtilityCode.load("PySliceAccessors", "Builtins.c")
25
24
 
25
+ def make_sequence_multiply_method(typeobj_cname):
26
+ pysequence_multiply_utility_code = TempitaUtilityCode.load(
27
+ "BuiltinSequenceMultiply", "ObjectHandling.c",
28
+ context={'typeobj': typeobj_cname})
29
+ return BuiltinMethod("__mul__", "Tz", "T", f"__Pyx_{typeobj_cname}_Multiply",
30
+ utility_code=pysequence_multiply_utility_code)
31
+
32
+
26
33
  # mapping from builtins to their C-level equivalents
27
34
 
28
35
  class _BuiltinOverride:
@@ -378,22 +385,18 @@ builtin_types_table = [
378
385
  ]),
379
386
 
380
387
  ("bytearray", "&PyByteArray_Type", [
381
- BuiltinMethod("__mul__", "Tz", "T", "__Pyx_PySequence_Multiply",
382
- utility_code=pysequence_multiply_utility_code),
388
+ make_sequence_multiply_method("PyByteArray_Type"),
383
389
  ]),
384
390
  ("bytes", "&PyBytes_Type", [BuiltinMethod("join", "TO", "T", "__Pyx_PyBytes_Join",
385
391
  utility_code=UtilityCode.load("StringJoin", "StringTools.c")),
386
- BuiltinMethod("__mul__", "Tz", "T", "__Pyx_PySequence_Multiply",
387
- utility_code=pysequence_multiply_utility_code),
392
+ make_sequence_multiply_method("PyBytes_Type"),
388
393
  ]),
389
394
  ("str", "&PyUnicode_Type", [BuiltinMethod("__contains__", "TO", "b", "PyUnicode_Contains"),
390
395
  BuiltinMethod("join", "TO", "T", "PyUnicode_Join"),
391
- BuiltinMethod("__mul__", "Tz", "T", "__Pyx_PySequence_Multiply",
392
- utility_code=pysequence_multiply_utility_code),
396
+ make_sequence_multiply_method("PyUnicode_Type"),
393
397
  ]),
394
398
 
395
- ("tuple", "&PyTuple_Type", [BuiltinMethod("__mul__", "Tz", "T", "__Pyx_PySequence_Multiply",
396
- utility_code=pysequence_multiply_utility_code),
399
+ ("tuple", "&PyTuple_Type", [make_sequence_multiply_method("PyTuple_Type"),
397
400
  ]),
398
401
 
399
402
  ("list", "&PyList_Type", [BuiltinMethod("insert", "TzO", "r", "PyList_Insert"),
@@ -402,8 +405,7 @@ builtin_types_table = [
402
405
  utility_code=UtilityCode.load("ListAppend", "Optimize.c")),
403
406
  BuiltinMethod("extend", "TO", "r", "__Pyx_PyList_Extend",
404
407
  utility_code=UtilityCode.load("ListExtend", "Optimize.c")),
405
- BuiltinMethod("__mul__", "Tz", "T", "__Pyx_PySequence_Multiply",
406
- utility_code=pysequence_multiply_utility_code),
408
+ make_sequence_multiply_method("PyList_Type"),
407
409
  ]),
408
410
 
409
411
  ("dict", "&PyDict_Type", [BuiltinMethod("__contains__", "TO", "b", "PyDict_Contains"),
@@ -1813,7 +1813,7 @@ class BytesNode(ConstNode):
1813
1813
  node.type = dst_type
1814
1814
  return node
1815
1815
  elif dst_type in (PyrexTypes.c_uchar_ptr_type, PyrexTypes.c_const_uchar_ptr_type, PyrexTypes.c_void_ptr_type):
1816
- node.type = (PyrexTypes.c_const_char_ptr_type if dst_type == PyrexTypes.c_const_uchar_ptr_type
1816
+ node.type = (PyrexTypes.c_const_char_ptr_type if dst_type.base_type.is_const
1817
1817
  else PyrexTypes.c_char_ptr_type)
1818
1818
  return CastNode(node, dst_type)
1819
1819
  elif dst_type.assignable_from(PyrexTypes.c_char_ptr_type):
@@ -1830,7 +1830,7 @@ class BytesNode(ConstNode):
1830
1830
  def generate_evaluation_code(self, code):
1831
1831
  if self.type.is_pyobject:
1832
1832
  result = code.get_py_string_const(self.value)
1833
- elif self.type.is_const:
1833
+ elif (self.type.is_ptr or self.type.is_array) and self.type.base_type.is_const:
1834
1834
  result = code.get_string_const(self.value)
1835
1835
  else:
1836
1836
  # not const => use plain C string literal and cast to mutable type
@@ -1900,6 +1900,9 @@ class UnicodeNode(ConstNode):
1900
1900
  dst_type.is_ptr and dst_type.base_type.is_void):
1901
1901
  # Allow using '-3' enforced unicode literals in a C char/char*/void* context.
1902
1902
  if self.bytes_value is not None:
1903
+ if dst_type.is_array:
1904
+ # Prevent an invalid assignment from a C string array and use a pointer instead.
1905
+ dst_type = dst_type.element_ptr_type()
1903
1906
  return BytesNode(self.pos, value=self.bytes_value).coerce_to(dst_type, env)
1904
1907
  if env.directives['c_string_encoding']:
1905
1908
  try:
@@ -9052,11 +9055,14 @@ class TupleNode(SequenceNode):
9052
9055
  return self.result_code
9053
9056
 
9054
9057
  def calculate_constant_result(self):
9058
+ if self.mult_factor:
9059
+ raise ValueError() # may exceed the compile time memory
9055
9060
  self.constant_result = tuple([
9056
9061
  arg.constant_result for arg in self.args])
9057
9062
 
9058
9063
  def compile_time_value(self, denv):
9059
9064
  values = self.compile_time_value_list(denv)
9065
+ assert self.mult_factor is None, self.mult_factor # set only after parsing
9060
9066
  try:
9061
9067
  return tuple(values)
9062
9068
  except Exception as e:
Cython/Compiler/Nodes.py CHANGED
@@ -766,6 +766,7 @@ class CFuncDeclaratorNode(CDeclaratorNode):
766
766
  level=2)
767
767
 
768
768
  if self.exception_check == '+':
769
+ self.cpp_check(env)
769
770
  env.add_include_file('ios') # for std::ios_base::failure
770
771
  env.add_include_file('new') # for std::bad_alloc
771
772
  env.add_include_file('stdexcept')
@@ -2019,6 +2020,10 @@ class FuncDefNode(StatNode, BlockNode):
2019
2020
  outer_scope=genv,
2020
2021
  parent_scope=env,
2021
2022
  scope_name=self.entry.cname)
2023
+ # FIXME: why do GeneratorDefNode and GeneratorBodyDefNode use the same scope?
2024
+ # This should hit the GeneratorBodyDefNode, not the GeneratorDefNode.
2025
+ if self.is_generator_body or self.is_generator:
2026
+ lenv.is_generator_scope = True
2022
2027
  else:
2023
2028
  lenv = LocalScope(name=self.entry.name,
2024
2029
  outer_scope=genv,
@@ -3250,7 +3255,7 @@ class DefNode(FuncDefNode):
3250
3255
  from .ExprNodes import ConstNode
3251
3256
  exception_value = ConstNode.for_type(
3252
3257
  self.pos, value=str(cfunc_type.exception_value), type=cfunc_type.return_type,
3253
- constant_result=cfunc_type.exception_value)
3258
+ constant_result=cfunc_type.exception_value.python_value)
3254
3259
  declarator = CFuncDeclaratorNode(self.pos,
3255
3260
  base=CNameDeclaratorNode(self.pos, name=self.name, cname=None),
3256
3261
  args=self.args,
@@ -8992,7 +8997,6 @@ class CriticalSectionStatNode(TryFinallyStatNode):
8992
8997
  child_attrs = ["args"] + TryFinallyStatNode.child_attrs
8993
8998
 
8994
8999
  var_type = None
8995
- state_temp = None
8996
9000
  preserve_exception = False
8997
9001
  is_pymutex_critical_section = False
8998
9002
 
@@ -9002,8 +9006,6 @@ class CriticalSectionStatNode(TryFinallyStatNode):
9002
9006
  else:
9003
9007
  self.var_type = PyrexTypes.c_py_critical_section_type
9004
9008
 
9005
- self.create_state_temp_if_needed(pos, body)
9006
-
9007
9009
  self.length_tag = str(len(args)) if len(args) > 1 else ""
9008
9010
 
9009
9011
  super().__init__(
@@ -9011,19 +9013,16 @@ class CriticalSectionStatNode(TryFinallyStatNode):
9011
9013
  args=args,
9012
9014
  body=body,
9013
9015
  finally_clause=CriticalSectionExitNode(
9014
- pos, length_tag=self.length_tag, critical_section=self),
9016
+ pos, length_tag=self.length_tag),
9015
9017
  **kwds,
9016
9018
  )
9017
9019
 
9018
- def create_state_temp_if_needed(self, pos, body):
9020
+ def check_for_yields(self):
9019
9021
  from .ParseTreeTransforms import YieldNodeCollector
9020
9022
  collector = YieldNodeCollector()
9021
- collector.visitchildren(body)
9022
- if not collector.yields:
9023
- return
9024
-
9025
- from . import ExprNodes
9026
- self.state_temp = ExprNodes.TempNode(pos, self.var_type)
9023
+ collector.visitchildren(self.body)
9024
+ if collector.yields:
9025
+ error(self.pos, f"Cannot yield while in a cython.critical_section.")
9027
9026
 
9028
9027
  def analyse_declarations(self, env):
9029
9028
  for arg in self.args:
@@ -9031,6 +9030,7 @@ class CriticalSectionStatNode(TryFinallyStatNode):
9031
9030
  return super().analyse_declarations(env)
9032
9031
 
9033
9032
  def analyse_expressions(self, env):
9033
+ self.check_for_yields()
9034
9034
  cy_pymutex_type = PyrexTypes.get_cy_pymutex_type()
9035
9035
  mutex_count = 0
9036
9036
  for i, arg in enumerate(self.args):
@@ -9074,12 +9074,8 @@ class CriticalSectionStatNode(TryFinallyStatNode):
9074
9074
 
9075
9075
  code.mark_pos(self.pos)
9076
9076
  code.begin_block()
9077
- if self.state_temp:
9078
- self.state_temp.allocate(code)
9079
- variable = self.state_temp.result()
9080
- else:
9081
- variable = Naming.critical_section_variable
9082
- code.putln(f"{self.var_type.declaration_code(variable)};")
9077
+ variable = Naming.critical_section_variable
9078
+ code.putln(f"{self.var_type.declaration_code(variable)};")
9083
9079
 
9084
9080
  for arg in self.args:
9085
9081
  arg.generate_evaluation_code(code)
@@ -9097,16 +9093,13 @@ class CriticalSectionStatNode(TryFinallyStatNode):
9097
9093
  arg.generate_disposal_code(code)
9098
9094
  arg.free_temps(code)
9099
9095
 
9100
- if self.state_temp:
9101
- self.state_temp.release(code)
9102
-
9103
9096
  code.end_block()
9104
9097
 
9105
9098
  def nogil_check(self, env):
9106
9099
  error(self.pos, "Critical sections require the GIL")
9107
9100
 
9108
9101
 
9109
- class CriticalSectionExitNode(StatNode, CopyWithUpTreeRefsMixin):
9102
+ class CriticalSectionExitNode(StatNode):
9110
9103
  """
9111
9104
  critical_section - the CriticalSectionStatNode that owns this
9112
9105
  """
@@ -9117,13 +9110,8 @@ class CriticalSectionExitNode(StatNode, CopyWithUpTreeRefsMixin):
9117
9110
  return self
9118
9111
 
9119
9112
  def generate_execution_code(self, code):
9120
- if self.critical_section.state_temp:
9121
- variable_name = self.critical_section.state_temp.result()
9122
- else:
9123
- variable_name = Naming.critical_section_variable
9124
-
9125
9113
  code.putln(
9126
- f"__Pyx_PyCriticalSection{self.length_tag}_End(&{variable_name});"
9114
+ f"__Pyx_PyCriticalSection{self.length_tag}_End(&{ Naming.critical_section_variable});"
9127
9115
  )
9128
9116
 
9129
9117
  class CythonLockStatNode(TryFinallyStatNode):
@@ -9162,29 +9150,12 @@ class CythonLockStatNode(TryFinallyStatNode):
9162
9150
  result.finally_except_clause = result.finally_clause
9163
9151
  return result
9164
9152
 
9165
- def check_for_yields(self):
9166
- from .ParseTreeTransforms import YieldNodeCollector
9167
- collector = YieldNodeCollector()
9168
- collector.visitchildren(self.body)
9169
- if collector.yields:
9170
- # DW - I've disallowed this because it seems like a deadlock disaster waiting to happen.
9171
- # I'm sure it's technically possible, and we can revise it if people have legitimate
9172
- # uses.
9173
- typename = self.arg.type.empty_declaration_code(pyrex=True).strip()
9174
- error(
9175
- self.pos,
9176
- f"Cannot use a 'with' statement with a '{typename}' in a generator. "
9177
- "If you really want to do this (and you are confident that there are no deadlocks) "
9178
- "then use try-finally."
9179
- )
9180
-
9181
9153
  def analyse_declarations(self, env):
9182
9154
  self.arg.analyse_declarations(env)
9183
9155
  return super().analyse_declarations(env)
9184
9156
 
9185
9157
  def analyse_expressions(self, env):
9186
9158
  self.arg = self.arg.analyse_expressions(env)
9187
- self.check_for_yields()
9188
9159
  body = self.body
9189
9160
  if isinstance(body, StatListNode) and len(body.stats) >= 1:
9190
9161
  body = body.stats[0]
@@ -219,13 +219,14 @@ class IterationTransform(Visitor.EnvTransform):
219
219
  return self._optimise_for_loop(node, node.iterator.sequence)
220
220
 
221
221
  def _optimise_for_loop(self, node, iterable, reversed=False):
222
+ iter_type = iterable.type
222
223
  annotation_type = None
223
224
  if (iterable.is_name or iterable.is_attribute) and iterable.entry and iterable.entry.annotation:
224
225
  annotation = iterable.entry.annotation.expr
225
226
  if annotation.is_subscript:
226
227
  annotation = annotation.base # container base type
227
228
 
228
- if Builtin.dict_type in (iterable.type, annotation_type):
229
+ if Builtin.dict_type in (iter_type, annotation_type):
229
230
  # like iterating over dict.keys()
230
231
  if reversed:
231
232
  # CPython raises an error here: not a sequence
@@ -233,29 +234,31 @@ class IterationTransform(Visitor.EnvTransform):
233
234
  return self._transform_dict_iteration(
234
235
  node, dict_obj=iterable, method=None, keys=True, values=False)
235
236
 
236
- if (Builtin.set_type in (iterable.type, annotation_type) or
237
- Builtin.frozenset_type in (iterable.type, annotation_type)):
237
+ if (Builtin.set_type in (iter_type, annotation_type) or
238
+ Builtin.frozenset_type in (iter_type, annotation_type)):
238
239
  if reversed:
239
240
  # CPython raises an error here: not a sequence
240
241
  return node
241
242
  return self._transform_set_iteration(node, iterable)
242
243
 
244
+ env = self.current_env()
245
+
243
246
  # C array (slice) iteration?
244
- if iterable.type.is_ptr or iterable.type.is_array:
247
+ if iter_type.is_ptr or iter_type.is_array:
245
248
  return self._transform_carray_iteration(node, iterable, reversed=reversed)
246
- if iterable.is_sequence_constructor:
249
+ if iterable.is_sequence_constructor and not env.is_generator_scope:
247
250
  # Convert iteration over homogeneous sequences of C types into array iteration.
248
- env = self.current_env()
251
+ # FIXME: using ListNode in this way currently generates invalid C code inside of generator loops.
249
252
  item_type = ExprNodes.infer_sequence_item_type(
250
- env, iterable, seq_type=iterable.type)
253
+ env, iterable, seq_type=iter_type)
251
254
  if item_type and not item_type.is_pyobject and not any(item.is_starred for item in iterable.args):
252
255
  iterable = ExprNodes.ListNode(iterable.pos, args=iterable.args).analyse_types(env).coerce_to(
253
256
  PyrexTypes.c_array_type(item_type, len(iterable.args)), env)
254
257
  return self._transform_carray_iteration(node, iterable, reversed=reversed)
255
- if iterable.is_string_literal:
258
+ if iterable.is_string_literal and not env.is_generator_scope:
256
259
  # Iterate over C array of single character values.
257
- env = self.current_env()
258
- if iterable.type is Builtin.unicode_type:
260
+ # FIXME: using ListNode in this way currently generates invalid C code inside of generator loops.
261
+ if iter_type is Builtin.unicode_type:
259
262
  item_type = PyrexTypes.c_py_ucs4_type
260
263
  items = map(ord, iterable.value)
261
264
  else:
@@ -266,13 +269,16 @@ class IterationTransform(Visitor.EnvTransform):
266
269
  iterable = ExprNodes.ListNode(iterable.pos, args=[as_int_node(ch)for ch in items])
267
270
  iterable = iterable.analyse_types(env).coerce_to(PyrexTypes.c_array_type(item_type, len(iterable.args)), env)
268
271
  return self._transform_carray_iteration(node, iterable, reversed=reversed)
269
- if iterable.type is Builtin.bytes_type:
270
- return self._transform_bytes_iteration(node, iterable, reversed=reversed)
271
- if iterable.type is Builtin.unicode_type:
272
+ if iter_type is Builtin.bytes_type:
273
+ if env.is_generator_scope:
274
+ return self._transform_indexable_iteration(node, iterable, is_mutable=False, reversed=reversed)
275
+ else:
276
+ return self._transform_bytes_iteration(node, iterable, reversed=reversed)
277
+ if iter_type is Builtin.unicode_type:
272
278
  return self._transform_unicode_iteration(node, iterable, reversed=reversed)
273
279
  # in principle _transform_indexable_iteration would work on most of the above, and
274
280
  # also tuple and list. However, it probably isn't quite as optimized
275
- if iterable.type is Builtin.bytearray_type:
281
+ if iter_type is Builtin.bytearray_type:
276
282
  return self._transform_indexable_iteration(node, iterable, is_mutable=True, reversed=reversed)
277
283
  if isinstance(iterable, ExprNodes.CoerceToPyTypeNode) and iterable.arg.type.is_memoryviewslice:
278
284
  return self._transform_indexable_iteration(node, iterable.arg, is_mutable=False, reversed=reversed)
@@ -601,7 +607,8 @@ class IterationTransform(Visitor.EnvTransform):
601
607
  exception_value=-1)
602
608
 
603
609
  def _transform_unicode_iteration(self, node, slice_node, reversed=False):
604
- if slice_node.is_literal:
610
+ env = self.current_env()
611
+ if slice_node.is_literal and not env.is_generator_scope:
605
612
  # try to reduce to byte iteration for plain Latin-1 strings
606
613
  try:
607
614
  bytes_value = bytes_literal(slice_node.value.encode('latin1'), 'iso8859-1')
@@ -614,7 +621,7 @@ class IterationTransform(Visitor.EnvTransform):
614
621
  slice_node.pos, value=bytes_value,
615
622
  constant_result=bytes_value,
616
623
  type=PyrexTypes.c_const_char_ptr_type).coerce_to(
617
- PyrexTypes.c_const_uchar_ptr_type, self.current_env()),
624
+ PyrexTypes.c_const_uchar_ptr_type, env),
618
625
  start=None,
619
626
  stop=ExprNodes.IntNode.for_size(slice_node.pos, len(bytes_value)),
620
627
  type=Builtin.unicode_type, # hint for Python conversion
@@ -646,8 +653,7 @@ class IterationTransform(Visitor.EnvTransform):
646
653
  is_temp = False,
647
654
  )
648
655
  if target_value.type != node.target.type:
649
- target_value = target_value.coerce_to(node.target.type,
650
- self.current_env())
656
+ target_value = target_value.coerce_to(node.target.type, env)
651
657
  target_assign = Nodes.SingleAssignmentNode(
652
658
  pos = node.target.pos,
653
659
  lhs = node.target,
Cython/Compiler/Symtab.py CHANGED
@@ -364,6 +364,7 @@ class Scope:
364
364
  # is_c_class_scope boolean Is an extension type scope
365
365
  # is_local_scope boolean Is a local (i.e. function/method/generator) scope
366
366
  # is_closure_scope boolean Is a closure scope
367
+ # is_generator_scope boolean Is a closure scope of a generator
367
368
  # is_generator_expression_scope boolean A subset of closure scope used for generator expressions
368
369
  # is_passthrough boolean Outer scope is passed directly
369
370
  # is_cpp_class_scope boolean Is a C++ class scope
@@ -386,6 +387,7 @@ class Scope:
386
387
  is_c_class_scope = 0
387
388
  is_closure_scope = 0
388
389
  is_local_scope = False
390
+ is_generator_scope = False
389
391
  is_generator_expression_scope = 0
390
392
  is_comprehension_scope = 0
391
393
  is_passthrough = 0
@@ -2254,6 +2256,7 @@ class ClosureScope(LocalScope):
2254
2256
 
2255
2257
 
2256
2258
  class GeneratorExpressionScope(ClosureScope):
2259
+ is_generator_scope = True
2257
2260
  is_generator_expression_scope = True
2258
2261
 
2259
2262
  def declare_assignment_expression_target(self, name, type, pos):
@@ -549,7 +549,7 @@ class MethodDispatcherTransform(EnvTransform):
549
549
  if Future.division in self.current_env().context.future_directives:
550
550
  special_method_name = '__truediv__'
551
551
  obj_type = operand1.type
552
- if obj_type.is_builtin_type:
552
+ if obj_type.is_builtin_type and not obj_type.is_exception_type:
553
553
  type_name = obj_type.name
554
554
  else:
555
555
  type_name = "object" # safety measure
@@ -564,7 +564,7 @@ class MethodDispatcherTransform(EnvTransform):
564
564
  if special_method_name:
565
565
  operand = node.operand
566
566
  obj_type = operand.type
567
- if obj_type.is_builtin_type:
567
+ if obj_type.is_builtin_type and not obj_type.is_exception_type:
568
568
  type_name = obj_type.name
569
569
  else:
570
570
  type_name = "object" # safety measure
@@ -619,7 +619,8 @@ class MethodDispatcherTransform(EnvTransform):
619
619
  # => see if it's usable instead
620
620
  return self._delegate_to_assigned_value(
621
621
  node, function, arg_list, kwargs)
622
- if arg_list and entry.is_cmethod and entry.scope and entry.scope.parent_type.is_builtin_type:
622
+ if (arg_list and entry.is_cmethod and entry.scope and
623
+ entry.scope.parent_type.is_builtin_type and not entry.scope.parent_type.is_exception_type):
623
624
  if entry.scope.parent_type is arg_list[0].type:
624
625
  # Optimised (unbound) method of a builtin type => try to "de-optimise".
625
626
  return self._dispatch_to_method_handler(
@@ -650,7 +651,8 @@ class MethodDispatcherTransform(EnvTransform):
650
651
  return node
651
652
  obj_type = self_arg.type
652
653
  is_unbound_method = False
653
- if obj_type.is_builtin_type:
654
+ # Exceptions aren't necessarily exact types so could have unknown methods
655
+ if obj_type.is_builtin_type and not obj_type.is_exception_type:
654
656
  if obj_type is Builtin.type_type and self_arg.is_name and arg_list and arg_list[0].type.is_pyobject:
655
657
  # calling an unbound method like 'list.append(L,x)'
656
658
  # (ignoring 'type.mro()' here ...)
@@ -3,11 +3,97 @@ from .pyport cimport uint64_t
3
3
 
4
4
  cdef extern from *:
5
5
  # On Python 2, PyDict_GetItemWithError is called _PyDict_GetItemWithError
6
+ # Also backport PyDict_GetItemStringRef and PyDict_SetDefaultRef
6
7
  """
7
8
  #if PY_MAJOR_VERSION <= 2
8
9
  #define PyDict_GetItemWithError _PyDict_GetItemWithError
9
10
  #endif
11
+
12
+ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
13
+ static CYTHON_INLINE int
14
+ __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result)
15
+ {
16
+ int res;
17
+ PyObject *key_obj = PyUnicode_FromString(key);
18
+ if (key_obj == NULL) {
19
+ *result = NULL;
20
+ return -1;
21
+ }
22
+ res = __Pyx_PyDict_GetItemRef(mp, key_obj, result);
23
+ Py_DECREF(key_obj);
24
+ return res;
25
+ }
26
+ #else
27
+ #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef
28
+ #endif
29
+ #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000)
30
+ static CYTHON_INLINE int
31
+ __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
32
+ PyObject **result)
33
+ {
34
+ PyObject *value;
35
+ if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) {
36
+ // get error
37
+ if (result) {
38
+ *result = NULL;
39
+ }
40
+ return -1;
41
+ }
42
+ if (value != NULL) {
43
+ // present
44
+ if (result) {
45
+ *result = value;
46
+ }
47
+ else {
48
+ Py_DECREF(value);
49
+ }
50
+ return 1;
51
+ }
52
+
53
+ // missing: set the item
54
+ if (PyDict_SetItem(d, key, default_value) < 0) {
55
+ // set error
56
+ if (result) {
57
+ *result = NULL;
58
+ }
59
+ return -1;
60
+ }
61
+ if (result) {
62
+ Py_INCREF(default_value);
63
+ *result = default_value;
64
+ }
65
+ return 0;
66
+ }
67
+ #else
68
+ #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef
69
+ #endif
10
70
  """
71
+ int PyDict_GetItemRef "__Pyx_PyDict_GetItemRef" (object p, object key, PyObject* *result) except -1
72
+ # Return a new strong reference to the object from dictionary p
73
+ # which has a key key:
74
+ # - If the key is present, set *result to a new strong reference to
75
+ # the value and return 1.
76
+ # - If the key is missing, set *result to NULL and return 0.
77
+ # - On error, raise an exception and return -1.
78
+
79
+ int PyDict_GetItemStringRef "__Pyx_CAPI_PyDict_GetItemStringRef" (object p, const char *key, PyObject* *result) except -1
80
+ # Similar to PyDict_GetItemRef(), but key is specified as a const char*
81
+ # UTF-8 encoded bytes string, rather than a PyObject*.
82
+
83
+ int PyDict_SetDefaultRef "__Pyx_CAPI_PyDict_SetDefaultRef" (object p, object key, object default_value, PyObject* *result) except -1
84
+ # Inserts default_value into the dictionary p with a key of key if the
85
+ # key is not already present in the dictionary. If result is not NULL,
86
+ # then *result is set to a strong reference to either default_value,
87
+ # if the key was not present, or the existing value, if key was already
88
+ # present in the dictionary. Returns 1 if the key was present and
89
+ # default_value was not inserted, or 0 if the key was not present and
90
+ # default_value was inserted. On failure, returns -1, sets an exception,
91
+ # and sets *result to NULL.
92
+ # For clarity: if you have a strong reference to default_value before
93
+ # calling this function, then after it returns, you hold a strong
94
+ # reference to both default_value and *result (if it’s not NULL). These
95
+ # may refer to the same object: in that case you hold two separate
96
+ # references to it.
11
97
 
12
98
  cdef extern from "Python.h":
13
99
  ############################################################################
@@ -139,7 +139,7 @@ cdef extern from *:
139
139
  return 1;
140
140
  #elif PY_VERSION_HEX >= 0x030d0000
141
141
  return PyThreadState_GetUnchecked() != NULL;
142
- #elif PY_VERSION_HEX >= 0x030b0000
142
+ #elif PY_VERSION_HEX >= 0x030C0000
143
143
  return _PyThreadState_UncheckedGet() != NULL;
144
144
  #else
145
145
  return PyGILState_Check();
@@ -166,7 +166,7 @@ cdef extern from *:
166
166
  return lock_result;
167
167
  }
168
168
 
169
- static CYTHON_UNUSED int __pyx_py_safe_mtx_lock(mtx_t* mutex) {
169
+ CYTHON_UNUSED static int __pyx_py_safe_mtx_lock(mtx_t* mutex) {
170
170
  PyGILState_STATE gil_state = __pyx_libc_threads_limited_api_ensure_gil();
171
171
  if (!__pyx_libc_threads_has_gil())
172
172
  return mtx_lock(mutex); /* No GIL, no problem */
@@ -175,7 +175,7 @@ cdef extern from *:
175
175
  return result;
176
176
  }
177
177
 
178
- static CYTHON_UNUSED int __pyx_py_safe_cnd_wait( cnd_t* cond, mtx_t* mutex) {
178
+ CYTHON_UNUSED static int __pyx_py_safe_cnd_wait( cnd_t* cond, mtx_t* mutex) {
179
179
  __Pyx_UnknownThreadState thread_state = __Pyx_SaveUnknownThread();
180
180
  int result = cnd_wait(cond, mutex);
181
181
  if (__Pyx_UnknownThreadStateMayHaveHadGil(thread_state)) {
@@ -194,7 +194,7 @@ cdef extern from *:
194
194
  }
195
195
  }
196
196
 
197
- static CYTHON_UNUSED int __pyx_py_safe_cnd_timedwait(cnd_t* cond, mtx_t* mutex, const struct timespec* time_point) {
197
+ CYTHON_UNUSED static int __pyx_py_safe_cnd_timedwait(cnd_t* cond, mtx_t* mutex, const struct timespec* time_point) {
198
198
  __Pyx_UnknownThreadState thread_state = __Pyx_SaveUnknownThread();
199
199
  int result = cnd_timedwait(cond, mutex, time_point);
200
200
  if (__Pyx_UnknownThreadStateMayHaveHadGil(thread_state)) {
@@ -213,7 +213,7 @@ cdef extern from *:
213
213
  }
214
214
  }
215
215
 
216
- static CYTHON_UNUSED void __pyx_libc_threads_py_safe_call_once(once_flag* flag, void (*func)(void)) {
216
+ CYTHON_UNUSED static void __pyx_libc_threads_py_safe_call_once(once_flag* flag, void (*func)(void)) {
217
217
  __Pyx_UnknownThreadState thread_state = __Pyx_SaveUnknownThread();
218
218
  call_once(flag, func);
219
219
  __Pyx_RestoreUnknownThread(thread_state);
@@ -194,7 +194,7 @@ cdef extern from *:
194
194
  return 1;
195
195
  #elif PY_VERSION_HEX >= 0x030d0000
196
196
  return PyThreadState_GetUnchecked() != NULL;
197
- #elif PY_VERSION_HEX >= 0x030b0000
197
+ #elif PY_VERSION_HEX >= 0x030C0000
198
198
  return _PyThreadState_UncheckedGet() != NULL;
199
199
  #else
200
200
  return PyGILState_Check();
Cython/Shadow.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # cython.* namespace for pure mode.
2
2
 
3
3
  # Possible version formats: "3.1.0", "3.1.0a1", "3.1.0a1.dev0"
4
- __version__ = "3.2.1"
4
+ __version__ = "3.2.2"
5
5
 
6
6
 
7
7
  # BEGIN shameless copy from Cython/minivect/minitypes.py
Cython/Utility/Builtins.c CHANGED
@@ -303,7 +303,7 @@ static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
303
303
 
304
304
  //////////////////// divmod_int.proto //////////////////
305
305
 
306
- const {{RETURN_TYPE}} __Pyx_divmod_ERROR_VALUE_{{CFUNC_SUFFIX}} = {-1, -1};
306
+ static const {{RETURN_TYPE}} __Pyx_divmod_ERROR_VALUE_{{CFUNC_SUFFIX}} = {-1, -1};
307
307
 
308
308
  static CYTHON_INLINE {{RETURN_TYPE}} __Pyx_divmod_{{CFUNC_SUFFIX}}({{TYPE}} a, {{TYPE}} b); /*proto*/
309
309
 
@@ -343,7 +343,7 @@ static CYTHON_INLINE {{RETURN_TYPE}} __Pyx_divmod_{{CFUNC_SUFFIX}}({{TYPE}} a, {
343
343
 
344
344
  //////////////////// divmod_float.proto //////////////////
345
345
 
346
- const {{RETURN_TYPE}} __Pyx_divmod_ERROR_VALUE_{{CFUNC_SUFFIX}} = {-1.0, -1.0};
346
+ static const {{RETURN_TYPE}} __Pyx_divmod_ERROR_VALUE_{{CFUNC_SUFFIX}} = {-1.0, -1.0};
347
347
 
348
348
  static CYTHON_INLINE {{RETURN_TYPE}} __Pyx_divmod_{{CFUNC_SUFFIX}}({{TYPE}} a, {{TYPE}} b); /*proto*/
349
349
 
Cython/Utility/Embed.c CHANGED
@@ -89,9 +89,9 @@ int
89
89
  }
90
90
  else {
91
91
  int i, res;
92
- wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc);
92
+ wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*) * (size_t) argc);
93
93
  /* We need a second copy, as Python might modify the first one. */
94
- wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc);
94
+ wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*) * (size_t) argc);
95
95
  char *oldloc = strdup(setlocale(LC_ALL, NULL));
96
96
  if (!argv_copy || !argv_copy2 || !oldloc) {
97
97
  fprintf(stderr, "out of memory\\n");
@@ -18,6 +18,11 @@ if (likely(__Pyx_init_assertions_enabled() == 0)); else
18
18
  static int __pyx_assertions_enabled_flag;
19
19
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
20
20
 
21
+ #if __clang__ || __GNUC__
22
+ // "Assertions enabled" may be written multiple times when using subinterpreters.
23
+ // However, it should always be written to the same value to isn't a "real" race.
24
+ __attribute__((no_sanitize("thread")))
25
+ #endif
21
26
  static int __Pyx_init_assertions_enabled(void) {
22
27
  PyObject *builtins, *debug, *debug_str;
23
28
  int flag;
@@ -2968,10 +2968,15 @@ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_le
2968
2968
  /////////////// PySequenceMultiply.proto ///////////////
2969
2969
 
2970
2970
  #define __Pyx_PySequence_Multiply_Left(mul, seq) __Pyx_PySequence_Multiply(seq, mul)
2971
+ #if !CYTHON_USE_TYPE_SLOTS
2972
+ #define __Pyx_PySequence_Multiply PySequence_Repeat
2973
+ #else
2971
2974
  static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
2975
+ #endif
2972
2976
 
2973
2977
  /////////////// PySequenceMultiply ///////////////
2974
2978
 
2979
+ #if CYTHON_USE_TYPE_SLOTS
2975
2980
  static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
2976
2981
  PyObject *result, *pymul = PyLong_FromSsize_t(mul);
2977
2982
  if (unlikely(!pymul))
@@ -2982,17 +2987,32 @@ static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul
2982
2987
  }
2983
2988
 
2984
2989
  static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
2985
- #if CYTHON_USE_TYPE_SLOTS
2986
2990
  PyTypeObject *type = Py_TYPE(seq);
2987
2991
  if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
2988
2992
  return type->tp_as_sequence->sq_repeat(seq, mul);
2989
- } else
2990
- #endif
2991
- {
2993
+ } else {
2992
2994
  return __Pyx_PySequence_Multiply_Generic(seq, mul);
2993
2995
  }
2994
2996
  }
2997
+ #endif
2998
+
2999
+ /////////////// BuiltinSequenceMultiply.proto ///////////////
3000
+
3001
+ static CYTHON_INLINE PyObject* __Pyx_{{typeobj}}_Multiply(PyObject *seq, Py_ssize_t mul);
2995
3002
 
3003
+ /////////////// BuiltinSequenceMultiply ////////////////
3004
+
3005
+ static CYTHON_INLINE PyObject* __Pyx_{{typeobj}}_Multiply(PyObject *seq, Py_ssize_t mul) {
3006
+ // It's important that this function always calls the exact typeobj slot, because it may
3007
+ // be used with a subclass deliberately to access the base class slot.
3008
+ ssizeargfunc slot = __Pyx_PyType_TryGetSubSlot(&{{typeobj}}, tp_as_sequence, sq_repeat, ssizeargfunc);
3009
+ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
3010
+ if (unlikely(!slot)) {
3011
+ return PyObject_CallMethod((PyObject*)&{{typeobj}}, "__mul__", "On", seq, mul);
3012
+ }
3013
+ #endif
3014
+ return slot(seq, mul);
3015
+ }
2996
3016
 
2997
3017
  /////////////// FormatTypeName.proto ///////////////
2998
3018
 
Cython/Utility/Optimize.c CHANGED
@@ -1191,6 +1191,13 @@ static {{c_ret_type}} __Pyx_Fallback_{{cfunc_name}}(PyObject *op1, PyObject *op2
1191
1191
  }
1192
1192
 
1193
1193
  #if CYTHON_USE_PYLONG_INTERNALS
1194
+ {{if op == 'Lshift'}}
1195
+ #if __clang__ || __GNUC__
1196
+ // left-shift by more than the width of the number is undefined behaviour.
1197
+ // We do check it (and test that it gives the right answer though).
1198
+ __attribute__((no_sanitize("shift")))
1199
+ #endif
1200
+ {{endif}}
1194
1201
  static {{c_ret_type}} __Pyx_Unpacked_{{cfunc_name}}(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
1195
1202
  CYTHON_MAYBE_UNUSED_VAR(inplace);
1196
1203
  CYTHON_UNUSED_VAR(zerodivision_check);
@@ -300,7 +300,7 @@ static void __Pyx__Locks_PyThreadTypeLock_Lock(__Pyx_Locks_PyThreadTypeLock lock
300
300
  PyGILState_Release(state);
301
301
  return;
302
302
  }
303
- #elif CYTHON_COMPILING_IN_PYPY || PY_VERSION_HEX < 0x030B0000
303
+ #elif CYTHON_COMPILING_IN_PYPY || PY_VERSION_HEX < 0x030C0000
304
304
  has_gil = PyGILState_Check();
305
305
  #elif PY_VERSION_HEX < 0x030d0000
306
306
  has_gil = _PyThreadState_UncheckedGet() != NULL;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Cython
3
- Version: 3.2.1
3
+ Version: 3.2.2
4
4
  Summary: The Cython compiler for writing C extensions in the Python language.
5
5
  Home-page: https://cython.org/
6
6
  Author: Robert Bradshaw, Stefan Behnel, David Woods, Greg Ewing, et al.
@@ -65,79 +65,39 @@ to install an uncompiled (slower) version of Cython with::
65
65
 
66
66
  .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
67
67
 
68
- 3.2.1 (2025-11-12)
68
+ 3.2.2 (2025-11-30)
69
69
  ==================
70
70
 
71
71
  Features added
72
72
  --------------
73
73
 
74
- * Cython now leaves markers about its utility code dependencies in the generated C code
75
- to help debugging "unused function" C compiler warnings.
76
- (Github issue https://github.com/cython/cython/issues/7294)
74
+ * The C-API declarations were updated to include the new ``PyDict_*Ref()`` functions.
75
+ (Github issue https://github.com/cython/cython/issues/7291)
77
76
 
78
77
  Bugs fixed
79
78
  ----------
80
79
 
81
- * Relative imports could fail if the shared utility module is used.
82
- This bug was introduces in Cython 3.2.0.
83
- (Github issue https://github.com/cython/cython/issues/7290)
80
+ * Iteration over literal sequences and strings in generators generated invalid C code since 3.2.0.
81
+ This was a regression due to the C array iteration optimisation in https://github.com/cython/cython/issues/6926, which is now
82
+ disabled inside of generators.
83
+ (Github issue https://github.com/cython/cython/issues/7342)
84
84
 
85
- * Under lock congestion, acquiring the GIL could crash in Python 3.11.
86
- This bug was introduces in Cython 3.2.0.
87
- (Github issue https://github.com/cython/cython/issues/7312)
88
-
89
- * Using the shared utility module left an unused C function in user modules with memoryviews.
90
- To make debugging this kind of issue easier, Cython now leaves "used by …" markers in the
91
- generated C files that indicate why a specific piece of utility code was included.
92
- This bug was introduces in Cython 3.2.0.
93
- (Github issue https://github.com/cython/cython/issues/7293)
94
-
95
- * Code using the pre-import scope failed with an undefined name.
96
- This bug was introduces in Cython 3.2.0.
97
- (Github issue https://github.com/cython/cython/issues/7304)
98
-
99
- * Includes all fixes as of Cython 3.1.7.
100
-
101
- 3.1.7 (2025-11-12):
102
-
103
- * Unicode characters formatted from C integers with padding, as in ``f"{value:XXc}"``,
104
- could result in invalid Python string objects since Cython 3.1.0.
105
- Also, lone surrogates failed to format in this way.
106
- (Github issue https://github.com/cython/cython/issues/7298)
107
-
108
- * Assigning nested structs from a list of structs (item by item) could crash Cython.
109
- (Github issue https://github.com/cython/cython/issues/7308)
85
+ * Calling special methods of known exception types failed with an ``AttributeError``.
86
+ (Github issue https://github.com/cython/cython/issues/7342)
110
87
 
111
- * Cython incorrectly called ``PyList_GetItemRef()`` in PyPy and GraalPython before Py3.13.
112
- (Github issue https://github.com/cython/cython/issues/7269)
88
+ * Calling the unbound ``__mul__`` special method of builtin collections with subtypes failed.
89
+ (Github issue https://github.com/cython/cython/issues/7340)
113
90
 
114
- * Trying to instantiate internal types used by Cython is now prohibited.
115
- (Github issue https://github.com/cython/cython/issues/7263)
91
+ * C string literals could generate invalid "const to non-const" casts in the C code.
92
+ (Github issue https://github.com/cython/cython/issues/7346)
116
93
 
117
- 3.1.6 (2025-10-23):
94
+ * ``yield`` is no longer allowed inside of a ``cython.critical_section``,
95
+ but *is* now allowed while holding a ``cython.pymutex``.
96
+ (Github issue https://github.com/cython/cython/issues/7317)
118
97
 
119
- * Unicode characters formatted from C integers with ``f"{value:c}"`` could result in
120
- invalid Python string objects since Cython 3.1.0.
121
- (Github issue https://github.com/cython/cython/issues/7240)
122
-
123
- * ``cythonize`` (program and function) now uses ``concurrent.futures.ProcessPoolExecutor``
124
- instead of ``multiprocessing.Pool`` to fix a hang on build failures in parallel builds.
125
- A possible work-around is to disable parallel builds.
126
- Patch by Sviatoslav Sydorenko. (Github issue https://github.com/cython/cython/issues/7183)
127
-
128
- 3.1.5 (2025-10-20):
129
-
130
- * Conversion from C++ strings longer than ``PY_SSIZE_T_MAX`` did not validate the length.
131
-
132
- * Some non-Limited API code was incorrectly used in generated header files.
133
- (Github issue https://github.com/cython/cython/issues/7157)
134
-
135
- * Optimised unpacking of Python integers in expressions uses a slightly safer scheme.
136
- (Github issue https://github.com/cython/cython/issues/7134)
137
-
138
- * Empty return statements were not always reported when tracing.
139
- (Github issue https://github.com/cython/cython/issues/7022)
98
+ * Under lock congestion, acquiring the GIL could crash in Python 3.11, part 2.
99
+ This bug was introduced in Cython 3.2.0.
100
+ (Github issue https://github.com/cython/cython/issues/7312)
140
101
 
141
- * Value conversion errors when tracing C return statements no longer fail the trace
142
- but fall back to reporting ``None`` returns instead.
143
- (Github issue https://github.com/cython/cython/issues/6503)
102
+ * The new ``py_safe_*`` functions in ``libc.threads`` triggered C compiler warnings.
103
+ (Github issue https://github.com/cython/cython/issues/7356)
@@ -2,7 +2,7 @@ cython.py,sha256=OTJCP0F_fecQWMsGOPJDuFU7brM1ScJAATH6ek98ho4,632
2
2
  Cython/CodeWriter.py,sha256=k1SAPvsjXum7dhX9IjZ3wXuDUOzzFKYEbNZSxMKEwos,24276
3
3
  Cython/Coverage.py,sha256=WGY5BW1nBcJ86f4Lrs6ZZIuFKCdngsEizs4Kor0iRsc,18783
4
4
  Cython/Debugging.py,sha256=vFtJhn7QstMf5gnYru2qHIz5ZjPg1KSlZVGHr-pBCwM,552
5
- Cython/Shadow.py,sha256=aXVdJeJTNMvFYBfGZisA1em00OeAvXyRyLzSF2SZ16k,19632
5
+ Cython/Shadow.py,sha256=HhmXZxYWwK_CprThLjdsHQr4r_5bpNKp7bfWjq6fJK0,19632
6
6
  Cython/Shadow.pyi,sha256=BaaRtWtFlBVM14LOD9ql-9Uw1UDZV3AOT2AWULk1WUw,18597
7
7
  Cython/StringIOTree.py,sha256=8u4R5jhUzqYvSX1w5_RrvxbgUvaMqW8jhQgXcCNKIkE,5570
8
8
  Cython/TestUtils.py,sha256=rph07UD41dNbdOjqQx_vNu2c0b3Ib1UeMxNYao_vxJU,15584
@@ -31,7 +31,7 @@ Cython/Compiler/AnalysedTreeTransforms.py,sha256=f7YtGIZx2TannOY8QMvqv5-8GGVFvol
31
31
  Cython/Compiler/Annotate.py,sha256=yjoXb-y5flOG37Naw_UtkK4HVRKxBIVNC7-x7aa8qnA,13559
32
32
  Cython/Compiler/AutoDocTransforms.py,sha256=eIPOjZ8hLiIr--4a4DGHoy6IcqbmUgwaDuG2LVG5YLA,11974
33
33
  Cython/Compiler/Buffer.py,sha256=NMqvFYIofuS93840lWrNcvDXlBhuXgKLoEuMs0PffLk,26954
34
- Cython/Compiler/Builtin.py,sha256=KTq5PwVqPe9FwNNtOXrZI7dxArjbMuIB7vwg7wcQK08,42742
34
+ Cython/Compiler/Builtin.py,sha256=sfW7MGgRm39TG2QoTF0GPhIVVy_8gW-eylGFaLRiy8I,42433
35
35
  Cython/Compiler/CmdLine.py,sha256=6u--_tFCXMEjDQaqYXbH4AXed5jXcOhBWGefngFB_Aw,13339
36
36
  Cython/Compiler/Code.pxd,sha256=-bYyHehjGEiFoe8bqT-2djaHann3jnU86gVgymoIpL0,3918
37
37
  Cython/Compiler/Code.py,sha256=dBNNyklkMCzaIYIGvjp7yPi48xS87JwRDHT7fHyGTbs,144440
@@ -40,7 +40,7 @@ Cython/Compiler/CythonScope.py,sha256=b_RU0YKr4UYzfrhAJE9xNdYAHi1H44hczsbBA9tiq6
40
40
  Cython/Compiler/Dataclass.py,sha256=NhP7E63rJzLpE98ZVrYCbNt-W0aYLh9r29e6yT0KnCQ,36595
41
41
  Cython/Compiler/DebugFlags.py,sha256=-ht7qWQyoJO6H5o0XJgwVjj5gWayuol-H2HoLqiCXsE,713
42
42
  Cython/Compiler/Errors.py,sha256=_qycMnE9-dH-uh--Wv20jFXlXkRl8UGIAsAdlIig9xM,9160
43
- Cython/Compiler/ExprNodes.py,sha256=0mKQWvz0_6upLxe6dGIwItoZb_nYbbqZe_w1OypGfOk,634967
43
+ Cython/Compiler/ExprNodes.py,sha256=jVQYixwSu_fx5tP7RKiu4RY3WOJzFpkccGvd2VZFT_8,635396
44
44
  Cython/Compiler/FlowControl.pxd,sha256=0wDFfkjWddMSOjs76KQSePJBMS1CQk5RjESRHXRkYww,2499
45
45
  Cython/Compiler/FlowControl.py,sha256=P4L87MdPre8loo2U2-ruXFz3Pz7jkUJEpg10db76_Vg,50821
46
46
  Cython/Compiler/FusedNode.py,sha256=gXGXpM6XPZtVT7fGr5g19Id0flqQf4OrcR5_zn1VP4Y,41407
@@ -53,8 +53,8 @@ Cython/Compiler/MatchCaseNodes.py,sha256=yVGVAsc1yrda1jHTAI7mZ2-SL67tNdcfOn-ugdC
53
53
  Cython/Compiler/MemoryView.py,sha256=pyy1oidHhmYAprfxjhX7fweDXzrxMkEbSICKFm2vd4o,31485
54
54
  Cython/Compiler/ModuleNode.py,sha256=7HAhU4H5VEeZxN42HGlq7dYRGA3faauucz3YsQmyULk,194712
55
55
  Cython/Compiler/Naming.py,sha256=xneFFCsB68xZhghXAxA2GnRrooWMumxss20B1I0avqk,11159
56
- Cython/Compiler/Nodes.py,sha256=Ef-QpICjbff3wb-LEzEfNA69fg4rOlAVSBgDLJYYL6E,455923
57
- Cython/Compiler/Optimize.py,sha256=0pI7dkwJirE2IrlSoLrbbuL9cq1pls5VDoex_5rYTmk,227816
56
+ Cython/Compiler/Nodes.py,sha256=SPMs4eHpOSsUakYl2NtNErXUZ_OwI5DRHcoWz12gRrg,454893
57
+ Cython/Compiler/Optimize.py,sha256=CX-UEAmTqAc4JsMxpRsKPx_7yaaEzwewcxHc7c2Roq0,228209
58
58
  Cython/Compiler/Options.py,sha256=DegABgz_JQbPN_hHfOTxDd3zKHXvqoYedB9jgco4fnk,32062
59
59
  Cython/Compiler/ParseTreeTransforms.pxd,sha256=mkdSaFvc5we32bs0RNFwbODQMsTHIU0jIlpZuFtHnaU,2268
60
60
  Cython/Compiler/ParseTreeTransforms.py,sha256=nL6TdknzbWsFTThUaMJeKcDakIYf7cDFk6vsaWeTFg4,186705
@@ -66,7 +66,7 @@ Cython/Compiler/Pythran.py,sha256=wiRE1buAxQ0NFbxg7DHyyd03I6qgLp-KP_fokAvSii4,78
66
66
  Cython/Compiler/Scanning.pxd,sha256=vcNaZoZdifzj5H_cbFa1eACNNCKko9iwWaOHuWQDfWs,1358
67
67
  Cython/Compiler/Scanning.py,sha256=kZI5h8k3ZoLA_nqCAx3nY2QZljuFi3QwpjZ9N9d6GGc,25212
68
68
  Cython/Compiler/StringEncoding.py,sha256=0o6B-tFxKhUdQ79eJfHZhdLun69qdkVUeznffpBAxtI,8487
69
- Cython/Compiler/Symtab.py,sha256=T05lDEidL_iB5mpb0UXrRN4qfocRUD3CoD1ckT4iAoY,137637
69
+ Cython/Compiler/Symtab.py,sha256=C18rR7_afF4id7vLEqKI4JNyV4G33d5RYWLlEB1LoCg,137775
70
70
  Cython/Compiler/TreeFragment.py,sha256=1AscujwN_mCFeO137PGy1ghCnJ17L9uYoJfqc-7h9VY,9514
71
71
  Cython/Compiler/TreePath.py,sha256=Vht_mzZpptXKJw2t_TM-PBYHtZIXXvZFWxjNkhPr9yg,7960
72
72
  Cython/Compiler/TypeInference.py,sha256=fmetS6rcT_ELhkCWMOukgOF5QarS-z0EyhvGudwvZuM,22446
@@ -76,7 +76,7 @@ Cython/Compiler/UtilNodes.py,sha256=GzzXI_7mw4IWr_y0aPwEy6af8CYIr17uddaPUGw6-_o,
76
76
  Cython/Compiler/UtilityCode.py,sha256=WC2ktplj5knJ9rpLb5v63VIFpV8QQGz2uZ9BGXjTxjs,14332
77
77
  Cython/Compiler/Version.py,sha256=24xykpTsCkAQLowr2Y16q5HnlEfiBaCLPD0y4TPy-h0,142
78
78
  Cython/Compiler/Visitor.pxd,sha256=Ys_t3ZU9Oy_GqY-P6CvZxg36dcFEAmnDzoI1gTpg6KU,1783
79
- Cython/Compiler/Visitor.py,sha256=KxPbGeg239Dd5vXabchffLuRMUE-vrUrD-Ag_Dlp56I,31117
79
+ Cython/Compiler/Visitor.py,sha256=UiHHq0QkhHnvtbgs1dc7_31e3vww8TZqmnVcxmNsEWA,31384
80
80
  Cython/Compiler/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13
81
81
  Cython/Compiler/Tests/TestBuffer.py,sha256=conB2NtpIjYP6bqS50rnDOEhSVulkfviCvuUw5_Y9Nc,4144
82
82
  Cython/Compiler/Tests/TestBuiltin.py,sha256=WyH4jo-2LCkxD_QPWMywRPaMPsUF2ZJerL4p60Hc3Mg,3453
@@ -126,7 +126,7 @@ Cython/Includes/cpython/contextvars.pxd,sha256=5kHKXWueZ7KlnKo5HeHA90YNdZtLy07Fk
126
126
  Cython/Includes/cpython/conversion.pxd,sha256=dbbFuZJF0SscmcaNCUf0tlBQDRdKYf5tH8yzhTU_XYI,1696
127
127
  Cython/Includes/cpython/datetime.pxd,sha256=_AQIUYFSNeVzO_VtU4O_bdC-lQ8S5eCa-EEZqgWR6PI,14216
128
128
  Cython/Includes/cpython/descr.pxd,sha256=RPSPJUxyejKsWruYS3IWU1rg0L1pKFAYidYcXW9YAj0,728
129
- Cython/Includes/cpython/dict.pxd,sha256=k3JbYRJ_LxF39v_aErVk_Ka2-czw-H6lQCpZNUmzmdU,7959
129
+ Cython/Includes/cpython/dict.pxd,sha256=eAjCr8sWCtjzistMc7xf5RiiRMzzm86enkT26tPW1sg,11417
130
130
  Cython/Includes/cpython/exc.pxd,sha256=0pI7VcDnMLqf-S_BClRgoiH2xGyDbhlmFGWOKcn3sGM,13830
131
131
  Cython/Includes/cpython/fileobject.pxd,sha256=yQG3M9wfS2jwpgSTo-8oXx8K9xnpGIkL-etQt9YDwTU,2889
132
132
  Cython/Includes/cpython/float.pxd,sha256=1wVFFSyGTQA0IWBACQU1BUVMwVRjXDQwNZEYcSXEew0,1670
@@ -176,7 +176,7 @@ Cython/Includes/libc/stdint.pxd,sha256=qHJXzpWCrbvJWSaHYZL27VJPupQreTZl9VGj0jgLd
176
176
  Cython/Includes/libc/stdio.pxd,sha256=qUaxEwNrQl1-4yHLorzzJZ-a-y5_-Rm_m7Z5meaRqH0,2476
177
177
  Cython/Includes/libc/stdlib.pxd,sha256=p62xq2XfB24WfNCjRXgD6cOYoRuV47AnYijkjWv4ugE,2444
178
178
  Cython/Includes/libc/string.pxd,sha256=tzYGbRrnccedFLes-KGgJqM0FEtwHF_q4f2fqltNvyE,2038
179
- Cython/Includes/libc/threads.pxd,sha256=HNfAaGiYQ3ntmYmv1xUIVBcr56Grg0Dv2O5quribVBc,9232
179
+ Cython/Includes/libc/threads.pxd,sha256=0Wov5KeF7fux7vnmyHBbJ168aXl3anWmkQY33SkGazI,9232
180
180
  Cython/Includes/libc/time.pxd,sha256=BFEwIzV2tL_3EGonlifFlwgfja2giNQC77Qq-nz4IrY,1488
181
181
  Cython/Includes/libcpp/__init__.pxd,sha256=PCx8ZRfOeoyMRu41PPlPY9uo2kZmt_7d0KR4Epzfe7c,94
182
182
  Cython/Includes/libcpp/algorithm.pxd,sha256=HaatOKA2pIHc-RNHCIWayPXLT2Hd56Q0gKC5kLlCYYc,23704
@@ -200,7 +200,7 @@ Cython/Includes/libcpp/limits.pxd,sha256=BWJzVBB8MZt3l9PUre1o5eScE2fGJa3_Sv6e_KH
200
200
  Cython/Includes/libcpp/list.pxd,sha256=iOovgIk_Slkf7yaDEv6-ZUss_AU98OGWkvgNQDF0K0A,4438
201
201
  Cython/Includes/libcpp/map.pxd,sha256=C8EaEsvLEc2tmEkyybOzgkx3CoFWYFBpZelHhcKHI1s,10481
202
202
  Cython/Includes/libcpp/memory.pxd,sha256=OqNDPX_1ps9bxWCEQDiefbQv-NeZJ7SNUQtdYB86MZs,3593
203
- Cython/Includes/libcpp/mutex.pxd,sha256=cxuiJwcyXnT33pOfE-tPPZbgPHHK1v-yCBiurzSaEUw,14843
203
+ Cython/Includes/libcpp/mutex.pxd,sha256=WJYD5G7eyI6EVEsMDK7unvs3m4JWAXfEfXh1V3qgTzs,14843
204
204
  Cython/Includes/libcpp/numbers.pxd,sha256=SkBhbClhRTtzbSMj_QvR2pz-CjdB08ZXPJbXSwATzvw,395
205
205
  Cython/Includes/libcpp/numeric.pxd,sha256=H4k7D-xrJ3mcLrGRUmghwS1-9FPb4BQnSREMuw3PvKQ,6570
206
206
  Cython/Includes/libcpp/optional.pxd,sha256=Mf5gnZIvB9IR-L7bi3ntog2EOXB-pp1Xo45CWqyRCiU,990
@@ -269,7 +269,7 @@ Cython/Tests/xmlrunner.py,sha256=1X79TBIYWOcZIzoylOSu9zULxVIR4xvq-RZ7f8Fn600,146
269
269
  Cython/Utility/AsyncGen.c,sha256=MG4LN14ozyq3JruA1Ad8I9ZnjlASxO2kwfvHTcAHXuU,33376
270
270
  Cython/Utility/Buffer.c,sha256=TcJ4eSxi1NxD51NH2GEK-dXgXdmVFIQcHSq22azfB2U,28258
271
271
  Cython/Utility/BufferFormatFromTypeInfo.pxd,sha256=KoGGKw7rW8Utav9xrwVZpsLX-vlpFe3Xv0hmp45PimM,97
272
- Cython/Utility/Builtins.c,sha256=udHKjWEYYG6CEKTeD6yxY03l2GVwLSa5svM6NKPrGg4,26719
272
+ Cython/Utility/Builtins.c,sha256=76n9lDGzDe37cskDojBYSXozaPTvy9AS_TFdm_Fj56U,26733
273
273
  Cython/Utility/CConvert.pyx,sha256=UFlPDRT9anal0RpY03hXsejEcwp-RXJSnLy6LbbnmPQ,4471
274
274
  Cython/Utility/CMath.c,sha256=rP6O5u23EybDGimRCHfy8WTpyxhPu5G1F6ksEmrgKnQ,3044
275
275
  Cython/Utility/CommonStructures.c,sha256=cXOrFQv0DP8QX2CF4u_2O2lFW41WC3nTNwSKRVt3B7M,7926
@@ -280,8 +280,8 @@ Cython/Utility/CppConvert.pyx,sha256=onbI09dQzC6ZJxvzosS-WuvweIeh3f0rd65Xor7G3AU
280
280
  Cython/Utility/CppSupport.cpp,sha256=vR1G8qqdyLWTk4quKz5v6Z1syIMrfPldB9IzbwkYxDo,5464
281
281
  Cython/Utility/CythonFunction.c,sha256=BCAiHjYiVBWils4k776a4UvBaDmuE7OSOFkygPXPtZE,63367
282
282
  Cython/Utility/Dataclasses.c,sha256=eCa9JHHg6bj-WSKw1xTDjazghmXAkMd9J5TnELNTVOI,4023
283
- Cython/Utility/Embed.c,sha256=pMoDW-9EHL_bxqKsaiCbkhyMMdYxdrDzUtlf-d0i-HQ,3417
284
- Cython/Utility/Exceptions.c,sha256=AE8cCfTP5E9C-c9eaY-xvv2nclXGUL5G4qT6qo8CZpE,35547
283
+ Cython/Utility/Embed.c,sha256=P4JHaSwtj61hRVFgQBKyt3FaNJiBjJe-asLtsFtexGs,3439
284
+ Cython/Utility/Exceptions.c,sha256=EV8TIZaCdQNo7CPGo6LPQYDYE1a06l2IOwEp6PIHLns,35793
285
285
  Cython/Utility/ExtensionTypes.c,sha256=l3_3wNWBncR-JcaWmUqe3ME56-PwxNEMo5rTo7Ih2ug,38249
286
286
  Cython/Utility/FunctionArguments.c,sha256=HvEfAAdrvBDxbAmiK_HZ4F2IFXs-xWC-u-28gwQ06fA,33705
287
287
  Cython/Utility/FusedFunction.pyx,sha256=3reL7n6L2M3gU_OXSYAvoDEVVjJxMWvpiesvGmRAEc8,1494
@@ -291,13 +291,13 @@ Cython/Utility/MemoryView.pyx,sha256=b_H0MFfFOLfBJUxD070EwnJLnZolLjPND96_IIDY-fg
291
291
  Cython/Utility/MemoryView_C.c,sha256=yFrTMRyNIE-PCKi-PzqcrzxfieSY6AaE6EsoQvHKcf4,28780
292
292
  Cython/Utility/ModuleSetupCode.c,sha256=OR-NnsdtIVlj6_hmIVquSLnOFyAqm2cA5RIF1oZcQj0,118854
293
293
  Cython/Utility/NumpyImportArray.c,sha256=Gwo493DF8JxUxhTTjJYIdyHHJ9TEwFKqDmKsdk_uPyw,2033
294
- Cython/Utility/ObjectHandling.c,sha256=yKBjDrbzSf5t4kunHiWZHqmN2lDnZvlPq96TCD4vIkU,119365
295
- Cython/Utility/Optimize.c,sha256=ksJP3HuQl63FSOE351WQLPmCpMdp1tdiyL4dOJPjfwA,59685
294
+ Cython/Utility/ObjectHandling.c,sha256=FOu27NOBKND-kNgq3mgCOw1ymElvTmXfUazeajzn218,120275
295
+ Cython/Utility/Optimize.c,sha256=AHaZlr8XCp6E2QOBNlUAEIhRUolKp0UyRJxh6jilqjk,59931
296
296
  Cython/Utility/Overflow.c,sha256=9C-WIzd4k4uSD7IrLVIJz8fEMK1jFt9UR4WRjDlarYk,15689
297
297
  Cython/Utility/Printing.c,sha256=h3F9eyCXSs284Y8DZRivKtoAOcx5jIYPeNFOSD59foc,2898
298
298
  Cython/Utility/Profile.c,sha256=JPglBHCdnTtyGj0JKzPtfN0djAIe6P5FVAqBQt43RZo,41218
299
299
  Cython/Utility/StringTools.c,sha256=WQpQTBWSVYpNPUsVj2cXP_RgwcfyQ_NH-T70e65N59U,50848
300
- Cython/Utility/Synchronization.c,sha256=mLjmEoh00bkL1LGFbecq9xtbE_86y6tdPHmZb4Uzjz8,18675
300
+ Cython/Utility/Synchronization.c,sha256=B3sJpm2UwNGkjWIeMDF8AqCgtttASNIPRXHvA7kXLKE,18675
301
301
  Cython/Utility/TString.c,sha256=UM3kg04oc0qq54ciFZd9X6Bk2acO1TqqZo89UtFvaoQ,13893
302
302
  Cython/Utility/TestCyUtilityLoader.pyx,sha256=91lWWJub7l_6xNn3ncrvQZZ94RpkQzEx2NtAaFpvrxY,152
303
303
  Cython/Utility/TestCythonScope.pyx,sha256=mWowHlHIs22w6xC5KAc8kelf2f2n6bhLapyqgz0JMpc,1999
@@ -310,8 +310,8 @@ Cython/Utility/arrayarray.h,sha256=hjXya3s-GoN4mKZTKUlyqPfT3tzf0GiansnSkUcWhk0,4
310
310
  pyximport/__init__.py,sha256=9hOyKolFtOerPiVEyktKrT1VtzbGexq9UmORzo52iHI,79
311
311
  pyximport/pyxbuild.py,sha256=AsL1tyLxG61Mj7Ah-DxtDBuaXF94W2Tb6KTos7r0w8I,5702
312
312
  pyximport/pyximport.py,sha256=BnXVwq1cwo1EYRjPU0J-RUDcwzGjUlzKWZOOMDNcu-s,18510
313
- cython-3.2.1.dist-info/METADATA,sha256=K3wBpDK7xFhqMMYTjA4K_mDyZ02hYmU2p92PQHl9uwY,6458
314
- cython-3.2.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
315
- cython-3.2.1.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
316
- cython-3.2.1.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
317
- cython-3.2.1.dist-info/RECORD,,
313
+ cython-3.2.2.dist-info/METADATA,sha256=V5NnCFFDPGtyyFd9r4accPayqeK-dptDMeHgB8ulvyg,4746
314
+ cython-3.2.2.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
315
+ cython-3.2.2.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
316
+ cython-3.2.2.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
317
+ cython-3.2.2.dist-info/RECORD,,
File without changes