Skip to content

Add typing-extensions dependency#2040

Open
sydduckworth wants to merge 6 commits into
asdf-format:mainfrom
sydduckworth:add-typing-extensions-dep
Open

Add typing-extensions dependency#2040
sydduckworth wants to merge 6 commits into
asdf-format:mainfrom
sydduckworth:add-typing-extensions-dep

Conversation

@sydduckworth
Copy link
Copy Markdown
Contributor

@sydduckworth sydduckworth commented May 5, 2026

Description

  • Added typing-extensions as a dependency
  • Removed custom Reader and Writer protocols in asdf.typing and replaced them with the backports from typing_extensions

typing-extensions backports various typing features so that they're available in older Python versions.
In addition to letting us remove the custom protocols as described above, it also gives access to the deprecated decorator which was added to warnings in Python 3.14 and will be very useful as we start to deprecate parts of the API.

Worth noting that typing-extensions is already an indirect dependency of several optional dependencies.

@sydduckworth sydduckworth requested a review from braingram May 5, 2026 19:36
@sydduckworth sydduckworth requested a review from a team as a code owner May 5, 2026 19:36
@sydduckworth sydduckworth added dependencies Pull requests that update a dependency file python Pull requests that update python code labels May 5, 2026
Copy link
Copy Markdown
Member

@zacharyburnett zacharyburnett left a comment

Choose a reason for hiding this comment

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

LGTM, how does the deprecated decorator look to users? It's https://peps.python.org/pep-0702/ right?

@zacharyburnett
Copy link
Copy Markdown
Member

nvm found it https://docs.python.org/3.13/library/warnings.html#warnings.deprecated, looks neat!

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

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants