Re: [Django] #32202: django-admin runserver and get_child_arguments() crashes on Windows and Python < 3.8.

2020-11-17 Thread Django
#32202: django-admin runserver and get_child_arguments() crashes on Windows and
Python < 3.8.
-+-
 Reporter:  andrey-zotov |Owner:  Carlton
 |  Gibson
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  3.1
  commands)  |
 Severity:  Release blocker  |   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 Carlton Gibson):

 * owner:  nobody => Carlton Gibson
 * 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/070.ee39914e60cc1d2825400dc9e1ca08b8%40djangoproject.com.


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-17 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
-+-
 Reporter:  Gordon Wrigley   |Owner:  sage
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (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 sage):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/13691 PR]. I opted to catch
 `TypeError` instead. Need opinions on how to proceed.

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


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-17 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
-+-
 Reporter:  Gordon Wrigley   |Owner:  sage
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.1
  (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 sage):

 * owner:  nobody => sage
 * status:  new => assigned
 * type:  Uncategorized => Bug
 * component:  Uncategorized => Database layer (models, ORM)
 * stage:  Unreviewed => Accepted


Comment:

 This is because SQLite's `JSON_EXTRACT` returns deserialized values. A
 simple solution is just to add `TypeError`
 
[https://github.com/django/django/blob/master/django/db/models/fields/json.py#L80
 here], which will also partially "solve" problems with people who use the
 JSON data type on PostgreSQL. Another option is to wrap the value in
 `JSON_QUOTE`... which I think is the better option.

 I'm guessing there's also a bug in querying `__key` on `{"key":
 "\"value\""}`, which will return `value` rather than `"value"`. I
 ''think'' wrapping the value in `JSON_QUOTE` should fix this as well.

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


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-17 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
+--
 Reporter:  Gordon Wrigley  |Owner:  nobody
 Type:  Uncategorized   |   Status:  new
Component:  Uncategorized   |  Version:  3.1
 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 sage):

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


Re: [Django] #32191: Not RFC 6265 compliant cookies in contrib.messages.

2020-11-17 Thread Django
#32191: Not RFC 6265 compliant cookies in contrib.messages.
--+---
 Reporter:  Nico Giefing  |Owner:  Craig Smith
 Type:  Bug   |   Status:  assigned
Component:  contrib.messages  |  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:  Cookie malformed  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+---

Comment (by Craig Smith):

 [https://github.com/django/django/pull/13690 PR] - it's a work in progress

-- 
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/063.b801d943da92acf6feb8b5687cdd881f%40djangoproject.com.


Re: [Django] #17235: Multipartparser shouldn't leave request.POST/request.FILES mutable

2020-11-17 Thread Django
#17235: Multipartparser shouldn't leave request.POST/request.FILES mutable
-+-
 Reporter:  Florian Apolloner|Owner:  vinay
 |  karanam
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  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 Jacob Walls):

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


Re: [Django] #32191: Not RFC 6265 compliant cookies in contrib.messages.

2020-11-17 Thread Django
#32191: Not RFC 6265 compliant cookies in contrib.messages.
--+---
 Reporter:  Nico Giefing  |Owner:  Craig Smith
 Type:  Bug   |   Status:  assigned
Component:  contrib.messages  |  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:  Cookie malformed  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+---
Changes (by Craig Smith):

 * owner:  nobody => Craig Smith
 * 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/063.12b0915dec2f0f188415e5d3a7b02f7d%40djangoproject.com.


Re: [Django] #32191: Not RFC 6265 compliant cookies in contrib.messages.

2020-11-17 Thread Django
#32191: Not RFC 6265 compliant cookies in contrib.messages.
--+
 Reporter:  Nico Giefing  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:  Cookie malformed  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Craig Smith):

 I have implemented the initial approach according to the comment above.
 One thing to note is that when the cookie is accessed through the value
 attribute, it will need  an `unquote`, for cases like
 `req.cookies['messages'].value`.

 This could be attempted with a property to manage access to the `value`
 attribute to apply the unquote in there, so that any client code that uses
 that method of access can remain unchanged.

 The compression has proved to be a bit tricky, due to changing between
 bytes and strings, but the approach that I am taking is to factor out the
 compression code from `signing.dumps` and `loads` into `signing.compress`
 and `decompress`.

 It was encouraging to see swapping the `quote` `unquote` for
 `singing.dumps` `signing.loads` works out of the box, if we want all our
 message cookies timestamped, which I assume that we don't. But anyway,
 that works. I'll be back on the case later this week. Thanks for your
 tips, PR forthcoming.

-- 
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/063.d5880a65baedb5e6273bf13287d471a7%40djangoproject.com.


Re: [Django] #470: Add Field.db_default for defining database defaults

2020-11-17 Thread Django
#470: Add Field.db_default for defining database defaults
-+-
 Reporter:  jws  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  normal   |   Resolution:
 Keywords:  sql schema   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adrian Turjak):

 * cc: Adrian Turjak (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.4ab2a76cfa2e37a0f926336fa7926244%40djangoproject.com.


Re: [Django] #32200: Aggregating when grouping on an ExpressionWrapper omits the expression from the group by

2020-11-17 Thread Django
#32200: Aggregating when grouping on an ExpressionWrapper omits the expression 
from
the group by
-+-
 Reporter:  Gordon Wrigley   |Owner:  Hasan
 |  Ramezani
 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 Hasan Ramezani):

 * owner:  nobody => Hasan Ramezani
 * status:  new => assigned
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.47bed4f851d2497163699b81590aa193%40djangoproject.com.


Re: [Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-17 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
+--
 Reporter:  Gordon Wrigley  |Owner:  nobody
 Type:  Uncategorized   |   Status:  new
Component:  Uncategorized   |  Version:  3.1
 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
+--
Description changed by Gordon Wrigley:

Old description:

> This Django 3.1.3, I only see this with Sqlite, it works fine with MySQL
> and Postgres.
>
> When I do a path lookup with values like
> `Bob.objects.values("my_json_field__position")` if there is an integer,
> float or bool in "position" then I get a JSON decode error.
> Strings, nones, dicts and lists all work, fetching the top level dict
> works and filtering on the path lookup works.
>
> `TypeError: the JSON object must be str, bytes or bytearray, not float`
>
> {{{
> ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:287:
> in __iter__
> self._fetch_all()
> ..\..\.venv\data_browser\lib\site-
> packages\django\db\models\query.py:1308: in _fetch_all
> self._result_cache = list(self._iterable_class(self))
> ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:111:
> in __iter__
> for row in compiler.results_iter(chunked_fetch=self.chunked_fetch,
> chunk_size=self.chunk_size):
> ..\..\.venv\data_browser\lib\site-
> packages\django\db\models\sql\compiler.py:1100: in apply_converters
> value = converter(value, expression, connection)
> ..\..\.venv\data_browser\lib\site-
> packages\django\db\models\fields\json.py:79: in from_db_value
> return json.loads(value, cls=self.decoder)
> }}}
>
> Queries that produce strings or None's seem to work fine.

New description:

 This Django 3.1.3, I only see this with Sqlite, it works fine with MySQL
 and Postgres.

 When I do a path lookup with values like
 `Bob.objects.values("my_json_field__position")` if there is an integer,
 float or bool in "position" then I get a JSON decode error.
 Strings, nones, dicts and lists all work, fetching the top level dict
 works and filtering on the path lookup works.

 `TypeError: the JSON object must be str, bytes or bytearray, not float`

 {{{
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:287:
 in __iter__
 self._fetch_all()
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:1308:
 in _fetch_all
 self._result_cache = list(self._iterable_class(self))
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:111:
 in __iter__
 for row in compiler.results_iter(chunked_fetch=self.chunked_fetch,
 chunk_size=self.chunk_size):
 ..\..\.venv\data_browser\lib\site-
 packages\django\db\models\sql\compiler.py:1100: in apply_converters
 value = converter(value, expression, connection)
 ..\..\.venv\data_browser\lib\site-
 packages\django\db\models\fields\json.py:79: in from_db_value
 return json.loads(value, cls=self.decoder)
 }}}

--

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


[Django] #32203: Error with values with JSON path lookup in Sqlite when value is numeric.

2020-11-17 Thread Django
#32203: Error with values with JSON path lookup in Sqlite when value is numeric.
--+
   Reporter:  Gordon Wrigley  |  Owner:  nobody
   Type:  Uncategorized   | Status:  new
  Component:  Uncategorized   |Version:  3.1
   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   |
--+
 This Django 3.1.3, I only see this with Sqlite, it works fine with MySQL
 and Postgres.

 When I do a path lookup with values like
 `Bob.objects.values("my_json_field__position")` if there is an integer,
 float or bool in "position" then I get a JSON decode error.
 Strings, nones, dicts and lists all work, fetching the top level dict
 works and filtering on the path lookup works.

 `TypeError: the JSON object must be str, bytes or bytearray, not float`

 {{{
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:287:
 in __iter__
 self._fetch_all()
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:1308:
 in _fetch_all
 self._result_cache = list(self._iterable_class(self))
 ..\..\.venv\data_browser\lib\site-packages\django\db\models\query.py:111:
 in __iter__
 for row in compiler.results_iter(chunked_fetch=self.chunked_fetch,
 chunk_size=self.chunk_size):
 ..\..\.venv\data_browser\lib\site-
 packages\django\db\models\sql\compiler.py:1100: in apply_converters
 value = converter(value, expression, connection)
 ..\..\.venv\data_browser\lib\site-
 packages\django\db\models\fields\json.py:79: in from_db_value
 return json.loads(value, cls=self.decoder)
 }}}

 Queries that produce strings or None's seem to work fine.

-- 
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/050.f8be1f99ef75b6704b86e76fe469ef0f%40djangoproject.com.


Re: [Django] #32202: django-admin runserver and get_child_arguments() crashes on Windows and Python < 3.8. (was: django-admin runserver and get_child_arguments)

2020-11-17 Thread Django
#32202: django-admin runserver and get_child_arguments() crashes on Windows and
Python < 3.8.
-+-
 Reporter:  andrey-zotov |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  3.1
  commands)  |
 Severity:  Release blocker  |   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):

 * cc: Carlton Gibson, Tom Forbes (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Tentatively accepted, I cannot check this on Windows, but it looks like a
 regression in 8a902b7ee622ada258d15fb122092c1f02b82698.
 `subprocess.run()`'s `args` parameter accepts path-like objects on Windows
 since Python 3.8 (see similar issue for `dbshell`, #31076).

-- 
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/070.3b0ae9cb45cad1c4df6221315c675f55%40djangoproject.com.


[Django] #32202: django-admin runserver and get_child_arguments

2020-11-17 Thread Django
#32202: django-admin runserver and get_child_arguments
-+-
   Reporter:  andrey-|  Owner:  nobody
  zotov  |
   Type:  Bug| Status:  new
  Component:  Core   |Version:  3.1
  (Management commands)  |
   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  |
-+-
 "django-admin runserver" fails with the following error:

 {{{
 Traceback (most recent call last):
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\runpy.py",
 line 193, in _run_module_as_main
 "__main__", mod_spec)
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\runpy.py",
 line 85, in _run_code
 exec(code, run_globals)
   File "C:\Users\someone\AppData\Local\Programs\Python\Python37\Scripts
 \django-admin.exe\__main__.py", line 7, in 
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\__init__.py", line 401, in
 execute_from_command_line
 utility.execute()
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\__init__.py", line 395, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\base.py", line 330, in run_from_argv
 self.execute(*args, **cmd_options)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\commands\runserver.py", line 61, in
 execute
 super().execute(*args, **options)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\base.py", line 371, in execute
 output = self.handle(*args, **options)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\commands\runserver.py", line 96, in handle
 self.run(**options)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\core\management\commands\runserver.py", line 103, in run
 autoreload.run_with_reloader(self.inner_run, **options)
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\utils\autoreload.py", line 616, in run_with_reloader
 exit_code = restart_with_reloader()
   File "c:\users\someone\appdata\local\programs\python\python37\lib\site-
 packages\django\utils\autoreload.py", line 244, in restart_with_reloader
 p = subprocess.run(args, env=new_environ, close_fds=False)
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\subprocess.py",
 line 488, in run
 with Popen(*popenargs, **kwargs) as process:
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\subprocess.py",
 line 800, in __init__
 restore_signals, start_new_session)
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\subprocess.py",
 line 1148, in _execute_child
 args = list2cmdline(args)
   File
 "c:\users\someone\appdata\local\programs\python\python37\lib\subprocess.py",
 line 555, in list2cmdline
 needquote = (" " in arg) or ("\t" in arg) or not arg
 TypeError: argument of type 'WindowsPath' is not iterable
 }}}

 Environment:
 Windows 10
 Python: 3.7.6
 Django: 3.1.3

 Steps to reproduce:
 {{{
 django-admin startproject mysite
 set PYTHONPATH=
 django-admin runserver --settings=mysite.settings
 }}}

 Apparently django.utils.autoreload.get_child_arguments returns
 WindowsPath("C:\Users\someone\AppData\Local\Programs\Python\Python37\Scripts
 \django-admin.exe") as the first argument,
 and subprocess.Popen expects a string and is not able to use Path.

 The following monkey-patch fixes the error:
 {{{
 def get_child_arguments_override():
 args = autoreload._get_child_arguments()
 for i, arg in enumerate(args):
 if isinstance(arg, Path):
 args[i] = str(arg)
 return args

 autoreload._get_child_arguments = autoreload.get_child_arguments
 autoreload.get_child_arguments = get_child_arguments_override
 }}}

-- 
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 

Re: [Django] #32191: Not RFC 6265 compliant cookies in contrib.messages.

2020-11-17 Thread Django
#32191: Not RFC 6265 compliant cookies in contrib.messages.
--+
 Reporter:  Nico Giefing  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.messages  |  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:  Cookie malformed  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Craig Smith):

 Hi Florian, that's a great idea. Doing so also makes sure that the
 characters used in the cookie are acceptable for RFC 6265. I'll start work
 on it today.

-- 
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/063.1dc1af1cef0a5a7227e18825d9298355%40djangoproject.com.


Re: [Django] #27590: Allow configuration of where to save staticfiles manifest.

2020-11-17 Thread Django
#27590: Allow configuration of where to save staticfiles manifest.
-+-
 Reporter:  David Sanders|Owner:  Jarosław
 Type:   |  Wygoda
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Christopher Henry):

 I argued in #28764 and comment:2 that the location of `staticfiles.json`
 shouldn't be configurable at all, that it should just be stored in the
 code base along with other configuration files (including automatically
 generated ones, like migration files). What are the use cases for storing
 this file anywhere else?

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


Re: [Django] #32076: Adding async methods to BaseCache

2020-11-17 Thread Django
#32076: Adding async methods to BaseCache
-+-
 Reporter:  Andrew Chen Wang |Owner:  Andrew
 |  Chen Wang
 Type:  New feature  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  cache| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Re: [Django] #27541: Provide hooks to override manifest file storage in ManifestFilesMixin

2020-11-17 Thread Django
#27541: Provide hooks to override manifest file storage in ManifestFilesMixin
-+
 Reporter:  Ryan Lopopolo|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  contrib.staticfiles  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by Carlton Gibson):

 I'm going to close this as a duplicate of #27590 — both tickets are asking
 to allow configuration of where to store the manifest.

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


Re: [Django] #27590: Allow configuration of where to save staticfiles manifest. (was: Prevent public access of staticfiles manifest)

2020-11-17 Thread Django
#27590: Allow configuration of where to save staticfiles manifest.
-+-
 Reporter:  David Sanders|Owner:  Jarosław
 Type:   |  Wygoda
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * needs_better_patch:  0 => 1
 * needs_docs:  0 => 1


Comment:

 I think we need to look at where we're headed before we simply add a
 setting here. If we consider the upgrade path, what we don't want to do is
 add a new setting and then need to deprecate it as soon as we improve the
 configuration options, with something along the lines of #26029.

 #26029 is needed because you currently need to provide a storage subclass
 in order to provide configuration parameters:

 {{{
 # In settings.py, where `CustomStorage` adjusts configuration in
 `__init__()`.
 STATICFILES_STORAGE = 'my_app.CustomStorage'
 }}}

 The complaint in #26029 is that providing the subclass is cumbersome, and
 we should be able to specify a dictionary like `DATABASES` and so on.
 But we should solve that problem over there.

 The issue here is that `ManifestStaticFilesStorage` has no way of
 specifying where to store the manifest.

 There's a
 [https://code.djangoproject.com/attachment/ticket/27541/manifest_storage.patch
 patch file] for #27541 (which I'm going to close as a duplicate of this
 ticket) which suggests adding an optional `manifest_storage` kwarg to
 `ManifestFilesMixin` — here you'd pass a configured storage to override
 where to store the manifest file:

 {{{
 # Something like...
 class CustomManifestStorage(ManifestStaticFilesStorage):
 def __init__(self, *args, **kwargs):
 manifest_storage = FileSystemStorage(
 location='path/for/manifest'
 )
 super().__init__(*args, manifest_storage=manifest_storage,
 **kwargs)
 }}}

 Using a storage covers the ''separate s3 bucket'' use-case (and similar)
 but also avoids the cumbersome
 [https://github.com/django/django/pull/12187/files#diff-
 f5c7100e3528e9f6edb98cd5a3d33133bdde6286a89fa472f89980fb07364a8eR366
 ManifestHandler wrapper from the initial PR here].

 I think with that, and tests, and documentation of the new parameter, with
 an example of how to configure it, we have a fix here. (That the
 configuration is a little cumbersome would hopefully spur renewed interest
 in pushing forward with #26029.)

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


Re: [Django] #32199: Missing documentation of JSONField in ModelForm field mapping

2020-11-17 Thread Django
#32199: Missing documentation of JSONField in ModelForm field mapping
--+
 Reporter:  sage  |Owner:  sage
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Documentation |  Version:  3.1
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by Carlton Gibson ):

 In [changeset:"4f7517b5e02ecc327698e672efb7209502393e3d" 4f7517b]:
 {{{
 #!CommitTicketReference repository=""
 revision="4f7517b5e02ecc327698e672efb7209502393e3d"
 [3.1.x] Fixed #32199 -- Doc'd JSONField in ModelForm field mapping.

 Backport of 4a412c2e659f9295973434c65b785b03acee7251 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.c83925ab1969c16b6f81f802ebd8431f%40djangoproject.com.