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

Re: [Python-modules-team] Bug#896429: python3-django-tables2: django_tables2 fails to import



Control: severity 896234 normal
Control: severity 896242 normal
Control: severity 896272 normal
Control: severity 896306 normal
Control: severity 896307 normal
Control: severity 896328 normal
Control: severity 896378 normal
Control: severity 896396 normal
Control: severity 896429 normal

On Sat, Apr 21, 2018 at 09:47:59AM +1000, Brian May wrote:
> Helmut Grohne <helmut@subdivi.de> writes:
> 
> > django.core.exceptions.ImproperlyConfigured: Requested setting
> > DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must
> > either define the environment variable DJANGO_SETTINGS_MODULE or call
> > settings.configure() before accessing settings.
> 
> I believe this bug report, and several others you filled recently that
> contain this same text are false.

I went passed the bug list to a few others for review and posted the
full list to d-devel (including all tracebacks). Nobody spoke up and
Chris Lamb vaguely said that the django ones looked legit to him.

I have lowered the severity of the relevant bugs (matching
"ImproperlyConfigured") to prevent issues with testing migration.

> Like it or not, it is just not possible to import Django libraries
> without providing a valid django settings file. This is not a sign that
> something is broken.

I wonder whether we can draw anything useful from these bugs before
closing them.

For one thing, you cannot use autopkgtest-pkg-python on these modules as
is.

Then having them not importable means that e.g, pydoc. That's
unfortunate. Often times, modules with non-trivial impact on their
environment do not do so at import time, but provide something like an
install function such that the user makes a conscious choice. An example
would be gbulb.install().

So yeah, for django this may make sense, but this behaviour is still
unfortunate from a qa pov.

I'd like to hear your opinion on this matter.

After the dust has settled, I can follow up on d-devel with a summary
that suggests filtering this particular django exception.

Helmut


Reply to: