[Django] #26484: Add a helpful message in manage.py when Django cannot be imported

3 views
Skip to first unread message

Django

unread,
Apr 9, 2016, 1:24:02 PM4/9/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
As discussed [https://github.com/django/django/pull/6314 on a pull
request] and [https://groups.google.com/d/topic/django-
developers/aXF1j55hb2Q/discussion on django-developers].

The first commit is 724a279849a5cd09cdb5ef201fe6958a4c26fe73 but the issue
is reopened after some concerns about the possibility of masking imports
on Python 2.

--
Ticket URL: <https://code.djangoproject.com/ticket/26484>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 9, 2016, 4:15:19 PM4/9/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

I [https://github.com/django/django/pull/6438 implemented Shai's
suggestion] to catch the original exception, then try `import django` and
display the helpful message if that fails or reraise the original
exception if not.

--
Ticket URL: <https://code.djangoproject.com/ticket/26484#comment:1>

Django

unread,
Apr 12, 2016, 10:50:33 AM4/12/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26484#comment:2>

Django

unread,
Apr 13, 2016, 2:41:03 PM4/13/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by timgraham):

In 724a279849a5cd09cdb5ef201fe6958a4c26fe73:

Raised a more helpful ImportError message in manage.py template.

--
Ticket URL: <https://code.djangoproject.com/ticket/26484#comment:3>

Django

unread,
Apr 13, 2016, 2:41:25 PM4/13/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"5c6d397956f405f5c3fee6dc42568386972b9fc2" 5c6d397]:
{{{
#!CommitTicketReference repository=""
revision="5c6d397956f405f5c3fee6dc42568386972b9fc2"
Refs #26484 -- Avoided masking useful exceptions in manage.py's
ImportError.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26484#comment:4>

Django

unread,
Apr 13, 2016, 2:57:56 PM4/13/16
to django-...@googlegroups.com
#26484: Add a helpful message in manage.py when Django cannot be imported
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/26484#comment:5>

Reply all
Reply to author
Forward
0 new messages