File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -388,11 +388,22 @@ the same library that the Python runtime is using.
388388
389389 Whenever ``PyCompilerFlags *flags `` is *NULL *, :attr: `cf_flags ` is treated as
390390 equal to ``0 ``, and any modification due to ``from __future__ import `` is
391- discarded. ::
391+ discarded.
392392
393- struct PyCompilerFlags {
394- int cf_flags;
395- }
393+ .. c :member :: int cf_flags
394+
395+ Compiler flags.
396+
397+ .. c :member :: int cf_feature_version;
398+
399+ *cf_feature_version * is the minor Python version. It should be
400+ initialized to ``PY_MINOR_VERSION ``.
401+
402+ The field is ignored by default, it is used if and only if
403+ ``PyCF_ONLY_AST `` flag is set in *cf_flags *.
404+
405+ .. versionchanged :: 3.8
406+ Added *cf_feature_version * field.
396407
397408
398409.. c :var :: int CO_FUTURE_DIVISION
Original file line number Diff line number Diff line change @@ -1312,6 +1312,11 @@ Changes in the Python API
13121312Changes in the C API
13131313--------------------
13141314
1315+ * The :c:type: `PyCompilerFlags ` structure gets a new *cf_feature_version *
1316+ field. It should be initialized to ``PY_MINOR_VERSION ``. The field is ignored
1317+ by default, it is used if and only if ``PyCF_ONLY_AST `` flag is set in
1318+ *cf_flags *.
1319+
13151320* The :c:func: `PyEval_ReInitThreads ` function has been removed from the C API.
13161321 It should not be called explicitly: use :c:func: `PyOS_AfterFork_Child `
13171322 instead.
You can’t perform that action at this time.
0 commit comments