Deprecate Python 2.5 language level. Remove its usages.

This commit is contained in:
Semyon Proshev
2017-12-13 19:44:28 +03:00
parent 556cb4fd3d
commit 96e41895d3
47 changed files with 153 additions and 716 deletions
-22
View File
@@ -1,22 +0,0 @@
# import A as B
import A as B
# import A as D, A as DDD
import A as D, A as DDD
# import A.B.C as D, A as DDD
import A.B.C as D, A as DDD
# import as as as
import as as as
# import A
import A
# import A, B, C
import A, B, C
# import A.B.C
import A.B.C
# from A import B, C
from A import B, C
# from A import B as C
from A import B as C
# from A import B as C, X as Y
from A import B as C, X as Y
# from foo import as as as
from foo import as as as
-211
View File
@@ -1,211 +0,0 @@
PyFile:ImportStmt.py
PsiComment(Py:END_OF_LINE_COMMENT)('# import A as B')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: B
PsiElement(Py:IDENTIFIER)('B')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import A as D, A as DDD')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: D
PsiElement(Py:IDENTIFIER)('D')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: DDD
PsiElement(Py:IDENTIFIER)('DDD')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import A.B.C as D, A as DDD')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A.B.C
PyReferenceExpression: C
PyReferenceExpression: B
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('B')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('C')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: D
PsiElement(Py:IDENTIFIER)('D')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: DDD
PsiElement(Py:IDENTIFIER)('DDD')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import as as as')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:as
PyReferenceExpression: as
PsiElement(Py:IDENTIFIER)('as')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: as
PsiElement(Py:IDENTIFIER)('as')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import A')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import A, B, C')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:B
PyReferenceExpression: B
PsiElement(Py:IDENTIFIER)('B')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:C
PyReferenceExpression: C
PsiElement(Py:IDENTIFIER)('C')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# import A.B.C')
PsiWhiteSpace('\n')
PyImportStatement
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:A.B.C
PyReferenceExpression: C
PyReferenceExpression: B
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('B')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('C')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from A import B, C')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
PsiWhiteSpace(' ')
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:B
PyReferenceExpression: B
PsiElement(Py:IDENTIFIER)('B')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:C
PyReferenceExpression: C
PsiElement(Py:IDENTIFIER)('C')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from A import B as C')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
PsiWhiteSpace(' ')
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:B
PyReferenceExpression: B
PsiElement(Py:IDENTIFIER)('B')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: C
PsiElement(Py:IDENTIFIER)('C')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from A import B as C, X as Y')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
PsiWhiteSpace(' ')
PyReferenceExpression: A
PsiElement(Py:IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:B
PyReferenceExpression: B
PsiElement(Py:IDENTIFIER)('B')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: C
PsiElement(Py:IDENTIFIER)('C')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:X
PyReferenceExpression: X
PsiElement(Py:IDENTIFIER)('X')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: Y
PsiElement(Py:IDENTIFIER)('Y')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from foo import as as as')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
PsiWhiteSpace(' ')
PyReferenceExpression: foo
PsiElement(Py:IDENTIFIER)('foo')
PsiWhiteSpace(' ')
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:as
PyReferenceExpression: as
PsiElement(Py:IDENTIFIER)('as')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: as
PsiElement(Py:IDENTIFIER)('as')
-9
View File
@@ -1,9 +0,0 @@
# with = 1 # legal identifier
# with = 1
with = 1
# from __future__ import nested_scopes, with_statement
from __future__ import nested_scopes, with_statement
# with x.y(z)[t] as y: pass
with x.y(z)[t] as y: pass
# with = 1 # now illegal
with = 1
-80
View File
@@ -1,80 +0,0 @@
PyFile:WithStatement2.py
PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1 # legal identifier')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1')
PsiWhiteSpace('\n')
PyAssignmentStatement
PyTargetExpression: with
PsiElement(Py:IDENTIFIER)('with')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyNumericLiteralExpression
PsiElement(Py:INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# from __future__ import nested_scopes, with_statement')
PsiWhiteSpace('\n')
PyFromImportStatement
PsiElement(Py:FROM_KEYWORD)('from')
PsiWhiteSpace(' ')
PyReferenceExpression: __future__
PsiElement(Py:IDENTIFIER)('__future__')
PsiWhiteSpace(' ')
PsiElement(Py:IMPORT_KEYWORD)('import')
PsiWhiteSpace(' ')
PyImportElement:nested_scopes
PyReferenceExpression: nested_scopes
PsiElement(Py:IDENTIFIER)('nested_scopes')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace(' ')
PyImportElement:with_statement
PyReferenceExpression: with_statement
PsiElement(Py:IDENTIFIER)('with_statement')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# with x.y(z)[t] as y: pass')
PsiWhiteSpace('\n')
PyWithStatement
PsiElement(Py:WITH_KEYWORD)('with')
PsiWhiteSpace(' ')
PyWithItem
PySubscriptionExpression
PyCallExpression: x.y
PyReferenceExpression: y
PyReferenceExpression: x
PsiElement(Py:IDENTIFIER)('x')
PsiElement(Py:DOT)('.')
PsiElement(Py:IDENTIFIER)('y')
PyArgumentList
PsiElement(Py:LPAR)('(')
PyReferenceExpression: z
PsiElement(Py:IDENTIFIER)('z')
PsiElement(Py:RPAR)(')')
PsiElement(Py:LBRACKET)('[')
PyReferenceExpression: t
PsiElement(Py:IDENTIFIER)('t')
PsiElement(Py:RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(Py:AS_KEYWORD)('as')
PsiWhiteSpace(' ')
PyTargetExpression: y
PsiElement(Py:IDENTIFIER)('y')
PsiElement(Py:COLON)(':')
PsiWhiteSpace(' ')
PyStatementList
PyPassStatement
PsiElement(Py:PASS_KEYWORD)('pass')
PsiWhiteSpace('\n')
PsiComment(Py:END_OF_LINE_COMMENT)('# with = 1 # now illegal')
PsiWhiteSpace('\n')
PyWithStatement
PsiElement(Py:WITH_KEYWORD)('with')
PsiWhiteSpace(' ')
PyWithItem
PsiErrorElement:expression expected
<empty list>
PsiErrorElement:Colon expected
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PsiElement(Py:INTEGER_LITERAL)('1')
PyStatementList
<empty list>