conda-build
conda-build copied to clipboard
Custom yaml Loader
This change was prompted by issues identified in #4179.
Instead of monkeypatching the yaml Loader every time it is used in an attempt to avoid parsing numbers make a custom Loader where the float/int tags are entirely removed.
This change also catches a number of cases that were previously missed. For example, pyyaml defined float resolvers for "-+0123456789." and int resolvers for "-+0123456789" and since the prior implementation only monkeypatched for "0123456789" it was still possible for numbers to be missed (e.g. ".0", "-1", "+1").
Yay! All done here!
@mingwandroid - no rush just let me know if anything here needs further work/discussion.
@kenodegard You identified a few cases that were previously missing, could you turn those cases into test cases please?
Absolutely! I will need to revive some dormant brain cells first...
I'm assuming we'd want the tests written in test_metadata
?
@jezdez added a few simple tests that are just checking to see if any int/floats occur in the parsed yaml. The zero, positive, and negative tests all fail on master.
@anaconda-issue-bot check