Repository navigation
Restore call parameters when an abstract call fails - #779
Merged
Merged
Conversation
A Function call that raised skipped the restore of the parameters and price names it was given, so they stuck and the next call used them: after abstract.SMA(d, timeperiod=0) failed, abstract.SMA(d) failed too. Restore them on every path. set_parameters also checks every value before writing any, so a rejected call leaves the function as it was. Refs #194
`make cython` from the repo root, with Cython 3.3.0 and numpy 2.5.4 in .venv (python3.12). Built from this file without Cython: 1714 passed, 1 skipped.
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.
Follow-up to #195, refs #194. A Function call that raised skipped the restore of the parameters and price names passed to it, so they stuck: after
abstract.SMA(d, timeperiod=0)failed,abstract.SMA(d)failed too. The restore now runs in afinally.set_parametersalso checks every value before writing any, so a rejected call leaves the function as it was. Calls that succeed behave as before.The second commit regenerates
_ta_lib.cwithmake cython(Cython 3.3.0), which also picks up #778. Against C dev 2af42bf84, built from the .pyx and again from the regenerated .c: 1714 passed, 1 skipped; both new tests fail without the_abstract.pxihunk.