Opened 5 years ago

Closed 5 years ago

Last modified 5 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: master
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


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:

Change History (4)

comment:1 Changed 5 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted

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

comment:2 Changed 5 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 499a745ae1b53614035b9993b148f32d4ce3f138:

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

comment:3 Changed 5 years ago by Claude Paroz <claude@…>

In 2d8c132b187d9dfefe0f409c4fb39b54a6645675:

Delayed settings.DATABASES usage by ConnectionHandler

Refs #20474.

comment:4 Changed 5 years ago by Claude Paroz <claude@…>

In 6a6bb168be90594a18ab6d62c994889b7e745055:

Delayed settings.DATABASE_ROUTERS usage by ConnectionRouter

Refs #20474.

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