Skip to content
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

Avoid test dependency on typing_extensions #2590

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

carlwgeorge
Copy link
Contributor

Summary

TypedDict was added to the standard library typing module in Python 3.8. Since this project already requires at least Python 3.9, we can rely on this being available.

Previous discussed in #2589.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

from typing_extensions import TypedDict
from typing import TypedDict
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to use typing.TypedDict instead of changing the import.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see, typing is already imported further up. Will adjust.

TypedDict was added to the standard library typing module in Python 3.8.
Since this project already requires at least Python 3.9, we can rely on
this being available.
@carlwgeorge carlwgeorge force-pushed the test-without-typing_extensions branch from 893ca34 to a4e5463 Compare March 5, 2025 07:24
@Kludex Kludex merged commit 8136fb6 into encode:master Mar 5, 2025
16 checks passed
@Kludex
Copy link
Member

Kludex commented Mar 5, 2025

Thanks.

@carlwgeorge carlwgeorge deleted the test-without-typing_extensions branch March 5, 2025 07:46
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.

2 participants