You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
The 'six' library includes a six.moves package that sets up a meta importer import hook to lazily load a bunch of modules only when they are first accessed. The finding.find_classes code when looping over sys.modules (via modules=ALL_IMPORTED_MODULES) is tripped up by this because as soon as it starts trying to introspect the six.moves module, it triggers lazy loading of a bunch of modules which may or may not be present in the systems given Python installation (common examples of modules that'll show up in the resulting ImportError messages: gdbm and Tkinter)
A workaround for this is to filter the list and avoid module names that start with 'six.'. Very hacky, agreed. Possibly worth considering a bug in https://pypi.python.org/pypi/six but given what it is trying to do I think code just needs to learn to play together. (i've encountered one other piece of code with this same problem due to six.moves having been imported)
I'm mailing you a CL internally, I'll let you push it upstream.
The text was updated successfully, but these errors were encountered:
The 'six' library includes a six.moves package that sets up a meta importer import hook to lazily load a bunch of modules only when they are first accessed. The finding.find_classes code when looping over sys.modules (via modules=ALL_IMPORTED_MODULES) is tripped up by this because as soon as it starts trying to introspect the six.moves module, it triggers lazy loading of a bunch of modules which may or may not be present in the systems given Python installation (common examples of modules that'll show up in the resulting ImportError messages: gdbm and Tkinter)
A workaround for this is to filter the list and avoid module names that start with 'six.'. Very hacky, agreed. Possibly worth considering a bug in https://pypi.python.org/pypi/six but given what it is trying to do I think code just needs to learn to play together. (i've encountered one other piece of code with this same problem due to six.moves having been imported)
I'm mailing you a CL internally, I'll let you push it upstream.
The text was updated successfully, but these errors were encountered: