Skip to content

Commit

Permalink
Remove support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Jan 9, 2025
1 parent 2063cda commit de6403c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ isort is a Python utility / library to sort imports alphabetically and
automatically separate into sections and by type. It provides a command line
utility, Python library and [plugins for various
editors](https://github.com/pycqa/isort/wiki/isort-Plugins) to
quickly sort all your imports. It requires Python 3.8+ to run but
quickly sort all your imports. It requires Python 3.9+ to run but
supports formatting Python 2 code too.

- [Try isort now from your browser!](https://pycqa.github.io/isort/docs/quick_start/0.-try.html)
Expand Down
1 change: 0 additions & 1 deletion docs/configuration/black_compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ language: python
python:
- "3.10"
- "3.9"
- "3.8"

install:
- pip install -r requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/github_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt requirements-test.txt"
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/1.-contributing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Account Requirements:

Base System Requirements:

- Python3.8+
- Python3.9+
- poetry
- bash or a bash compatible shell (should be auto-installed on Linux / Mac)
- WSL users running Ubuntu may need to install Python's venv module even after installing Python.
Expand Down
9 changes: 3 additions & 6 deletions isort/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,9 @@ def sort_file(
if not config.quiet:
print(f"Fixing {source_file.path}")
finally:
try: # Python 3.8+: use `missing_ok=True` instead of try except.
if not config.overwrite_in_place: # pragma: no branch
tmp_file = _tmp_file(source_file)
tmp_file.unlink()
except FileNotFoundError:
pass # pragma: no cover
if not config.overwrite_in_place: # pragma: no branch
tmp_file = _tmp_file(source_file)
tmp_file.unlink(missing_ok=True)
else:
changed = sort_stream(
input_stream=source_file.stream,
Expand Down
8 changes: 2 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -40,7 +39,7 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.8.0"
python = ">=3.9.0"
colorama = {version = ">=0.4.6", optional = true}

[tool.poetry.extras]
Expand Down Expand Up @@ -138,7 +137,7 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.mypy]
python_version = 3.8
python_version = 3.9
strict = true
follow_imports = "silent"
exclude = "isort/_vendored|tests/unit/example_projects|tests/unit/example_crlf_file.py"
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ux

result=0

for ver in {3.8,3.9,3.10}; do
for ver in {3.9,3.10}; do
# latest tag will override after each build, leaving only the newest python version tagged
docker build ./ --build-arg VERSION=$ver -t "isort:$ver" -t "isort:latest" && docker run "isort:$ver"
result=$(( $? + $result ))
Expand Down

0 comments on commit de6403c

Please sign in to comment.