maint: Dependency upgrades and High backlog items (v2.11.0)
- All dependencies to current releases (97 known vulnerabilities -> 0), Python 3.14, uv pinned, requirements-test.txt, lxml/dateutil pinned - CSRF tokens on admin forms, logout and IndieAuth consent - IndieAuth client and crosspost link-card fetches via safe_get - FLASK_DEBUG/FLASK_ENV default off/production; image sets them - Foreign keys enforced on pooled connections; migration 018 removes orphans - Rate limits shared across processes (rate_limits, migration 019) - datetime.utcnow() and sqlite3 default adapters replaced - compose.yaml fixed; duplicate dev_auth.py and test.ini removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9f17e145ff
commit
75946be7b2
67 files changed
+885
-498
No files matched your search
@@ -14,9 +14,9 @@ the pieces fit together.
|
||||
|
||||
| Component | Choice |
|
||||
|-----------|--------|
|
||||
| Language | Python 3.11 (`python:3.11-slim` base image) |
|
||||
| Web framework | Flask 3.0 (Werkzeug, Jinja2, itsdangerous, click come with it) |
|
||||
| WSGI server | gunicorn 21.2, 4 sync workers (see [deployment.md](deployment.md)) |
|
||||
| Language | Python 3.14 (`python:3.14-slim` base image; since v2.11.0) |
|
||||
| Web framework | Flask 3.1 (Werkzeug, Jinja2, itsdangerous, click come with it) |
|
||||
| WSGI server | gunicorn 26.2, 4 sync workers (see [deployment.md](deployment.md)) |
|
||||
| Database | SQLite (standard-library `sqlite3`), WAL mode, FTS5 for search |
|
||||
| Content storage | Markdown files on disk |
|
||||
| Background work | `threading` daemon threads; `fcntl.flock` file locks to pick one process |
|
||||
@@ -28,32 +28,36 @@ the pieces fit together.
|
||||
|
||||
## Python dependencies (`requirements.txt`)
|
||||
|
||||
Pinned to a minor series. Upgraded in v2.11.0, when the set had no known
|
||||
vulnerabilities (`pip-audit`); check again before each release.
|
||||
|
||||
| Package | Pin | Used for |
|
||||
|---------|-----|----------|
|
||||
| Flask | `3.0.*` | Web framework |
|
||||
| gunicorn | `21.2.*` | Production WSGI server |
|
||||
| markdown | `3.5.*` | Rendering notes (`extra`, `codehilite`, `nl2br` and a bare-URL linking extension) |
|
||||
| feedgen | `1.0.*` | RSS 2.0 feed (`starpunk/feeds/rss.py`); Atom and JSON Feed are generated by StarPunk's own code |
|
||||
| httpx | `0.27.*` | All outbound HTTP: OIDC, IndieAuth client discovery, webmention and WebSub requests (through the SSRF-safe wrapper in `webmention_ssrf.py`), crossposting APIs, health check |
|
||||
| python-dotenv | `1.0.*` | Loading `.env` |
|
||||
| beautifulsoup4 | `4.12.*` | HTML parsing: IndieAuth client pages, crosspost text and link cards |
|
||||
| Flask | `3.1.*` | Web framework |
|
||||
| gunicorn | `26.2.*` | Production WSGI server |
|
||||
| markdown | `3.11.*` | Rendering notes (`extra`, `codehilite`, `nl2br` and a bare-URL linking extension) |
|
||||
| nh3 | `0.3.*` | HTML sanitising (rendered notes, webmention content) |
|
||||
| beautifulsoup4 | `4.15.*` | HTML parsing: IndieAuth client pages, crosspost text and link cards |
|
||||
| lxml | `6.1.*` | Outgoing link extraction, webmention endpoint discovery and source checks |
|
||||
| mf2py | `2.0.*` | Parsing microformats2 (webmention sources, reply contexts, author h-card) |
|
||||
| pytest | `8.0.*` | Test runner (listed here as well as in the image's test stage) |
|
||||
| psutil | `5.9.*` | Memory monitor and system metrics |
|
||||
| Pillow | `10.1.*` | Image validation, resizing and variants |
|
||||
| pillow-heif | `0.18.*` | HEIC/HEIF uploads (iPhone photos) |
|
||||
| nh3 | `0.2.*` | HTML sanitising (rendered notes, webmention content) |
|
||||
| PyJWT[crypto] | `2.10.*` | Verifying OIDC ID tokens (JWKS, RS/ES signatures via `cryptography`) |
|
||||
| python-dateutil | `4.0.*` | Dates in reply contexts |
|
||||
| feedgen | `1.0.*` | RSS 2.0 feed (`starpunk/feeds/rss.py`); Atom and JSON Feed are generated by StarPunk's own code |
|
||||
| httpx | `0.28.*` | All outbound HTTP; requests to user-supplied URLs go through `webmention_ssrf.safe_get`/`safe_post` |
|
||||
| PyJWT[crypto] | `2.15.*` | Verifying OIDC ID tokens (JWKS, RS/ES signatures via `cryptography`) |
|
||||
| python-dotenv | `1.2.*` | Loading `.env` |
|
||||
| Pillow | `13.0.*` | Image validation, resizing and variants |
|
||||
| pillow-heif | `1.8.*` | HEIC/HEIF uploads (iPhone photos) |
|
||||
| psutil | `7.2.*` | Memory monitor and system metrics |
|
||||
|
||||
Packages imported directly but installed only as dependencies of the above:
|
||||
`lxml` (outgoing link extraction, webmention endpoint discovery and source checks; from feedgen) and `python-dateutil` (dates in
|
||||
reply contexts; from feedgen). `markupsafe` comes with Flask/Jinja2.
|
||||
`markupsafe` comes with Flask/Jinja2.
|
||||
|
||||
### Development dependencies (`requirements-dev.txt`)
|
||||
### Test and development dependencies
|
||||
|
||||
Includes `requirements.txt`, plus `pytest-cov`, `pytest-mock`, `black`,
|
||||
`flake8`, `mypy` and `gunicorn`. Coding standards are in
|
||||
[../standards/](../standards/).
|
||||
- `requirements-test.txt`: `pytest` 9.2 and `pytest-mock` 3.15, used by the
|
||||
Containerfile test stage (CI).
|
||||
- `requirements-dev.txt`: runtime and test requirements plus `pytest-cov`,
|
||||
`black`, `flake8`, `mypy` (not enforced) and `pip-audit`. Coding standards
|
||||
are in [../standards/](../standards/).
|
||||
|
||||
### Deliberately not used
|
||||
|
||||
@@ -94,7 +98,7 @@ Protocol details: [indieweb-protocols.md](indieweb-protocols.md),
|
||||
```
|
||||
|
||||
- **In CI**: the `test` stage of the `Containerfile` installs the production
|
||||
requirements plus pytest and pytest-mock and runs the whole suite. The
|
||||
requirements plus `requirements-test.txt` and runs the whole suite. The
|
||||
image is only built and pushed if it passes. Checklist:
|
||||
[../standards/testing-checklist.md](../standards/testing-checklist.md).
|
||||
|
||||
|
||||
Reference in new issue
Block a user