aboutsummaryrefslogtreecommitdiff
path: root/lib3
diff options
context:
space:
mode:
authorTina Müller <cpan2@tinita.de>2019-11-18 15:55:27 +0100
committerTina Müller (tinita) <cpan2@tinita.de>2019-11-20 20:48:47 +0100
commit8c5e47fe62d7b9e0282a176a4b79b8b2980dc704 (patch)
treec063aa57c84d2081ae743716cade3b9bc092b4ed /lib3
parent4a31b16b04c08f926f01d3f297140634665f004a (diff)
downloadpyyaml-8c5e47fe62d7b9e0282a176a4b79b8b2980dc704.tar.gz
Move constructor for object/apply to Unsafe
Diffstat (limited to 'lib3')
-rw-r--r--lib3/yaml/constructor.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib3/yaml/constructor.py b/lib3/yaml/constructor.py
index 34fc1ae..fb4f1e9 100644
--- a/lib3/yaml/constructor.py
+++ b/lib3/yaml/constructor.py
@@ -695,10 +695,6 @@ FullConstructor.add_multi_constructor(
FullConstructor.construct_python_object)
FullConstructor.add_multi_constructor(
- 'tag:yaml.org,2002:python/object/apply:',
- FullConstructor.construct_python_object_apply)
-
-FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/object/new:',
FullConstructor.construct_python_object_new)
@@ -714,6 +710,10 @@ class UnsafeConstructor(FullConstructor):
return super(UnsafeConstructor, self).make_python_instance(
suffix, node, args, kwds, newobj, unsafe=True)
+UnsafeConstructor.add_multi_constructor(
+ 'tag:yaml.org,2002:python/object/apply:',
+ UnsafeConstructor.construct_python_object_apply)
+
# Constructor is same as UnsafeConstructor. Need to leave this in place in case
# people have extended it directly.
class Constructor(UnsafeConstructor):