Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for collections.abc in Python >=3.8 #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ganto
Copy link

@ganto ganto commented Jul 15, 2022

Fixes the following error with Python >=3.8:

[...]
python ./run_tests.py
................................................EEEEEEEEEEEE.EEEEEE.EEEE...........E...EE.EEEEEEEEEEEEEE.EEEEE..EE.............EE........EEEEEEE..EEE...........E....EE........................EE.EEE...EE......EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.......E.EE.EEEEEEEEE
======================================================================
ERROR: test_exports_failed_render (datatypes.tests.test_entity.TestEntityNoMock)                                                                              
----------------------------------------------------------------------                                                                                        
Traceback (most recent call last):                                                                                                                            
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/tests/test_entity.py", line 291, in test_exports_failed_render         
    node1_exports = Exports({'a': '${a}'}, SETTINGS, '')                                                                                                      
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/exports.py", line 24, in __init__                                      
    super(Exports, self).__init__(mapping, settings, uri)                                                                                                     
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/parameters.py", line 67, in __init__                                   
    self.merge(mapping)                                                                                                                                       
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/parameters.py", line 234, in merge                                     
    wrapped = self._wrap_dict(other)                                                                                                                          
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/parameters.py", line 124, in _wrap_dict                                
    d[k] = self._get_wrapped(k, v)                                                                                                                            
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/parameters.py", line 110, in _get_wrapped                              
    return self._wrap_value(value)                                                                                                                            
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/datatypes/parameters.py", line 102, in _wrap_value                                                                                                                                                                                               
    return Value(value, self._settings, self._uri,                                                                                                            
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/values/value.py", line 31, in __init__                                           
    self._item = self._parser.parse(value, self._settings)                                                                                                    
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/values/parser.py", line 68, in parse                                             
    tokens = parsers.listify(tokens)                                                                                                                          
  File "/var/tmp/portage/dev-python/reclass-1.7.0/work/reclass-1.7.0/reclass/values/parser_funcs.py", line 52, in listify                                     
    if (isinstance(w, collections.Iterable) and                                                                                                               
AttributeError: module 'collections' has no attribute 'Iterable'
[...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant