Opened 17 years ago

Closed 16 years ago

#4299 closed (fixed)

remove code duplication in postgresql and postgresql_psycopg2 backends

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Their base.py and introspection.py modules are almost identical and cause bugs to have to be fixed in both places.

Change History (10)

comment:1 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedAccepted

comment:2 by bp@…, 17 years ago

Resolution: fixed
Status: newclosed

Duplicated in #5106 and taken care of there, starting with [5949]?

comment:3 by Barry Pederson <bp@…>, 17 years ago

Resolution: fixed
Status: closedreopened

comment:4 by Barry Pederson <bp@…>, 17 years ago

Resolution: duplicate
Status: reopenedclosed

comment:5 by Gary Wilson, 17 years ago

Resolution: duplicate
Status: closedreopened

No duplication was removed from the modules listed in the ticket description though in all of that refactoring.

comment:6 by Gary Wilson, 17 years ago

(In [6165]) Refs #4299 -- Removed some code duplication in the postgresql introspection modules by letting the postgresql_psycopg2 backend use identical functions from the postgresql backend.

comment:7 by Gary Wilson, 17 years ago

Resolution: fixed
Status: reopenedclosed

The base modules don't really have that much duplication except for in the DatabaseWrapper class, and subclassing one from the other probably isn't worth it.

comment:8 by Jason Yan, 17 years ago

Resolution: fixed
Status: closedreopened

Fix imports from django.db.backends.postgresql.introspection, which imports db.backend.postgresql.base and thus psycopg in the psycopg2 backend.

comment:9 by Gary Wilson, 17 years ago

[6165] backed out in [6171].

comment:10 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: reopenedclosed

Doesn't look like there's anything much to do here any longer. Over the years, we've gradually moved more and more common stuff into django/db/backends/postgresql/. In particular, the introspection stuff in the psycopg2 backend inherits from the psycopg backend.

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