diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2019-01-08 18:37:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 18:37:30 +0100 |
commit | e0f99a4cc4effb50ff2ecaabb592408802ceda92 (patch) | |
tree | 407fd048507ead50fab6f29616f0ee376bd85e83 | |
parent | 7d7e041380d8b8dcf3990cf9b6afc881f8f854b4 (diff) | |
parent | abe58b24e2af11b9d72803224d704464df46cd14 (diff) | |
download | cython-e0f99a4cc4effb50ff2ecaabb592408802ceda92.tar.gz |
Merge pull request #2789 from cython/gh2580_enable_generator_stop
Add "generator_stop" to default future imports for language_level=3
-rw-r--r-- | Cython/Compiler/Main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 9465edab3..9130fbf19 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -98,16 +98,16 @@ class Context(object): self.gdb_debug_outputwriter = None def set_language_level(self, level): - from .Future import print_function, unicode_literals, absolute_import, division + from .Future import print_function, unicode_literals, absolute_import, division, generator_stop future_directives = [] if level == '3str': - future_directives = [print_function, absolute_import, division] + future_directives = [print_function, absolute_import, division, generator_stop] self.future_directives.discard(unicode_literals) level = 3 else: level = int(level) if level >= 3: - future_directives = [print_function, unicode_literals, absolute_import, division] + future_directives = [print_function, unicode_literals, absolute_import, division, generator_stop] self.language_level = level if future_directives: self.future_directives.update(future_directives) |