Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/yaml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def add_path_resolver(tag, path, kind=None, Loader=Loader, Dumper=Dumper):
Loader.add_path_resolver(tag, path, kind)
Dumper.add_path_resolver(tag, path, kind)

def add_constructor(tag, constructor, Loader=Loader):
def add_constructor(tag, constructor, Loader=FullLoader):
"""
Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
Expand Down
2 changes: 1 addition & 1 deletion lib3/yaml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def add_path_resolver(tag, path, kind=None, Loader=Loader, Dumper=Dumper):
Loader.add_path_resolver(tag, path, kind)
Dumper.add_path_resolver(tag, path, kind)

def add_constructor(tag, constructor, Loader=Loader):
def add_constructor(tag, constructor, Loader=FullLoader):
"""
Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/test_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _make_objects():
NewArgs, NewArgsWithState, Reduce, ReduceWithState, MyInt, MyList, MyDict, \
FixedOffset, today, execute

class MyLoader(yaml.Loader):
class MyLoader(yaml.FullLoader):
pass
class MyDumper(yaml.Dumper):
pass
Expand Down
2 changes: 1 addition & 1 deletion tests/lib3/test_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _make_objects():
NewArgs, NewArgsWithState, Reduce, ReduceWithState, MyInt, MyList, MyDict, \
FixedOffset, today, execute

class MyLoader(yaml.Loader):
class MyLoader(yaml.FullLoader):
pass
class MyDumper(yaml.Dumper):
pass
Expand Down