Re: [Django] #32183: Incorrect exec usage in `shell -c` command prevents functions from working

2020-11-09 Thread Django
#32183: Incorrect exec usage in `shell -c` command prevents functions from 
working
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|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/068.01844caab4cd67ae42c77dc5c6653629%40djangoproject.com.


Re: [Django] #31527: Admindocs' View index assumes settings.ROOT_URLCONF is an import string

2020-11-09 Thread Django
#31527: Admindocs' View index assumes settings.ROOT_URLCONF is an import string
-+-
 Reporter:  Keryn Knight |Owner:
 Type:   |  Qihao(Jim) Xie
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admindocs|  Version:  master
 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 Carlton Gibson):

 Hi Qihao, welcome

 
[https://github.com/django/django/blob/0773837e15bb632afffb6848a58c59a791008fa1/django/contrib/admindocs/views.py#L121-L124
 The code in question is in here]. Once you're up and running, you can post
 to the [https://forum.djangoproject.com/c/internals/mentorship/10 forum]
 if you need help.

-- 
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.a6102c9b33d2a1a7dad28ac621f16df7%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


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

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


Re: [Django] #32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.1
  (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:"cc3870c30f0338a09e440430d5dcc028d23f1a02" cc3870c3]:
 {{{
 #!CommitTicketReference repository=""
 revision="cc3870c30f0338a09e440430d5dcc028d23f1a02"
 [3.1.x] Fixed #32182 -- Fixed crash of JSONField nested key transforms
 with subquery annotations on PostgreSQL.

 Backport of 0773837e15bb632afffb6848a58c59a791008fa1 from master
 }}}

-- 
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.4bc19487561834ed45187787af291949%40djangoproject.com.


Re: [Django] #32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.1
  (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:"0773837e15bb632afffb6848a58c59a791008fa1" 0773837]:
 {{{
 #!CommitTicketReference repository=""
 revision="0773837e15bb632afffb6848a58c59a791008fa1"
 Fixed #32182 -- Fixed crash of JSONField nested key transforms with
 subquery annotations on PostgreSQL.
 }}}

-- 
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.69f538504d509b558056c1832407faa4%40djangoproject.com.


Re: [Django] #32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 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
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


Comment:

 #30704

-- 
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.6b2bdde7ef385b80e8f14f03404f0b4b%40djangoproject.com.


Re: [Django] #31527: Admindocs' View index assumes settings.ROOT_URLCONF is an import string

2020-11-09 Thread Django
#31527: Admindocs' View index assumes settings.ROOT_URLCONF is an import string
-+-
 Reporter:  Keryn Knight |Owner:
 Type:   |  jimxie1228
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admindocs|  Version:  master
 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 jimxie1228):

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


Comment:

 Hey! I'm a first time contributor and I would like to put in a patch to
 fix this issue. I'll start by understanding the source code. Any
 help/guidance on which module to look for in the source code would be much
 appreciated!

-- 
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.2d4354afcba3fdd0a827141ab5e8e12d%40djangoproject.com.


Re: [Django] #32183: Incorrect exec usage in `shell -c` command prevents functions from working

2020-11-09 Thread Django
#32183: Incorrect exec usage in `shell -c` command prevents functions from 
working
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by William Schwartz):

 * owner:  nobody => William Schwartz
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/13660 PR] includes tests and
 documents the new feature in the release notes (but not in the main docs
 since it seems more like a bug fix than a new feature to 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.25308a730e27d5321fdbaed879857b49%40djangoproject.com.


[Django] #32183: Incorrect exec usage in `shell -c` command prevents functions from working

2020-11-09 Thread Django
#32183: Incorrect exec usage in `shell -c` command prevents functions from 
working
-+-
   Reporter:  William|  Owner:  nobody
  Schwartz   |
   Type:  Bug| Status:  new
  Component:  Core   |Version:  master
  (Management commands)  |
   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  |
-+-
 The examples below use Python 3.7 and Django 2.2.16, but I checked that
 the code is the same on master and works the same in Python 3.8.

 Here's how [https://docs.python.org/3/using/cmdline.html#cmdoption-c
 python -c] works:

 {{{
 $ python -c 
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/053.fbd8c56db7a6ae35fcb08cd4d3723b6a%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  William
 |  Schwartz
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  Douglas Cueva => William Schwartz


Comment:

 Thanks for the patch.

 > Is this a backport candidate?

 No, this doesn't qualify for a backport.

-- 
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.6f81cfedb6dcc45badd08c57e8a52942%40djangoproject.com.


Re: [Django] #32177: ManagementUtility instantiates CommandParser without passing already-computed prog argument

2020-11-09 Thread Django
#32177: ManagementUtility instantiates CommandParser without passing already-
computed prog argument
-+-
 Reporter:  William Schwartz |Owner:  Douglas
 |  Cueva
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-
Changes (by William Schwartz):

 * needs_tests:  1 => 0


Comment:

 Replying to [comment:2 Mariusz Felisiak]:
 > ...I was not able to reproduce and invalid message (even with mocking
 `sys.argv`), so a regression test is crucial.

 I've created a patch with a test case in
 [https://github.com/django/django/pull/13658 PR]. (I didn't see Douglas
 Cueva's patch GH-13652 before I pushed mine. Sorry.) Is this a backport
 candidate?

 The
 
[https://github.com/wkschwartz/django/blob/c8a6dab82841abb43dfc7dc8859482d329c8334a/tests/admin_scripts/tests.py#L1868-L1882
 test I added] passes now, and failed like below before I applied the fix.

 {{{
 (venv) ➜  django git:(mgmt-argv0) ✗ tox -e py38 --
 admin_scripts.tests.ExecuteFromCommandLine
 
 py38 run-test: commands[0] | django/.tox/py38/bin/python runtests.py
 admin_scripts.tests.ExecuteFromCommandLine
 Testing against Django installed in 'django/django'
 System check identified no issues (0 silenced).
 E
 ==
 ERROR: test_prog_name_from_argv0
 (admin_scripts.tests.ExecuteFromCommandLine)
 Program name is computed once from argv argument, not sys.argv (#32177).
 --
 Traceback (most recent call last):
   File "django/tests/admin_scripts/tests.py", line 1882, in
 test_prog_name_from_argv0
 execute_from_command_line([''] + args)
   File "django/django/core/management/__init__.py", line 414, in
 execute_from_command_line
 utility.execute()
   File "django/django/core/management/__init__.py", line 347, in execute
 parser = CommandParser(usage='%(prog)s subcommand [options] [args]',
 add_help=False, allow_abbrev=False)
   File "django/django/core/management/base.py", line 54, in __init__
 super().__init__(**kwargs)
   File
 
"/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py",
 line 1660, in __init__
 prog = _os.path.basename(_sys.argv[0])
   File
 
"/usr/local/opt/python@3.8/bin/../Frameworks/Python.framework/Versions/3.8/lib/python3.8/posixpath.py",
 line 142, in basename
 p = os.fspath(p)
 TypeError: expected str, bytes or os.PathLike object, not NoneType

 --
 Ran 1 test in 0.005s

 FAILED (errors=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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.29ec97610c6c3f5995c9f8f62c867efc%40djangoproject.com.


Re: [Django] #26607: Add a hook to customize the admin's formsets parameters

2020-11-09 Thread Django
#26607: Add a hook to customize the admin's formsets parameters
-+-
 Reporter:  David Sanders|Owner:  (none)
 Type:  New feature  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  admin inline | Triage Stage:  Accepted
  formset initial|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Manav Agarwal):

 * owner:  nobody => (none)
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.1b273054975940f584a10a0bd624ed4a%40djangoproject.com.


Re: [Django] #32182: Nested KeyTransform errors when used with a subquery on PostgreSQL. (was: Nested KeyTransform errors when used with a subquery)

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery on PostgreSQL.
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (models, ORM)  |
 Severity:  Release blocker  |   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):

 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 It's not a regression, but a bug in a new feature.

-- 
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.dc6e827296980dffe957abdd14b651ef%40djangoproject.com.


Re: [Django] #32182: Nested KeyTransform errors when used with a subquery

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery
-+-
 Reporter:  Hannes Ljungberg |Owner:  Hannes
 |  Ljungberg
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (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 Hannes Ljungberg):

 * has_patch:  0 => 1


Comment:

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

-- 
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.8bd226acfd7e920a62c04f79ec202d88%40djangoproject.com.


[Django] #32182: Nested KeyTransform errors when used with a subquery

2020-11-09 Thread Django
#32182: Nested KeyTransform errors when used with a subquery
-+-
   Reporter:  Hannes |  Owner:  Hannes Ljungberg
  Ljungberg  |
   Type:  Bug| Status:  assigned
  Component:  Database   |Version:  3.1
  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  |
-+-
 Annotating a subquery which returns a JSONField and then applying a nested
 KeyTransform on that annotation results in a `TypeError`.

 Example:

 {{{
 NullableJSONModel.objects.annotate(
 subquery_value=models.Subquery(
 NullableJSONModel.objects.filter(id=OuterRef("id")).values("value")[:1]
 ),
 expr=KeyTransform("foo", KeyTransform("bar", "subquery_value")),
 )
 }}}

 {{{
 Traceback (most recent call last):
   File "/tests/django/tests/model_fields/test_jsonfield.py", line 421, in
 test_nested_key_transform_on_subquery
 [self.objs[4]],
   File "/usr/local/lib/python3.6/unittest/case.py", line 1005, in
 assertSequenceEqual
 difflib.ndiff(pprint.pformat(seq1).splitlines(),
   File "/usr/local/lib/python3.6/pprint.py", line 58, in pformat
 compact=compact).pformat(object)
   File "/usr/local/lib/python3.6/pprint.py", line 144, in pformat
 self._format(object, sio, 0, 0, {}, 0)
   File "/usr/local/lib/python3.6/pprint.py", line 161, in _format
 rep = self._repr(object, context, level)
   File "/usr/local/lib/python3.6/pprint.py", line 393, in _repr
 self._depth, level)
   File "/usr/local/lib/python3.6/pprint.py", line 405, in format
 return _safe_repr(object, context, maxlevels, level)
   File "/usr/local/lib/python3.6/pprint.py", line 555, in _safe_repr
 rep = repr(object)
   File "/tests/django/django/db/models/query.py", line 256, in __repr__
 data = list(self[:REPR_OUTPUT_SIZE + 1])
   File "/tests/django/django/db/models/query.py", line 280, in __iter__
 self._fetch_all()
   File "/tests/django/django/db/models/query.py", line 1320, in _fetch_all
 self._result_cache = list(self._iterable_class(self))
   File "/tests/django/django/db/models/query.py", line 51, in __iter__
 results = compiler.execute_sql(chunked_fetch=self.chunked_fetch,
 chunk_size=self.chunk_size)
   File "/tests/django/django/db/models/sql/compiler.py", line 1147, in
 execute_sql
 sql, params = self.as_sql()
   File "/tests/django/django/db/models/sql/compiler.py", line 498, in
 as_sql
 extra_select, order_by, group_by = self.pre_sql_setup()
   File "/tests/django/django/db/models/sql/compiler.py", line 55, in
 pre_sql_setup
 self.setup_query()
   File "/tests/django/django/db/models/sql/compiler.py", line 46, in
 setup_query
 self.select, self.klass_info, self.annotation_col_map =
 self.get_select()
   File "/tests/django/django/db/models/sql/compiler.py", line 262, in
 get_select
 sql, params = self.compile(col)
   File "/tests/django/django/db/models/sql/compiler.py", line 428, in
 compile
 sql, params = vendor_impl(self, self.connection)
   File "/tests/django/django/db/models/fields/json.py", line 305, in
 as_postgresql
 return '(%s %s %%s)' % (lhs, self.postgres_nested_operator), params +
 [key_transforms,]
 TypeError: can only concatenate tuple (not "list") to tuple
 }}}

-- 
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.fa4079eebe85a5613e96d719f35744d3%40djangoproject.com.


Re: [Django] #31973: TypeError loading data in JSONField if DB has native JSON support

2020-11-09 Thread Django
#31973: TypeError loading data in JSONField if DB has native JSON support
-+-
 Reporter:  Adam Alton   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.1
  (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:  0|UI/UX:  0
-+-

Comment (by Thomas J Bradley):

 This is a general comment for other people who many run into this
 problem—I diagnosed my problem with a lot of dependency checks.

 My problem was specifically related to `django-db-geventpool`—at the time
 it wasn’t compatible with the new JSONField.
 https://github.com/jneight/django-db-geventpool

 Just today ran into this exact same problem again because a reversion in
 the most recent version of `django-db-geventpool`, `v3.2.4` which is not
 compatible with Django/3.1—I’ll have to wait to upgrade this dependency
 until after their next release.

-- 
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.131dcdbee1243acf5a982d03a0c276ed%40djangoproject.com.


Re: [Django] #31672: debug error view shows no traceback if exc.__traceback__ is None for innermost exception

2020-11-09 Thread Django
#31672: debug error view shows no traceback if exc.__traceback__ is None for
innermost exception
-+-
 Reporter:  Chris Jerdonek   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Error reporting  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  technical_500_response,traceback,chain|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hasan Ramezani):

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


Re: [Django] #24434: Django Custom Field inherits ForeignKey deconstruct() fails

2020-11-09 Thread Django
#24434: Django Custom Field inherits ForeignKey deconstruct() fails
-+-
 Reporter:  greenbender  |Owner:  Nishant
 |  Sagar
 Type:  Bug  |   Status:  assigned
Component:  Documentation|  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  deconstruct,migration  |
Has patch:  0|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Nishant Sagar):

 * owner:  nobody => Nishant Sagar
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.23da49fa650b0ba52b296b2641671a22%40djangoproject.com.


Re: [Django] #32181: ModelBackend used hardcoded global variable UserModel that cannot be overrided. (was: ModelBackend used hardcoded global variable UserModel, it can not be overrided.)

2020-11-09 Thread Django
#32181: ModelBackend used hardcoded global variable UserModel that cannot be
overrided.
-+-
 Reporter:  danilovmy|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  contrib.auth |  Version:  3.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  custombackend,   | Triage Stage:
  ModelBackend   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => wontfix
 * easy:  1 => 0
 * has_patch:  1 => 0
 * type:  Uncategorized => New feature


Comment:

 I'm not really sure if I understand your use case. Do you have different
 user models for different authorization backends? (because `ModelBackend`
 supports  a custom model for users). If so, it's fair that you need to
 override `authenticate()` in such an advanced usage, IMO. We cannot
 maintain hooks for all niche scenarios. You can start a discussion on
 DevelopersMailingList if you don't agree.

-- 
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.f111ed48d8a25cee98beb9a394ab0d0c%40djangoproject.com.


Re: [Django] #31685: Support updating conflicts with QuerySet.bulk_create().

2020-11-09 Thread Django
#31685: Support updating conflicts with QuerySet.bulk_create().
-+-
 Reporter:  Vitor Pereira|Owner:  Chih Sean
 |  Hsu
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  bulk insert update   | Triage Stage:  Accepted
  upsert |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Alexandr Tatarinov):

 Added a comment to pull request about potential room for improvement.

-- 
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/062.93321dd242d25a0938b1e9e0d6244812%40djangoproject.com.


[Django] #32181: ModelBackend used hardcoded global variable UserModel, it can not be overrided.

2020-11-09 Thread Django
#32181: ModelBackend used hardcoded global variable UserModel, it can not be
overrided.
-+-
   Reporter:  danilovmy  |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component: |Version:  3.1
  contrib.auth   |   Keywords:  custombackend,
   Severity:  Normal |  ModelBackend
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 It is not possible override Usermodel for custombackend which depends on
 ModelBackend.

 if i want to change something un Usermodel class i should override whole
 authenticate method. it is not difficult but stupid and brakes SOLID rule

 it's easy to change:
 1. add **usermodel=UserModel** in ModelBackend class definitions
 2. Change global variable UserModel to local **self.usermodel**

 {{{

 class ModelBackend(BaseBackend):
 """
 Authenticates against settings.AUTH_USER_MODEL.
 """
 usermodel=UserModel

 def authenticate(self, request, username=None, password=None,
 **kwargs):
 if username is None:
 username = kwargs.get(self.usermodel.USERNAME_FIELD)
 if username is None or password is None:
 return
 try:
 user =
 self.usersermodel._default_manager.get_by_natural_key(username)
 except UserModel.DoesNotExist:
 # Run the default password hasher once to reduce the timing
 # difference between an existing and a nonexistent user
 (#20760).
 self.usermodel().set_password(password)
 else:
 if user.check_password(password) and
 self.user_can_authenticate(user):
 return user

 }}}

 after that it can be possible to do something like that:


 {{{
 class LoginBackend(ModelBackend):
 """docstring for LoginBackend."""

 def authenticate(self, *args, **kwargs):
  self.usermodel = change_something_in(self.usermodel, *args,
 **kwargs)
  return super().authenticate(self, *args, **kwargs).
 }}}

-- 
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.f3d163eb6ca05886d036f529b54ca05f%40djangoproject.com.


Re: [Django] #31653: Add PostgreSQL operations to add constraints via NOT VALID / VALIDATE CONSTRAINT

2020-11-09 Thread Django
#31653: Add PostgreSQL operations to add constraints via NOT VALID / VALIDATE
CONSTRAINT
-+-
 Reporter:  Adam (Chainz)|Owner:  Sanskar
  Johnson|  Jaiswal
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 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:  nobody => Sanskar Jaiswal
 * needs_better_patch:  0 => 1
 * status:  new => assigned
 * type:  Cleanup/optimization => New feature


-- 
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.1b692a98281e418067dc2f40ece0a14d%40djangoproject.com.


Re: [Django] #32179: Add JSONObject Func

2020-11-09 Thread Django
#32179: Add JSONObject Func
-+-
 Reporter:  Chiorufarewerin  |Owner:
 |  Chiorufarewerin
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  json_object, | Triage Stage:  Accepted
  jsonb_build_object, JSONObject |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Re: [Django] #31672: debug error view shows no traceback if exc.__traceback__ is None for innermost exception

2020-11-09 Thread Django
#31672: debug error view shows no traceback if exc.__traceback__ is None for
innermost exception
-+-
 Reporter:  Chris Jerdonek   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Error reporting  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  technical_500_response,traceback,chain|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => assigned
 * needs_better_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4db5871ff43e311719d5b14962bb13fb%40djangoproject.com.