Conversation
Contributor
There was a problem hiding this comment.
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.tomlmetadata (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
cryptographybackend 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. |
…erstand PEP 639 annotations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.