Cython 3.2.5__py3-none-any.whl → 3.2.8__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.
@@ -52,7 +52,7 @@ def extended_iglob(pattern):
52
52
  # because '/' is generally common for relative paths.
53
53
  if '**/' in pattern or os.sep == '\\' and '**\\' in pattern:
54
54
  seen = set()
55
- first, rest = re.split(r'\*\*[%s]' % ('/\\\\' if os.sep == '\\' else '/'), pattern, 1)
55
+ first, rest = re.split(r'\*\*[%s]' % ('/\\\\' if os.sep == '\\' else '/'), pattern, maxsplit=1)
56
56
  if first:
57
57
  first = iglob(first + os.sep)
58
58
  else:
@@ -1,13 +1,10 @@
1
1
  import os
2
- import re
3
- import shutil
4
- import tempfile
5
2
 
6
3
  from Cython.Compiler import (
7
4
  MemoryView, Code, Options, Pipeline, Errors, Main, Symtab
8
5
  )
9
6
  from Cython.Compiler.StringEncoding import EncodedString
10
- from Cython.Compiler.Scanning import FileSourceDescriptor
7
+ from Cython.Compiler.Scanning import SharedUtilitySourceDescriptor
11
8
 
12
9
 
13
10
  def create_shared_library_pipeline(context, scope, options, result):
@@ -72,23 +69,17 @@ def generate_shared_module(options):
72
69
  Errors.open_listing_file(None)
73
70
 
74
71
  dest_c_file = options.shared_c_file_path
72
+ pyx_file = os.path.splitext(dest_c_file)[0] + '.pyx'
75
73
  module_name = os.path.splitext(os.path.basename(dest_c_file))[0]
76
74
 
77
75
  context = Main.Context.from_options(options)
78
76
  scope = Symtab.ModuleScope('MemoryView', parent_module = None, context = context, is_package=False)
79
77
 
80
- with tempfile.TemporaryDirectory() as tmpdirname:
81
- pyx_file = os.path.join(tmpdirname, f'{module_name}.pyx')
82
- c_file = os.path.join(tmpdirname, f'{module_name}.c')
83
- with open(pyx_file, 'w'):
84
- pass
85
- source_desc = FileSourceDescriptor(pyx_file)
86
- comp_src = Main.CompilationSource(source_desc, EncodedString(module_name), os.getcwd())
87
- result = Main.create_default_resultobj(comp_src, options)
88
-
89
- pipeline = create_shared_library_pipeline(context, scope, options, result)
90
- err, enddata = Pipeline.run_pipeline(pipeline, comp_src)
91
- if err is None:
92
- shutil.copy(c_file, dest_c_file)
78
+ source_desc = SharedUtilitySourceDescriptor(pyx_file)
79
+ comp_src = Main.CompilationSource(source_desc, EncodedString(module_name), os.getcwd())
80
+ result = Main.create_default_resultobj(comp_src, options)
81
+
82
+ pipeline = create_shared_library_pipeline(context, scope, options, result)
83
+ err, enddata = Pipeline.run_pipeline(pipeline, comp_src)
93
84
 
94
85
  return err, enddata
Cython/Compiler/Code.py CHANGED
@@ -2429,19 +2429,26 @@ class GlobalState:
2429
2429
  writer.putln("{")
2430
2430
  writer.putln(f"PyObject **table = {array_cname};")
2431
2431
  writer.putln(f"for (Py_ssize_t i=0; i<{constant_count}; ++i) {{")
2432
- writer.putln("#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING")
2432
+ writer.putln("#if PY_VERSION_HEX >= 0x030F0000")
2433
+ writer.putln("PyUnstable_SetImmortal(table[i]);")
2434
+ writer.putln("#elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING")
2433
2435
  # We don't want to set the refcount on shared constants (e.g. cached integers)
2434
2436
  # because setting the refcount isn't thread-safe. The chances are that most of the constants
2435
2437
  # that this applies to are already immortal though so that isn't a great loss.
2438
+ # Overflow, e.g. on 32 bit systems.
2439
+ writer.putln("if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;")
2436
2440
  writer.putln("#if PY_VERSION_HEX < 0x030E0000")
2437
2441
  writer.putln("if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)")
2438
2442
  writer.putln("#else")
2439
2443
  writer.putln("if (PyUnstable_Object_IsUniquelyReferenced(table[i]))")
2440
2444
  writer.putln("#endif")
2441
2445
  writer.putln("{")
2442
- writer.putln("Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);")
2446
+ # Go one higher than we think we need to because of a bug in SET_REFCNT check in CPython
2447
+ writer.putln("Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));")
2443
2448
  writer.putln("}")
2444
2449
  writer.putln("#else")
2450
+ # Overflow, e.g. on 32 bit systems.
2451
+ writer.putln("if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;")
2445
2452
  writer.putln("Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);")
2446
2453
  writer.putln("#endif")
2447
2454
  writer.putln("}") # for()
@@ -2015,14 +2015,17 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
2015
2015
  if not entry or not entry.is_special:
2016
2016
  return
2017
2017
 
2018
+ code.globalstate.use_utility_code(
2019
+ UtilityCode.load_cached("DeallocKeepAlive", "ExtensionTypes.c"))
2018
2020
  code.putln("{")
2019
2021
  code.putln("PyObject *etype, *eval, *etb;")
2020
2022
  code.putln("PyErr_Fetch(&etype, &eval, &etb);")
2021
- # increase the refcount while we are calling into user code
2022
- # to prevent recursive deallocation
2023
- code.putln("__Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);")
2023
+ # Keep the object alive while we are calling into user code, to prevent
2024
+ # the user code from triggering recursive deallocation. On free-threading
2025
+ # this must not use Py_SET_REFCNT() (see DeallocKeepAlive in ExtensionTypes.c).
2026
+ code.putln("__Pyx_DeallocKeepAliveBegin(o);")
2024
2027
  code.putln("%s(o);" % entry.func_cname)
2025
- code.putln("__Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);")
2028
+ code.putln("__Pyx_DeallocKeepAliveEnd(o);")
2026
2029
  code.putln("PyErr_Restore(etype, eval, etb);")
2027
2030
  code.putln("}")
2028
2031
 
@@ -281,6 +281,15 @@ class StringSourceDescriptor(SourceDescriptor):
281
281
  return "<StringSourceDescriptor:%s>" % self.name
282
282
 
283
283
 
284
+ class SharedUtilitySourceDescriptor(FileSourceDescriptor):
285
+ """
286
+ A specialized source descriptor for shared utility code only. Not part of public API.
287
+ """
288
+
289
+ def get_file_object(self, encoding=None, error_handling=None):
290
+ from io import StringIO
291
+ return StringIO('')
292
+
284
293
  #------------------------------------------------------------------
285
294
 
286
295
  class PyrexScanner(Scanner):
@@ -79,8 +79,8 @@ cdef extern from "<vector>" namespace "std" nogil:
79
79
  reverse_iterator operator--(int)
80
80
  reverse_iterator operator+(size_type)
81
81
  reverse_iterator operator-(size_type)
82
- difference_type operator-(iterator)
83
- difference_type operator-(const_iterator)
82
+ difference_type operator-(reverse_iterator)
83
+ difference_type operator-(const_reverse_iterator)
84
84
  bint operator==(reverse_iterator)
85
85
  bint operator==(const_reverse_iterator)
86
86
  bint operator!=(reverse_iterator)
@@ -104,8 +104,8 @@ cdef extern from "<vector>" namespace "std" nogil:
104
104
  const_reverse_iterator operator--(int)
105
105
  const_reverse_iterator operator+(size_type)
106
106
  const_reverse_iterator operator-(size_type)
107
- difference_type operator-(iterator)
108
- difference_type operator-(const_iterator)
107
+ difference_type operator-(reverse_iterator)
108
+ difference_type operator-(const_reverse_iterator)
109
109
  bint operator==(reverse_iterator)
110
110
  bint operator==(const_reverse_iterator)
111
111
  bint operator!=(reverse_iterator)
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.5"
4
+ __version__ = "3.2.8"
5
5
 
6
6
 
7
7
  # BEGIN shameless copy from Cython/minivect/minitypes.py
Cython/Utility/AsyncGen.c CHANGED
@@ -346,11 +346,19 @@ __Pyx_async_gen_self_method(PyObject *g, PyObject *arg) {
346
346
  }
347
347
 
348
348
 
349
+ static PyObject *
350
+ __Pyx_async_gen_get_running(__pyx_PyAsyncGenObject *o, void *context) {
351
+ CYTHON_UNUSED_VAR(context);
352
+ return __Pyx_NewRef(o->ag_running_async ? Py_True : Py_False);
353
+ }
354
+
355
+
349
356
  static PyGetSetDef __Pyx_async_gen_getsetlist[] = {
350
357
  {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
351
358
  PyDoc_STR("name of the async generator"), 0},
352
359
  {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
353
360
  PyDoc_STR("qualified name of the async generator"), 0},
361
+ {"ag_running", (getter)__Pyx_async_gen_get_running, NULL, NULL, 0},
354
362
  //REMOVED: {(char*) "ag_await", (getter)coro_get_cr_await, NULL,
355
363
  //REMOVED: (char*) PyDoc_STR("object being awaited on, or None")},
356
364
  {0, 0, 0, 0, 0} /* Sentinel */
@@ -358,7 +366,6 @@ static PyGetSetDef __Pyx_async_gen_getsetlist[] = {
358
366
 
359
367
  static PyMemberDef __Pyx_async_gen_memberlist[] = {
360
368
  //REMOVED: {(char*) "ag_frame", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_frame), READONLY},
361
- {"ag_running", T_BOOL, offsetof(__pyx_PyAsyncGenObject, ag_running_async), READONLY, NULL},
362
369
  //REMOVED: {(char*) "ag_code", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_code), READONLY},
363
370
  //ADDED: "ag_await"
364
371
  {"ag_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
@@ -1654,6 +1654,10 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1654
1654
  Py_XINCREF(code);
1655
1655
  gen->gi_code = code;
1656
1656
  gen->gi_frame = NULL;
1657
+ #if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
1658
+ memset(gen->$monitoring_states_cname, 0, sizeof(gen->$monitoring_states_cname));
1659
+ gen->$monitoring_version_cname = 0;
1660
+ #endif
1657
1661
 
1658
1662
  PyObject_GC_Track(gen);
1659
1663
  return gen;
@@ -134,6 +134,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject
134
134
  //@requires: ModuleSetupCode.c::IncludeStructmemberH
135
135
  //@requires: ObjectHandling.c::PyObjectGetAttrStr
136
136
  //@requires: ObjectHandling.c::CachedMethodType
137
+ //@requires: ObjectHandling.c::PyObjectCallOneArg
137
138
  //@requires: ExtensionTypes.c::CallTypeTraverse
138
139
  //@requires: Synchronization.c::CriticalSections
139
140
  //@substitute: naming
@@ -461,6 +462,8 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
461
462
  return result;
462
463
  }
463
464
 
465
+ static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value); /*proto*/
466
+
464
467
  static int
465
468
  __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
466
469
  CYTHON_UNUSED_VAR(context);
@@ -475,9 +478,59 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, vo
475
478
  __Pyx_BEGIN_CRITICAL_SECTION(op);
476
479
  __Pyx_Py_XDECREF_SET(op->func_annotations, value);
477
480
  __Pyx_END_CRITICAL_SECTION();
481
+ if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists((PyObject*) op, Py_None) < 0)) return -1;
478
482
  return 0;
479
483
  }
480
484
 
485
+ static int
486
+ __Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
487
+ /* Return 1 if the function dict exists, 0 otherwise. This cannot fail:
488
+ * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
489
+ #if CYTHON_COMPILING_IN_PYPY
490
+ *dict = PyObject_GenericGetDict(op_in, NULL);
491
+ #elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
492
+ *dict = ((__pyx_CyFunctionObject*) op_in)->func_dict;
493
+ #else
494
+ PyObject **dictptr = _PyObject_GetDictPtr(op_in);
495
+ *dict = likely(dictptr) ? *dictptr : NULL;
496
+ #endif
497
+ return *dict ? 1 : 0;
498
+ }
499
+
500
+ static int
501
+ __Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
502
+ PyObject *dict;
503
+ int dict_found;
504
+ *annotate = NULL;
505
+ dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
506
+ if (!dict_found) return 0;
507
+ return __Pyx_PyDict_GetItemRef(dict, PYIDENT("__annotate__"), annotate);
508
+ }
509
+
510
+ static int
511
+ __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
512
+ PyObject *dict;
513
+ int dict_found;
514
+ dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
515
+ if (!dict_found) return 0;
516
+ return PyDict_SetItem(dict, PYIDENT("__annotate__"), value);
517
+ }
518
+
519
+ static int
520
+ __Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
521
+ PyObject *dict;
522
+ int result;
523
+ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
524
+ dict = __Pyx_CyFunction_get_dict((__pyx_CyFunctionObject*) op_in, NULL);
525
+ #else
526
+ dict = PyObject_GenericGetDict(op_in, NULL);
527
+ #endif
528
+ if (unlikely(!dict)) return -1;
529
+ result = PyDict_SetItem(dict, PYIDENT("__annotate__"), value);
530
+ Py_DECREF(dict);
531
+ return result;
532
+ }
533
+
481
534
  static PyObject *
482
535
  __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
483
536
  PyObject* result = op->func_annotations;
@@ -491,15 +544,100 @@ __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
491
544
  }
492
545
 
493
546
  static PyObject *
494
- __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
495
- PyObject *result;
547
+ __Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
548
+ PyObject *annotate = NULL;
549
+ PyObject *result = NULL;
550
+ __pyx_CyFunctionObject *op = (__pyx_CyFunctionObject*) op_in;
496
551
  CYTHON_UNUSED_VAR(context);
497
- __Pyx_BEGIN_CRITICAL_SECTION(op);
498
- result = __Pyx_CyFunction_get_annotations_locked(op);
552
+ __Pyx_BEGIN_CRITICAL_SECTION(op_in);
553
+ result = __Pyx_XNewRef(op->func_annotations);
554
+ __Pyx_END_CRITICAL_SECTION();
555
+ if (result) return result;
556
+
557
+ if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
558
+ if (!annotate || annotate == Py_None) {
559
+ Py_XDECREF(annotate);
560
+ __Pyx_BEGIN_CRITICAL_SECTION(op_in);
561
+ result = __Pyx_CyFunction_get_annotations_locked(op);
562
+ __Pyx_END_CRITICAL_SECTION();
563
+ return result;
564
+ }
565
+
566
+ PyObject *format = PyLong_FromLong(1L); // annotationlib.Format.VALUE
567
+ if (likely(format)) {
568
+ result = __Pyx_PyObject_CallOneArg(annotate, format);
569
+ Py_DECREF(format);
570
+ }
571
+ Py_DECREF(annotate);
572
+ if (unlikely(!result)) return NULL;
573
+ if (unlikely(!PyDict_Check(result))) {
574
+ PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
575
+ Py_DECREF(result);
576
+ return NULL;
577
+ }
578
+ __Pyx_BEGIN_CRITICAL_SECTION(op_in);
579
+ __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
499
580
  __Pyx_END_CRITICAL_SECTION();
500
581
  return result;
501
582
  }
502
583
 
584
+ static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) {
585
+ // The signature of this function is 0 or 1 args, where arg should be an int (if passed).
586
+ // However, for this basic placeholder implementation, we don't care and don't check it.
587
+ CYTHON_UNUSED_VAR(args);
588
+ if (unlikely(!self)) {
589
+ PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
590
+ }
591
+ Py_XINCREF(self);
592
+ return self;
593
+ }
594
+
595
+ static PyMethodDef __Pyx_CyFunction_annotate_method = {
596
+ "__annotate__",
597
+ (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl,
598
+ METH_VARARGS,
599
+ "Placeholder __annotate__ function to allow 'functools.wraps' to work "
600
+ "on Cython functions."
601
+ };
602
+
603
+ // We don't yet support PEP649 properly, so __annotate__ is
604
+ // implemented in a minimal way, just so that functools.wraps works.
605
+ static PyObject *
606
+ __Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
607
+ PyObject *annotate = NULL;
608
+ CYTHON_UNUSED_VAR(context);
609
+ if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
610
+ if (annotate) return annotate;
611
+
612
+ PyObject *annotations = __Pyx_CyFunction_get_annotations(op_in, NULL);
613
+ if (unlikely(!annotations)) return NULL;
614
+ PyObject *method = PyCFunction_New(
615
+ &__Pyx_CyFunction_annotate_method,
616
+ annotations);
617
+ Py_DECREF(annotations);
618
+ return method;
619
+ }
620
+
621
+ static int
622
+ __Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
623
+ CYTHON_UNUSED_VAR(context);
624
+ if (value == NULL) {
625
+ PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
626
+ return -1;
627
+ }
628
+ if (unlikely(value != Py_None && !PyCallable_Check(value))) {
629
+ PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
630
+ return -1;
631
+ }
632
+ if (value != Py_None) {
633
+ __pyx_CyFunctionObject *op = (__pyx_CyFunctionObject*) op_in;
634
+ __Pyx_BEGIN_CRITICAL_SECTION(op_in);
635
+ Py_CLEAR(op->func_annotations);
636
+ __Pyx_END_CRITICAL_SECTION();
637
+ }
638
+ return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
639
+ }
640
+
503
641
  static PyObject *
504
642
  __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
505
643
  int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
@@ -649,6 +787,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
649
787
  {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
650
788
  {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
651
789
  {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
790
+ {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
652
791
  {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
653
792
  // {"__signature__", (getter)__Pyx_CyFunction_get_signature, 0, 0, 0},
654
793
  #if CYTHON_COMPILING_IN_LIMITED_API
@@ -402,6 +402,34 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
402
402
  #define __Pyx_TRASHCAN_END
403
403
  #endif
404
404
 
405
+ /////////////// DeallocKeepAlive.proto ///////////////
406
+
407
+ // Keep `o` alive across a call into user __dealloc__ code, to prevent the user
408
+ // code from triggering recursive deallocation, then drop the temporary reference.
409
+ //
410
+ // On the GIL build this is a plain refcount bump. On free-threading we must NOT
411
+ // use Py_SET_REFCNT(o, 1): the object reaching tp_dealloc is unowned and merged
412
+ // (ob_ref_shared == _Py_REF_MERGED), so Py_SET_REFCNT takes the unowned branch and
413
+ // writes ob_ref_shared = _Py_REF_SHARED(1, _Py_REF_MERGED), i.e. "merged, shared
414
+ // count 1" -- indistinguishable from a live object. A concurrent
415
+ // PyUnstable_TryIncRef() would then succeed and resurrect the dying object
416
+ // (use-after-free). Instead we mirror CPython's _PyObject_ResurrectStart/End:
417
+ // re-take ownership and keep the *shared* refcount at the refuse sentinel (0), so
418
+ // the bump is invisible to other threads and TryIncRef keeps refusing.
419
+
420
+ #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
421
+ #define __Pyx_DeallocKeepAliveBegin(o) do { \
422
+ _Py_atomic_store_uintptr_relaxed(&(o)->ob_tid, _Py_ThreadId()); \
423
+ _Py_atomic_store_uint32_relaxed(&(o)->ob_ref_local, 1); \
424
+ _Py_atomic_store_ssize_relaxed(&(o)->ob_ref_shared, 0); \
425
+ } while (0)
426
+ #define __Pyx_DeallocKeepAliveEnd(o) \
427
+ _Py_atomic_store_uint32_relaxed(&(o)->ob_ref_local, 0)
428
+ #else
429
+ #define __Pyx_DeallocKeepAliveBegin(o) __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1)
430
+ #define __Pyx_DeallocKeepAliveEnd(o) __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1)
431
+ #endif
432
+
405
433
  /////////////// CallNextTpDealloc.proto ///////////////
406
434
 
407
435
  static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
Cython/Utility/TString.c CHANGED
@@ -301,8 +301,8 @@ static PyObject* __Pyx_MakeTemplateLibTemplate(PyObject *strings, PyObject *inte
301
301
  if (unlikely(__Pyx_VectorcallBuilder_AddArg(PYIDENT("interpolations"), interpolations, kwargs_builder, args, 1)<0))
302
302
  goto failed_shortcut;
303
303
  result = __Pyx_Object_Vectorcall_CallFromBuilder(tp, args, 0, kwargs_builder);
304
- Py_DECREF(kwargs_builder);
305
304
  if (result) {
305
+ Py_DECREF(kwargs_builder);
306
306
  Py_DECREF(tp);
307
307
  return result;
308
308
  }
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.1
2
+ Name: Cython
3
+ Version: 3.2.8
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.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Programming Language :: Python :: Implementation :: CPython
27
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
28
+ Classifier: Programming Language :: Python :: Implementation :: Stackless
29
+ Classifier: Programming Language :: C
30
+ Classifier: Programming Language :: C++
31
+ Classifier: Programming Language :: Cython
32
+ Classifier: Topic :: Software Development :: Code Generators
33
+ Classifier: Topic :: Software Development :: Compilers
34
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
+ Classifier: Typing :: Typed
36
+ Requires-Python: >=3.8
37
+ Description-Content-Type: text/x-rst
38
+
39
+ The Cython language makes writing C extensions for the Python language as
40
+ easy as Python itself. Cython is a source code translator based on Pyrex_,
41
+ but supports more cutting edge functionality and optimizations.
42
+
43
+ The Cython language is a superset of the Python language (almost all Python
44
+ code is also valid Cython code), but Cython additionally supports optional
45
+ static typing to natively call C functions, operate with C++ classes and
46
+ declare fast C types on variables and class attributes. This allows the
47
+ compiler to generate very efficient C code from Cython code.
48
+
49
+ This makes Cython the ideal language for writing glue code for external
50
+ C/C++ libraries, and for fast C modules that speed up the execution of
51
+ Python code.
52
+
53
+ The newest Cython release can always be downloaded from https://cython.org/.
54
+ Unpack the tarball or zip file, enter the directory, and then run::
55
+
56
+ pip install .
57
+
58
+ Note that for one-time builds, e.g. for CI/testing, on platforms that are not
59
+ covered by one of the wheel packages provided on PyPI *and* the pure Python wheel
60
+ that we provide is not used, it is substantially faster than a full source build
61
+ to install an uncompiled (slower) version of Cython with::
62
+
63
+ NO_CYTHON_COMPILE=true pip install .
64
+
65
+ .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
66
+
67
+ 3.2.8 (2026-06-30)
68
+ ==================
69
+
70
+ Bugs fixed
71
+ ----------
72
+
73
+ * Assigning a Python 3.14+ ``.__annotate__`` function to a Cython compiled function no longer
74
+ evaluates annotations eagerly. Fixes a regression with ``@functools.wraps()`` in Cython 3.2.6.
75
+ Patch by Jelle Zijlstra. (Github issue https://github.com/cython/cython/issues/7767)
76
+
77
+ * In freethreading Python, the necessary object keep-alive while executing user code in
78
+ ``.__dealloc__()`` uses a safer scheme.
79
+ Patch by Yaxing Cai. (Github issue https://github.com/cython/cython/issues/7769)
80
+
81
+ * The local function state used by ``sys.monitoring`` read from uninitialised memory.
82
+ (Github issue https://github.com/cython/cython/issues/7774)
83
+
84
+ * The ``.ag_running`` flag attribute of async generators was always false on big-endian systems.
@@ -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=QyVRKX6eoN308tYTd9Ya-AKd11LPWHoF5Jm6am0ojsE,19650
5
+ Cython/Shadow.py,sha256=JV8gxdLJJYmsPyagxLjKUrGCI4sm1N6xwmuBxy9zvtc,19650
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
@@ -13,11 +13,11 @@ Cython/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  Cython/Build/BuildExecutable.py,sha256=OhySP6G2ppkA_Tzutv2Mvxt3YyhViy_aU7vAeGCjEbY,4742
14
14
  Cython/Build/Cache.py,sha256=WCh4JatKFgjAE6JRIzbMYchnoCQ1wWlr6v7QH5pXXMU,6834
15
15
  Cython/Build/Cythonize.py,sha256=9dYCW_To76B0wZA5GO3DNWjZn8PllkFvef-X7d-nbRc,13475
16
- Cython/Build/Dependencies.py,sha256=eY-zCjgd_ENgIErJw-yGVzv4lWveeNhljFaRcFN4wMw,51710
16
+ Cython/Build/Dependencies.py,sha256=W7KVOEjsQblxVR7io-e_RRt_BQHAIhSbzORIGiVDed8,51719
17
17
  Cython/Build/Distutils.py,sha256=iO5tPX84Kc-ZWMocfuQbl_PqyC9HGGIRS-NiKI60-ZE,49
18
18
  Cython/Build/Inline.py,sha256=hcRhJJ8XWRYZJ7eGW8P-Yh5DhWCQm2Hxr9Im7WP352g,16298
19
19
  Cython/Build/IpythonMagic.py,sha256=X11ClQS2psBcjnI4S1Ovyz_3sW8xEjRqXIh-44ycdek,21455
20
- Cython/Build/SharedModule.py,sha256=6WL0f3NxG2SwRy_humjasLk-FpsbY-ukK4iopuGsE0s,3666
20
+ Cython/Build/SharedModule.py,sha256=7vDHHJVBixGOEmk4qIzl8gbO0A7ZZlCAzMYUHd2ZeiI,3379
21
21
  Cython/Build/__init__.py,sha256=UCsI8hI_a75i0iWwZQfuaoKTH5LW6z2b5GhN9QaJ0zo,339
22
22
  Cython/Build/Tests/TestCyCache.py,sha256=mOL-snKvdUtJvAZ50lqutqP_8XgRQcbeHoxZloTF51k,6614
23
23
  Cython/Build/Tests/TestCythonizeArgsParser.py,sha256=l7dgs39KO-ZPxQzRVccg3wvzQuBLOIi9hqB9jollw5c,20167
@@ -34,7 +34,7 @@ Cython/Compiler/Buffer.py,sha256=NMqvFYIofuS93840lWrNcvDXlBhuXgKLoEuMs0PffLk,269
34
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
- Cython/Compiler/Code.py,sha256=fmmSUPRHP5IErmbsg4tDu5bvPgxL_kbgGdBX5_m1jQA,145206
37
+ Cython/Compiler/Code.py,sha256=e6ph6vlHaoLeZy_CrTVR5n0nd-QkqqETHG8dOO9atOA,145691
38
38
  Cython/Compiler/CodeGeneration.py,sha256=aEW8IwXvwEOsde0-RxvAi_cb8_qdaDGxH_nS_VFwKWc,1068
39
39
  Cython/Compiler/CythonScope.py,sha256=3EnPlOWLSfPO2HfQ2KrjJBDDhHV-VNvUUCmnDkSkJaQ,7473
40
40
  Cython/Compiler/Dataclass.py,sha256=NhP7E63rJzLpE98ZVrYCbNt-W0aYLh9r29e6yT0KnCQ,36595
@@ -51,7 +51,7 @@ Cython/Compiler/LineTable.py,sha256=epP6DoefUR7JCK9OUOyoYcxMWhBEwyTWOr3E7vJRqa4,
51
51
  Cython/Compiler/Main.py,sha256=8BCgxfGhYNGvhROKqV7ovifvQJvWn2xOQBB3uBiAZ5g,35011
52
52
  Cython/Compiler/MatchCaseNodes.py,sha256=yVGVAsc1yrda1jHTAI7mZ2-SL67tNdcfOn-ugdCRWPs,7792
53
53
  Cython/Compiler/MemoryView.py,sha256=Yqh-Uedzod5Ux_kNxUMIwk2sh4qbWNbgEaknxgxy4X0,31691
54
- Cython/Compiler/ModuleNode.py,sha256=Y9rX6sCM7jGmITSTJ6o1qQIR9Oi_1HG-ZgmakVUBfj0,195228
54
+ Cython/Compiler/ModuleNode.py,sha256=sZRowp3CC1KbW6F_vcuLXax8nb8h49CqUFCgYQqelPA,195471
55
55
  Cython/Compiler/Naming.py,sha256=xneFFCsB68xZhghXAxA2GnRrooWMumxss20B1I0avqk,11159
56
56
  Cython/Compiler/Nodes.py,sha256=QjWfQlCfgQH01qGCXNgofYhwD1ua8aZ0BSbXWt3tWlw,455165
57
57
  Cython/Compiler/Optimize.py,sha256=lKUOpH9tk4Zl16ngnUFtcuAoTnJh3z79yGCnxmtJhj8,228625
@@ -64,7 +64,7 @@ Cython/Compiler/Pipeline.py,sha256=JyYMnRekoKRBe9yOvAuW39Gy-pTitJm5jD_qfO9BAeU,1
64
64
  Cython/Compiler/PyrexTypes.py,sha256=w-MZRI5vqf6F-x5wRnG7TJGbgv2WBdww0BIimcBGevY,223302
65
65
  Cython/Compiler/Pythran.py,sha256=wiRE1buAxQ0NFbxg7DHyyd03I6qgLp-KP_fokAvSii4,7888
66
66
  Cython/Compiler/Scanning.pxd,sha256=vcNaZoZdifzj5H_cbFa1eACNNCKko9iwWaOHuWQDfWs,1358
67
- Cython/Compiler/Scanning.py,sha256=kZI5h8k3ZoLA_nqCAx3nY2QZljuFi3QwpjZ9N9d6GGc,25212
67
+ Cython/Compiler/Scanning.py,sha256=b1xfK5V4bgdOBKpuweCTBQKVQ_pMOjlYuGEwey3NAmY,25506
68
68
  Cython/Compiler/StringEncoding.py,sha256=0o6B-tFxKhUdQ79eJfHZhdLun69qdkVUeznffpBAxtI,8487
69
69
  Cython/Compiler/Symtab.py,sha256=gGJU2_0b_kDiWDT5W7ml-3VeLK4oLbtTciLRwiAnHz8,137382
70
70
  Cython/Compiler/TreeFragment.py,sha256=MhuO-RbsXGV6fLIDGTOt_mA8QlU2jDyKhzT_vEExFwY,9545
@@ -220,7 +220,7 @@ Cython/Includes/libcpp/typeinfo.pxd,sha256=tITsqurrdaZjsEGFksem9xZtVhSxQRxHZxcoC
220
220
  Cython/Includes/libcpp/unordered_map.pxd,sha256=dHnTuJ1S3ja7OYGRW-hZ1Zh_xDpv3iW6JUxs9Um_K4U,7945
221
221
  Cython/Includes/libcpp/unordered_set.pxd,sha256=yfmib2EnFDGn_RvlxCFkVy-eVapwQw2FvTHu-I5psTU,5810
222
222
  Cython/Includes/libcpp/utility.pxd,sha256=hTbvp7c12pnU2yvzzMvflZB-MAc_--3xh3PXtD_VIwg,1040
223
- Cython/Includes/libcpp/vector.pxd,sha256=h1FA-ke48g9t-yI6IQ5kooSO51nOBkBWhNw0_hzevFY,7680
223
+ Cython/Includes/libcpp/vector.pxd,sha256=-i0f2EIYixDUhlP4HCtMkza2gqpoqc1VHVDFJNRNthc,7712
224
224
  Cython/Includes/numpy/math.pxd,sha256=Y98lWnk5cxa1yfIy8QklWUeLCbvqpHewDO5w_B11lS4,3388
225
225
  Cython/Includes/posix/__init__.pxd,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13
226
226
  Cython/Includes/posix/dlfcn.pxd,sha256=U-jAieh45NSlrlogsd6SJeCunYDxCG-AlQ7hpEXQgL4,356
@@ -266,7 +266,7 @@ Cython/Tests/TestStringIOTree.py,sha256=vTuu3z32WTcmJaf0fBq62NMghYtaPL2rRnfdl2WM
266
266
  Cython/Tests/TestTestUtils.py,sha256=w4SVcZ8G9Brr_2XGkoQl1EkWR8_sI9LPDAw2cCRQ13U,2901
267
267
  Cython/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13
268
268
  Cython/Tests/xmlrunner.py,sha256=1X79TBIYWOcZIzoylOSu9zULxVIR4xvq-RZ7f8Fn600,14612
269
- Cython/Utility/AsyncGen.c,sha256=MG4LN14ozyq3JruA1Ad8I9ZnjlASxO2kwfvHTcAHXuU,33376
269
+ Cython/Utility/AsyncGen.c,sha256=6zN7HLBhuTT6xYc3hdExfWefPOUiOqEcCGssal428fM,33543
270
270
  Cython/Utility/Buffer.c,sha256=TcJ4eSxi1NxD51NH2GEK-dXgXdmVFIQcHSq22azfB2U,28258
271
271
  Cython/Utility/BufferFormatFromTypeInfo.pxd,sha256=KoGGKw7rW8Utav9xrwVZpsLX-vlpFe3Xv0hmp45PimM,97
272
272
  Cython/Utility/Builtins.c,sha256=T8u9YKUXThK_jxP2AWBPoFrzBcJqtRNKXyE21cNwLJM,26861
@@ -274,15 +274,15 @@ Cython/Utility/CConvert.pyx,sha256=UFlPDRT9anal0RpY03hXsejEcwp-RXJSnLy6LbbnmPQ,4
274
274
  Cython/Utility/CMath.c,sha256=rP6O5u23EybDGimRCHfy8WTpyxhPu5G1F6ksEmrgKnQ,3044
275
275
  Cython/Utility/CommonStructures.c,sha256=cXOrFQv0DP8QX2CF4u_2O2lFW41WC3nTNwSKRVt3B7M,7926
276
276
  Cython/Utility/Complex.c,sha256=nxxtxZk74ykGPoVhkHtYAnITLWLKYNHBSs8NEEmRf38,14033
277
- Cython/Utility/Coroutine.c,sha256=1GuV2LvFGS_jgYKs-6Mdu_mdfrSNH4qJSjtf6UlObyw,85176
277
+ Cython/Utility/Coroutine.c,sha256=3lfpf0kagzR1vG3p6HWyUjlGOhnHHfCtktN8DlI9EbA,85374
278
278
  Cython/Utility/CpdefEnums.pyx,sha256=Lnsx0BqA_rxwxP4RZlMupMp4WGUF7QUC1K-hFvUsL0o,3737
279
279
  Cython/Utility/CppConvert.pyx,sha256=onbI09dQzC6ZJxvzosS-WuvweIeh3f0rd65Xor7G3AU,7317
280
280
  Cython/Utility/CppSupport.cpp,sha256=vR1G8qqdyLWTk4quKz5v6Z1syIMrfPldB9IzbwkYxDo,5464
281
- Cython/Utility/CythonFunction.c,sha256=VD40HHXcNWVaEDGoB7FEHxYCburho9bSoL-QLgm1rtQ,63201
281
+ Cython/Utility/CythonFunction.c,sha256=1T9YRO3NzqL1bfgpNR2Ozd0rMvgbmc00wL8qlBUTiuI,68489
282
282
  Cython/Utility/Dataclasses.c,sha256=eCa9JHHg6bj-WSKw1xTDjazghmXAkMd9J5TnELNTVOI,4023
283
283
  Cython/Utility/Embed.c,sha256=P4JHaSwtj61hRVFgQBKyt3FaNJiBjJe-asLtsFtexGs,3439
284
284
  Cython/Utility/Exceptions.c,sha256=EV8TIZaCdQNo7CPGo6LPQYDYE1a06l2IOwEp6PIHLns,35793
285
- Cython/Utility/ExtensionTypes.c,sha256=l3_3wNWBncR-JcaWmUqe3ME56-PwxNEMo5rTo7Ih2ug,38249
285
+ Cython/Utility/ExtensionTypes.c,sha256=ow9kh_v1hb05Lc2hZwaF77hQredll1cXqnGav6HLxo8,39826
286
286
  Cython/Utility/FunctionArguments.c,sha256=jaKaZijGdgFhWJDhPJNc9jmUND5sMXK6jMLExfvubwI,33684
287
287
  Cython/Utility/FusedFunction.pyx,sha256=3reL7n6L2M3gU_OXSYAvoDEVVjJxMWvpiesvGmRAEc8,1494
288
288
  Cython/Utility/ImportExport.c,sha256=_hSzU6yMv8FRbDowik8TARIhVHY9mdh_ny2r5Fo_yds,30584
@@ -298,7 +298,7 @@ Cython/Utility/Printing.c,sha256=h3F9eyCXSs284Y8DZRivKtoAOcx5jIYPeNFOSD59foc,289
298
298
  Cython/Utility/Profile.c,sha256=JPglBHCdnTtyGj0JKzPtfN0djAIe6P5FVAqBQt43RZo,41218
299
299
  Cython/Utility/StringTools.c,sha256=HwuY-f6t-6JtEt0PBQ2WatXSdGDT2t8JpxvVv9qJ4FM,50902
300
300
  Cython/Utility/Synchronization.c,sha256=B3sJpm2UwNGkjWIeMDF8AqCgtttASNIPRXHvA7kXLKE,18675
301
- Cython/Utility/TString.c,sha256=8cAAcx70pSeYH9Xw98OPmYBUV1LtgwmIFr54Swvuqa0,14001
301
+ Cython/Utility/TString.c,sha256=EkjgVaP8fnczi0swRvcwtoYzZnBvBwEjaTpW7VUvQtQ,14005
302
302
  Cython/Utility/TestCyUtilityLoader.pyx,sha256=91lWWJub7l_6xNn3ncrvQZZ94RpkQzEx2NtAaFpvrxY,152
303
303
  Cython/Utility/TestCythonScope.pyx,sha256=mWowHlHIs22w6xC5KAc8kelf2f2n6bhLapyqgz0JMpc,1999
304
304
  Cython/Utility/TestUtilityLoader.c,sha256=dGy6ZWL2kBqtmUY7kF75UEox5kadQZ__BmZKscwg2aY,279
@@ -310,8 +310,8 @@ Cython/Utility/arrayarray.h,sha256=_XxdxYmGtk0tRcqZjFFalSH0EfsldfY3b8PBQ42vdjI,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.5.dist-info/METADATA,sha256=Xevq7UMhlsCKvOM5Kp1HD3x9fKCPmWl0PFoMpYRmCH8,6923
314
- cython-3.2.5.dist-info/WHEEL,sha256=BNRMDyzLkkcmlv0J8ppDQkk2VED33SesJDynr9ED1gc,91
315
- cython-3.2.5.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
316
- cython-3.2.5.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
317
- cython-3.2.5.dist-info/RECORD,,
313
+ cython-3.2.8.dist-info/METADATA,sha256=FrJ05Rp57v6J_pyX1fRYBDVIjREW4dXmow-a3U-5svY,3940
314
+ cython-3.2.8.dist-info/WHEEL,sha256=BNRMDyzLkkcmlv0J8ppDQkk2VED33SesJDynr9ED1gc,91
315
+ cython-3.2.8.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139
316
+ cython-3.2.8.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24
317
+ cython-3.2.8.dist-info/RECORD,,
@@ -1,145 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: Cython
3
- Version: 3.2.5
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.8
20
- Classifier: Programming Language :: Python :: 3.9
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Programming Language :: Python :: 3.12
24
- Classifier: Programming Language :: Python :: 3.13
25
- Classifier: Programming Language :: Python :: 3.14
26
- Classifier: Programming Language :: Python :: Implementation :: CPython
27
- Classifier: Programming Language :: Python :: Implementation :: PyPy
28
- Classifier: Programming Language :: Python :: Implementation :: Stackless
29
- Classifier: Programming Language :: C
30
- Classifier: Programming Language :: C++
31
- Classifier: Programming Language :: Cython
32
- Classifier: Topic :: Software Development :: Code Generators
33
- Classifier: Topic :: Software Development :: Compilers
34
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
- Classifier: Typing :: Typed
36
- Requires-Python: >=3.8
37
- Description-Content-Type: text/x-rst
38
-
39
- The Cython language makes writing C extensions for the Python language as
40
- easy as Python itself. Cython is a source code translator based on Pyrex_,
41
- but supports more cutting edge functionality and optimizations.
42
-
43
- The Cython language is a superset of the Python language (almost all Python
44
- code is also valid Cython code), but Cython additionally supports optional
45
- static typing to natively call C functions, operate with C++ classes and
46
- declare fast C types on variables and class attributes. This allows the
47
- compiler to generate very efficient C code from Cython code.
48
-
49
- This makes Cython the ideal language for writing glue code for external
50
- C/C++ libraries, and for fast C modules that speed up the execution of
51
- Python code.
52
-
53
- The newest Cython release can always be downloaded from https://cython.org/.
54
- Unpack the tarball or zip file, enter the directory, and then run::
55
-
56
- pip install .
57
-
58
- Note that for one-time builds, e.g. for CI/testing, on platforms that are not
59
- covered by one of the wheel packages provided on PyPI *and* the pure Python wheel
60
- that we provide is not used, it is substantially faster than a full source build
61
- to install an uncompiled (slower) version of Cython with::
62
-
63
- NO_CYTHON_COMPILE=true pip install .
64
-
65
- .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
66
-
67
- 3.2.5 (2026-05-23)
68
- ==================
69
-
70
- Bugs fixed
71
- ----------
72
-
73
- * A compile failure was fixed when using the walrus operator inside of try-except.
74
- (Github issue https://github.com/cython/cython/issues/7462)
75
-
76
- * Expressions with side-effects as object argument to ``isinstance()`` could get
77
- evaluated multiple times, e.g. when they use the walrus operator.
78
- (Github issue https://github.com/cython/cython/issues/7670)
79
-
80
- * Several problems generating the shared utility module were resolved, including
81
- a performance regression with memory views.
82
- (Github issues https://github.com/cython/cython/issues/7487, https://github.com/cython/cython/issues/7497, https://github.com/cython/cython/issues/7504, https://github.com/cython/cython/issues/7558)
83
-
84
- * Some GC and refcounting issues were resolved for Cython functions in the Limited API.
85
- (Github issue https://github.com/cython/cython/issues/7594)
86
-
87
- * Refcounting errors and error handling issues were resolved in some rare error handling cases.
88
- (Github issues https://github.com/cython/cython/issues/7597, https://github.com/cython/cython/issues/7599, https://github.com/cython/cython/issues/7612, https://github.com/cython/cython/issues/7673)
89
-
90
- * Using ``cython.pymutex`` in an extension type with ``cdef`` methods generated
91
- invalid C code missing the required ``PyMutex`` declarations.
92
- (Github issue https://github.com/cython/cython/issues/6995)
93
-
94
- * Calling ``.get_frame()`` on Cython coroutines could crash in freethreading Python.
95
- (Github issue https://github.com/cython/cython/issues/7632)
96
-
97
- * The vectorcall protocol was not used correctly in ``.throw()`` of Cython coroutines
98
- when raising the exception only by type (without value or traceback).
99
- (Github issue https://github.com/cython/cython/issues/7677)
100
-
101
- * A problem with cpdef enums in the Limited API of Python 3.11+ was resolved.
102
- (Github issue https://github.com/cython/cython/issues/7503)
103
-
104
- * Unicode predicates like ``.isdigit()`` are now allowed to fail in the Limited API.
105
- (Github issue https://github.com/cython/cython/issues/7602)
106
-
107
- * Conditional expressions mixing Python float and int object types could accidentally
108
- infer float as the common result type, instead of treating both independently.
109
-
110
- * Using ``sizeof()`` in the size declarations of ``extern`` arrays failed.
111
- (Github issue https://github.com/cython/cython/issues/7451)
112
-
113
- * Enabling profiling generated invalid C code for non-Python return tuples.
114
- (Github issue https://github.com/cython/cython/issues/7580)
115
-
116
- * ``abs()`` on C ``long long`` values could generate invalid C code.
117
-
118
- * When the ``CYTHON_AVOID_BORROWED_REFS`` C macro is enabled, e.g. in GraalPython,
119
- dict iteration could fail to compile.
120
- Patch by Michael Šimáček. (Github issue https://github.com/cython/cython/issues/7631)
121
-
122
- * A C compiler warning about unused functions was resolved.
123
- (Github issue https://github.com/cython/cython/issues/7560)
124
-
125
- * The ``py_safe_call_once()`` C++ mutex helper function in ``libcpp.mutex``
126
- failed to compile.
127
- (Github issue https://github.com/cython/cython/issues/7585)
128
-
129
- * The ``cpython.array`` declarations were adapted for Python 3.15. Direct access
130
- to the C struct of the ``array.array`` data type might require user code changes.
131
- (Github issue https://github.com/cython/cython/issues/7659)
132
-
133
- * Spaces in file paths written to the ``depfile`` were not escaped.
134
- Patch by Loïc Estève. (Github issue https://github.com/cython/cython/issues/7423)
135
-
136
- * Cython's cache failed to restore multi-file results.
137
- (Github issue https://github.com/cython/cython/issues/7559)
138
-
139
- * Using Tempita from its command line failed with a name error.
140
- (Github issue https://github.com/cython/cython/issues/7567)
141
-
142
- Other changes
143
- -------------
144
-
145
- * The known builtin types were updated for Py3.15.
File without changes