Make SpecBuildInterface pickleable#25628
Merged
tgamblin merged 4 commits intospack:developfrom Aug 27, 2021
Merged
Conversation
This class was confusing pickle when being serialized, due to its scary nature of being an object that disguise as another type.
43c874a to
093c201
Compare
Member
|
Unfortunately this doesn't fix #23892, looks like they were different issues after all. |
tgamblin
reviewed
Aug 27, 2021
.github/workflows/unit_tests.yaml
Outdated
| strategy: | ||
| matrix: | ||
| python-version: [3.8] | ||
| python-version: [3.6, 3.8, 3.9] |
Member
There was a problem hiding this comment.
We do need more macOS but is this going to tank CI?
Member
Author
There was a problem hiding this comment.
I'll remove them. This was more to check if there were time differences between v3.8+ and previous versions. But the fast tests don't really exercise places where we spawn processes.
tgamblin
approved these changes
Aug 27, 2021
haampie
pushed a commit
to haampie/spack
that referenced
this pull request
Sep 17, 2021
* Add a __reduce__ method to SpecBuildInterface This class was confusing pickle when being serialized, due to its scary nature of being an object that disguise as another type. * Add more MacOS tests, switch them to clingo * Fix condition syntax * Remove Python v3.6 and v3.9 with macOS
haampie
pushed a commit
to haampie/spack
that referenced
this pull request
Sep 17, 2021
* Add a __reduce__ method to SpecBuildInterface This class was confusing pickle when being serialized, due to its scary nature of being an object that disguise as another type. * Add more MacOS tests, switch them to clingo * Fix condition syntax * Remove Python v3.6 and v3.9 with macOS
haampie
added a commit
to haampie/spack
that referenced
this pull request
Sep 17, 2021
This reverts commit dcf4fc4.
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.
fixes #21215
This PR makes two unit tests that were failing on macOS, with Python 3.8 and
clingoPASS. The fix for that was adding an explicit__reduce__method to theSpecBuildInterface, which is an object wrapper around a spec. Without itpicklesometimes would try to search for the wrapped class in the module containing the base class ofSpecBuildInterface.Modifications:
__reduce__method toSpecBuildInterfaceclingoto check that ASP solver: two unit tests failing on MacOS #21215 is effectively solvedThere are still questions I don't know how to answer: