-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use PyYAML CLoader to parse rules when available #323
Conversation
use the following on linux to reinstall pyyaml with libyaml
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tests in Python 2.7 still seem to fail due to rule reordering though.
whoops I didn't wait long enough for them given that the other tests were passing - sorry! will address today |
if k not in self.meta: | ||
del meta[k] | ||
for k, v in self.meta.items(): | ||
meta[k] = v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a neat bug: tests broke only on py2 because in py3 all dicts became ordered. so here, where we copied self.meta
(a dict) into definition["rule"]["meta"]
(something that needs to be ordered), the py3 version managed to work just fine by chance, while the py2 version failed to order the keys correctly.
closes #306