Opened 18 years ago
Closed 17 years ago
#4299 closed (fixed)
remove code duplication in postgresql and postgresql_psycopg2 backends
| Reported by: | 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 , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 18 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:4 by , 18 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | reopened → closed |
comment:5 by , 18 years ago
| Resolution: | duplicate |
|---|---|
| Status: | closed → reopened |
No duplication was removed from the modules listed in the ticket description though in all of that refactoring.
comment:6 by , 18 years ago
comment:7 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
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 , 18 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
Fix imports from django.db.backends.postgresql.introspection, which imports db.backend.postgresql.base and thus psycopg in the psycopg2 backend.
comment:10 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
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.
Duplicated in #5106 and taken care of there, starting with [5949]?