File tree 3 files changed +7
-6
lines changed 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -827,7 +827,7 @@ Changes in the Python API
827
827
in the object itself.
828
828
(Contributed by Serhiy Storchaka in :issue: `40257 `.)
829
829
830
- * The constant values of future flags in the :mod: `future ` module
830
+ * The constant values of future flags in the :mod: `__future__ ` module
831
831
is updated in order to prevent collision with compiler flags.
832
832
(Contributed by Batuhan Taskaya in :issue: `39562 `)
833
833
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ typedef struct {
89
89
#define CO_ASYNC_GENERATOR 0x0200
90
90
91
91
/* These are no longer used. */
92
- /* These values are changed in 3.9 to prevent collision with
93
- compiler flags. See issue 39562 for more details . */
92
+ /* bpo-39562: These constant values are changed in Python 3.9
93
+ to prevent collision with compiler flags . */
94
94
#define CO_FUTURE_DIVISION 0x20000
95
95
#define CO_FUTURE_ABSOLUTE_IMPORT 0x40000 /* do absolute imports by default */
96
96
#define CO_FUTURE_WITH_STATEMENT 0x80000
Original file line number Diff line number Diff line change @@ -78,13 +78,14 @@ def test_badfuture10(self):
78
78
self .check_syntax_error (cm .exception , "badsyntax_future10" , 3 )
79
79
80
80
def test_ensure_flags_dont_clash (self ):
81
- # test that future flags and compiler flags doesn't clash
82
- # obtain future flags (CO_****) from future module
81
+ # bpo-39562: test that future flags and compiler flags doesn't clash
82
+
83
+ # obtain future flags (CO_***) from the __future__ module
83
84
flags = [
84
85
getattr (__future__ , future ).compiler_flag
85
86
for future in __future__ .all_feature_names
86
87
]
87
- # obtain some of the exported compiler flags (PyCF_**** ) from ast
88
+ # obtain some of the exported compiler flags (PyCF_***) from the ast module
88
89
flags .extend (
89
90
getattr (ast , flag ) for flag in dir (ast ) if flag .startswith ("PyCF_" )
90
91
)
You can’t perform that action at this time.
0 commit comments