Django

Code

Ticket #8238 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

django/db/__init__.py assumes it is loaded from the filesystem

Reported by: Guido van Rossum <guido@python.org> Assigned to: nobody
Milestone: 1.0 Component: Database layer (models, ORM)
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

There is code in the django.db package init.py that lists the available db backends. Unfortunately this code uses os.listdir() on a directory derived from file, and when loaded from a zip archive, this doesn't work. I have a quick hack that works around this, but perhaps there's a better way.

Attachments

db.diff (1.0 kB) - added by Guido van Rossum <guido@python.org> on 08/11/08 14:17:12.
patch

Change History

08/11/08 14:17:12 changed by Guido van Rossum <guido@python.org>

  • attachment db.diff added.

patch

08/11/08 14:27:01 changed by mtredinnick

  • needs_better_patch changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • milestone set to 1.0.

08/15/08 16:49:24 changed by Guido van Rossum <guido@python.org>

ping?

08/15/08 17:03:02 changed by mtredinnick

The ticket is marked as 1.0. Not 1.0-beta. We addressed those first. It's still open. We'll get to it. :-)

08/17/08 12:32:31 changed by mtredinnick

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

(In [8424]) Fixed #8238 -- If an invalid database backend is mentioned in settings and the environment doesn't support os.listdir(), we crashed whilst trying to construct the friendly error message. This was not so friendly.

This patch handles that case (which occurs in real life in Google App Engine). Patch from Guido van Rossum.


Add/Change #8238 (django/db/__init__.py assumes it is loaded from the filesystem)




Change Properties
Action