support for pyyaml-6
See original GitHub issueThe yaml.load()
function (as used in https://github.com/ebroecker/canmatrix/blob/development/src/canmatrix/formats/yaml.py#L77) is inherently unsafe, and therefore the pyyaml developers try to fade it out.
Since pyyaml-5.1 (released on Mar 13, 2019), the module will therefore emit a warning if yaml.load()
is called (without explictely specifying a Loader
).
As of pyyaml-6 (released on Oct 13, 2021 - that’s about a year ago), the yaml.load()
function now mandates an explicit Loader.
see https://msg.pyyaml.org/load for details.
I currently do not have much time to investigate this issue any further, but the options are:
- ideally use
yaml.SafeLoader
as the loader (resp.yaml.safe_load()
which wraps this in a single function) - but this might break withcanmatrix
, as it is building full fledged objects from the yaml-string - use
yaml.FullLoader
(which basically restores the pre-6.0 behaviour of pyyaml) - but this has to be found to also be unsafe and “may go away”. - do something else.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PyYAML · PyPI
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle support, capable extension API, and sensible error messages. PyYAML supports standard ...
Read more >PyYAML is a YAML parser and emitter for Python.
YAML is a data serialization format designed for human readability and interaction with scripting languages. PyYAML is a YAML parser and emitter for...
Read more >Support PyYAML 6 #3526 - aws/sagemaker-python-sdk - GitHub
Given PyYAML is such a popular library, and PyYAML 6 is commonly used, this frequently causes dependency conflicts. Describe alternatives you've considered.
Read more >[ANN] PyYAML-6.0 Released
[ANN] PyYAML-6.0 Released ... PyYAML supports standard YAML tags and provides Python-specific tags that allow to represent an arbitrary ...
Read more >Support PyYAML 6 version | StoryBoard
Currently not supporting latest version of PyYAML, which is 6. Probably will need to update requirements.txt. No description provided ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @umlaeute
I switched to safe_load() seems still to work…
OK, I close this ticket.
let’s open a new ticket if we get in trouble