omry / omegaconf

Flexible Python configuration system. The last one you will ever need.
BSD 3-Clause "New" or "Revised" License
1.88k stars 98 forks source link

Use CSafeLoader when possible #1150

Closed wouterzwerink closed 6 months ago

wouterzwerink commented 6 months ago

Motivation

yaml.CSafeLoader is significantly faster. However, it is not always available. The proposed change is to use it whenever it is available with a fall back to yaml.SafeLoader (current loader).

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

No additional tests required, current tests should cover yaml being parsed correctly.

Fixes

What issue does this PR fix? Use https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue to link this PR to a corresponding issue.

Fixes #1149

Related PRs

-

wouterzwerink commented 6 months ago

Thanks, this looks good but can you please add a news fragment about this change?

Done, let me know if that looks good to you! By the way, it might be worth adding something about news fragments in CONTRIBUTING.md

odelalleau commented 6 months ago

Thanks, this looks good but can you please add a news fragment about this change?

Done, let me know if that looks good to you! By the way, it might be worth adding something about news fragments in CONTRIBUTING.md

Good point, see #1151 (unfortunately I can't add you as reviewer)