You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have fast LibYAML bindings automatically enabled if they are available, or, to have an easy way to turn them on globally, without modifying existing code that already uses PyYAML, and that can work even when importing other packages that themselves use PyYAML.
only works for code that is fully controlled. Also, it is inconvenient to retrofit large projects that may import yaml in more than one place, use load, dump, add_representer, etc. without explicitly specifying a Loader or Dumper, or use the "sugar" methods.
This seems work, but maybe there is a better way? #436
The text was updated successfully, but these errors were encountered:
What about having a yaml.auto import that automatically selects the Loader, Dumper, etc? Like tqdm.auto API. Which could eventually become the default in a major version change (v7?).
Yeah, this has been a long-standing need, but is somewhat complicated in the current codebase by the way the various Loaders and Dumpers are technically unrelated concrete classes composed entirely of mixins. I have a working sample of something similar in #700 - there's still some bikeshedding on the name, but the overall concept seems workable (since the new API lets you explicitly opt in to the features/tags you want independent of the underlying Loader/Dumper impl).
It would be nice to have fast LibYAML bindings automatically enabled if they are available, or, to have an easy way to turn them on globally, without modifying existing code that already uses PyYAML, and that can work even when importing other packages that themselves use PyYAML.
The suggestion in the documentation
only works for code that is fully controlled. Also, it is inconvenient to retrofit large projects that may import yaml in more than one place, use load, dump, add_representer, etc. without explicitly specifying a Loader or Dumper, or use the "sugar" methods.
This seems work, but maybe there is a better way?
#436
The text was updated successfully, but these errors were encountered: