Support pygambit 17 action interface; fix tests for pygambit >= 16.7.0 - #117
Open
d-kad wants to merge 2 commits into
Open
Support pygambit 17 action interface; fix tests for pygambit >= 16.7.0#117d-kad wants to merge 2 commits into
d-kad wants to merge 2 commits into
Conversation
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.
Description of the changes in this PR
Updates
gtdrawfor the removal of theActionobject in pygambit 17 (gambitproject/gambit#1078), and fixes test breakage.gambit_layout.py: a chance action's probability moved fromnode.prior_action.probtoInfoset.action_probs[label]. One call site, branch inlined.Detection is by
hasattr, not by version string: pygambit 17.0.0a1 and 17.0.0a2 are published and still carry the old interface, so a16/17major-version check misclassifies them. The real boundary is 17.0.0b1.node.prior_action.labelneeds no change — the newBranchnamed tuple keeps.label. (The ChangeLog note in #1078 saying this breaksgtdrawpredates the commit that introducedBranch.)The pygambit 16 arms are temporary. Once 17.0.0b1 is on PyPI: pin
pygambit>=17.0.0b1, delete the threeelsearms (one ingambit_layout.py, two in the chance tests), and rewrite the chance construction as plainappend_event.