Opened 8 years ago

Closed 8 years ago

#7421 closed (fixed)

Don't check the exact error message of exceptions

Reported by: anto.cuni@… Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: vm-compat
Cc: anto.cuni@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


django/core/management/commands/ checks for the exact error message when catching an ImportError exception.
This test could fail on implementations other than CPython, is they choose to format the error messages slightly differently, as for example PyPy does.
The attacched patch solves this problem.

Attachments (2)

pypy-compatible.patch (648 bytes) - added by anto.cuni@… 8 years ago.
patch.patch (683 bytes) - added by fijal 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by anto.cuni@…

comment:1 Changed 8 years ago by anonymous

  • Cc anto.cuni@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 8 years ago by jacob

  • Keywords vm-compat added
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [7623]) Fixed #7421 -- Improved syncdb implementation not to check for exact exception text, in case of alternate Python implementation. Thanks, anto.cuni@…

comment:4 Changed 8 years ago by fijal

  • Resolution fixed deleted
  • Status changed from closed to reopened

Actually commited thing was not exactly the same as attached patch. Attaching new patch which makes logic work again.

Changed 8 years ago by fijal

comment:5 Changed 8 years ago by russellm

To make it easier to validate your patch - what does PyPy return in the error message?

comment:6 Changed 8 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [7891]) Fixed #7421 -- Corrected the condition used during syncdb to establish that a management module is or isn't available. This is to satisfy non-CPython implementations which can use different error messages. Thanks to Maciej Fijalkowski (fijal) for his help confirming the problem.

Note: See TracTickets for help on using tickets.
Back to Top