Skip to content

Commit 2bd1309

Browse files
committed
#24: remove support for Python 3.8, add support for Python 3.13.
1 parent e940381 commit 2bd1309

34 files changed

Lines changed: 1224 additions & 924 deletions

.cruft.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy",
3-
"commit": "76810704d72f5bc55abceb1db8353070cd9ea500",
3+
"commit": "b2e674a3486fadc2c666cc51493bb516fdf75753",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -10,9 +10,9 @@
1010
"is_sub_package": true,
1111
"author": "Perry Goy",
1212
"author_email": "perry.goy@gmail.com",
13-
"license": "MIT",
1413
"github_username": "ScreenPyHQ",
15-
"_template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy"
14+
"_template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy",
15+
"_commit": "b2e674a3486fadc2c666cc51493bb516fdf75753"
1616
}
1717
},
1818
"directory": null

.github/workflows/cruft.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Cruft
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.13"]
18+
os: [ubuntu-latest]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
cache: 'pip'
27+
- name: Install dependencies
28+
shell: bash
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -e .[dev]
32+
- name: Run Cruft
33+
run: |
34+
cruft check

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1818
os: [ubuntu-latest]
1919

2020
steps:

.github/workflows/poetry.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
max-parallel: 9
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.12"]
19+
python-version: ["3.13"]
2020
os: [ubuntu-latest]
21-
poetry-version: ["1.6.1"]
21+
poetry-version: ["2.1.3"]
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -32,8 +32,5 @@ jobs:
3232
with:
3333
poetry-version: ${{ matrix.poetry-version }}
3434

35-
- name: Check toml structure
36-
run: poetry check
37-
38-
- name: Check lock file
39-
run: poetry lock --check
35+
- name: Check lock file is consistent with pyproject
36+
run: poetry check --lock

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
pip install
2424
poetry
2525
--user
26-
- name: Build ScreenPy Playwright
26+
- name: "Build ScreenPy Playwright"
2727
run: >-
2828
python -m
2929
poetry

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
max-parallel: 9
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2020
os: [ubuntu-latest]
2121

2222
steps:

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,23 @@ pre-check-in: black-check ruff-check mypy
3434

3535
pre-check-in-fix: black-fix ruff-fix mypy
3636

37-
.PHONY: pre-check-in pre-check-in-fix
37+
lint: black-check ruff-check
38+
39+
lint-fix: black-fix ruff-fix
40+
41+
.PHONY: pre-check-in pre-check-in-fix lint lint-fix
3842

3943
# requires poetry-plugin-export
4044
requirements:
4145
poetry export --without-hashes --extras dev -f requirements.txt > requirements.txt
4246

4347
.PHONY: requirements
4448

49+
cruft-update:
50+
cruft update --allow-untracked-files
51+
52+
.PHONY: cruft-update
53+
4554
################################################################################
4655
# sub-package specific
4756

poetry.lock

Lines changed: 1036 additions & 788 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ build-backend = "poetry.core.masonry.api"
1919

2020

2121
[tool.black]
22-
target-version = ['py312']
22+
target-version = ['py313']
2323
extend-exclude = '''
2424
# A regex preceded with ^/ will apply only to files and directories
2525
# in the root of the project.
@@ -36,68 +36,34 @@ extend-exclude = '''
3636

3737

3838
[tool.ruff]
39-
target-version = "py38" # minimum supported version
39+
target-version = "py39" # minimum supported version
4040
line-length = 88 # same as Black.
41+
output-format = "concise"
4142
extend-exclude = [
4243
"docs",
4344
]
4445

4546
[tool.ruff.lint]
4647
select = [
47-
"A", # flake8-builtins
48-
"ANN", # flake8-annotations
49-
"ARG", # flake8-unused-arguments
50-
"B", # flake8-bugbear
51-
"BLE", # flake8-blind-except
52-
"C4", # flake8-comprehensions
53-
"D", # pydocstyle
54-
"E", # pycodestyle error
55-
"EM", # flake8-errmsg
56-
"ERA", # eradicate
57-
"F", # Pyflakes
58-
"FA", # flake8-future-annotations
59-
"FBT", # flake8-boolean-trap
60-
"FIX", # flake8-fixme
61-
"FLY", # flynt
62-
"I", # isort
63-
"ICN", # flake8-import-conventions
64-
"ISC", # flake8-implicit-str-concat
65-
"PGH", # pygrep-hooks
66-
"PIE", # flake8-pie
67-
"PL", # pylint
68-
"PT", # flake8-pytest-style
69-
"Q", # flake8-quotes
70-
"RET", # flake8-return
71-
"RSE", # flake8-raise
72-
"RUF", # ruff specific
73-
"SIM", # flake8-simplify
74-
"T10", # flake8-debugger
75-
"T20", # flake8-print
76-
"TCH", # flake8-type-checking
77-
"TRY", # tryceratops
78-
"UP", # python upgrade
79-
"W", # pycodestyle warning
80-
"YTT", # flake8-2020
81-
82-
# we would like these someday, but not yet
83-
# "FURB", # refurb
48+
"ALL", # let's get all the new hotness and ignore as we need!
8449
]
8550
ignore = [
86-
"D107", # missing __init__ docstring, we do that in the class docstring.
87-
"D203", # one blank line before class docstring, no thanks!
88-
"D212", # multi line summary first line, we want a one line summary.
89-
"ANN101", # missing self annotation, we only annotate self when we return it.
90-
"ANN102", # missing cls annotation, we only annotate cls when we return it.
51+
"D107", # missing __init__ docstring, we do that in the class docstring.
52+
"D203", # one blank line before class docstring, no thanks!
53+
"D212", # multi line summary first line, we want a one line summary.
54+
"E501", # black handles our line limits.
55+
"N818", # we like our conventions with readable error classes.
9156
]
9257

9358
extend-safe-fixes = [
94-
"EM101", "EM102",
95-
"TCH001", "TCH002", "TCH003", "TCH004",
9659
"C419",
9760
"D200", "D205", "D415",
61+
"EM101", "EM102",
9862
"PT003", "PT006", "PT018",
9963
"RET504",
64+
"TCH001", "TCH002", "TCH003", "TCH004",
10065
"UP006", "UP007",
66+
"W291",
10167
]
10268

10369
[tool.ruff.lint.flake8-pytest-style]
@@ -118,11 +84,20 @@ split-on-trailing-comma = false
11884

11985
[tool.ruff.lint.per-file-ignores]
12086
"tests/**" = [
121-
"D", # we don't need public-API-polished docstrings in tests.
122-
"FBT", # using a boolean as a test object is useful!
123-
"PLR", # likewise using specific numbers and strings in tests.
87+
"A", # import __doc__ is shadowing python builtin
88+
"D", # we don't need public-API-polished docstrings in tests.
89+
"FBT", # using a boolean as a test object is useful!
90+
"N802", # we are intentional about our capitalization!
91+
"N803", # we like our standards for variable names in tests.
92+
"N806", # we are intentional about our capitalization!
93+
"PLR", # using specific numbers and strings in tests is useful!
94+
"PYI034", # our Fake-ables need to be... weird.
95+
"S101", # we want to assert in tests!
96+
"SLF001", # we need to access private methods in tests.
12497
]
125-
"__version__.py" = ["D"]
98+
"__version__.py" = [
99+
"D", # we don't need public-API-polished docstrings in version.
100+
]
126101
"*.pyi" = [
127102
"PLR0913", # it's not our fault they have too many parameters!
128103
]
@@ -132,6 +107,7 @@ split-on-trailing-comma = false
132107
# END OF BOILERPLATE ScreenPyHQ CONFIGURATIONS #
133108
################################################################################
134109

110+
135111
[tool.poetry]
136112
name = "screenpy_playwright"
137113
version = "0.0.6"
@@ -145,11 +121,11 @@ readme = "README.md"
145121
classifiers = [
146122
"Operating System :: OS Independent",
147123
"Programming Language :: Python :: 3 :: Only",
148-
"Programming Language :: Python :: 3.8",
149124
"Programming Language :: Python :: 3.9",
150125
"Programming Language :: Python :: 3.10",
151126
"Programming Language :: Python :: 3.11",
152127
"Programming Language :: Python :: 3.12",
128+
"Programming Language :: Python :: 3.13",
153129
"Development Status :: 5 - Production/Stable",
154130
"Intended Audience :: Developers",
155131
"Topic :: Software Development :: Quality Assurance",
@@ -168,11 +144,11 @@ classifiers = [
168144
# so we dont have two different sets of package versions to update.
169145

170146
[tool.poetry.dependencies]
171-
python = "^3.8"
147+
python = "^3.9"
172148

173149
screenpy = ">=4.0.2"
174150
playwright = ">=1.39.0"
175-
importlib_metadata = {version = "*", python = "3.8.*"}
151+
importlib_metadata = {version = "*", python = "3.9.*"}
176152

177153
# convenience packages for development
178154
black = {version = "*", optional = true}

screenpy_playwright/__version__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
r"""
2-
,-. ,-. ,-. ,--. ,--. . . ;-. . ,
3-
( ` / | ) | | |\ | | ) \ /
4-
`-. | |-< |- |- | \| |-' Y
5-
. ) \ | \ | | | | | |
6-
`-' `;-.' ,' `--,.`-.' ', , ' . ,-.' , ,-. . . ,---.
7-
| ) | / \ \ / | . | | ) | / | | |
8-
|-' | |--| Y | ) ) |-< | | -. |--| |
9-
| | | | | |/|/ | \ | \ | | | |
10-
' `--' ' ' ' ' ' ' ' ' `-' ' ' '
2+
,-. ,-. ,-. ,--. ,--. . . ;-. . ,
3+
( ` / | ) | | |\ | | ) \ /
4+
`-. | |-< |- |- | \| |-' Y
5+
. ) \ | \ | | | | | |
6+
`-' `;-.' ,' `--,.`-.' ', , ' . ,-.' , ,-. . . ,---.
7+
| ) | / \ \ / | . | | ) | / | | |
8+
|-' | |--| Y | ) ) |-< | | -. |--| |
9+
| | | | | |/|/ | \ | \ | | | |
10+
' `--' ' ' ' ' ' ' ' ' `-' ' ' '
1111
"""
1212

1313
import importlib.metadata

0 commit comments

Comments
 (0)