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
This is a weird one, which we noticed a while back but I didn't bother tracking down until today.
When anyone tries to import pkg_resources, which is provided by setuptools, it will parse through all of your Python modules to determine what packages exist. An ImportWarning is triggered because, while the backports directory exists, it does not contain a __init__.py file so it's not technically a Python package. This does not appear to have any negative impact on how it enumerates the Python packages, but it is a sign that the namespace package is not properly being set up.
You can verify that this issue exists with the latest version, 1.0.5, by running the following command. I've included the output that I'm getting for reference.
I can verify that the namespace package is in fact missing the __init__.py file by checking out the package directory.
$ ls /usr/local/lib/python2.7/dist-packages/backports
configparser csv.py csv.pyc
I'll note that while I included the reduced scope example of directly importing the module, we were seeing this in the wild while running both the unittest and pytest test runners.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. Obviously, backported namespace packages can be finnicky, to say the least. Can you give me steps to reproduce this in a clean environment? It looks like you may have configparser and csv both installed, so could it be related to having both of them? I'm not necessarily trying to cast blame, but could it be an issue in configparser?
My apologies for assuming it was this backported library that was causing the issue. It looks like configparser is required by pytest at the moment, so it's not actually possible to work around this warning.
This is a weird one, which we noticed a while back but I didn't bother tracking down until today.
When anyone tries to import
pkg_resources
, which is provided by setuptools, it will parse through all of your Python modules to determine what packages exist. AnImportWarning
is triggered because, while thebackports
directory exists, it does not contain a__init__.py
file so it's not technically a Python package. This does not appear to have any negative impact on how it enumerates the Python packages, but it is a sign that the namespace package is not properly being set up.You can verify that this issue exists with the latest version, 1.0.5, by running the following command. I've included the output that I'm getting for reference.
I can verify that the namespace package is in fact missing the
__init__.py
file by checking out the package directory.I'll note that while I included the reduced scope example of directly importing the module, we were seeing this in the wild while running both the
unittest
andpytest
test runners.The text was updated successfully, but these errors were encountered: