Skip to content

Commit acf43fc

Browse files
committedJul 30, 2021
Revert "Revert "Fixed #1785: module incorrectly excluded from stdlib definition.""
This reverts commit 8ae8d50.
1 parent a433308 commit acf43fc

File tree

9 files changed

+15
-2
lines changed

9 files changed

+15
-2
lines changed
 

‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changelog
44
NOTE: isort follows the [semver](https://semver.org/) versioning standard.
55
Find out more about isort's release policy [here](https://pycqa.github.io/isort/docs/major_releases/release_policy).
66

7+
### 5.10.0 TBD
8+
9+
#### Potentially breaking changes:
10+
- Fixed #1785: `_ast` module incorrectly excluded from stdlib definition.
11+
712
### 5.9.3 July 28 2021
813
- Improved text of skipped file message to mention gitignore feature.
914
- Made all exceptions pickleable.

‎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__"]:

‎tests/integration/test_projects_using_isort.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_websockets(tmpdir):
8383

8484
def test_airflow(tmpdir):
8585
git_clone("https://github.com/apache/airflow.git", tmpdir)
86-
run_isort([str(tmpdir), "--skip-glob", "*/_vendor/*"])
86+
run_isort([str(tmpdir), "--skip-glob", "*/_vendor/*", "--skip", "tests"])
8787

8888

8989
def test_typeshed(tmpdir):
@@ -97,6 +97,8 @@ def test_typeshed(tmpdir):
9797
"scripts",
9898
"--skip",
9999
f"{tmpdir}/third_party/2and3/yaml/__init__.pyi",
100+
"--skip",
101+
f"{tmpdir}/stdlib/ast.pyi",
100102
)
101103
)
102104

0 commit comments

Comments
 (0)
Please sign in to comment.