Skip to content

Commit

Permalink
Revert "Revert "Fixed #1785: module incorrectly excluded from stdlib …
Browse files Browse the repository at this point in the history
…definition.""

This reverts commit 8ae8d50.
  • Loading branch information
timothycrosley committed Jul 30, 2021
1 parent a433308 commit acf43fc
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,11 @@ Changelog
NOTE: isort follows the [semver](https://semver.org/) versioning standard.
Find out more about isort's release policy [here](https://pycqa.github.io/isort/docs/major_releases/release_policy).

### 5.10.0 TBD

#### Potentially breaking changes:
- Fixed #1785: `_ast` module incorrectly excluded from stdlib definition.

### 5.9.3 July 28 2021
- Improved text of skipped file message to mention gitignore feature.
- Made all exceptions pickleable.
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py27.py
Expand Up @@ -40,6 +40,7 @@
"UserString",
"W",
"__builtin__",
"_ast",
"_winreg",
"abc",
"aepack",
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py35.py
Expand Up @@ -6,6 +6,7 @@
"""

stdlib = {
"_ast",
"_dummy_thread",
"_thread",
"abc",
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py36.py
Expand Up @@ -6,6 +6,7 @@
"""

stdlib = {
"_ast",
"_dummy_thread",
"_thread",
"abc",
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py37.py
Expand Up @@ -6,6 +6,7 @@
"""

stdlib = {
"_ast",
"_dummy_thread",
"_thread",
"abc",
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py38.py
Expand Up @@ -6,6 +6,7 @@
"""

stdlib = {
"_ast",
"_dummy_thread",
"_thread",
"abc",
Expand Down
1 change: 1 addition & 0 deletions isort/stdlibs/py39.py
Expand Up @@ -6,6 +6,7 @@
"""

stdlib = {
"_ast",
"_thread",
"abc",
"aifc",
Expand Down
2 changes: 1 addition & 1 deletion scripts/mkstdlibs.py
Expand Up @@ -31,7 +31,7 @@ class FakeApp:
invdata = fetch_inventory(FakeApp(), "", url)

# Any modules we want to enforce across Python versions stdlib can be included in set init
modules = {"posixpath", "ntpath", "sre_constants", "sre_parse", "sre_compile", "sre"}
modules = {"_ast", "posixpath", "ntpath", "sre_constants", "sre_parse", "sre_compile", "sre"}
for module in invdata["py:module"]:
root, *_ = module.split(".")
if root not in ["__future__", "__main__"]:
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/test_projects_using_isort.py
Expand Up @@ -83,7 +83,7 @@ def test_websockets(tmpdir):

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


def test_typeshed(tmpdir):
Expand All @@ -97,6 +97,8 @@ def test_typeshed(tmpdir):
"scripts",
"--skip",
f"{tmpdir}/third_party/2and3/yaml/__init__.pyi",
"--skip",
f"{tmpdir}/stdlib/ast.pyi",
)
)

Expand Down

0 comments on commit acf43fc

Please sign in to comment.