Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions 19 Doc/c-api/veryhigh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,22 @@ the same library that the Python runtime is using.

Whenever ``PyCompilerFlags *flags`` is *NULL*, :attr:`cf_flags` is treated as
equal to ``0``, and any modification due to ``from __future__ import`` is
discarded. ::
discarded.

struct PyCompilerFlags {
int cf_flags;
}
.. c:member:: int cf_flags

Compiler flags.

.. c:member:: int cf_feature_version

*cf_feature_version* is the minor Python version. It should be
initialized to ``PY_MINOR_VERSION``.

The field is ignored by default, it is used if and only if
``PyCF_ONLY_AST`` flag is set in *cf_flags*.

.. versionchanged:: 3.8
Added *cf_feature_version* field.


.. c:var:: int CO_FUTURE_DIVISION
Expand Down
5 changes: 5 additions & 0 deletions 5 Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,11 @@ Changes in the Python API
Changes in the C API
--------------------

* The :c:type:`PyCompilerFlags` structure gets a new *cf_feature_version*
field. It should be initialized to ``PY_MINOR_VERSION``. The field is ignored
by default, it is used if and only if ``PyCF_ONLY_AST`` flag is set in
*cf_flags*.

* The :c:func:`PyEval_ReInitThreads` function has been removed from the C API.
It should not be called explicitly: use :c:func:`PyOS_AfterFork_Child`
instead.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.