Skip to content

Avoid test dependency on typing_extensions#2590

Merged
Kludex merged 1 commit intoKludex:masterfrom
carlwgeorge:test-without-typing_extensions
Mar 5, 2025
Merged

Avoid test dependency on typing_extensions#2590
Kludex merged 1 commit intoKludex:masterfrom
carlwgeorge:test-without-typing_extensions

Conversation

@carlwgeorge
Copy link
Copy Markdown
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.

Comment thread tests/protocols/test_websocket.py Outdated
import websockets.client
import websockets.exceptions
from typing_extensions import TypedDict
from typing import TypedDict
Copy link
Copy Markdown
Owner

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
Copy Markdown
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 Kludex:master Mar 5, 2025
@Kludex
Copy link
Copy Markdown
Owner

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