Fix package hash / unparse compat with Python 3.14#51042
Merged
Conversation
eedda45 to
b5d8e59
Compare
Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Harmen Stoppels <[email protected]>
b5d8e59 to
1fcc379
Compare
Member
Author
|
Verified locally that
|
9 tasks
becker33
approved these changes
Jul 25, 2025
haampie
added a commit
that referenced
this pull request
Jul 29, 2025
* package_hash.py: fix TagMultiMethods forward compat with Python 3.14 Signed-off-by: Harmen Stoppels <[email protected]> * Silence ast.Str warnings for 3.8:3.13 Signed-off-by: Harmen Stoppels <[email protected]> --------- Signed-off-by: Harmen Stoppels <[email protected]>
haampie
added a commit
that referenced
this pull request
Jul 29, 2025
* package_hash.py: fix TagMultiMethods forward compat with Python 3.14 Signed-off-by: Harmen Stoppels <[email protected]> * Silence ast.Str warnings for 3.8:3.13 Signed-off-by: Harmen Stoppels <[email protected]> --------- Signed-off-by: Harmen Stoppels <[email protected]>
alecbcs
pushed a commit
that referenced
this pull request
Aug 12, 2025
* package_hash.py: fix TagMultiMethods forward compat with Python 3.14 Signed-off-by: Harmen Stoppels <[email protected]> * Silence ast.Str warnings for 3.8:3.13 Signed-off-by: Harmen Stoppels <[email protected]> --------- Signed-off-by: Harmen Stoppels <[email protected]>
alstar555
pushed a commit
to alstar555/spack
that referenced
this pull request
Aug 27, 2025
* package_hash.py: fix TagMultiMethods forward compat with Python 3.14 Signed-off-by: Harmen Stoppels <[email protected]> * Silence ast.Str warnings for 3.8:3.13 Signed-off-by: Harmen Stoppels <[email protected]> --------- Signed-off-by: Harmen Stoppels <[email protected]> Signed-off-by: Angelica Loshak <[email protected]>
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.
The first commit ensures forward compatibility with Python 3.14: that version
will remove the
smember fromConstant, so it will always raise (andcatch)
AttributeError.The second commit merely reduces the noise of warnings related to accessing
ast.Str,ast.Num, et cetera. These warnings show up when running unit tests.This brings the number of warnings down from ~100K to <5K.
While at it, also fix incorrect function overrides: the argument name is
node,not
funcin the parent class.The advantage of the
if sys.version_infobranches is not only that it's no longera condition checked in a loop/traversal, but also that we can easily delete these
functions if we ever require Python 3.8.