8000 Apply suggestions · python/cpython@d1094d6 · GitHub
[go: up one dir, main page]

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

Commit d1094d6

Browse files
isidenticalvstinner
andcommitted
Apply suggestions
Co-Authored-By: Victor Stinner <vstinner@python.org>
1 parent 7cd943a commit d1094d6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Doc/whatsnew/3.9.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ Changes in the Python API
827827
in the object itself.
828828
(Contributed by Serhiy Storchaka in :issue:`40257`.)
829829

830-
* The constant values of future flags in the :mod:`future` module
830+
* The constant values of future flags in the :mod:`__future__` module
831831
is updated in order to prevent collision with compiler flags.
832832
(Contributed by Batuhan Taskaya in :issue:`39562`)
833833

Include/code.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ typedef struct {
8989
#define CO_ASYNC_GENERATOR 0x0200
9090

9191
/* 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. */
9494
#define CO_FUTURE_DIVISION 0x20000
9595
#define CO_FUTURE_ABSOLUTE_IMPORT 0x40000 /* do absolute imports by default */
9696
#define CO_FUTURE_WITH_STATEMENT 0x80000

Lib/test/test_future.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ def test_badfuture10(self):
7878
self.check_syntax_error(cm.exception, "badsyntax_future10", 3)
7979

8080
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
8384
flags = [
8485
getattr(__future__, future).compiler_flag
8586
for future in __future__.all_feature_names
8687
]
87-
# obtain some of the exported compiler flags (PyCF_****) from ast
88+
# obtain some of the exported compiler flags (PyCF_***) from the ast module
8889
flags.extend(
8990
getattr(ast, flag) for flag in dir(ast) if flag.startswith("PyCF_")
9091
)

0 commit comments

Comments
 (0)
0