@@ -12,18 +12,21 @@ experimental new changes but requires using the newer C API.
12
12
**Welcome into the bright world of multiple new cool and compatible Python
13
13
runtimes! **
14
14
15
+ .. _regular-runtime :
16
+
15
17
Regular Python: /usr/bin/python3
16
18
================================
17
19
18
20
* Python compiled in release mode
19
21
* This runtime still provides ``Py_INCREF() `` macro:
20
22
modify ``PyObject.ob_refcnt `` at the ABI level.
21
- * Compatible with Python 3.7 C **API **.
22
- * Should be compatible with Python 3.7 **ABI **.
23
+ * Should be fully compatible with :ref: `Python 3.7 C API <c-api >`
24
+ * Should be fully compatible with Python 3.7 stable **ABI ** (it may become
25
+ incompatible with the Python 3.7 full ABI).
23
26
24
27
Compared to Python 3.7 regular runtime, this runtime no longer check its
25
- arguments. The debug runtime should now be preferred to develop C extensions
26
- and to run tests.
28
+ arguments for performance reasons . The debug runtime should now be preferred to
29
+ develop C extensions and to run tests.
27
30
28
31
Example of Python 3.7 code::
29
32
@@ -61,6 +64,8 @@ Debug runtime: /usr/bin/python3-dbg
61
64
function arguments are stored in registers, and so gdb fails with the
62
65
"<optimized out>" message.
63
66
67
+ For example, the debug runtime can check that the GIL is held by the caller.
68
+
64
69
.. _exp-runtime :
65
70
66
71
New experimental runtime: python3-exp
@@ -79,7 +84,7 @@ New experimental runtime: python3-exp
79
84
* ``Py_GC `` header and ``PyObject `` structure can be very different from the
80
85
one used by the regular and debug runtimes.
81
86
82
- Technically, this experimental runtime is likely to be a opt-in compilation
87
+ Technically, this experimental runtime can be a opt-in compilation
83
88
mode of the upstream CPython code base.
84
89
85
90
See :ref: `Optimization ideas <optim-ideas >`.
@@ -90,19 +95,19 @@ See :ref:`Optimization ideas <optim-ideas>`.
90
95
PyPy, RustPython and others
91
96
===========================
92
97
93
- Since the `C API will be smaller <new-c-api> ` and the `stable ABI will become
94
- more usable <stable-abi> `, you can imagine that Python implementations other
95
- than CPython will be able to more easily have a **full and up-to-date support **
96
- of the latest full C API.
98
+ Since the :ref: `C API will be smaller <new-c-api >` and the :ref: `stable ABI
99
+ will become more usable <stable-abi>`, you can imagine that Python
100
+ implementations other than CPython will be able to more easily have a **full
101
+ and up-to-date support ** of the latest full C API.
97
102
98
103
99
104
Put your CPython fork here!
100
105
===========================
101
106
102
107
Since a :ref: `stable ABI <stable-abi >` have been designed, if all your C
103
- extensions have opt-in for the new C API: you are now allowed to fork CPython
104
- and experiment your own flavor CPython. Do whatever you want: C extensions only
105
- access your runtime through runtime .
108
+ extensions have opt-in for the :ref: ` new C API < new-c-api >` : you are now
109
+ allowed to fork CPython and experiment your own flavor CPython. Do whatever you
110
+ want: C extensions only calls your runtime through function calls .
106
111
107
112
See :ref: `Optimization ideas <optim-ideas >`.
108
113
0 commit comments