Skip to content

Comments

[Fix] Fix TypedDict import error for Python < 3.12#1441

Open
nil0x9 wants to merge 1 commit intoInternLM:mainfrom
nil0x9:linty/dev-fix-typeddict-import
Open

[Fix] Fix TypedDict import error for Python < 3.12#1441
nil0x9 wants to merge 1 commit intoInternLM:mainfrom
nil0x9:linty/dev-fix-typeddict-import

Conversation

@nil0x9
Copy link
Contributor

@nil0x9 nil0x9 commented Jan 23, 2026

This PR is complementary to PR https://github.com/InternLM/xtuner/pull

Pydantic requires that typing_extensions.TypedDIct is used in place of typing.TypedDIct for Python < 3.12. So running the current code on earlier Python version will likely thow a PydanticUserError

See: https://docs.pydantic.dev/latest/errors/usage_errors/#typed-dict-version

@nil0x9 nil0x9 force-pushed the linty/dev-fix-typeddict-import branch from 893dc26 to 4b9e9b7 Compare January 23, 2026 09:13
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.

1 participant