diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0c67934f1..def6e4db5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9"] + python-version: ["3.11"] steps: - uses: actions/checkout@v2 diff --git a/isort/settings.py b/isort/settings.py index 3c891411f..104d54865 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -251,7 +251,7 @@ def __post_init__(self) -> None: if sys.version_info.major == 2 and sys.version_info.minor <= 6: py_version = "2" elif sys.version_info.major == 3 and ( - sys.version_info.minor <= 6 or sys.version_info.minor >= 11 + sys.version_info.minor <= 5 or sys.version_info.minor >= 12 ): py_version = "3" else: diff --git a/isort/stdlibs/__init__.py b/isort/stdlibs/__init__.py index 7b00716b8..3394a7eda 100644 --- a/isort/stdlibs/__init__.py +++ b/isort/stdlibs/__init__.py @@ -1,2 +1,2 @@ from . import all as _all -from . import py2, py3, py27, py35, py36, py37, py38, py39, py310 +from . import py2, py3, py27, py36, py37, py38, py39, py310, py311 diff --git a/isort/stdlibs/py3.py b/isort/stdlibs/py3.py index 4e0b5eec9..988254385 100644 --- a/isort/stdlibs/py3.py +++ b/isort/stdlibs/py3.py @@ -1,3 +1,3 @@ -from . import py35, py36, py37, py38, py39, py310 +from . import py36, py37, py38, py39, py310, py311 -stdlib = py35.stdlib | py36.stdlib | py37.stdlib | py38.stdlib | py39.stdlib | py310.stdlib +stdlib = py36.stdlib | py37.stdlib | py38.stdlib | py39.stdlib | py310.stdlib | py311.stdlib diff --git a/isort/stdlibs/py35.py b/isort/stdlibs/py35.py deleted file mode 100644 index 29ab9aeba..000000000 --- a/isort/stdlibs/py35.py +++ /dev/null @@ -1,223 +0,0 @@ -""" -File contains the standard library of Python 3.5. - -DO NOT EDIT. If the standard library changes, a new list should be created -using the mkstdlibs.py script. -""" - -stdlib = { - "_ast", - "_dummy_thread", - "_thread", - "abc", - "aifc", - "argparse", - "array", - "ast", - "asynchat", - "asyncio", - "asyncore", - "atexit", - "audioop", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "compileall", - "concurrent", - "configparser", - "contextlib", - "copy", - "copyreg", - "crypt", - "csv", - "ctypes", - "curses", - "datetime", - "dbm", - "decimal", - "difflib", - "dis", - "distutils", - "doctest", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "enum", - "errno", - "faulthandler", - "fcntl", - "filecmp", - "fileinput", - "fnmatch", - "formatter", - "fpectl", - "fractions", - "ftplib", - "functools", - "gc", - "getopt", - "getpass", - "gettext", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "html", - "http", - "imaplib", - "imghdr", - "imp", - "importlib", - "inspect", - "io", - "ipaddress", - "itertools", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "lzma", - "macpath", - "mailbox", - "mailcap", - "marshal", - "math", - "mimetypes", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multiprocessing", - "netrc", - "nis", - "nntplib", - "ntpath", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pathlib", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "poplib", - "posix", - "posixpath", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "queue", - "quopri", - "random", - "re", - "readline", - "reprlib", - "resource", - "rlcompleter", - "runpy", - "sched", - "select", - "selectors", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "socketserver", - "spwd", - "sqlite3", - "sre", - "sre_compile", - "sre_constants", - "sre_parse", - "ssl", - "stat", - "statistics", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "threading", - "time", - "timeit", - "tkinter", - "token", - "tokenize", - "trace", - "traceback", - "tracemalloc", - "tty", - "turtle", - "turtledemo", - "types", - "typing", - "unicodedata", - "unittest", - "urllib", - "uu", - "uuid", - "venv", - "warnings", - "wave", - "weakref", - "webbrowser", - "winreg", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpc", - "zipapp", - "zipfile", - "zipimport", - "zlib", -} diff --git a/tests/unit/test_importable.py b/tests/unit/test_importable.py index d45ca5063..6156c454b 100644 --- a/tests/unit/test_importable.py +++ b/tests/unit/test_importable.py @@ -31,9 +31,12 @@ def test_importable(): import isort.stdlibs.py2 import isort.stdlibs.py3 import isort.stdlibs.py27 - import isort.stdlibs.py35 import isort.stdlibs.py36 import isort.stdlibs.py37 + import isort.stdlibs.py38 + import isort.stdlibs.py39 + import isort.stdlibs.py310 + import isort.stdlibs.py311 import isort.utils import isort.wrap import isort.wrap_modes