Skip to content

Update all code left-overs to 3.10+#1041

Open
sobolevn wants to merge 6 commits into
msgspec:mainfrom
sobolevn:upgrade-3.10
Open

Update all code left-overs to 3.10+#1041
sobolevn wants to merge 6 commits into
msgspec:mainfrom
sobolevn:upgrade-3.10

Conversation

@sobolevn

@sobolevn sobolevn commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Things I used:

  • pyupgrade
  • A lot of manual labour 😅

Considerations:

  • I checked that both new and old type forms are covered with tests
  • I double checked that no particular APIs require older type forms (typing._GenericAlias vs types.GenericAlias difference)

Comment thread src/msgspec/_utils.py
Comment thread tests/unit/test_common.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a bit torn with these test upgrades. Even though we can use the builtin generics, we should still support the typing.-forms, and as such, these should also be tested. Not sure what the least amount of effort is, but ideally we'd have at least some parametrisation for the core usages, that show both forms work

@sobolevn sobolevn Jun 7, 2026

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.

Yes, there are many cases where I added both forms.

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