Closed
Description
The following code was working on 3.13 but no longer works in 5.1:
import yaml
class Ref(yaml.YAMLObject):
yaml_tag = '!Ref'
def __init__(self, val):
self.val = val
@classmethod
def from_yaml(cls, loader, node):
return cls(node.value)
yaml.load('Foo: !Ref bar')
I get the following exception on 5.1:
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!Ref'
in "<unicode string>", line 1, column 6:
Foo: !Ref bar
This is true whether I use yaml.load
, yaml.full_load
or yaml.unsafe_load
.
Metadata
Metadata
Assignees
Labels
No labels