[Django] #22603: Reorganize code in django.db.backends

37 views
Skip to first unread message

Django

unread,
May 8, 2014, 3:38:21 PM5/8/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database | Keywords:
layer (models, ORM) | Has patch: 0
Severity: Normal | Needs tests: 0
Triage Stage: | Easy pickings: 0
Unreviewed |
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently, database backends are split in modules inconsistently. For
example:

- in the base implementation, most classes are defined in __init__.py; in
actual backends, most classes are in base.py;
- in the base implementation, BaseDatabaseCreation and
BaseDatabaseSchemaEditor have their own modules while other classes are
defined in __init__.py;
- the postgresql backend has an operations.py, other backends don't.

It would be easier to make cross-backend changes if the code was organized
consistently.

Considering the size of the classes involved, I think we should put each
class it its own module.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 8, 2014, 4:14:37 PM5/8/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:1>

Django

unread,
Jun 2, 2014, 10:51:37 AM6/2/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization | Version: master

Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by gchp):

* status: new => assigned
* owner: nobody => gchp


--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:2>

Django

unread,
Jun 2, 2014, 11:32:59 AM6/2/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization | Version: master

Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by timo):

We should do this late in the 1.8 release cycle when there is less of a
chance we'll need to backport bug fixes to 1.7.x as reorganizing a lot of
code like this will make backporting more painful.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:3>

Django

unread,
Jun 2, 2014, 11:41:38 AM6/2/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization | Version: master

Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by gchp):

That sounds sensible. I'll put it on hold until closer to the release
date. Is the timeline for 1.8 online anywhere? A quick search didn't
reveal it.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:4>

Django

unread,
Jun 2, 2014, 12:18:09 PM6/2/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization | Version: master

Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by timo):

No, we're at least a month behind on the 1.7 release, so that needs to be
finished first.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:5>

Django

unread,
Oct 20, 2014, 10:32:34 AM10/20/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization | Version: master

Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: 1.8-alpha | Patch needs improvement: 0

Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timgraham):

* keywords: => 1.8-alpha


Comment:

I'm tagging this ticket 1.8-alpha so we can try to make this change close
to that date (currently scheduled for January 12) before we fork
stable/1.8.x.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:6>

Django

unread,
Dec 24, 2014, 1:14:17 PM12/24/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by berkerpeksag):

gchp, are you planning to work on this? I can review your patch or take a
look at this before 1.8 alpha.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:7>

Django

unread,
Dec 24, 2014, 1:27:32 PM12/24/14
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by gchp):

Hey berkerpeksag,
I'm not sure if I'll get time, I don't want to say I will in case I don't.
Feel free to assign it to yourself if you like!
Cheers

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:8>

Django

unread,
Jan 6, 2015, 2:12:35 PM1/6/15
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: gchp
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

There are still a couple large patches that touch these classes that may
make it into 1.8 (in particular,
[https://github.com/django/django/pull/3669 PR 3669]), so let's hold off a
bit longer on this -- I'm thinking after the "feature freeze" on Monday,
but before we cut the branch and issue an alpha release.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:9>

Django

unread,
Jan 12, 2015, 2:32:54 PM1/12/15
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: timgraham

Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* owner: gchp => timgraham


--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:10>

Django

unread,
Jan 14, 2015, 1:42:22 PM1/14/15
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/3899 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:11>

Django

unread,
Jan 14, 2015, 2:01:09 PM1/14/15
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: 1.8-alpha | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* stage: Accepted => Ready for checkin


Comment:

Considering this is essentially code moving and the test suite is happy,
I'd consider this RFC.

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:12>

Django

unread,
Jan 14, 2015, 2:18:30 PM1/14/15
to django-...@googlegroups.com
#22603: Reorganize code in django.db.backends
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: timgraham
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: 1.8-alpha | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"28308078f397d1de36fd0da417ac7da2544ba12d"]:
{{{
#!CommitTicketReference repository=""
revision="28308078f397d1de36fd0da417ac7da2544ba12d"
Fixed #22603 -- Reorganized classes in django.db.backends.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22603#comment:13>

Reply all
Reply to author
Forward
0 new messages