-
Notifications
You must be signed in to change notification settings - Fork 4
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
Expose safe_load
ing
#6
Comments
I'm not an expert at all in yaml parsing, but would it work as a workaround to use |
@jeverling That's pretty inefficient, though. Also, I am not sure Python objects like tuples would be handled wrongly. E.g., see how load+dump a tuple transforms it in a list, when using "safe":
|
Thanks, that makes sense! |
Thanks for the great project btw! I was looking at the way docker-compose interpolates variables in |
Thanks! I am happy to accept a PR if you have time to work on it! |
Not right now, but I hope I can find the time in the next weeks. |
Hey @lbolla, I was interested in working on this. I am not sure what to do though. Your help is much appreciated. |
@thisHermit I think supporting Have a look at PyYaml docs on how to do it. I'd be good to have a unittest that highlights the problem with the current implementation. I am OK with replacing the simple Loader with SafeLoader, btw: no need to support both, imo. |
At the moment,
yamlenv
usesyaml.load
to load .yaml files.We should also support using
yaml.safe_load
.The text was updated successfully, but these errors were encountered: