stevedore – python3 load extension error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
stevedore |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi,
I've changed my code to use stevedore and load the entry points configured in setup.py within my code through the stevedore extension. It works fine in python2.7 but python3.
When I load the extensions in python2, it returns a dict with my extensions correctly as below:
>>> from stevedore import extension
>>> mgr = extension.
... invoke_
>>> mgr.extensions
[<stevedore.
The same load in python3 returns a null dict:
>>> mgr.extensions
[]
The test used in my code when I parse tox with py34 returns the following error:
Could not load 'extractorX': 'dict' object has no attribute 'iteritems'
When I googled this error, they said that iteritems function change to items for the python3X versions and it works just for python2.
Any help to make this work for both versions of python?
Many thanks and cheers,
Aida
If you have a troubleshooting or support issue, use the following resources:
- Ask OpenStack: http://
- The mailing list: http://
- IRC: 'openstack' channel on Freenode
-------
Release: 1.29.1.dev1 on 2018-07-26 22:55
SHA: e4ef5d0df45f74e
Source: https:/
URL: https:/
description: | updated |
It sounds like you're using the iteritems() method somewhere in the code being invoked when the plugin loads. You can pass propagate_ map_exceptions= True when constructing the ExtensionManager to get the traceback.