Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f8e800

Browse files
srittaugvanrossum
authored andcommitted
Drop support for Python 3.3 (#5248)
See also python/typeshed#2258 and python/typeshed#2260.
1 parent 03759c8 commit 5f8e800

6 files changed

Lines changed: 13 additions & 16 deletions

File tree

extensions/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
'Programming Language :: Python :: 2',
2121
'Programming Language :: Python :: 2.7',
2222
'Programming Language :: Python :: 3',
23-
'Programming Language :: Python :: 3.3',
2423
'Programming Language :: Python :: 3.4',
2524
'Programming Language :: Python :: 3.5',
2625
'Programming Language :: Python :: 3.6',

mypy/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def default_lib_path(data_dir: str,
385385
else:
386386
# For Python 2, we only have stubs for 2.7
387387
versions = ["2.7"]
388-
# E.g. for Python 3.5, try 3.5/, 3.4/, 3.3/, 3/, 2and3/.
388+
# E.g. for Python 3.6, try 3.6/, 3.5/, 3.4/, 3/, 2and3/.
389389
for v in versions + [str(pyversion[0]), '2and3']:
390390
for lib_type in ['stdlib', 'third_party']:
391391
stubdir = os.path.join(typeshed_dir, lib_type, v)

mypy/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PYTHON2_VERSION = (2, 7)
22
PYTHON3_VERSION = (3, 6)
3-
PYTHON3_VERSION_MIN = (3, 3)
3+
PYTHON3_VERSION_MIN = (3, 4)
44
CACHE_DIR = '.mypy_cache'
55
CONFIG_FILE = 'mypy.ini'
66
SHARED_CONFIG_FILES = ('setup.cfg',)

runtests.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212

1313

1414
def get_versions() -> List[str]:
15+
# generates list of python versions to use.
16+
# For Python2, this is only [2.7].
17+
# Otherwise, it is [3.x, ..., 3.1, 3.0], where x is the version
18+
# of the running interpreter.
1519
major = sys.version_info[0]
1620
minor = sys.version_info[1]
1721
if major == 2:
1822
return ['2.7']
1923
else:
20-
# generates list of python versions to use.
21-
# For Python2, this is only [2.7].
22-
# Otherwise, it is [3.4, 3.3, 3.2, 3.1, 3.0].
2324
return ['%d.%d' % (major, i) for i in range(minor, -1, -1)]
2425

2526

@@ -175,7 +176,7 @@ def add_stubs(driver: Driver) -> None:
175176

176177
modules = {'typing'}
177178
# TODO: This should also test Python 2, and pass pyversion accordingly.
178-
for version in ["2and3", "3", "3.3", "3.4", "3.5"]:
179+
for version in ["2and3", "3", "3.5"]:
179180
for stub_type in ['builtins', 'stdlib', 'third_party']:
180181
stubdir = join('typeshed', stub_type, version)
181182
for f in find_files(stubdir, suffix='.pyi'):

scripts/stubtest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
import dumpmodule
1919

20-
if sys.version_info < (3, 4):
21-
from singledispatch import singledispatch
22-
else:
23-
from functools import singledispatch
20+
from functools import singledispatch
2421

2522
# TODO: email.contentmanager has a symbol table with a None node.
2623
# This seems like it should not be.

test-data/unit/cmdline.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,13 @@ python_version = 2.6
508508
mypy.ini: [mypy]: python_version: Python 2.6 is not supported (must be 2.7)
509509
== Return code: 0
510510

511-
[case testPythonVersionTooOld32]
511+
[case testPythonVersionTooOld33]
512512
# cmd: mypy -c pass
513513
[file mypy.ini]
514514
[[mypy]
515-
python_version = 3.2
515+
python_version = 3.3
516516
[out]
517-
mypy.ini: [mypy]: python_version: Python 3.2 is not supported (must be 3.3 or higher)
517+
mypy.ini: [mypy]: python_version: Python 3.3 is not supported (must be 3.4 or higher)
518518
== Return code: 0
519519

520520
[case testPythonVersionTooNew28]
@@ -542,11 +542,11 @@ mypy.ini: [mypy]: python_version: Python major version '4' out of range (must be
542542
python_version = 2.7
543543
[out]
544544

545-
[case testPythonVersionAccepted33]
545+
[case testPythonVersionAccepted34]
546546
# cmd: mypy -c pass
547547
[file mypy.ini]
548548
[[mypy]
549-
python_version = 3.3
549+
python_version = 3.4
550550
[out]
551551

552552
[case testPythonVersionAccepted36]

0 commit comments

Comments
 (0)