question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support for pyyaml-6

See original GitHub issue

The 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 with canmatrix, 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:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ebroeckercommented, Oct 20, 2022

Hi @umlaeute

I switched to safe_load() seems still to work…

0reactions
ebroeckercommented, Oct 26, 2022

OK, I close this ticket.

let’s open a new ticket if we get in trouble

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found