Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-08 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  cjerdonek
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | 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 ):

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


Comment:

 In [changeset:"7ca3b391b611eb710c4c1d613e2f672591097a00" 7ca3b391]:
 {{{
 #!CommitTicketReference repository=""
 revision="7ca3b391b611eb710c4c1d613e2f672591097a00"
 Fixed #27170 -- Added DatabaseWrapper class attributes to ease
 subclassing.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d4a827fe40fd7968564961396bc23c78%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-07 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  cjerdonek
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | 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 timgraham):

 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e801dfe27ec9081c1fd1e502b9c089fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-06 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  cjerdonek
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by cjerdonek):

 * has_patch:  0 => 1


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d1cffb02c20a535114f3de56c30eb709%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-03 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  cjerdonek
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by cjerdonek):

 I started working on this in [https://github.com/django/django/pull/7206
 this PR].

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8872c756998a0a90f3d5d3e21a742c7d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-03 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  cjerdonek
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by cjerdonek):

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


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.24ac1ac7b9246a470ff890a71ab38058%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-03 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
-+-
 Reporter:  cjerdonek|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | 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):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * type:  Uncategorized => Cleanup/optimization
 * needs_tests:   => 0
 * needs_docs:   => 0


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c5ea5a4d4cd3c231cb9fcc20968cc670%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27170: Make database backend __init__() methods friendlier to subclassing

2016-09-03 Thread Django
#27170: Make database backend __init__() methods friendlier to subclassing
--+
 Reporter:  cjerdonek |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 The `__init__()` method for most or all of the database backends looks
 something like the following:

 {{{#!python
 def __init__(self, *args, **kwargs):
 super(DatabaseWrapper, self).__init__(*args, **kwargs)

 self.features = DatabaseFeatures(self)
 self.ops = DatabaseOperations(self)
 self.client = DatabaseClient(self)
 self.creation = DatabaseCreation(self)
 self.introspection = DatabaseIntrospection(self)
 self.validation = DatabaseValidation(self)
 }}}

 
([https://github.com/django/django/blob/dbccf163b6e45bf2a673c249d4667360676acddc/django/db/backends/mysql/base.py#L231
 Here] is a link to this code for the MySQL backend.)

 Notice that each of the database classes is "hard-coded."

 Since much of the behavior of the backends is defined by these classes
 (and so can be modified by changing these classes), it would be nice if it
 were easier to change what class is used. I believe this could be done
 simply by making each of these classes a class attribute.  This pattern is
 used to good effect, for example, throughout the test framework. You can
 see this being done in the definition of `DiscoverRunner`, for example,
 
[https://github.com/django/django/blob/dbccf163b6e45bf2a673c249d4667360676acddc/django/test/runner.py#L388
 here]:

 {{{#!python
 class DiscoverRunner(object):

 test_suite = unittest.TestSuite
 parallel_test_suite = ParallelTestSuite
 test_runner = unittest.TextTestRunner
 test_loader = unittest.defaultTestLoader
 reorder_by = (TestCase, SimpleTestCase)
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.3f469ae7b7bac74d3f5a5ee5ec056e7d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.