Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20474 closed Cleanup/optimization (fixed)

Make django.db importable without side-effects on settings

Reported by: Claude Paroz Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, django.db is not importable without triggering settings configuration, which does harm in certain situations, where imports have then to happen at runtime. I've set up a branch where this behaviour has been fixed:

https://github.com/django/django/pull/1193

Change History (4)

comment:1 by Anssi Kääriäinen, 11 years ago

Triage Stage: UnreviewedAccepted

I don't see any reason to not accept this.

comment:2 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 499a745ae1b53614035b9993b148f32d4ce3f138:

Fixed #20474 -- Proxied and deprecated django.db.backend

comment:3 by Claude Paroz <claude@…>, 11 years ago

In 2d8c132b187d9dfefe0f409c4fb39b54a6645675:

Delayed settings.DATABASES usage by ConnectionHandler

Refs #20474.

comment:4 by Claude Paroz <claude@…>, 11 years ago

In 6a6bb168be90594a18ab6d62c994889b7e745055:

Delayed settings.DATABASE_ROUTERS usage by ConnectionRouter

Refs #20474.

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