Django

Code

Ticket #7421 (closed: fixed)

Opened 6 months ago

Last modified 5 months ago

Don't check the exact error message of exceptions

Reported by: anto.cuni@gmail.com Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords: vm-compat
Cc: anto.cuni@gmail.com Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

django/core/management/commands/syncdb.py 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

pypy-compatible.patch (0.6 kB) - added by anto.cuni@gmail.com on 06/11/08 09:23:17.
patch.patch (0.7 kB) - added by fijal on 07/11/08 09:49:54.

Change History

06/11/08 09:23:17 changed by anto.cuni@gmail.com

  • attachment pypy-compatible.patch added.

06/11/08 09:29:02 changed by anonymous

  • cc set to anto.cuni@gmail.com.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

06/11/08 21:09:55 changed by jacob

  • keywords set to vm-compat.
  • stage changed from Unreviewed to Accepted.

06/11/08 23:22:03 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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

07/11/08 09:49:14 changed by fijal

  • status changed from closed to reopened.
  • resolution deleted.

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

07/11/08 09:49:54 changed by fijal

  • attachment patch.patch added.

07/11/08 09:54:19 changed by russellm

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

07/11/08 10:08:10 changed by russellm

  • status changed from reopened to closed.
  • resolution set to fixed.

(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.


Add/Change #7421 (Don't check the exact error message of exceptions)




Change Properties
Action