Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1808: Add support for Python 3.10 #1809

Merged
merged 7 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: ["3.8"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: ["3.8"]

steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-rc.2"]
os: [ubuntu-latest, ubuntu-18.04, macos-latest, windows-latest]

steps:
Expand Down Expand Up @@ -48,11 +48,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: Install poetry
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
poetry install

# New poetry installer doesn't work well with Python 3.10 (see https://github.com/python-poetry/poetry/issues/4210).
- name: Use legacy poetry installer
if: startsWith(matrix.python-version, '3.10')
run: poetry config experimental.new-installer false

- name: Install dependencies
run: poetry install

- name: Test
shell: bash
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Find out more about isort's release policy [here](https://pycqa.github.io/isort/
- Implemented #1796: Switch to `tomli` for pyproject.toml configuration loader.
- Fixed #1801: CLI bug (--exend-skip-glob, overrides instead of extending).
- Fixed #1802: respect PATH customization in nested calls to git.
- Added support for Python 3.10

#### Potentially breaking changes:
- Fixed #1785: `_ast` module incorrectly excluded from stdlib definition.
Expand Down
2 changes: 1 addition & 1 deletion isort/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,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 <= 5 or sys.version_info.minor >= 9
sys.version_info.minor <= 5 or sys.version_info.minor >= 10
):
py_version = "3"
else:
Expand Down
2 changes: 1 addition & 1 deletion isort/stdlibs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from . import all as _all
from . import py2, py3, py27, py35, py36, py37, py38, py39
from . import py2, py3, py27, py35, py36, py37, py38, py39, py310
4 changes: 2 additions & 2 deletions isort/stdlibs/py3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import py35, py36, py37, py38, py39
from . import py35, py36, py37, py38, py39, py310

stdlib = py35.stdlib | py36.stdlib | py37.stdlib | py38.stdlib | py39.stdlib
stdlib = py35.stdlib | py36.stdlib | py37.stdlib | py38.stdlib | py39.stdlib | py310.stdlib
221 changes: 221 additions & 0 deletions isort/stdlibs/py310.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
"""
File contains the standard library of Python 3.10.

DO NOT EDIT. If the standard library changes, a new list should be created
using the mkstdlibs.py script.
"""

stdlib = {
"_ast",
"_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",
"contextvars",
"copy",
"copyreg",
"crypt",
"csv",
"ctypes",
"curses",
"dataclasses",
"datetime",
"dbm",
"decimal",
"difflib",
"dis",
"distutils",
"doctest",
"email",
"encodings",
"ensurepip",
"enum",
"errno",
"faulthandler",
"fcntl",
"filecmp",
"fileinput",
"fnmatch",
"fractions",
"ftplib",
"functools",
"gc",
"getopt",
"getpass",
"gettext",
"glob",
"graphlib",
"grp",
"gzip",
"hashlib",
"heapq",
"hmac",
"html",
"http",
"imaplib",
"imghdr",
"imp",
"importlib",
"inspect",
"io",
"ipaddress",
"itertools",
"json",
"keyword",
"lib2to3",
"linecache",
"locale",
"logging",
"lzma",
"mailbox",
"mailcap",
"marshal",
"math",
"mimetypes",
"mmap",
"modulefinder",
"msilib",
"msvcrt",
"multiprocessing",
"netrc",
"nis",
"nntplib",
"ntpath",
"numbers",
"operator",
"optparse",
"os",
"ossaudiodev",
"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",
"secrets",
"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",
"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",
"zoneinfo",
}
Loading