Skip to content

Commit 0bc99dc

Browse files
committed
version bumps, docs updates ahead of release
1 parent 7ae4888 commit 0bc99dc

20 files changed

Lines changed: 778 additions & 504 deletions

.flake8

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[flake8]
2+
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.tox
3+
extend-ignore =
4+
# let black handle line length
5+
E501
6+
# not black compatible (whitespace before `:`)
7+
E203
8+

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
37
- package-ecosystem: pip
48
directory: "/"
59
schedule:

.github/workflows/build.yml

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build
22

33
on:
44
push:
5+
tags:
6+
- "*"
57
branches:
68
- main
79
pull_request:
@@ -21,14 +23,15 @@ jobs:
2123
- name: Install dependencies
2224
run: |
2325
python -m pip install --upgrade pip
24-
pip install 'poetry>=1.8,<1.9'
26+
pip install 'poetry>=2.2.1,<2.3'
2527
poetry check --lock
2628
2729
build:
2830
runs-on: ubuntu-latest
2931
strategy:
32+
fail-fast: false
3033
matrix:
31-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
34+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3235

3336
steps:
3437
- uses: actions/checkout@v1
@@ -39,12 +42,72 @@ jobs:
3942
- name: Install dependencies
4043
run: |
4144
python -m pip install --upgrade pip
42-
pip install 'tox<5' tox-gh-actions 'poetry>=1.8,<1.9'
45+
pip install 'tox<5' tox-gh-actions 'poetry>=2.2,<2.3'
4346
- name: Test with tox
4447
run: tox
4548

4649
- name: Upload coverage to Codecov
47-
if: matrix.python-version == 3.11
50+
if: matrix.python-version == 3.13
4851
uses: codecov/codecov-action@v2.1.0
4952
with:
5053
file: ./coverage.xml
54+
55+
# https://github.com/marketplace/actions/alls-green#why
56+
all-green:
57+
name: Are all checks green?
58+
if: always()
59+
needs:
60+
- poetry-lockfile-up-to-date
61+
- build
62+
runs-on: ubuntu-latest
63+
64+
steps:
65+
- name: Decide whether the needed jobs succeeded or failed
66+
uses: re-actors/alls-green@release/v1
67+
with:
68+
jobs: ${{ toJSON(needs) }}
69+
70+
check-tag:
71+
name: Check tag correctness
72+
runs-on: ubuntu-latest
73+
if: "startsWith(github.ref, 'refs/tags/v')"
74+
steps:
75+
- uses: actions/checkout@v4
76+
- run: |
77+
version=$(grep -E '^version\s*=' pyproject.toml | sed -E 's/^version\s*=\s*"([^"]+)".*/\1/')
78+
79+
tag="${GITHUB_REF_NAME}"
80+
81+
echo "Detected version in pyproject.toml: $version"
82+
echo "Detected tag name: $tag"
83+
84+
# Compare them
85+
if [ "v$version" != "$tag" ]; then
86+
echo "❌ Tag ($tag) does not match version in pyproject.toml ($version)"
87+
exit 1
88+
fi
89+
90+
echo "✅ Tag matches version. Proceeding with release..."
91+
92+
release:
93+
name: Release
94+
runs-on: ubuntu-latest
95+
if: "startsWith(github.ref, 'refs/tags/v')"
96+
needs: [all-green, check-tag]
97+
environment: PyPI
98+
permissions:
99+
id-token: write
100+
steps:
101+
- uses: actions/checkout@v1
102+
- name: Set up Python
103+
uses: actions/setup-python@v2
104+
with:
105+
python-version: '3.13'
106+
- name: Install dependencies
107+
run: |
108+
pip install 'poetry>=2.2,<2.3'
109+
- name: Build distribution
110+
run: |
111+
poetry build
112+
- name: Publish package to PyPI
113+
uses: pypa/gh-action-pypi-publish@release/v1

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ CLI args + config file
6060

6161
### Prerequisites
6262

63-
- Python 3.9+ (3.9–3.13 supported)
63+
- Python 3.10+ (3.10–3.14 supported)
6464
- [Poetry](https://python-poetry.org/) for dependency management
6565
- [tox](https://tox.wiki/) for test automation
6666

@@ -96,8 +96,8 @@ pip install -r docs/requirements.txt
9696
### CI
9797

9898
GitHub Actions (`.github/workflows/build.yml`):
99-
- Tests on Python 3.9–3.13
100-
- Coverage uploaded to Codecov on Python 3.11
99+
- Tests on Python 3.10–3.14
100+
- Coverage uploaded to Codecov on Python 3.13
101101
- Poetry lockfile consistency check
102102

103103
## Testing

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
0.20.0 (2025-06-12)
4+
0.20.0 (2026-05-29)
55
-------------------
66

77
- Improve speed and accuracy of detecting of "slotless" classes,

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ It's easy to get wrong, and what's worse: there is nothing warning you that you
3131
``slotscheck`` helps you validate your slots are working properly.
3232
You can even use it to enforce the use of slots across (parts of) your codebase.
3333

34-
See my `blog post <https://dev.arie.bovenberg.net/blog/finding-broken-slots-in-popular-python-libraries/>`_
35-
for the origin story behind ``slotscheck``.
34+
See `my talk at EuroPython <https://www.youtube.com/watch?v=87DoVbgtuRA>`_
35+
for the details of how slots work and what can go wrong with them.
3636

3737
Quickstart
3838
----------

docs/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Use the following configuration:
2828
2929
repos:
3030
- repo: https://github.com/ariebovenberg/slotscheck
31-
rev: v0.19.1
31+
rev: v0.20.0
3232
hooks:
3333
- id: slotscheck
3434
# If your Python files are not importable from the project root,

docs/configuration.rst

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,3 @@ Alternatively, you can manually specify the config file to be used with the
5151

5252
Note that CLI options have precedence over a config file.
5353
Thus, you can always override what's configured there.
54-
55-
Unused slots detection (Experimental)
56-
--------------------------------------
57-
58-
.. note::
59-
60-
Requires **Python 3.13+**. Disabled by default.
61-
62-
To enable detection of unused slots:
63-
64-
.. code-block:: toml
65-
66-
[tool.slotscheck]
67-
detect-unused-slots = true
68-
69-
To suppress false positives, use a regex pattern matching
70-
``module.path:ClassName.slot_name``:
71-
72-
.. code-block:: toml
73-
74-
[tool.slotscheck]
75-
detect-unused-slots = true
76-
exclude-slots = '''
77-
(
78-
mymodule:MyClass\.externally_set_slot
79-
|.*\.cache
80-
)
81-
'''

docs/errors.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ implementors.
137137
The special slots ``__weakref__`` and ``__dict__`` are also excluded,
138138
as they serve Python-internal purposes rather than user assignment.
139139

140-
**Known limitation:** This check uses Python 3.13's ``__static_attributes__``
141-
to determine which attributes are assigned within the class body.
142-
Attributes that are only set externally (e.g. ``obj.slot = value``
143-
from outside the class) will be reported as unused. Use
144-
``--exclude-slots`` with a regex pattern to suppress such false positives.
140+
.. admonition:: Limitations
141+
142+
This check uses Python 3.13's ``__static_attributes__``
143+
to determine which attributes are assigned within the class body.
144+
Attributes that are only set externally (e.g. ``obj.slot = value``
145+
from outside the class) will be reported as unused. Use
146+
``--exclude-slots`` with a regex pattern to suppress such false positives.

0 commit comments

Comments
 (0)