diff options
author | Batuhan Taşkaya <batuhanosmantaskaya@gmail.com> | 2020-04-22 16:09:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-22 16:09:03 (GMT) |
commit | 4454057269b995341b04d13f0bf97f96080f27d0 (patch) | |
tree | fda84a982bce4372ad398afeac039f03b4d29d2c /Lib/__future__.py | |
parent | 9b498939009f49b8c772c89e8fc80efbfd8afcb5 (diff) | |
download | cpython-4454057269b995341b04d13f0bf97f96080f27d0.zip cpython-4454057269b995341b04d13f0bf97f96080f27d0.tar.gz cpython-4454057269b995341b04d13f0bf97f96080f27d0.tar.bz2 |
bpo-39562: Prevent collision of future and compiler flags (GH-19230)
The constant values of future flags in the __future__ module
is updated in order to prevent collision with compiler flags.
Previously PyCF_ALLOW_TOP_LEVEL_AWAIT was clashing
with CO_FUTURE_DIVISION.
Diffstat (limited to 'Lib/__future__.py')
-rw-r--r-- | Lib/__future__.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/__future__.py b/Lib/__future__.py index e113568..d7cb8ac 100644 --- a/Lib/__future__.py +++ b/Lib/__future__.py @@ -68,14 +68,14 @@ __all__ = ["all_feature_names"] + all_feature_names # this module. CO_NESTED = 0x0010 # nested_scopes CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) -CO_FUTURE_DIVISION = 0x2000 # division -CO_FUTURE_ABSOLUTE_IMPORT = 0x4000 # perform absolute imports by default -CO_FUTURE_WITH_STATEMENT = 0x8000 # with statement -CO_FUTURE_PRINT_FUNCTION = 0x10000 # print function -CO_FUTURE_UNICODE_LITERALS = 0x20000 # unicode string literals -CO_FUTURE_BARRY_AS_BDFL = 0x40000 -CO_FUTURE_GENERATOR_STOP = 0x80000 # StopIteration becomes RuntimeError in generators -CO_FUTURE_ANNOTATIONS = 0x100000 # annotations become strings at runtime +CO_FUTURE_DIVISION = 0x20000 # division +CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default +CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement +CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function +CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals +CO_FUTURE_BARRY_AS_BDFL = 0x400000 +CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators +CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime class _Feature: def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): |