Repository navigation
Reset cache on mypy change - #1952
Merged
gvanrossum merged 4 commits intoJul 29, 2016
Merged
Conversation
This commit modifies build.py to add an extra "version_id" attribute to the cache metadata. If the version id specified in mypy/version.py differs from the id stored in the cached data, mypy will automatically invalidate that cached data.
This commit modifies setup.py to automatically edit the installed mypy/version.py file during installation to include the git hash if applicable. If setup.py is not being run from a git repo, or if a git executable can't be found in the system, mypy will default to using the original version id.
| meta.get('child_modules', []), | ||
| meta.get('options'), | ||
| meta.get('dep_prios', []), | ||
| meta.get('version_id') |
Member
|
That's all I've got. And the "." works fine, so no worries about that. So really, just two trailing commas. :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request modifies
build.pyto add an extra "version_id" attribute to the cache metadata. If the version id specified inmypy/version.pydiffers from the id stored in the cached data, mypy will automatically invalidate that cached data.This pull request will also modify
setup.pyto automatically edit the installedmypy/version.pyfile during installation to include the git hash if applicable.If
setup.pyis not being run from a git repo, or if a git executable can't be found in the system, mypy will default to using the original version id.The net effect should be that...
version.pyfiles edited during installation to include the git commit hash. However, their cache will still be invalidated whenever they update since we manually change the__version__variable per each release.version.pyfiles edited during installation to include the git commit hash. That means their cache will be automatically invalidated even if the__version__variable is the same as before.Fixes #1354.