Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 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 Mariusz Felisiak):

 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.839e37ba9ff21cd76d043f32b585ced3%40djangoproject.com.


Re: [Django] #33343: update_or_create seems to issue wrongly limited query to the database

2021-12-06 Thread Django
#33343: update_or_create seems to issue wrongly limited query to the database
-+-
 Reporter:  Florian Apolloner|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Florian Apolloner):

 Ah, I mixed up queries with and without `get()`, my bad. Reminds me that I
 really should fix `update_or_create` at some point to do what I expect:
 Namely update first and only create as fallback. /me goes to reject a PR
 that tries to introduce `update_or_create` in our codebase instead of
 proper update & on conflict inserts :D

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5fde489c32892320cbeb4f9ff31f4957%40djangoproject.com.


Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+--
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 Severity:  Normal  |   Resolution:  fixed
 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 Mariusz Felisiak ):

 In [changeset:"7cf7d74e8a754446eeb85cacf2fef1247e0cb6d7" 7cf7d74]:
 {{{
 #!CommitTicketReference repository=""
 revision="7cf7d74e8a754446eeb85cacf2fef1247e0cb6d7"
 [2.2.x] Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an
 upstream access control based on URL paths.

 Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.

 Backport of d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6 from main.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f3e28fae8a1fbafb44930ee999d4e7fd%40djangoproject.com.


Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+--
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 Severity:  Normal  |   Resolution:  fixed
 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 Mariusz Felisiak ):

 In [changeset:"333c65603032c377e682cdbd7388657a5463a05a" 333c6560]:
 {{{
 #!CommitTicketReference repository=""
 revision="333c65603032c377e682cdbd7388657a5463a05a"
 [3.2.x] Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an
 upstream access control based on URL paths.

 Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.

 Backport of d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6 from main.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.07bcaf98f0dc4bfaa89e920add9c4b91%40djangoproject.com.


Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+--
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 Severity:  Normal  |   Resolution:  fixed
 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 Mariusz Felisiak ):

 * resolution:  wontfix => fixed


Comment:

 In [changeset:"22bd17488159601bf0741b70ae7932bffea8eced" 22bd174]:
 {{{
 #!CommitTicketReference repository=""
 revision="22bd17488159601bf0741b70ae7932bffea8eced"
 [3.1.x] Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an
 upstream access control based on URL paths.

 Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.

 Backport of d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6 from main.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.42bd13478d2347080050e10591a87eef%40djangoproject.com.


Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+--
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 Severity:  Normal  |   Resolution:  fixed
 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 Mariusz Felisiak ):

 In [changeset:"20b9ad36ff0558b819659a10a9734262367750be" 20b9ad36]:
 {{{
 #!CommitTicketReference repository=""
 revision="20b9ad36ff0558b819659a10a9734262367750be"
 [4.0.x] Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an
 upstream access control based on URL paths.

 Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.

 Backport of d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6 from main.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.db892e8575394aa935187bdd8aea6718%40djangoproject.com.


Re: [Django] #30530: url `path` accepts newlines in various places.

2021-12-06 Thread Django
#30530: url `path` accepts newlines in various places.
+--
 Reporter:  Sjoerd Job Postmus  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Core (URLs) |  Version:  dev
 Severity:  Normal  |   Resolution:  fixed
 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 Mariusz Felisiak ):

 In [changeset:"d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6" d4dcd5b9]:
 {{{
 #!CommitTicketReference repository=""
 revision="d4dcd5b9dd9e462fec8220e33e3e6c822b7e88a6"
 Fixed #30530, CVE-2021-44420 -- Fixed potential bypass of an upstream
 access control based on URL paths.

 Thanks Sjoerd Job Postmus and TengMA(@te3t123) for reports.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4d79d290b136069355c4bf7a9dd3fdee%40djangoproject.com.


Re: [Django] #33343: update_or_create seems to issue wrongly limited query to the database

2021-12-06 Thread Django
#33343: update_or_create seems to issue wrongly limited query to the database
-+-
 Reporter:  Florian Apolloner|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 `update_or_create()` uses `get()` and this is an intended optimization,
 see #6785 and 330638b89f14e1fb06e9d313ccc9768ae167c53f.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.38c2e3cc38fabdc519f09ddb50dfa6d9%40djangoproject.com.


[Django] #33343: update_or_create seems to issue wrongly limited query to the database

2021-12-06 Thread Django
#33343: update_or_create seems to issue wrongly limited query to the database
-+-
   Reporter:  Florian|  Owner:  nobody
  Apolloner  |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  dev
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 Just dumping this here before I forget -- haven't checked yet if this is
 just the logging output or indeed a wrong query:
 {{{
 In [2]: User.objects.update_or_create(username='test', defaults={})
 (0.000) BEGIN; args=None; alias=default
 (0.000) SELECT "auth_user"."id", "auth_user"."password",
 "auth_user"."last_login", "auth_user"."is_superuser",
 "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name",
 "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active",
 "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" =
 'test' LIMIT 21; args=('test',); alias=default
 (0.000) SAVEPOINT "s140548210464576_x1"; args=None; alias=default
 (0.000) INSERT INTO "auth_user" ("password", "last_login", "is_superuser",
 "username", "first_name", "last_name", "email", "is_staff", "is_active",
 "date_joined") SELECT '', NULL, 0, 'test', '', '', '', 0, 1, '2021-12-07
 07:17:48.232962' RETURNING "auth_user"."id"; args=('', None, False,
 'test', '', '', '', False, True, '2021-12-07 07:17:48.232962');
 alias=default
 (0.000) RELEASE SAVEPOINT "s140548210464576_x1"; args=None; alias=default
 Out[2]: (, True)
 }}}
 The `LIMIT 21;` here smells like the query executed for the `repr` of a
 `Query` object.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.e5d5d2366de7d3a08d203907a65f6c79%40djangoproject.com.


Re: [Django] #31398: multiple_database.tests.AuthTestCase doesn't flush the default database if transactions aren't supported.

2021-12-06 Thread Django
#31398: multiple_database.tests.AuthTestCase doesn't flush the default database 
if
transactions aren't supported.
--+
 Reporter:  Tim Graham|Owner:  (none)
 Type:  Bug   |   Status:  new
Component:  Core (Other)  |  Version:  dev
 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 Mariusz Felisiak):

 * owner:  Hassaan Ali Wattoo => (none)
 * status:  assigned => new


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3572c593e1e951717c04c663c9561691%40djangoproject.com.


Re: [Django] #32213: QuerySet.values()/.values_list() on KeyTransforms return wrong values for double-quoted strings on SQLite and Oracle

2021-12-06 Thread Django
#32213: QuerySet.values()/.values_list() on KeyTransforms return wrong values 
for
double-quoted strings on SQLite and Oracle
-+-
 Reporter:  sage |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  sqlite oracle json   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  sage => (none)
 * status:  assigned => new


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.dde5bbe42a68f814f83931d200c393e0%40djangoproject.com.


Re: [Django] #27095: Queries involving postgres Array fields can't include expressions as elements

2021-12-06 Thread Django
#27095: Queries involving postgres Array fields can't include expressions as
elements
--+
 Reporter:  Matthew Wilkes|Owner:  (none)
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  dev
 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 Mariusz Felisiak):

 * owner:  Hannes Ljungberg => (none)
 * status:  assigned => new


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.c9f9a3138fc0322901566152e5d7636f%40djangoproject.com.


Re: [Django] #32518: Document that QuerySet.contains() should not be overused.

2021-12-06 Thread Django
#32518: Document that QuerySet.contains() should not be overused.
--+
 Reporter:  Mariusz Felisiak  |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * owner:  Pradhvan Bisht  => (none)
 * status:  assigned => new


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.056058d364628c81e0c26dfc4afb63e1%40djangoproject.com.


Re: [Django] #33342: Allow ExclusionConstraint to use the OpClass expression

2021-12-06 Thread Django
#33342: Allow ExclusionConstraint to use the OpClass expression
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  dev
 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
-+-

Comment (by Hannes Ljungberg):

 > Sounds reasonable, maybe we should also deprecate the opclasses
 argument.

 Yup, that sounds like the proper way forward.

 As a side note it would be interesting to look into the possibility of
 deprecating the `fields` argument (and by that the `opclasses` argument)
 on `Index` and `UniqueConstraint`. It would require us to make
 `Index.contains_expressions` and `UniqueConstraint.contains_expressions` a
 bit smarter.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.fd0efadba31cf9458064d6d1590971d2%40djangoproject.com.


Re: [Django] #33342: Allow ExclusionConstraint to use the OpClass expression

2021-12-06 Thread Django
#33342: Allow ExclusionConstraint to use the OpClass expression
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  dev
 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 Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Sounds reasonable, maybe we should also deprecate the `opclasses`
 argument.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e6d9bda1665c1ad7c42f99a2d63dbfbf%40djangoproject.com.


Re: [Django] #33342: Allow ExclusionConstraint to use the OpClass expression

2021-12-06 Thread Django
#33342: Allow ExclusionConstraint to use the OpClass expression
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  dev
 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 Hannes Ljungberg):

 * has_patch:  0 => 1


Comment:

 PR: https://github.com/django/django/pull/15162

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2a900291a384acb6e9cf28d57d07e974%40djangoproject.com.


[Django] #33342: Allow ExclusionConstraint to use the OpClass expression

2021-12-06 Thread Django
#33342: Allow ExclusionConstraint to use the OpClass expression
-+-
   Reporter:  Hannes |  Owner:  Hannes Ljungberg
  Ljungberg  |
   Type:  New| Status:  assigned
  feature|
  Component: |Version:  dev
  contrib.postgres   |
   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  |
-+-
 To bring `ExclusionConstraint` in line with `Index` and `UniqueConstraint`
 I think we should allow usage of the
 [https://docs.djangoproject.com/en/3.2/ref/contrib/postgres/indexes
 /#opclass-expressions OpClass] expressions. To support this we would make
 `ExclusionConstraint` use the DDL reference classes instead of a templated
 SQL string plus usage of the `IndexExpression` class.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.d4ba1100a2484222d5cfce891c9dbbf1%40djangoproject.com.


Re: [Django] #33216: Use simplified paths for deconstruct of expressions

2021-12-06 Thread Django
#33216: Use simplified paths for deconstruct of expressions
-+-
 Reporter:  Adam Johnson |Owner:
 Type:   |  AllenJonathan
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by AllenJonathan):

 * owner:  Manaia Junior => AllenJonathan


Comment:

 I have deconstructed Value() and submitted a pull request
 https://github.com/django/django/pull/15161. I'm not sure if I did the
 right thing because other expressions' path could be simplified as well
 but I haven't figured those out.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6817785f00928868f8e67dc9cbc9bf0a%40djangoproject.com.


Re: [Django] #33335: Detecting uniqueness doesn't work for models with functional unique constraints.

2021-12-06 Thread Django
#5: Detecting uniqueness doesn't work for models with functional unique
constraints.
-+-
 Reporter:  Hervé Le Roy |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 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
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"fed7f992ac8b2ccb5164761a609277513f10d963" fed7f992]:
 {{{
 #!CommitTicketReference repository=""
 revision="fed7f992ac8b2ccb5164761a609277513f10d963"
 [4.0.x] Fixed #5 -- Made model validation ignore functional unique
 constraints.

 Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa.

 Thanks Hervé Le Roy for the report.

 Backport of 1eaf38fa87384fe26d1abf6e389d6df1600d4d8c from main
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.feac1fdaecf8813381b9afb171fe3537%40djangoproject.com.


Re: [Django] #33335: Detecting uniqueness doesn't work for models with functional unique constraints.

2021-12-06 Thread Django
#5: Detecting uniqueness doesn't work for models with functional unique
constraints.
-+-
 Reporter:  Hervé Le Roy |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 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 Mariusz Felisiak ):

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


Comment:

 In [changeset:"1eaf38fa87384fe26d1abf6e389d6df1600d4d8c" 1eaf38f]:
 {{{
 #!CommitTicketReference repository=""
 revision="1eaf38fa87384fe26d1abf6e389d6df1600d4d8c"
 Fixed #5 -- Made model validation ignore functional unique
 constraints.

 Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa.

 Thanks Hervé Le Roy for the report.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.92607626ee5b979920f10d4de4111638%40djangoproject.com.


Re: [Django] #33331: Improve exception handling with `cursor.close()` after errors

2021-12-06 Thread Django
#1: Improve exception handling with `cursor.close()` after errors
-+-
 Reporter:  Daniel Hahler|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 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 Carlton Gibson):

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


Comment:

 There was an extended discussion of the merits of the `raise...from`
 syntax around #31177 ([https://groups.google.com/g/django-
 developers/c/ibEOt3A9c2M/m/sOL7YV5LFwAJ Mailing list thread]).

 The summary of that was that, in general, given that exceptions are
 automatically chained, the different message **between** the chained
 exceptions was not worth the noise.

 The cited exceptions were using `raise...from` to remove noise from an
 long-chain of exceptions, when you wished to pull-out the **real cause**
 that may perhaps lie a frame frames deep, and using `from None` to
 suppress chaining, when the underlying exception is not informative.

 I'm going to close as wontfix on the basis of that discussion. If you
 think this case is different you can message the DevelopersMailingList.
 (If so, please give a concrete example of how the change is supposed to
 help — I couldn't really see if from the description here — it seems like
 a lot of effort to change the message between the tracebacks, but maybe
 you're using the `__cause__` attribute in a way that merits it…? 樂)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.783d21bcfa6b3dfb30389002ffd154d5%40djangoproject.com.


Re: [Django] #32807: JSONField.bound_data raises TypeError when data is None

2021-12-06 Thread Django
#32807: JSONField.bound_data raises TypeError when data is None
-+-
 Reporter:  Dan Strokirk |Owner:  Dan
 |  Strokirk
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  3.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  JSONField| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Timothy Hobbs):

 Hi, was this fixed already in the release Django 3.2.7? I'm getting this
 backtrace on Django 3.2.7 when running admin smoke tests and the backtrace
 doesn't touch my code at all, making it a bit tricky to debug:

 {{{
 ==
 ERROR: test_change_post (apps.aklub.tests.test_admin.AdminSmokeTest)
 --
 Traceback (most recent call last):
   File "/klub-v/venv/src/django-admin-smoke-
 tests-2/django_admin_smoke_tests/tests.py", line 31, in test_deco
 fn(self, model, model_admin)
   File "/klub-v/venv/src/django-admin-smoke-
 tests-2/django_admin_smoke_tests/tests.py", line 307, in test_change_post
 response.render()
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/response.py", line 105, in render
 self.content = self.rendered_content
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/response.py", line 83, in rendered_content
 return template.render(context, self._request)
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/backends/django.py", line 61, in render
 return self.template.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 170, in render
 return self._render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/test/utils.py",
 line 100, in instrumented_test_render
 return self.nodelist.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 938, in render
 bit = node.render_annotated(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 905, in render_annotated
 return self.render(context)
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/loader_tags.py", line 150, in render
 return compiled_parent._render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/test/utils.py",
 line 100, in instrumented_test_render
 return self.nodelist.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 938, in render
 bit = node.render_annotated(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 905, in render_annotated
 return self.render(context)
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/loader_tags.py", line 150, in render
 return compiled_parent._render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/test/utils.py",
 line 100, in instrumented_test_render
 return self.nodelist.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 938, in render
 bit = node.render_annotated(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 905, in render_annotated
 return self.render(context)
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/loader_tags.py", line 150, in render
 return compiled_parent._render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/test/utils.py",
 line 100, in instrumented_test_render
 return self.nodelist.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 938, in render
 bit = node.render_annotated(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 905, in render_annotated
 return self.render(context)
   File "/klub-v/venv/lib/python3.8/site-
 packages/django/template/loader_tags.py", line 150, in render
 return compiled_parent._render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/test/utils.py",
 line 100, in instrumented_test_render
 return self.nodelist.render(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 938, in render
 bit = node.render_annotated(context)
   File "/klub-v/venv/lib/python3.8/site-packages/django/template/base.py",
 line 905, in render_annotated
 

Re: [Django] #33341: The PrimaryKey of an Unmanaged Model is incorrectly regognized (accessing database VIEW)

2021-12-06 Thread Django
#33341: The PrimaryKey of an Unmanaged Model is incorrectly regognized 
(accessing
database VIEW)
-+-
 Reporter:  Janne|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Uncategorized|  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  Unmanaged model, | Triage Stage:
  Database VIEW, postgres|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Comment:

 Hi. I don't think there's quite enough detail here to see what you're
 issue is.

 In general, using `managed=False` works with views, and has for many
 years, see e.g. #16320.

 You mention the primary key, but don't provide the model definition.
 Ensure you're declaring a field as `primary_key=True`.
 There was a recent [https://pganalyze.com/blog/postgresql-views-django-
 python walk through on using views with Django (targeting Postgres)] that
 might help you if you walk through it.

 Otherwise, it looks like a usage issue, so you'll need to use one of the
 support channels. See TicketClosingReasons/UseSupportChannels.

 If you can provide a sample project or a failing test case showing a fault
 in Django, then very happy to re-open and have a look.
 Thanks.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.81715fb0496363cc9afb5446dd11a551%40djangoproject.com.