Avoid RunLockRequired error by using backend functions
#977
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.
Closes #975, supersedes #976. The former PR was an attempt to pin the ixmp4 version, which doesn't work as explained there. Instead, as @khaeru suggested, we should bump the minimum supported version of ixmp4 in ixmp to v0.12. This PR adjusts the code we have in message_ix that runs into
RunLockRequirederrors by calling ixmp4-backend functions directly.These functions were exclusively necessary in
scenario_setup.py, which is code that is called for everyScenario, anyway, and presumably not by user code, but by internal routines, so it should be safe to use backend functions directly.Please note that this is not an attempt to integrate the
Run.transact()or other ixmp4 rollback features.How to review
PR checklist
Add or expand tests;coverage checks both ✅[ ] Add, expand, or update documentation.Just internal function calls.[ ] Update release notes.Just internal function calls.