Re: [Django] #27468: Move utils.crypto.salted_hmac() from SHA1 toward SHA256

2018-03-09 Thread Django
#27468: Move utils.crypto.salted_hmac() from SHA1 toward SHA256
-+-
 Reporter:  Tim Graham   |Owner:  Srinivas
 Type:   |  Reddy Thatiparthy
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  master
 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 Asif Saifuddin Auvi):

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


Re: [Django] #29199: Oracle backend won't connect if password contains '@'

2018-03-09 Thread Django
#29199: Oracle backend won't connect if password contains '@'
-+-
 Reporter:  Shane Allgeier   |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Shane Allgeier):

 Patch looks good to me. Any chance we can get this backported to the older
 versions? At least Django 1.11 since that's the last version that supports
 Oracle 11.2.

 Thanks for the patch, felixxm!

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


Re: [Django] #8408: Add a new meta option: don't do count(*) in admin

2018-03-09 Thread Django
#8408: Add a new meta option: don't do count(*) in admin
---+---
 Reporter:  LI Daobing |Owner:  Thomas Chaumeny
 Type:  New feature|   Status:  new
Component:  contrib.admin  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+---

Comment (by Jerome Leclanche):

 I've been using the following for a while:

 {{{
 #!python
 class EstimatedCountPaginator(Paginator):
 def __init__(self, *args, **kwargs):
 super().__init__(*args, **kwargs)
 self.object_list.count = self.count

 @cached_property
 def count(self):
 if self.object_list.query.where:
 return self.object_list.count()

 db_table = self.object_list.model._meta.db_table
 cursor = connections[self.object_list.db].cursor()
 cursor.execute("SELECT reltuples FROM pg_class WHERE
 relname = %s", (db_table, ))
 result = cursor.fetchone()
 if not result:
 return 0
 return int(result[0])
 }}}

 At the very least I believe such a paginator should be available by
 default in `django.contrib.postgres`.

 But going beyond that, the problem is that users are not always able to
 modify the affected admin objects. So there should be some way of setting
 the *default* paginator for all admin objects, I think.

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


Re: [Django] #19544: IntegrityError during Many To Many add()

2018-03-09 Thread Django
#19544: IntegrityError during Many To Many add()
-+-
 Reporter:  German M. Bravo  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Дилян Палаузов):

 * cc: Дилян Палаузов (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/064.6b22f506f51b59d63670e40cced90a1f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19544: IntegrityError during Many To Many add()

2018-03-09 Thread Django
#19544: IntegrityError during Many To Many add()
-+-
 Reporter:  German M. Bravo  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Дилян Палаузов):

 I reinvented this phenomenon in #28514.

 I think what needs to be done in to teach bulk_create() the {{{INSERT ...
 ON CONFLICT (DO NOTHING|IGNORE)}}} semantic and use this logic in
 
{{{django.db.models.fields.create_forward_many_to_many_manager.ManyRelatedManager._add_items()}}}.
 #28668 is my proposal.

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


Re: [Django] #28668: Add ON CONFLICT support to QuerySet.bulk_create()

2018-03-09 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  assigned
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 Дилян Палаузов):

 * Attachment "on_conflict_ignore.patch" added.

 The on_conflict_ignore.patch adds on_conflict='ignore' to
 QuerySet.bulk_create and empowers bulk_create optionally to send post_save
 signals, when the ID of the inserted object is known to bulk_create.  For
 postgresql bulk_create offers in addition to retrieve the IDs of the newly
 inserted objects, when using on_conflict='ignore' and, with a second
 query, to find the PKs pf the supplied objs that were already in the
 databse.  When supported by the backend (so not Oracle),
 on_conflict='ignore' is added to bulk_create() in
 
django.db.models.fields.create_forward_many_to_many_manager.ManyRelatedManager._add_items,
 making ManyRelatedManager.add() thread-safe, possibly resolving #19544.  I
 have the feeling reset_sequence = True doesn't work as expected, as the
 IDs are random.  This patch integrated the changes of om Forbes and
 previous changes of me.

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


Re: [Django] #29199: Oracle backend won't connect if password contains '@'

2018-03-09 Thread Django
#29199: Oracle backend won't connect if password contains '@'
-+-
 Reporter:  Shane Allgeier   |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

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


Re: [Django] #27317: Make Form subclasses combine Form.Media from all parents

2018-03-09 Thread Django
#27317: Make Form subclasses combine Form.Media from all parents
-+
 Reporter:  James Pic|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Forms|  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
-+

Comment (by James Pic):

 Absolutely agree with Tim, which is why i didn't invest time on this, but
 in adapters instead.

 Full comment on the corresponding PR:
 https://github.com/django/django/pull/9743

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


[Django] #29206: Validation Error and 500 when a reset password link contains a bad UIDB64 UUID

2018-03-09 Thread Django
#29206: Validation Error and 500 when a reset password link contains a bad 
UIDB64
UUID
---+
   Reporter:  Mattia Procopio  |  Owner:  nobody
   Type:  Uncategorized| Status:  new
  Component:  Uncategorized|Version:  2.0
   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|
---+
 Our user model pk is a UUID, while making some tests trying to reset the
 password, we met a 500 because the encoded UUID is not decoded properly.
 Here's the URL:
 
http://127.0.0.1:8000/reset/MTgiYWRiYmItZWNhYi00OTBiLThiMTMtYzg0MDUxMWRmOTVl/4u3-853c9fe868a403fa439f/

 and this is the traceback:

 {{{
 ValueError: invalid literal for int() with base 16:
 '18"adbbbecab490b8b13c840511df95e'
   File "django/db/models/fields/__init__.py", line 2363, in to_python
 return uuid.UUID(value)
   File "python3.6/uuid.py", line 141, in __init__
 int = int_(hex, 16)

 ValidationError: ['\'18"adbbb-ecab-490b-8b13-c840511df95e\' is not a valid
 UUID.']
   File "django/core/handlers/exception.py", line 35, in inner
 response = get_response(request)
   File "django/core/handlers/base.py", line 128, in _get_response
 response = self.process_exception_by_middleware(e, request)
   File "django/core/handlers/base.py", line 126, in _get_response
 response = wrapped_callback(request, *callback_args,
 **callback_kwargs)
   File "django/views/decorators/debug.py", line 76, in
 sensitive_post_parameters_wrapper
 return view(request, *args, **kwargs)
   File "django/views/decorators/cache.py", line 44, in _wrapped_view_func
 response = view_func(request, *args, **kwargs)
   File "django/contrib/auth/views.py", line 329, in password_reset_confirm
 user = UserModel._default_manager.get(pk=uid)
   File "django/db/models/manager.py", line 82, in manager_method
 return getattr(self.get_queryset(), name)(*args, **kwargs)
   File "django/db/models/query.py", line 397, in get
 num = len(clone)
   File "django/db/models/query.py", line 254, in __len__
 self._fetch_all()
   File "django/db/models/query.py", line 1179, in _fetch_all
 self._result_cache = list(self._iterable_class(self))
   File "django/db/models/query.py", line 53, in __iter__
 results = compiler.execute_sql(chunked_fetch=self.chunked_fetch,
 chunk_size=self.chunk_size)
   File "django/db/models/sql/compiler.py", line 1051, in execute_sql
 sql, params = self.as_sql()
   File "django/db/models/sql/compiler.py", line 459, in as_sql
 where, w_params = self.compile(self.where) if self.where is not None
 else ("", [])
   File "django/db/models/sql/compiler.py", line 391, in compile
 sql, params = node.as_sql(self, self.connection)
   File "django/db/models/sql/where.py", line 80, in as_sql
 sql, params = compiler.compile(child)
   File "django/db/models/sql/compiler.py", line 391, in compile
 sql, params = node.as_sql(self, self.connection)
   File "django/db/models/lookups.py", line 161, in as_sql
 rhs_sql, rhs_params = self.process_rhs(compiler, connection)
   File "django/db/models/lookups.py", line 260, in process_rhs
 return super().process_rhs(compiler, connection)
   File "django/db/models/lookups.py", line 93, in process_rhs
 return self.get_db_prep_lookup(value, connection)
   File "django/db/models/lookups.py", line 187, in get_db_prep_lookup
 [get_db_prep_value(value, connection, prepared=True)]
   File "django/db/models/fields/__init__.py", line 2354, in
 get_db_prep_value
 value = self.to_python(value)
   File "django/db/models/fields/__init__.py", line 2368, in to_python
 params={'value': value},
 }}}

 The error is raised when **user = UserModel._default_manager.get(pk=uid)**
 is executd, while I think a ValidationError is a proper exception I'm
 wondering if that couldn't be catched within that try/except. I feel is a
 bit weird getting a 500 if somebody tries to forge a URL for example.

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


Re: [Django] #29180: makemigrations autodetector ignoring existing migrations

2018-03-09 Thread Django
#29180: makemigrations autodetector ignoring existing migrations
-+-
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  master
 Severity:  Release blocker  |   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 Carlton Gibson ):

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


Comment:

 In [changeset:"5b083a824ea90fb1705bd0c208245ff92a5237d8" 5b083a82]:
 {{{
 #!CommitTicketReference repository=""
 revision="5b083a824ea90fb1705bd0c208245ff92a5237d8"
 Fixed #29180 -- Fixed a regression where migrations already in the plan
 were readded.

 Regression in a38ae914d89809aed6d79337b74a8b31b6d3849a.
 }}}

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


Re: [Django] #29180: makemigrations autodetector ignoring existing migrations

2018-03-09 Thread Django
#29180: makemigrations autodetector ignoring existing migrations
-+-
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  master
 Severity:  Release blocker  |   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 Carlton Gibson ):

 In [changeset:"4d420a53cf9796ce635d16f6832b6c5f1bb7dc8a" 4d420a53]:
 {{{
 #!CommitTicketReference repository=""
 revision="4d420a53cf9796ce635d16f6832b6c5f1bb7dc8a"
 Refs #29180 -- Added MigrationGraph._generate_plan() for testing.
 }}}

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


Re: [Django] #28988: Multi-table inheritance breaks GenericRelation querying

2018-03-09 Thread Django
#28988: Multi-table inheritance breaks GenericRelation querying
-+-
 Reporter:  robwa|Owner:  (none)
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.11
  contrib.contenttypes   |
 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 Carlton Gibson):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


Comment:

 Updated changes look good.

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