summaryrefslogtreecommitdiff
path: root/lib3
diff options
context:
space:
mode:
Diffstat (limited to 'lib3')
-rw-r--r--lib3/yaml/constructor.py2
-rw-r--r--lib3/yaml/emitter.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib3/yaml/constructor.py b/lib3/yaml/constructor.py
index 2f6ed15..5e23c20 100644
--- a/lib3/yaml/constructor.py
+++ b/lib3/yaml/constructor.py
@@ -509,7 +509,7 @@ class Constructor(SafeConstructor):
if '.' in name:
module_name, object_name = name.rsplit('.', 1)
else:
- module_name = '__builtin__'
+ module_name = 'builtins'
object_name = name
try:
__import__(module_name)
diff --git a/lib3/yaml/emitter.py b/lib3/yaml/emitter.py
index b5521fa..5815909 100644
--- a/lib3/yaml/emitter.py
+++ b/lib3/yaml/emitter.py
@@ -180,8 +180,7 @@ class Emitter:
self.write_version_directive(version_text)
self.tag_prefixes = self.DEFAULT_TAG_PREFIXES.copy()
if self.event.tags:
- handles = self.event.tags.keys()
- handles.sort()
+ handles = sorted(self.event.tags.keys())
for handle in handles:
prefix = self.event.tags[handle]
self.tag_prefixes[prefix] = handle