mk-fg / pretty-yaml

PyYAML-based module to produce a bit more pretty and readable YAML-serialized data
Do What The F*ck You Want To Public License
135 stars 29 forks source link

Deprecation warning #30

Closed MyrikLD closed 5 years ago

MyrikLD commented 5 years ago

Hello. Your lib uses pyyaml==4.2b4 But it raises a warning in Python 3.7

  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/__init__.py", line 72, in load
    return loader.get_single_data()
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/constructor.py", line 37, in get_single_data
    return self.construct_document(node)
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/constructor.py", line 46, in construct_document
    for dummy in generator:
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/constructor.py", line 204, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/site-packages/yaml/constructor.py", line 126, in construct_mapping
    if not isinstance(key, collections.Hashable):
  File "/Users/myrik/.local/share/virtualenvs/esentai-e7Q7McuI/lib/python3.7/collections/__init__.py", line 52, in __getattr__
    DeprecationWarning, stacklevel=2)
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
mk-fg commented 5 years ago

Don't think it has any restriction on PyYAML version, so if there's any version of it that works under other restrictions that you have - just use that. Given that python-3.8 will get released soon, I think PyYAML will be updated to fix that, so maybe just updating it with pip then should get rid of the warning in 3.7 too. Otherwise I'd suggest filing an issue with PyYAML, if there isn't one already (most likely should be).