diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-09-29 09:22:31 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-09-29 09:26:49 +0200 |
commit | 7f638bcbd507f3d128d3221a398d193201c0ddad (patch) | |
tree | 40bb804fd2d9fa8f3f9eadc8c7f45a4e00b4c0ed /Cython/Compiler/Options.py | |
parent | ba9d273aa7526b179dc4f5cb6b65ceedc5b41210 (diff) | |
download | cython-cy3str.tar.gz |
Remove the new 'str_is_str' directive again and replace it by a new "language_level=3str" that resembles "language_level=3" but keeps unprefixed string literals and the 'str' builtin type unchanged.cy3str
See #2565.
Diffstat (limited to 'Cython/Compiler/Options.py')
-rw-r--r-- | Cython/Compiler/Options.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Cython/Compiler/Options.py b/Cython/Compiler/Options.py index 966d282ed..78e144fc6 100644 --- a/Cython/Compiler/Options.py +++ b/Cython/Compiler/Options.py @@ -198,7 +198,6 @@ _directive_defaults = { 'iterable_coroutine': False, # Make async coroutines backwards compatible with the old asyncio yield-from syntax. 'c_string_type': 'bytes', 'c_string_encoding': '', - 'str_is_str': None, # fall back to 'language_level == 2' 'type_version_tag': True, # enables Py_TPFLAGS_HAVE_VERSION_TAG on extension types 'unraisable_tracebacks': True, 'old_style_globals': False, @@ -293,7 +292,7 @@ def normalise_encoding_name(option_name, encoding): # Override types possibilities above, if needed directive_types = { - 'language_level': int, # values can be None/2/3, where None == 2+warning + 'language_level': str, # values can be None/2/3/'3str', where None == 2+warning 'auto_pickle': bool, 'locals': dict, 'final' : bool, # final cdef classes and methods @@ -314,7 +313,6 @@ directive_types = { 'freelist': int, 'c_string_type': one_of('bytes', 'bytearray', 'str', 'unicode'), 'c_string_encoding': normalise_encoding_name, - 'str_is_str': bool, } for key, val in _directive_defaults.items(): @@ -349,7 +347,6 @@ directive_scopes = { # defaults to available everywhere # Avoid scope-specific to/from_py_functions for c_string. 'c_string_type': ('module',), 'c_string_encoding': ('module',), - 'str_is_str': ('module',), 'type_version_tag': ('module', 'cclass'), 'language_level': ('module',), # globals() could conceivably be controlled at a finer granularity, |