Skip to content

v4.6.0

Choose a tag to compare

@luisgf luisgf released this 13 Oct 21:55
· 103 commits to master since this release

Python 3.15 is officially supported and Python 3.10 is deprecated. CPython 3.15.0 joins the publish-gating CI matrix. 3.10 still works throughout 4.x but now warns at import (it reached end of life on 2026-10-01). 5.0 will require Python 3.11+. This release also includes the fixes from the 3.15 readiness audit and strict base64url decoding.

pip install -U openbadgeslib

Added

  • feat: Python 3.15 is officially supported (#243). It now runs in the publish-gating CI test matrix: lint, mypy --strict, and the full suite with every optional extra on 3.10–3.15. It also gets its trove classifier. Until now it was only an advisory pre-release job.
  • feat: Python 3.10 is deprecated (CPython end of life: 2026-10-01). Importing openbadgeslib on 3.10 emits a DeprecationWarning.
    • Python shows it by default only for scripts and the installed openbadges* console tools: once, on stderr.
    • Nothing else changes in 4.x: requires-python, the 3.10 classifier and the CI leg stay. 5.0 drops 3.10 (#242).

Security

  • security(jws): base64url is decoded strictly and canonically (RFC 4648 §5): the URL-safe alphabet, no padding or exactly the canonical amount, and zero unused trailing bits.
    • Before, characters outside the alphabet were dropped, +// were accepted as -/_, and extra = and trailing bits were ignored. As a result, the bytes of one signature had many accepted encodings.
    • An OB1/OB2 JWS whose signature segment is spelled any other way no longer verifies. Whitespace around the whole token is ignored.
    • The status-list, SD-JWT VC header and OID4VCI c_nonce decoders reject the same input.
    • A bare StatusList2021 encodedList in standard base64 still decodes.
    • OB3 JWT-VC tokens are verified by PyJWT and are unchanged.
    • Prompted by Python 3.15: its urlsafe_b64decode warns that a future version will discard + and /.

Fixed

  • fix: config files, mail templates and --recipients-file are read as UTF-8, and a leading BOM is skipped. signer.log is written as UTF-8 on every platform. Before, the locale encoding was used, so on Windows a non-ASCII config was read differently under 3.10–3.14 than under 3.15 (PEP 686). An invalid file now fails with an error that names it.
  • fix(oid4vci): SqliteOID4VCIStore closes the SQLite connection when configuring or migrating it fails, instead of leaking it until garbage collection.
  • fix: download_file closes the response held by an HTTPError before re-raising it. As a result, the error's body is no longer readable after it propagates.

Upgrading on Python 3.10

To silence only this notice, including in a test suite that runs with filterwarnings = error, add the message filter:

ignore:Python 3.10 is deprecated in openbadgeslib:DeprecationWarning

Use it in PYTHONWARNINGS, with -W, or in your pytest filterwarnings. A module-based filter does not match, because the warning is attributed to the code that imports openbadgeslib. Plan the move to Python 3.11+ before 5.0. See Installation.

Verification

CI is green on the tagged commit (7d19141): the 3.10–3.15 matrix (3.15 on the CPython 3.15.0 GA build), Windows, the [eudi] openvc-core floor/latest legs, and the PyPI publish. I re-ran the full local gate on the tagged tree:

  • flake8 and mypy --strict (58 files) pass.
  • 1871 tests passed, with 6 deselected (the opt-in conformance_docker marker) and 0 skipped, under OPENBADGES_REQUIRE_LDP_SD=1 OPENBADGES_REQUIRE_OID4VCI=1, with openvc-core 1.26.0 installed.
  • The delegates import (pyld, openvc.openid4vci) and pip check is clean.

Before the version bump, the same tree also passed the full gate on CPython 3.10.20 and 3.15.0rc3.

Full details in Changelog.txt.

Correction (2026-10-14): CPython 3.10 reached end of life on 2026-10-01, not 2026-10-31 as these notes and the 4.6.0 warning text first said. The warning message is corrected in the next release; the documented filter ignore:Python 3.10 is deprecated in openbadgeslib:DeprecationWarning is unaffected.