Skip to content

Commit 754b55a

Browse files
Fixed #1785: module incorrectly excluded from stdlib definition.
1 parent c467a98 commit 754b55a

File tree

8 files changed

+8
-1
lines changed

8 files changed

+8
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Find out more about isort's release policy [here](https://pycqa.github.io/isort/
88
- Improved text of skipped file message to mention gitignore feature.
99
- Fixed #1779: Pylama integration ignores pylama specific isort config overrides.
1010
- Fixed #1781: `--from-first` CLI flag shouldn't take any arguments.
11+
- Fixed #1785: `_ast` module incorrectly excluded from stdlib definition.
1112

1213
### 5.9.2 July 8th 2021
1314
- Improved behavior of `isort --check --atomic` against Cython files.

isort/stdlibs/py27.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"UserString",
4141
"W",
4242
"__builtin__",
43+
"_ast",
4344
"_winreg",
4445
"abc",
4546
"aepack",

isort/stdlibs/py35.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
stdlib = {
9+
"_ast",
910
"_dummy_thread",
1011
"_thread",
1112
"abc",

isort/stdlibs/py36.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
stdlib = {
9+
"_ast",
910
"_dummy_thread",
1011
"_thread",
1112
"abc",

isort/stdlibs/py37.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
stdlib = {
9+
"_ast",
910
"_dummy_thread",
1011
"_thread",
1112
"abc",

isort/stdlibs/py38.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
stdlib = {
9+
"_ast",
910
"_dummy_thread",
1011
"_thread",
1112
"abc",

isort/stdlibs/py39.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
stdlib = {
9+
"_ast",
910
"_thread",
1011
"abc",
1112
"aifc",

scripts/mkstdlibs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FakeApp:
3131
invdata = fetch_inventory(FakeApp(), "", url)
3232

3333
# Any modules we want to enforce across Python versions stdlib can be included in set init
34-
modules = {"posixpath", "ntpath", "sre_constants", "sre_parse", "sre_compile", "sre"}
34+
modules = {"_ast", "posixpath", "ntpath", "sre_constants", "sre_parse", "sre_compile", "sre"}
3535
for module in invdata["py:module"]:
3636
root, *_ = module.split(".")
3737
if root not in ["__future__", "__main__"]:

0 commit comments

Comments
 (0)