Skip to content

[jwcrypto] Update to 1.5.7#15633

Merged
srittau merged 2 commits intopython:mainfrom
srittau:jwcrypto-1.5.7
Apr 8, 2026
Merged

[jwcrypto] Update to 1.5.7#15633
srittau merged 2 commits intopython:mainfrom
srittau:jwcrypto-1.5.7

Conversation

@srittau
Copy link
Copy Markdown
Collaborator

@srittau srittau commented Apr 8, 2026

  • Replace some ABCs with concrete types or protocols.
  • Use LiteralString in some instances.

Closes: #15628

* Replace some ABCs with concrete types or protocols.
* Use `LiteralString` in some instances.
@srittau srittau linked an issue Apr 8, 2026 that may be closed by this pull request
@github-actions

This comment has been minimized.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/computation/ops.py:328: error: Need type annotation for "_binary_ops_dict" (hint: "_binary_ops_dict: dict[<type>, <type>] = ...")  [var-annotated]

Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

not totally sure about some of the Mapping -> dict and Sequence -> list changes (see inline comment), but this basically LGTM

default_allowed_algs: Sequence[str]
default_max_plaintext_size: int

JWEHeaderRegistry: dict[LiteralString, JWSEHeaderParameter]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume this was deliberately typed as Mapping rather than dict before to reflect the fact that you're probably not really meant to mutate it? I don't feel strongly, though

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Possibly, but that would need at least a comment. And I'm not sure why you would need to prevent that. On the other hand, these are not marked as Final, so "readonly", but not Final seems incomplete in any case.

@srittau srittau merged commit 4ea569a into python:main Apr 8, 2026
39 checks passed
@srittau srittau deleted the jwcrypto-1.5.7 branch April 8, 2026 11:12
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.

Daily tests failed on Wed Apr 08 2026

2 participants