Code

Opened 6 years ago

Closed 5 years ago

#8489 closed (wontfix)

ImportError from missing _md5 gets swallowed

Reported by: jfedor Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I encountered this problem on Mac OS X 10.4 using Python 2.5 from MacPorts and have seen it confusing other people on mailing lists.

If I install the Python package from MacPorts but forget the py25-hashlib package, importing hashlib fails, but the error message for that is not printed because ImportError is being cought in source:django/trunk/django/db/__init__.py. The user is stuck with a confusing message of "ImportError: No module named base" or similar (depending on the DB backend).

I suggest catching ImportError in source:django/trunk/django/utils/hashcompat.py and reraising it as ImproperlyConfigured.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

This should be considered a MacPorts bug: hashlib is part of the Python standard library, and any distribution that fails to include it is a broken distro.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.