Skip to content

Python package tidy ups#7667

Open
achamayou wants to merge 5 commits intomainfrom
modernise_python_code
Open

Python package tidy ups#7667
achamayou wants to merge 5 commits intomainfrom
modernise_python_code

Conversation

@achamayou
Copy link
Member

Improve pyproject.toml (use the native Python version numbers directly, set the license the modern way, correct dependencies), and modernise some patterns in our code that are unnecessarily old-fashioned.

@achamayou achamayou requested a review from a team as a code owner February 13, 2026 13:41
Copilot AI review requested due to automatic review settings February 13, 2026 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Python package metadata to be more PEP-compliant and modernises several Python modules/tests (typing syntax, cryptography API usage), plus minor script cleanup around release-note validation.

Changes:

  • Update python/pyproject.toml metadata (PEP 440 version format, SPDX-style license fields, dependency list tweaks).
  • Modernise Python code to use built-in generics / PEP 604 unions and remove deprecated cryptography backend usage.
  • Small cleanup/fixups in release tooling and helper scripts.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/extract-release-notes.py Adjusts version comparison against pyproject.toml for changelog validation.
python/utils/submit_recovery_share.sh Fixes/help text output for usage instructions.
python/tests/test_cose_sign.py Removes deprecated default_backend() usage in cryptography calls.
python/src/ccf/tx_id.py Updates optional typing to `str
python/src/ccf/split_ledger.py Migrates typing from List[...] to list[...].
python/src/ccf/receipt.py Migrates typing from List[...] to list[...].
python/src/ccf/merkletree.py Modernises class definition (class MerkleTree:).
python/src/ccf/ledger_viz.py Updates optional typing to `str
python/src/ccf/ledger_code.py Removes accidental tuple creation in validator assignment.
python/src/ccf/ledger.py Modernises typing and removes deprecated cryptography backend usage.
python/src/ccf/cose.py Removes deprecated cryptography backend usage and modernises typing.
python/src/ccf/_versionifier.py Uses removeprefix and renames helper to underscore-prefixed function.
python/pyproject.toml Switches to PEP 440 dev version, adds SPDX-style license fields, updates dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant