[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MBF proposal: python modules that fail to import



On Mon, Apr 16, 2018 at 04:14:21PM -0300, Herbert Fortes wrote:
> Package python3-dj-static is on the dd-list. But I can import it.
> 
> # on a bananapi
> 
> $ python3
> Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
> [GCC 6.3.0 20170124] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import static     # dependency
> >>> import dj_static  # module
> >>> 

For most of these bug reports there exists a setting in which the
modules can be imported. E.g. a significant chunk of them becomes
importable after installing python3-pkg-resources.

> If I understood correct (about the test), please note the diff:
> 
> python3-dj-static  # Debian package
> dj_static          # module
> 
> The package name uses '-' and the module '_'.

In my initial mail there is a draft.gz that contains the proposed bug
reports. Searching for python3-dj-static yields:

| After installing python3-dj-static importing the module dj_static
| into a python interpreter fails with the following error:
| 
| Traceback (most recent call last):
|   File "<string>", line 1, in <module>
|   File "/usr/lib/python3/dist-packages/dj_static.py", line 5, in <module>
|     from django.conf import settings
| ModuleNotFoundError: No module named 'django'

So my heuristic did select the right module and it failed to import,
because no dependency on python3-django was declared. Thus the bug
report seems legitimate to me.

Helmut


Reply to: