Skip to content

Adds __version_info__ tuple #12152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Adds __version_info__ tuple #12152

wants to merge 7 commits into from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Feb 8, 2022

Alternative to #12149
Closes #12145

@sobolevn sobolevn requested a review from JukkaL February 8, 2022 18:25
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@KotlinIsland
Copy link
Contributor

Looks good, but I noticed you haven't addressed CustomPythonBuild in setup.py.

@sobolevn
Copy link
Member Author

sobolevn commented Feb 9, 2022

Good catch!

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉



__version__ = build_version(__version_info__, __version_release_level__)
base_version = __version__
Copy link
Contributor

Choose a reason for hiding this comment

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

This will generate an incorrect base_version including the git hash

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Feb 9, 2022

If the purpose of this change is to make plugin version parsing easier, should there be a deprecation cycle to send the __version_info__ instead of __version__ to plugins plugin function?

@sobolevn
Copy link
Member Author

If the purpose of this change is to make plugin version parsing easier, should there be a deprecation cycle to send the version_info instead of version to plugins plugin function?

I guess this is the next step 🙂

@jhance
Copy link
Collaborator

jhance commented Mar 21, 2022

We don't require a deprecation period for plugin API changes.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

base_version shouldn't include git hash, as KotlinIsland points out. There are also merge conflicts.

While we don't require a deprecation period for plugin API changes, we need to be careful about breaking things here, since allowing plugins to branch on version is what enables us to play fast and loose with breaking plugins.

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.

mypy.version.__version__ is hard to work with
4 participants