Skip to content

Commit 5550e05

Browse files
authored
Drop support for running Python with 3.8 (#423)
1 parent d1fbd81 commit 5550e05

File tree

9 files changed

+19
-20
lines changed

9 files changed

+19
-20
lines changed

.github/workflows/cache_ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
ARTIFACT_NAME: cleanup_cache
1919
ALL_VENV_PREFIXES: venv, venv-base, pre-commit
20-
ALL_PYTHON_VERSIONS: 3.8, 3.9, 3.10, 3.11
20+
ALL_PYTHON_VERSIONS: 3.9, 3.10, 3.11, 3.12
2121
steps:
2222
- name: Download workflow artifact
2323
id: download-artifact

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
CACHE_VERSION: 1
12-
DEFAULT_PYTHON: 3.8
12+
DEFAULT_PYTHON: 3.9
1313
LIB_FOLDER: python_typing_update
1414
PRE_COMMIT_CACHE: ~/.cache/pre-commit
1515

@@ -174,7 +174,7 @@ jobs:
174174
runs-on: ubuntu-latest
175175
strategy:
176176
matrix:
177-
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
177+
python-version: ["3.9", "3.10", "3.11", "3.12"]
178178
outputs:
179179
python-key: ${{ steps.generate-python-key.outputs.key }}
180180
steps:

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: v3.15.0
44
hooks:
55
- id: pyupgrade
6-
args: [--py38-plus]
6+
args: [--py39-plus]
77
exclude: &fixtures ^tests/fixtures/.+\.py$
88
- repo: https://github.com/pycqa/flake8
99
rev: 6.1.0

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Marc Mueller
3+
Copyright (c) 2024 Marc Mueller
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,22 @@ Check `git diff` before committing!
123123
### Python version options
124124

125125
**`--py37-plus`**
126-
Set the minimum Python syntax version to **3.7**. (Default: **3.8**)
126+
Set the minimum Python syntax version to **3.7**. (Default: **3.9**)
127127

128128
**`--py38-plus`**
129-
Set the minimum Python syntax version to **3.8**. This is the default.
129+
Set the minimum Python syntax version to **3.8**. (Default: **3.9**)
130130

131131
**`--py39-plus`**
132-
Set the minimum Python syntax version to **3.9**. (Default: **3.8**)
132+
Set the minimum Python syntax version to **3.9**. This is the default.
133133

134134
**`--py310-plus`**
135-
Set the minimum Python syntax version to **3.10**. (Default: **3.8**)
135+
Set the minimum Python syntax version to **3.10**. (Default: **3.9**)
136136

137137
**`--py311-plus`**
138-
Set the minimum Python syntax version to **3.11**. (Default: **3.8**)
138+
Set the minimum Python syntax version to **3.11**. (Default: **3.9**)
139139

140140
**`--py312-plus`**
141-
Set the minimum Python syntax version to **3.12**. (Default: **3.8**)
141+
Set the minimum Python syntax version to **3.12**. (Default: **3.9**)
142142

143143

144144
## License

pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ignore=
33
load-plugins =
44
pylint.extensions.typing,
55
pylint.extensions.code_style,
6-
py-version = 3.8
6+
py-version = 3.9
77

88
[BASIC]
99
good-names =

pyproject.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ keywords = ["typing", "pep585", "pep604"]
1313
classifiers = [
1414
"Development Status :: 4 - Beta",
1515
"Intended Audience :: Developers",
16-
"Programming Language :: Python :: 3.8",
1716
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
2019
"Programming Language :: Python :: 3.12",
2120
"Topic :: Software Development",
2221
]
23-
requires-python = ">=3.8"
22+
requires-python = ">=3.9"
2423
dependencies = [
2524
"aiofiles==23.2.1",
2625
"autoflake==2.2.1",
@@ -67,7 +66,7 @@ asyncio_mode = "auto" # https://github.com/pytest-dev/pytest-asyncio#modes
6766

6867
[tool.mypy]
6968
# https://mypy.readthedocs.io/en/stable/config_file.html
70-
python_version = 3.8
69+
python_version = 3.9
7170
show_error_codes = true
7271
ignore_missing_imports = true
7372
strict = true

python_typing_update/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async def async_main(argv: list[str] | None = None) -> int:
9090
group_py_version = py_version_options.add_mutually_exclusive_group()
9191
group_py_version.add_argument(
9292
'--py37-plus',
93-
action='store_const', dest='min_version', const=(3, 7), default=(3, 8),
93+
action='store_const', dest='min_version', const=(3, 7), default=(3, 9),
9494
)
9595
group_py_version.add_argument(
9696
'--py38-plus',

tests/test_main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def async_test_main(
5858
(
5959
pytest.param(
6060
'changed.py', 'changed_fixed.py',
61-
None, 0,
61+
['--py38-plus'], 0,
6262
id="typing_updated",
6363
),
6464
pytest.param(
@@ -93,7 +93,7 @@ async def async_test_main(
9393
),
9494
pytest.param(
9595
'changed.py', 'changed_fixed.py',
96-
['-v'], 12,
96+
['-v', '--py38-plus'], 12,
9797
id="debug",
9898
),
9999
),
@@ -463,12 +463,12 @@ async def test_main_unused_import_comment(
463463
(
464464
pytest.param(
465465
'keep_updates.py', 'keep_updates_no_change.py',
466-
None, 0,
466+
['--py38-plus'], 0,
467467
id="no_import_removed",
468468
),
469469
pytest.param(
470470
'keep_updates.py', 'keep_updates_fixed.py',
471-
['--keep-updates'], 0,
471+
['--keep-updates', '--py38-plus'], 0,
472472
id="keep_updates",
473473
),
474474
),

0 commit comments

Comments
 (0)