Add language level for Python 3.11 (PY-51300)

GitOrigin-RevId: bc2fd30744ca9c2a8023c718ade4689bfc9fef9b
This commit is contained in:
KotlinIsland
2021-11-17 18:07:47 +03:00
committed by intellij-monorepo-bot
parent d25b9c2a2e
commit 119696be41
30 changed files with 761 additions and 50 deletions

View File

@@ -1,2 +1,2 @@
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax. The print statement has been replaced with a print() function">print 'foo'</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax. The print statement has been replaced with a print() function">print 'bar'</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. The print statement has been replaced with a print() function">print 'foo'</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. The print statement has been replaced with a print() function">print 'bar'</warning>

View File

@@ -1,4 +1,4 @@
print(<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support <>, use != instead">a <> b</warning>)
print(<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support <>, use != instead">a <> b</warning>)
if <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support <>, use != instead">a <> 2</warning>:
if <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support <>, use != instead">a <> 2</warning>:
var = a

View File

@@ -1 +1 @@
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have type long. Use int instead.">long("abc")</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have type long. Use int instead.">long("abc")</warning>

View File

@@ -2,7 +2,7 @@ class A(B):
def __init__(self):
<warning descr="Python version 2.7 does not support this syntax. super() should have arguments in Python 2">super()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have method cmp">cmp()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have method reduce">reduce()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have method cmp">cmp()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have method reduce">reduce()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have method buffer">buffer()</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have method buffer">buffer()</warning>

View File

@@ -1,4 +1,4 @@
try:
do_smth()
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax">except ImportError, ImportWarning:
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax">except ImportError, ImportWarning:
do()</warning>

View File

@@ -1 +1 @@
from <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have module Bastion">Bastion</warning> import BastionClass
from <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have module Bastion">Bastion</warning> import BastionClass

View File

@@ -1,4 +1,4 @@
import <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have module Bastion">Bastion</warning>
import <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have module Bastion">Bastion</warning>
from <warning descr="Python version 2.7 does not have module asyncio">asyncio</warning> import Queue
from io import StringIO

View File

@@ -1,3 +1,3 @@
<error descr="Python version 2.7 does not have module builtins">import builtins</error>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not have module __builtin__">import __builtin__</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not have module __builtin__">import __builtin__</warning>

View File

@@ -1 +1 @@
var = [x for x in <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax in list comprehensions">1, 2, 3</warning>]
var = [x for x in <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax in list comprehensions">1, 2, 3</warning>]

View File

@@ -1,8 +1,8 @@
a = <error descr="Python does not support a trailing 'u'">12u</error>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a trailing 'l'">12l</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a trailing 'l'">12l</warning>
c = <error descr="Python does not support a trailing 'll'">12ll</error>
d = <error descr="Python does not support a trailing 'U'">12U</error>
e = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a trailing 'L'">12L</warning>
e = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a trailing 'L'">12L</warning>
f = <error descr="Python does not support a trailing 'LL'">12LL</error>
g = <error descr="Python does not support a trailing 'ul'">0x12ful</error>
h = <error descr="Python does not support a trailing 'uL'">0X12fuL</error>
@@ -20,4 +20,4 @@ s = <error descr="Python does not support a trailing 'llu'">12llu</error>
t = <error descr="Python does not support a trailing 'llU'">12llU</error>
u = <error descr="Python does not support a trailing 'LLu'">12LLu</error>
v = <error descr="Python does not support a trailing 'LLU'">12LLU</error>
w = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>
w = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>

View File

@@ -1 +1 @@
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax. The print statement has been replaced with a print() function">print "One value"</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. The print statement has been replaced with a print() function">print "One value"</warning>

View File

@@ -1,4 +1,4 @@
try:
a
except :
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax">raise ImportError, ImportWarning</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax">raise ImportError, ImportWarning</warning>

View File

@@ -1 +1 @@
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>

View File

@@ -6,11 +6,11 @@ a = <error descr="Python version 2.7 does not support a 'F' prefix"><warning des
a = <error descr="Python version 2.7 does not support a 'F' prefix"><warning descr="Python version 3.5 does not support a 'F' prefix">F</warning></error>""
a = <error descr="Python version 2.7 does not support a 'RF' prefix"><warning descr="Python version 3.5 does not support a 'RF' prefix">rf</warning></error>""
a = <error descr="Python version 2.7 does not support a 'FR' prefix"><warning descr="Python version 3.5 does not support a 'FR' prefix">fr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'FU' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'FU' prefix">fu</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UF' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'UF' prefix">uf</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BF' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'BF' prefix">bf</warning></error>""
a = <error descr="Python version 2.7 does not support a 'FB' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'FB' prefix">fb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UFR' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'UFR' prefix">ufr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'FU' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'FU' prefix">fu</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UF' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'UF' prefix">uf</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BF' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'BF' prefix">bf</warning></error>""
a = <error descr="Python version 2.7 does not support a 'FB' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'FB' prefix">fb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UFR' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'UFR' prefix">ufr</warning></error>""
# python 3.3
@@ -35,7 +35,7 @@ a = b""
a = u""
a = r""
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'UR' prefix">ur</warning>""
a = b""
a = br""
@@ -43,14 +43,14 @@ a = br""
a = u""
a = r""
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'UR' prefix">ur</warning>""
# combined, PY-32321
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not allow to mix bytes and non-bytes literals">u"" b""</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not allow to mix bytes and non-bytes literals">r"" b""</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not allow to mix bytes and non-bytes literals"><error descr="Python version 2.7 does not support a 'F' prefix"><warning descr="Python version 3.5 does not support a 'F' prefix">f</warning></error>"" b""</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not allow to mix bytes and non-bytes literals">u"" b""</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not allow to mix bytes and non-bytes literals">r"" b""</warning>
b = <warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not allow to mix bytes and non-bytes literals"><error descr="Python version 2.7 does not support a 'F' prefix"><warning descr="Python version 3.5 does not support a 'F' prefix">f</warning></error>"" b""</warning>
# never was available
a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'RR' prefix">rr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'BB' prefix">bb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support a 'UU' prefix">uu</warning></error>""
a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'RR' prefix">rr</warning></error>""
a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'BB' prefix">bb</warning></error>""
a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support a 'UU' prefix">uu</warning></error>""

View File

@@ -3,7 +3,7 @@
# oct
<warning descr="Python versions 2.7, 3.5 do not support underscores in numeric literals">0o1_23</warning>
<error descr="Python version 3.6 does not support this syntax. It requires '0o' prefix for octal literals"><warning descr="Python versions 2.7, 3.5 do not support underscores in numeric literals"><warning descr="Python versions 3.5, 3.7, 3.8, 3.9, 3.10 do not support this syntax. It requires '0o' prefix for octal literals">01_23</warning></warning></error>
<error descr="Python version 3.6 does not support this syntax. It requires '0o' prefix for octal literals"><warning descr="Python versions 2.7, 3.5 do not support underscores in numeric literals"><warning descr="Python versions 3.5, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. It requires '0o' prefix for octal literals">01_23</warning></warning></error>
# bin
<warning descr="Python versions 2.7, 3.5 do not support underscores in numeric literals">0b_0011_1111_0100_1110</warning>

View File

@@ -1,14 +1,14 @@
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">async</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">async</warning>(object):
pass
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">await</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">await</warning>(object):
pass
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">async</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">async</warning>():
pass
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">await</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">await</warning>():
pass
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">async</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">await</warning> = 2
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">async</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">await</warning> = 2

View File

@@ -1 +1 @@
print(<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support <>, use != instead">a<caret> <> b</warning>)
print(<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support <>, use != instead">a<caret> <> b</warning>)

View File

@@ -1 +1 @@
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 do not support this syntax. The print statement has been replaced with a print() function">print "foo"</warning>
<warning descr="Python versions 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 do not support this syntax. The print statement has been replaced with a print() function">print "foo"</warning>

View File

@@ -1 +1 @@
<error descr="Python version 3.10 does not support a trailing 'l'">1000l</error>
<error descr="Python version 3.11 does not support a trailing 'l'">1000l</error>

View File

@@ -1,2 +1,2 @@
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">a<caret>sync</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">a<caret>sync</warning>(object):
pass

View File

@@ -1,2 +1,2 @@
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">a<caret>sync</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">a<caret>sync</warning>():
pass

View File

@@ -1 +1 @@
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">async</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">async</warning> = 1

View File

@@ -1,2 +1,2 @@
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">a<caret>wait</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">a<caret>wait</warning>(object):
pass

View File

@@ -1,2 +1,2 @@
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">a<caret>wait</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">a<caret>wait</warning>():
pass

View File

@@ -1 +1 @@
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10 do not allow 'async' and 'await' as names">await</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9, 3.10, 3.11 do not allow 'async' and 'await' as names">await</warning> = 1