Skip to content

Commit 79fea5d

Browse files
committed
Drop support for 3.8 and apply some formatting/skel updates.
1 parent 67bbe3f commit 79fea5d

File tree

14 files changed

+94
-110
lines changed

14 files changed

+94
-110
lines changed

.cookiecutterrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)
22

33
default_context:
4-
allow_tests_inside_package: 'no'
5-
c_extension_function: '-'
6-
c_extension_module: '-'
74
c_extension_optional: 'no'
85
c_extension_support: 'no'
96
codacy: 'no'
@@ -17,10 +14,12 @@ default_context:
1714
email: contact@ionelmc.ro
1815
formatter_quote_style: single
1916
full_name: Ionel Cristian Mărieș
17+
function_name: compute
2018
github_actions: 'yes'
2119
github_actions_osx: 'yes'
2220
github_actions_windows: 'yes'
2321
license: BSD 2-Clause License
22+
module_name: core
2423
package_name: tblib
2524
pre_commit: 'yes'
2625
project_name: tblib
@@ -40,6 +39,7 @@ default_context:
4039
sphinx_doctest: 'no'
4140
sphinx_theme: sphinx-py3doc-enhanced-theme
4241
test_matrix_separate_coverage: 'no'
42+
tests_inside_package: 'no'
4343
version: 3.0.0
4444
version_manager: bump2version
4545
website: https://blog.ionelmc.ro/

.github/workflows/github-actions.yml

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: build
2-
on: [push, pull_request]
2+
on: [push, pull_request, workflow_dispatch]
33
jobs:
44
test:
55
name: ${{ matrix.name }}
@@ -19,24 +19,6 @@ jobs:
1919
toxpython: 'python3.11'
2020
tox_env: 'docs'
2121
os: 'ubuntu-latest'
22-
- name: 'py38 (ubuntu)'
23-
python: '3.8'
24-
toxpython: 'python3.8'
25-
python_arch: 'x64'
26-
tox_env: 'py38'
27-
os: 'ubuntu-latest'
28-
- name: 'py38 (windows)'
29-
python: '3.8'
30-
toxpython: 'python3.8'
31-
python_arch: 'x64'
32-
tox_env: 'py38'
33-
os: 'windows-latest'
34-
- name: 'py38 (macos)'
35-
python: '3.8'
36-
toxpython: 'python3.8'
37-
python_arch: 'x64'
38-
tox_env: 'py38'
39-
os: 'macos-latest'
4022
- name: 'py39 (ubuntu)'
4123
python: '3.9'
4224
toxpython: 'python3.9'
@@ -52,7 +34,7 @@ jobs:
5234
- name: 'py39 (macos)'
5335
python: '3.9'
5436
toxpython: 'python3.9'
55-
python_arch: 'x64'
37+
python_arch: 'arm64'
5638
tox_env: 'py39'
5739
os: 'macos-latest'
5840
- name: 'py310 (ubuntu)'
@@ -70,7 +52,7 @@ jobs:
7052
- name: 'py310 (macos)'
7153
python: '3.10'
7254
toxpython: 'python3.10'
73-
python_arch: 'x64'
55+
python_arch: 'arm64'
7456
tox_env: 'py310'
7557
os: 'macos-latest'
7658
- name: 'py311 (ubuntu)'
@@ -88,7 +70,7 @@ jobs:
8870
- name: 'py311 (macos)'
8971
python: '3.11'
9072
toxpython: 'python3.11'
91-
python_arch: 'x64'
73+
python_arch: 'arm64'
9274
tox_env: 'py311'
9375
os: 'macos-latest'
9476
- name: 'py312 (ubuntu)'
@@ -106,26 +88,26 @@ jobs:
10688
- name: 'py312 (macos)'
10789
python: '3.12'
10890
toxpython: 'python3.12'
109-
python_arch: 'x64'
91+
python_arch: 'arm64'
11092
tox_env: 'py312'
11193
os: 'macos-latest'
112-
- name: 'pypy38 (ubuntu)'
113-
python: 'pypy-3.8'
114-
toxpython: 'pypy3.8'
94+
- name: 'py313 (ubuntu)'
95+
python: '3.13'
96+
toxpython: 'python3.13'
11597
python_arch: 'x64'
116-
tox_env: 'pypy38'
98+
tox_env: 'py313'
11799
os: 'ubuntu-latest'
118-
- name: 'pypy38 (windows)'
119-
python: 'pypy-3.8'
120-
toxpython: 'pypy3.8'
100+
- name: 'py313 (windows)'
101+
python: '3.13'
102+
toxpython: 'python3.13'
121103
python_arch: 'x64'
122-
tox_env: 'pypy38'
104+
tox_env: 'py313'
123105
os: 'windows-latest'
124-
- name: 'pypy38 (macos)'
125-
python: 'pypy-3.8'
126-
toxpython: 'pypy3.8'
127-
python_arch: 'x64'
128-
tox_env: 'pypy38'
106+
- name: 'py313 (macos)'
107+
python: '3.13'
108+
toxpython: 'python3.13'
109+
python_arch: 'arm64'
110+
tox_env: 'py313'
129111
os: 'macos-latest'
130112
- name: 'pypy39 (ubuntu)'
131113
python: 'pypy-3.9'
@@ -142,7 +124,7 @@ jobs:
142124
- name: 'pypy39 (macos)'
143125
python: 'pypy-3.9'
144126
toxpython: 'pypy3.9'
145-
python_arch: 'x64'
127+
python_arch: 'arm64'
146128
tox_env: 'pypy39'
147129
os: 'macos-latest'
148130
- name: 'pypy310 (ubuntu)'
@@ -160,14 +142,14 @@ jobs:
160142
- name: 'pypy310 (macos)'
161143
python: 'pypy-3.10'
162144
toxpython: 'pypy3.10'
163-
python_arch: 'x64'
145+
python_arch: 'arm64'
164146
tox_env: 'pypy310'
165147
os: 'macos-latest'
166148
steps:
167-
- uses: actions/checkout@v3
149+
- uses: actions/checkout@v4
168150
with:
169151
fetch-depth: 0
170-
- uses: actions/setup-python@v4
152+
- uses: actions/setup-python@v5
171153
with:
172154
python-version: ${{ matrix.python }}
173155
architecture: ${{ matrix.python_arch }}
@@ -183,3 +165,11 @@ jobs:
183165
TOXPYTHON: '${{ matrix.toxpython }}'
184166
run: >
185167
tox -e ${{ matrix.tox_env }} -v
168+
finish:
169+
needs: test
170+
if: ${{ always() }}
171+
runs-on: ubuntu-latest
172+
steps:
173+
- uses: codecov/codecov-action@v3
174+
with:
175+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
# pre-commit install --install-hooks
33
# To update the versions:
44
# pre-commit autoupdate
5-
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg|tests/bad.*.py)(/|$)'
5+
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg|tests/badsyntax.py)(/|$)'
66
# Note the order is intentional to avoid multiple passes of the hooks
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.1.1
9+
rev: v0.11.2
1010
hooks:
1111
- id: ruff
12-
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
13-
- repo: https://github.com/psf/black
14-
rev: 23.10.0
15-
hooks:
16-
- id: black
12+
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]
13+
- id: ruff-format
1714
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.5.0
15+
rev: v5.0.0
1916
hooks:
2017
- id: trailing-whitespace
2118
- id: end-of-file-fixer

README.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ Overview
1010
* - docs
1111
- |docs|
1212
* - tests
13-
- | |github-actions|
14-
| |codecov|
13+
- |github-actions| |codecov|
1514
* - package
16-
- | |version| |wheel| |supported-versions| |supported-implementations|
17-
| |commits-since|
15+
- |version| |wheel| |supported-versions| |supported-implementations| |commits-since|
1816
.. |docs| image:: https://readthedocs.org/projects/python-tblib/badge/?style=flat
19-
:target: https://python-tblib.readthedocs.io/
17+
:target: https://readthedocs.org/projects/python-tblib/
2018
:alt: Documentation Status
2119

2220
.. |github-actions| image:: https://github.com/ionelmc/python-tblib/actions/workflows/github-actions.yml/badge.svg

ci/templates/.github/workflows/github-actions.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: build
2-
on: [push, pull_request]
2+
on: [push, pull_request, workflow_dispatch]
33
jobs:
44
test:
55
name: {{ '${{ matrix.name }}' }}
@@ -33,7 +33,7 @@ jobs:
3333
{% for os, python_arch in [
3434
['ubuntu', 'x64'],
3535
['windows', 'x64'],
36-
['macos', 'x64'],
36+
['macos', 'arm64'],
3737
] %}
3838
- name: '{{ env }} ({{ os }})'
3939
python: '{{ python }}'
@@ -44,10 +44,10 @@ jobs:
4444
{% endfor %}
4545
{% endfor %}
4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
with:
4949
fetch-depth: 0
50-
- uses: actions/setup-python@v4
50+
- uses: actions/setup-python@v5
5151
with:
5252
python-version: {{ '${{ matrix.python }}' }}
5353
architecture: {{ '${{ matrix.python_arch }}' }}
@@ -63,3 +63,11 @@ jobs:
6363
TOXPYTHON: '{{ '${{ matrix.toxpython }}' }}'
6464
run: >
6565
tox -e {{ '${{ matrix.tox_env }}' }} -v
66+
finish:
67+
needs: test
68+
if: {{ '${{ always() }}' }}
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: codecov/codecov-action@v3
72+
with:
73+
CODECOV_TOKEN: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

docs/conf.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import sphinx_py3doc_enhanced_theme
2-
31
extensions = [
4-
'autoapi.extension',
2+
'sphinx.ext.autodoc',
3+
'sphinx.ext.autosummary',
54
'sphinx.ext.coverage',
65
'sphinx.ext.doctest',
76
'sphinx.ext.extlinks',
@@ -10,35 +9,29 @@
109
'sphinx.ext.todo',
1110
'sphinx.ext.viewcode',
1211
]
13-
autoapi_type = 'python'
14-
autoapi_dirs = ['../src']
15-
1612
source_suffix = '.rst'
1713
master_doc = 'index'
1814
project = 'tblib'
19-
year = '2013-2022'
15+
year = '2013-2023'
2016
author = 'Ionel Cristian Mărieș'
2117
copyright = f'{year}, {author}'
2218
version = release = '3.0.0'
2319

2420
pygments_style = 'trac'
2521
templates_path = ['.']
2622
extlinks = {
27-
'issue': ('https://github.com/ionelmc/python-tblib/issues/%s', '#'),
28-
'pr': ('https://github.com/ionelmc/python-tblib/pull/%s', 'PR #'),
23+
'issue': ('https://github.com/ionelmc/python-tblib/issues/%s', '#%s'),
24+
'pr': ('https://github.com/ionelmc/python-tblib/pull/%s', 'PR #%s'),
2925
}
26+
3027
html_theme = 'sphinx_py3doc_enhanced_theme'
31-
html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
3228
html_theme_options = {
3329
'githuburl': 'https://github.com/ionelmc/python-tblib/',
3430
}
3531

3632
html_use_smartypants = True
3733
html_last_updated_fmt = '%b %d, %Y'
3834
html_split_index = False
39-
html_sidebars = {
40-
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
41-
}
4235
html_short_title = f'{project}-{version}'
4336

4437
napoleon_use_ivar = True

pyproject.toml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
[build-system]
22
requires = [
3-
"setuptools>=30.3.0",
3+
"setuptools>=40.1.0",
44
]
55

6-
[tool.ruff.per-file-ignores]
7-
"ci/*" = ["S"]
8-
96
[tool.ruff]
107
extend-exclude = ["static", "ci/templates"]
8+
line-length = 140
9+
src = ["src", "tests"]
10+
target-version = "py39"
11+
12+
[tool.ruff.lint.per-file-ignores]
13+
"ci/*" = ["S"]
14+
15+
[tool.ruff.lint]
1116
ignore = [
1217
"RUF001", # ruff-specific rules ambiguous-unicode-character-string
1318
"S101", # flake8-bandit assert
14-
"S301", # flake8-bandit pickle
1519
"S308", # flake8-bandit suspicious-mark-safe-usage
20+
"S603", # flake8-bandit subprocess-without-shell-equals-true
21+
"S607", # flake8-bandit start-process-with-partial-path
1622
"E501", # pycodestyle line-too-long
1723
]
18-
line-length = 140
1924
select = [
2025
"B", # flake8-bugbear
2126
"C4", # flake8-comprehensions
@@ -30,28 +35,20 @@ select = [
3035
"PLE", # pylint errors
3136
"PT", # flake8-pytest-style
3237
"PTH", # flake8-use-pathlib
33-
"Q", # flake8-quotes
3438
"RSE", # flake8-raise
3539
"RUF", # ruff-specific rules
3640
"S", # flake8-bandit
3741
"UP", # pyupgrade
3842
"W", # pycodestyle warnings
3943
]
40-
src = ["src", "tests"]
41-
target-version = "py38"
4244

43-
[tool.ruff.flake8-pytest-style]
45+
[tool.ruff.lint.flake8-pytest-style]
4446
fixture-parentheses = false
4547
mark-parentheses = false
4648

47-
[tool.ruff.isort]
49+
[tool.ruff.lint.isort]
4850
forced-separate = ["conftest"]
4951
force-single-line = true
5052

51-
[tool.black]
52-
line-length = 140
53-
target-version = ["py38"]
54-
skip-string-normalization = true
55-
56-
[tool.ruff.flake8-quotes]
57-
inline-quotes = "single"
53+
[tool.ruff.format]
54+
quote-style = "single"

0 commit comments

Comments
 (0)