Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

import websockets.client
import websockets.exceptions
from typing_extensions import TypedDict
from typing import TypedDict
Copy link
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
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
16 checks passed
@Kludex
Copy link
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