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
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ For a complete changelog, see:
* https://github.com/yaml/pyyaml/commits/
* https://bitbucket.org/xi/pyyaml/commits/

4.2 (unreleased)
----------------

* Fixed deprecation warning on Python 3.7 by importing from collections.abc
instead of collections.

4.1 (2018-06-26)
----------------

Expand Down
4 changes: 2 additions & 2 deletions lib3/yaml/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .error import *
from .nodes import *

import collections, datetime, base64, binascii, re, sys, types
import collections.abc, datetime, base64, binascii, re, sys, types

class ConstructorError(MarkedYAMLError):
pass
Expand Down Expand Up @@ -123,7 +123,7 @@ def construct_mapping(self, node, deep=False):
mapping = {}
for key_node, value_node in node.value:
key = self.construct_object(key_node, deep=deep)
if not isinstance(key, collections.Hashable):
if not isinstance(key, collections.abc.Hashable):
raise ConstructorError("while constructing a mapping", node.start_mark,
"found unhashable key", key_node.start_mark)
value = self.construct_object(value_node, deep=deep)
Expand Down