| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
To be able to implement :ref:`backward compatibility <back-compat>`, the plan is to provide multiple Python runtimes, at least two. An "old" runtime with maximum backward compatibility, and one "new" runtime which includes experimental new changes but requires using the newer C API.
Welcome into the bright world of multiple new cool and compatible Python runtimes!
Compared to Python 3.7 regular runtime, this runtime no longer check its arguments for performance reasons. The debug runtime should now be preferred to develop C extensions and to run tests.
Example of Python 3.7 code:
int
PyList_Append(PyObject *op, PyObject *newitem)
{
if (PyList_Check(op) && (newitem != NULL))
return app1((PyListObject *)op, newitem);
PyErr_BadInternalCall();
return -1;
}
The if (PyList_Check(op) && (newitem != NULL)) belongs to the debug runtime and should be removed from the regular Python.
For example, the debug runtime can check that the GIL is held by the caller.
See also
Technically, this experimental runtime can be a opt-in compilation mode of the upstream CPython code base.
See :ref:`Optimization ideas <optim-ideas>`.
Last 10 years, CPython has been forked multiple times to attempt different CPython enhancements:
Sadly, none is this project has been merged back into CPython. Unladen Swallow lost its funding from Google, Pyston lost its funding from Dropbox, Pyjion is developed in the limited spare time of two Microsoft employees.
Other Python implementations written from scratch:
Since the :ref:`C API will be smaller <new-c-api>` and the :ref:`stable ABI will become more usable <stable-abi>`, you can imagine that Python implementations other than CPython will be able to more easily have a full and up-to-date support of the latest full C API.
Since a :ref:`stable ABI <stable-abi>` have been designed, if all your C extensions have opt-in for the :ref:`new C API <new-c-api>`: you are now allowed to fork CPython and experiment your own flavor CPython. Do whatever you want: C extensions only calls your runtime through function calls.
| Back | FazBrowse Home | New Git URL |