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

Skip to content

Depend on ast-serialize by default#21297

Merged
JukkaL merged 3 commits intomasterfrom
ast-serialize-default-dep
Apr 23, 2026
Merged

Depend on ast-serialize by default#21297
JukkaL merged 3 commits intomasterfrom
ast-serialize-default-dep

Conversation

@JukkaL
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL commented Apr 23, 2026

This way parallel checking is available in the default install (as an experimental feature in mypy 2.0).

We'll still support pip install mypy[native-parser] as a no-op for backward compat.

This way parallel checking is available in the default install
(as an experimental feature in mypy 2.0).

We will keep ast-serialize backward compatible. By dropping the
upper version bound, can avoid some minor friction when updating
ast-serialize version to 1.x.

Also `pip install mypy[native-parser]` is no longer supported,
as it's redundant now.
@JukkaL JukkaL requested a review from ilevkivskyi April 23, 2026 11:00
Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Not 100% sure about removing upper bound, I would feel safer knowing that we have an option to make a breaking change. But not strongly opposed to this either.

Also have a suggestion on dependency group, don't want to penalize people who actually tried the native parser.

Comment thread pyproject.toml
reports = ["lxml"]
install-types = ["pip"]
faster-cache = ["orjson"]
native-parser = ["ast-serialize>=0.2.0,<1.0.0"]
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.

Maybe make it an empty list, to not break builds for brave people who actually tried this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I realised recently when removing the python2 extra that this doesn't actually break builds, it just issues a warning

@github-actions

This comment has been minimized.

@JukkaL
Copy link
Copy Markdown
Collaborator Author

JukkaL commented Apr 23, 2026

Not 100% sure about removing upper bound, I would feel safer knowing that we have an option to make a breaking change. But not strongly opposed to this either.

Ok, we can keep the upper bound. We can remove it one or two mypy releases before we publish ast-serialize 1.0, so that there's a Window when both pre-1.0 and post-1.0 versions work.

@JukkaL JukkaL changed the title Depend on ast-serialize by default, drop upper version bound Depend on ast-serialize by default Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 64e5052 into master Apr 23, 2026
25 checks passed
@JukkaL JukkaL deleted the ast-serialize-default-dep branch April 23, 2026 12:39
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.

3 participants