Skip to content

Commit

Permalink
chore: remove Python 3.8 support
Browse files Browse the repository at this point in the history
Removes support for Python 3.8, which became EOL on 2024-10-07:

https://peps.python.org/pep-0569/
  • Loading branch information
johnfraney committed Jan 17, 2025
1 parent 6e66c2c commit 3bc5126
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: "Unit Tests"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ["ubuntu-22.04", "windows-2022", "macos-13"]
runs-on: ${{ matrix.runs-on }}
steps:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance"
Expand All @@ -33,7 +34,7 @@ maintainers = [
]
name = "ssort"
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"

[project.license]
text = "MIT"
Expand Down
16 changes: 0 additions & 16 deletions tests/test_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@

from ssort._bindings import get_bindings

# Most walrus operator syntax is valid in 3.8. Only use this decorator for the
# rare cases where it is not.
walrus_operator = pytest.mark.skipif(
sys.version_info < (3, 9),
reason="some walrus operator syntax is not valid prior to python 3.9",
)


match_statement = pytest.mark.skipif(
sys.version_info < (3, 10),
Expand Down Expand Up @@ -96,7 +89,6 @@ def function(
]


@walrus_operator
def test_function_def_bindings_walrus_decorator():
node = _parse(
"""
Expand Down Expand Up @@ -165,7 +157,6 @@ async def function(
]


@walrus_operator
def test_async_function_def_bindings_walrus_decorator():
node = _parse(
"""
Expand Down Expand Up @@ -201,7 +192,6 @@ def b(self):
assert list(get_bindings(node)) == ["ClassName"]


@walrus_operator
def test_class_def_bindings_walrus_decorator():
node = _parse(
"""
Expand Down Expand Up @@ -1004,17 +994,11 @@ def test_set_bindings_unpack():
assert list(get_bindings(node)) == []


@walrus_operator
def test_set_bindings_walrus():
node = _parse("{a, {b := genb()}, c}")
assert list(get_bindings(node)) == ["b"]


def test_set_bindings_walrus_py38():
node = _parse("{a, {(b := genb())}, c}")
assert list(get_bindings(node)) == ["b"]


def test_set_bindings_walrus_unpack():
node = _parse("{a, b, *(rest := other)}")
assert list(get_bindings(node)) == ["rest"]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38,py39,py310,py311,py312,black,isort,ssort,pyflakes,pylint,mypy
envlist = py39,py310,py311,py312,black,isort,ssort,pyflakes,pylint,mypy
isolated_build = true

[testenv]
Expand Down

0 comments on commit 3bc5126

Please sign in to comment.