Re: [Django] #26551: Django ORM generates invalid PostgreSQL query with Inverted Q() object that crosses relations

2016-11-20 Thread Django
#26551: Django ORM generates invalid PostgreSQL query with Inverted Q() object 
that
crosses relations
-+-
 Reporter:  Erik B. Andersen |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Q(), postgreSQL  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by François Freitag):

 * cc: mail@… (added)


--
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/066.9f9abfe332b71074d39ee0bac1d84cd7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16614: Support server-side cursors for queryset iteration in database backends

2016-11-20 Thread Django
#16614: Support server-side cursors for queryset iteration in database backends
-+-
 Reporter:  Dan McGee|Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  memory cursors   | Triage Stage:  Accepted
  database   |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by François Freitag):

 * cc: mail@… (added)
 * needs_tests:  1 => 0


Comment:

 I have written a draft for this feature based on previous patch by Anssi
 and Kevin.
 [https://github.com/django/django/pull/7587 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.70a6a3039cea17b0202e2480cbe571ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27512: Dead code path in Model.__init__

2016-11-20 Thread Django
#27512: Dead code path in Model.__init__
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:
 |  Unreviewed
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:"74742aa956d9cef0493b57f50f1cb7dc0f987fc6" 74742aa]:
 {{{
 #!CommitTicketReference repository=""
 revision="74742aa956d9cef0493b57f50f1cb7dc0f987fc6"
 Fixed #27512 -- Removed unused code in Model.__init__().
 }}}

--
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/068.9a63a673fb251e6c01e0ac8d5f339b4f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: Make AuthenticationForm use the username length from the user model

2016-11-20 Thread Django
#27515: Make AuthenticationForm use the username length from the user model
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.auth |  Version:  1.10
 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 Tim Graham):

 * status:  closed => new
 * resolution:  invalid =>


Old description:

> Hi,
>
> http://127.0.0.1:8000/admin/
>

> {{{
> 
> 
>   
> Username:
>  type="text" required="">
> }}}
>
> `maxlength="150"` is Right,

New description:

 `AuthenticationForm` has a hardcoded `max_length=254` (#19130). It might
 be able to use the max length from the user model with something like:
 `self.fields['username'].max_length =
 UserModel._meta.get_field(UserModel.USERNAME_FIELD).max_length` in
 `AuthenticationForm.__init__()`.

--

--
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/065.eb01c6674c009e8ddb7ec9750dc140b2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: Make AuthenticationForm use the username length from the user model (was: admin login action is maxlength 254 rather than 150 characters)

2016-11-20 Thread Django
#27515: Make AuthenticationForm use the username length from the user model
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  contrib.auth |  Version:  1.10
 Severity:  Normal   |   Resolution:  invalid
 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 Tim Graham):

 * status:  assigned => closed
 * component:  Forms => contrib.auth
 * has_patch:  1 => 0
 * resolution:   => invalid
 * stage:  Unreviewed => Accepted


Comment:

 [https://docs.djangoproject.com/en/stable/topics/auth/customizing/#specifying-a
 -custom-user-model Custom user models] may have a username with length
 other than 150, that's why using that value isn't appropriate. We might be
 able to use that with something like this:
 `self.fields['username'].max_length =
 UserModel._meta.get_field(UserModel.USERNAME_FIELD).max_length`.

--
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/065.ff2c7b2d9f693af8cc6bd8575944da4b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26207: Replace dynamic classes with non-data descriptors for deferred instance loading

2016-11-20 Thread Django
#26207: Replace dynamic classes with non-data descriptors for deferred instance
loading
-+-
 Reporter:  Anssi Kääriäinen |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"9d4246419ca5b913a7a9b05f18e695f10a9fd0fb" 9d42464]:
 {{{
 #!CommitTicketReference repository=""
 revision="9d4246419ca5b913a7a9b05f18e695f10a9fd0fb"
 Refs #26207 -- Removed obsolete comments about deferred model classes.
 }}}

--
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/066.f33e2f8a561a481be0f1ce7642fba83a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27437: Can't create GinIndex on ArrayField(CITextField)

2016-11-20 Thread Django
#27437: Can't create GinIndex on ArrayField(CITextField)
-+-
 Reporter:  Davide Setti |Owner:  Mads
 |  Jensen
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  postgres, indexes,   | Triage Stage:  Accepted
  gin, citext, arrays|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mads Jensen):

 I'm a bit indifferent to how this will get treated.

--
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/061.b4c5a831fb1bac1234384b3525a870b3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27437: Can't create GinIndex on ArrayField(CITextField)

2016-11-20 Thread Django
#27437: Can't create GinIndex on ArrayField(CITextField)
-+-
 Reporter:  Davide Setti |Owner:  Mads
 |  Jensen
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  postgres, indexes,   | Triage Stage:  Accepted
  gin, citext, arrays|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 As I mentioned to the reporter at DUTH I'm not convinced this a common
 enough use case to ship and maintain a custom operation class.

 I'd be in favor of moving the ticket to ''Someday/Maybe'' and see if this
 gather any traction as both `GINIndex` and `CITextField` are new features
 in the still unreleased Django 1.11.

--
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/061.cedebf4843fd9a65e3fc35bd8a642892%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27437: Can't create GinIndex on ArrayField(CITextField)

2016-11-20 Thread Django
#27437: Can't create GinIndex on ArrayField(CITextField)
-+-
 Reporter:  Davide Setti |Owner:  Mads
 |  Jensen
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  postgres, indexes,   | Triage Stage:  Accepted
  gin, citext, arrays|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mads Jensen):

 * 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/061.24867ae4d5cbb5cf8d24ecabfde373e2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27437: Can't create GinIndex on ArrayField(CITextField)

2016-11-20 Thread Django
#27437: Can't create GinIndex on ArrayField(CITextField)
-+-
 Reporter:  Davide Setti |Owner:  Mads
 |  Jensen
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  postgres, indexes,   | Triage Stage:  Accepted
  gin, citext, arrays|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mads Jensen):

 [https://github.com/django/django/pull/7585 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/061.864ea13bb1f17c4aa6a0da05f1c88473%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27514: Add test coverage for Model.__init__ "Number of args..." exception

2016-11-20 Thread Django
#27514: Add test coverage for Model.__init__ "Number of args..." exception
-+-
 Reporter:  Adam Chainz  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 Simon Charette ):

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


Comment:

 In [changeset:"cc1f6f26b68223bb5b332c774422173d7800bf80" cc1f6f26]:
 {{{
 #!CommitTicketReference repository=""
 revision="cc1f6f26b68223bb5b332c774422173d7800bf80"
 Fixed #27514 -- Tested Model.__init__ excessive number of fields.
 }}}

--
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/068.6607b47a8021a15e6f543aa9e82b7f65%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27514: Add test coverage for Model.__init__ "Number of args..." exception

2016-11-20 Thread Django
#27514: Add test coverage for Model.__init__ "Number of args..." exception
-+-
 Reporter:  Adam Chainz  |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 Simon Charette):

 * version:  1.10 => master
 * stage:  Unreviewed => Accepted


--
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/068.f2d387905cb7a5658549adfda02848ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27516: Optimize test client response.json()

2016-11-20 Thread Django
#27516: Optimize test client response.json()
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Testing framework|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * cc: me@… (added)
 * owner:  nobody => Adam Chainz
 * has_patch:  0 => 1
 * status:  new => assigned


Comment:

 https://github.com/django/django/pull/7584

--
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/068.9280140166b415bc38df54455a074862%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27516: Optimize test client response.json()

2016-11-20 Thread Django
#27516: Optimize test client response.json()
+
   Reporter:  Adam Chainz   |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Testing framework |Version:  1.10
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 It's quite common for a test to look like:

 {{{
 resp = self.client.get('/api/things/')
 assert 'users' in resp.json()
 assert 'groups' in resp.json()
 }}}

 Each call to `json()` currently re-parses the unchanged body. It could
 cache this :)

--
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/053.e81cbf1abf970ad238f6cee00dc2eb24%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27437: Can't create GinIndex on ArrayField(CITextField)

2016-11-20 Thread Django
#27437: Can't create GinIndex on ArrayField(CITextField)
-+-
 Reporter:  Davide Setti |Owner:  Mads
 |  Jensen
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  postgres, indexes,   | Triage Stage:  Accepted
  gin, citext, arrays|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mads Jensen):

 * owner:  (none) => Mads Jensen
 * status:  new => assigned


Comment:

 I have some code, tests, and documentation for this, although the SQL code
 from Stackoverflow appears to be incorrect (I get
 {{{django.db.utils.InternalError: ginqueryarrayextract: unknown strategy
 number: 7}}}).

--
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/061.42229ee4ad79b46d0d7cd51bc7f38f4e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rather than 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rather than 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ramin Farajpour Cami):

 User model use max_length=150,also in add user form set 150,
 What your means "value setting the max length based on the custom user
 model"?

--
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/065.0cd85929e13481f07f269e0cb3fa280f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rather than 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rather than 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 The suggestion doesn't account for custom user models and undoes #19130
 (you might try using `git blame` to investigate history next time).

 If the current situation is problematic for you, perhaps there would be
 some value in setting the max length based on the custom user model
 [https://github.com/django/django/commit/bfcda778#commitcomment-2001360 as
 Claude suggested] .

--
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/065.92087a4585955e439a5f30a0519ede13%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rather than 150 characters (was: admin login action is maxlength 254 rether thet 150 characters)

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rather than 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  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/065.cf18e52931f6f2e30af6b502ff77284d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27513: Optimize Signal.send a tiny bit

2016-11-20 Thread Django
#27513: Optimize Signal.send a tiny bit
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  master
 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
-+-

Comment (by Adam Chainz):

 `send()` with receivers can be optimized too with a list comprehension,
 avoiding temp var `response` and method calls on `responses`:

 {{{
 In [1]: %cpaste
 Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
 :def before(self, sender, **named):
 for receiver in self._live_receivers(sender):
 response = receiver(signal=self, sender=sender, **named)
 responses.append((receiver, response))
 return responses


 def after(self, sender, **named):
 return [
 (receiver, receiver(signal=self, sender=sender, **named))
 for receiver in self._live_receivers(sender)
 ]
 :

 In [3]: dis.dis(before)
   2   0 SETUP_LOOP  66 (to 69)
   3 LOAD_FAST0 (self)
   6 LOAD_ATTR0 (_live_receivers)
   9 LOAD_FAST1 (sender)
  12 CALL_FUNCTION1 (1 positional, 0 keyword pair)
  15 GET_ITER
 >>   16 FOR_ITER49 (to 68)
  19 STORE_FAST   3 (receiver)

   3  22 LOAD_FAST3 (receiver)
  25 LOAD_CONST   1 ('signal')
  28 LOAD_FAST0 (self)
  31 LOAD_CONST   2 ('sender')
  34 LOAD_FAST1 (sender)
  37 LOAD_FAST2 (named)
  40 CALL_FUNCTION_KW   512 (0 positional, 2 keyword pair)
  43 STORE_FAST   4 (response)

   4  46 LOAD_GLOBAL  1 (responses)
  49 LOAD_ATTR2 (append)
  52 LOAD_FAST3 (receiver)
  55 LOAD_FAST4 (response)
  58 BUILD_TUPLE  2
  61 CALL_FUNCTION1 (1 positional, 0 keyword pair)
  64 POP_TOP
  65 JUMP_ABSOLUTE   16
 >>   68 POP_BLOCK

   5 >>   69 LOAD_GLOBAL  1 (responses)
  72 RETURN_VALUE

 In [4]: dis.dis(after)
  10   0 LOAD_CLOSURE 0 (named)
   3 LOAD_CLOSURE 1 (self)
   6 LOAD_CLOSURE 2 (sender)
   9 BUILD_TUPLE  3
  12 LOAD_CONST   1 ( at
 0x1068b5930, file "", line 10>)
  15 LOAD_CONST   2 ('after..')
  18 MAKE_CLOSURE 0

  11  21 LOAD_DEREF   1 (self)
  24 LOAD_ATTR0 (_live_receivers)
  27 LOAD_DEREF   2 (sender)
  30 CALL_FUNCTION1 (1 positional, 0 keyword pair)
  33 GET_ITER
  34 CALL_FUNCTION1 (1 positional, 0 keyword pair)
  37 RETURN_VALUE
 }}}

--
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/068.79d8b0eb6730a585e8b8cffb3ed91e7d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rether thet 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rether thet 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

 * Attachment "fix.patch" added.


--
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/065.bfb50e67bc9ef65a6af9e8b8fb4b6a16%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rether thet 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rether thet 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

 * 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/065.805fcd09b59c5a6110d493c62ae03857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27515: admin login action is maxlength 254 rether thet 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rether thet 150 characters
-+-
 Reporter:  Ramin Farajpour  |Owner:  Ramin
  Cami   |  Farajpour Cami
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Forms|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

 * status:  new => assigned
 * owner:  nobody => Ramin Farajpour Cami


--
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/065.46c6b9c3135db54025ea49309d3dce89%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27515: admin login action is maxlength 254 rether thet 150 characters

2016-11-20 Thread Django
#27515: admin login action is maxlength 254 rether thet 150 characters
+
   Reporter:  Ramin Farajpour Cami  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Forms |Version:  1.10
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Hi,

 http://127.0.0.1:8000/admin/


 {{{
 
 
   
 Username:
 
 }}}

 `maxlength="150"` is Right,

--
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/050.6e7e72f7ee738d75cf806b481fb80b6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27514: Add test coverage for Model.__init__ "Number of args..." exception

2016-11-20 Thread Django
#27514: Add test coverage for Model.__init__ "Number of args..." exception
-+-
 Reporter:  Adam Chainz  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam Chainz):

 https://github.com/django/django/pull/7582

--
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/068.8aa84443e2ef0251701e811bec41f4bf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27513: Optimize Signal.send a tiny bit

2016-11-20 Thread Django
#27513: Optimize Signal.send a tiny bit
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  master
 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 Markus Holtermann):

 * version:  1.10 => master
 * stage:  Unreviewed => Ready for checkin


Comment:

 LGTM

--
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/068.1c08aeae7b36469465011efa3218838a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27514: Add test coverage for Model.__init__ "Number of args..." exception

2016-11-20 Thread Django
#27514: Add test coverage for Model.__init__ "Number of args..." exception
-+-
   Reporter:  Adam   |  Owner:  nobody
  Chainz |
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Database   |Version:  1.10
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Following #27512, the "Number of args exceeds number of fields" exception
 has no test coverage ( http://djangoci.com/view/coverage/job/django-
 coverage/HTML_Coverage_Report/_home_jenkins_workspace_django-
 coverage_django_db_models_base_py.html#n478 ) but it should.

--
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/053.657ed85698dc09fba5983855d407d48c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27512: Dead code path in Model.__init__

2016-11-20 Thread Django
#27512: Dead code path in Model.__init__
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * cc: me@… (added)


--
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/068.e95b479439a902945e7843b144d03ddd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27513: Optimize Signal.send a tiny bit

2016-11-20 Thread Django
#27513: Optimize Signal.send a tiny bit
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * cc: me@… (added)


--
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/068.a63d7436c46a5b7ae74cff70e716a394%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27512: Dead code path in Model.__init__

2016-11-20 Thread Django
#27512: Dead code path in Model.__init__
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * owner:  nobody => Adam Chainz
 * 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/068.74f619c969d381c052c1687b503d0ccd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27513: Optimize Signal.send a tiny bit

2016-11-20 Thread Django
#27513: Optimize Signal.send a tiny bit
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * owner:  nobody => Adam Chainz
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/7581

--
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/068.2d1b4fdd629392d6db18e1ce17b90a27%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27513: Optimize Signal.send a tiny bit

2016-11-20 Thread Django
#27513: Optimize Signal.send a tiny bit
+
   Reporter:  Adam Chainz   |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Utilities |Version:  1.10
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Signals often have no listeners so their `send()` is a no-op. #16639 tried
 to optimize the model init signals to be faster for this case, but came
 out too complicated.

 One micro optimization can be done in the current no-op code is to avoid
 assigning the empty list to a variable before returning it, which is less
 operations in the Python virtual machine, for example:

 {{{
 In [5]: import dis

 In [6]: def foo1():
...: responses = []
...: if True:
...: return responses
...:

 In [7]: dis.dis(foo1)
   2   0 BUILD_LIST   0
   3 STORE_FAST   0 (responses)

   3   6 LOAD_GLOBAL  0 (True)
   9 POP_JUMP_IF_FALSE   16

   4  12 LOAD_FAST0 (responses)
  15 RETURN_VALUE
 >>   16 LOAD_CONST   0 (None)
  19 RETURN_VALUE

 In [8]: def foo2():
...: if True:
...: return []
...:

 In [9]: dis.dis(foo2)
   2   0 LOAD_GLOBAL  0 (True)
   3 POP_JUMP_IF_FALSE   10

   3   6 BUILD_LIST   0
   9 RETURN_VALUE
 >>   10 LOAD_CONST   0 (None)
  13 RETURN_VALUE
 }}}

 Timing the two above example functions gives:

 {{{
 In [13]: %timeit foo1()
 1000 loops, best of 3: 160 ns per loop

 In [14]: %timeit foo2()
 1000 loops, best of 3: 121 ns per loop
 }}}

--
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/053.14c53abe049576da6b4164c58bcc185d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27512: Dead code path in Model.__init__

2016-11-20 Thread Django
#27512: Dead code path in Model.__init__
-+-
 Reporter:  Adam Chainz  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chainz):

 * type:  Uncategorized => Cleanup/optimization
 * has_patch:  0 => 1
 * component:  Uncategorized => Database layer (models, ORM)


Comment:

 https://github.com/django/django/pull/7580

--
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/068.407feca58f2a5237e9e66f2e5d206d2d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27512: Dead code path in Model.__init__

2016-11-20 Thread Django
#27512: Dead code path in Model.__init__
-+
   Reporter:  Adam Chainz|  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 These lines in `Model.__init__` look suspicious to me:

 {{{
 # Maintain compatibility with existing calls.
 if isinstance(field.remote_field, ManyToOneRel):
 kwargs.pop(field.attname, None)
 }}}

 There's no test coverage for them, and they have remained untouched since
 they were added in #3438 10 years ago, as an optimization rewrite of
 `Model.__init__`. Afaict they aren't needed.

--
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/053.b069d3914747dee9fc3dec32aadb89e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.