Repository navigation
Standardize music21 version access - #2209
Merged
Merged
Conversation
from music21 import * put __version__ into the importing module, overwriting that module's own. Remove __version__, __version_info__, VERSION, and VERSION_STR from __all__ in music21 and music21.base; all stay as attributes. __init__ now imports __version__ and __version_info__ directly from _version instead of rebuilding them from the VERSION aliases, which adds music21.__version_info__ for conf.py. Use __version__ in freezeThaw, configure, and the release docs. Test that packaging reads __version__ without respelling it. AI-assisted (Claude)
a34686d (the 2022 move to hatch) began building the tuple from the __version__ string and never converted the parts, so it has held ('11', '0', '0', 'b16') since then and comparisons went wrong: ('9', '0') > ('11', '0'). Nothing in music21 compared it, so it went unnoticed. AI-assisted (Claude)
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.
Standardize m21 versioning to match rest of python.:
__version__and__version_info__Keeping VERSION_STR and VERSION as aliases
Do not export VERSION_STR or
__version__etc. withimport *-- polluting environment.Test that the music21 version is always acceptable to Packaging