Skip to content

Fix DeprecationWarnings by updating key type property usage in tests #1590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Subham-KRLX
Copy link

Fixes #1483.

Replaced deprecated key.key_type with key.kty in test files to remove DeprecationWarnings and ensure compatibility with latest dependencies.

Single change (remove DeprecationWarnings).

@dopry
Copy link
Member

dopry commented Aug 11, 2025

@Subham-KRLX for context, can you link to the documentation regarding the deprecation of key_type here in the issue?

@Subham-KRLX
Copy link
Author

Hi @dopry, this change is based on the official JSON Web Key spec (RFC 7517, Section 4.1) which mandates "kty" as the standard parameter for key type. The older key_type property in libraries like jwcrypto has been deprecated and now triggers warnings with .kty being the correct standards-compliant attribute. Updating the tests removes these DeprecationWarnings ensures compatibility with the latest dependencies and aligns with the JWK specification.

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.

DeprecationWarning in test_authorization_code.py::TestOIDCAuthorizationCodeHSAlgorithm::test_id_token
2 participants