Skip to content

Commit 79c842a

Browse files
authored
Add support for Python 3.13 (#524)
1 parent b03d7d7 commit 79c842a

File tree

7 files changed

+26
-16
lines changed

7 files changed

+26
-16
lines changed

.github/workflows/ci.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
runs-on: ubuntu-latest
175175
strategy:
176176
matrix:
177-
python-version: ["3.9", "3.10", "3.11", "3.12"]
177+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
178178
outputs:
179179
python-key: ${{ steps.generate-python-key.outputs.key }}
180180
steps:
@@ -186,7 +186,6 @@ jobs:
186186
with:
187187
python-version: ${{ matrix.python-version }}
188188
check-latest: true
189-
allow-prereleases: true
190189
- name: Generate partial Python venv restore key
191190
id: generate-python-key
192191
run: >-

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repos:
1313
- mccabe==0.7.0
1414
- pycodestyle==2.12.1
1515
- pyflakes==3.2.0
16+
- Flake8-pyproject==1.2.3
1617
files: ^(python_typing_update|script|tests)/.+\.py$
1718
exclude: *fixtures
1819
- repo: https://github.com/PyCQA/isort

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ Set the minimum Python syntax version to **3.11**. (Default: **3.9**)
140140
**`--py312-plus`**
141141
Set the minimum Python syntax version to **3.12**. (Default: **3.9**)
142142

143+
**`--py313-plus`**
144+
Set the minimum Python syntax version to **3.13**. (Default: **3.9**)
145+
143146

144147
## License
145148
This Project is licensed under the MIT license.

pyproject.toml

+14-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ classifiers = [
1717
"Programming Language :: Python :: 3.10",
1818
"Programming Language :: Python :: 3.11",
1919
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
2021
"Topic :: Software Development",
2122
]
2223
requires-python = ">=3.9"
@@ -28,6 +29,9 @@ dependencies = [
2829
"reorder-python-imports==3.14.0",
2930
]
3031

32+
[project.urls]
33+
"Source Code" = "https://github.com/cdce8p/python-typing-update"
34+
3135
[project.optional-dependencies]
3236
black = [
3337
"black==24.10.0",
@@ -68,7 +72,7 @@ asyncio_default_fixture_loop_scope = "function"
6872

6973
[tool.mypy]
7074
# https://mypy.readthedocs.io/en/stable/config_file.html
71-
python_version = 3.9
75+
python_version = "3.9"
7276
show_error_codes = true
7377
ignore_missing_imports = true
7478
strict = true
@@ -99,3 +103,12 @@ allow_any_generics = true
99103
# disallow_untyped_calls = false
100104
# disallow_untyped_defs = false
101105
# disallow_incomplete_defs = false
106+
107+
[tool.flake8]
108+
max_line_length = 119
109+
extend_exclude = [
110+
".github",
111+
".vscode",
112+
"tests/fixtures",
113+
"venv*",
114+
]

python_typing_update/__main__.py

+4
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ async def async_main(argv: list[str] | None = None) -> int:
113113
'--py312-plus',
114114
action='store_const', dest='min_version', const=(3, 12),
115115
)
116+
group_py_version.add_argument(
117+
'--py313-plus',
118+
action='store_const', dest='min_version', const=(3, 13),
119+
)
116120

117121
argv = argv or sys.argv[1:]
118122
args = parser.parse_args(argv)

setup.cfg

-13
This file was deleted.

tests/test_main.py

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ async def test_main(
115115
pytest.param(['--py38-plus']),
116116
pytest.param(['--py39-plus']),
117117
pytest.param(['--py310-plus']),
118+
pytest.param(['--py311-plus']),
119+
pytest.param(['--py312-plus']),
120+
pytest.param(['--py313-plus']),
118121
),
119122
)
120123
async def test_py_version(

0 commit comments

Comments
 (0)