summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Scanning.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-08-25 10:28:49 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-09-16 12:31:10 +0200
commitc8e6f375dab5589ea2441775e193d650119dc9b2 (patch)
tree5791a19678fae5b6dc94d543531e18f5cbae9861 /Cython/Compiler/Scanning.py
parente59d4dcf6c93e8e4c330bca57cbad90476776531 (diff)
downloadcython-c8e6f375dab5589ea2441775e193d650119dc9b2.tar.gz
Warn when no "language_level" is specified to prepare the transition to language_level=3.
Closes #2593.
Diffstat (limited to 'Cython/Compiler/Scanning.py')
-rw-r--r--Cython/Compiler/Scanning.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/Scanning.py b/Cython/Compiler/Scanning.py
index 9e07aa0eb..466384b4e 100644
--- a/Cython/Compiler/Scanning.py
+++ b/Cython/Compiler/Scanning.py
@@ -147,6 +147,8 @@ class SourceDescriptor(object):
"""
A SourceDescriptor should be considered immutable.
"""
+ filename = None
+
_file_type = 'pyx'
_escaped_description = None
@@ -274,8 +276,6 @@ class StringSourceDescriptor(SourceDescriptor):
Instances of this class can be used instead of a filenames if the
code originates from a string object.
"""
- filename = None
-
def __init__(self, name, code):
self.name = name
#self.set_file_type_from_name(name)