Re: Performance does not scale when increasing file upload sizes

2022-05-17 Thread 'Noxx' via Django developers (Contributions to Django itself)
Hi Carlton, thanks for your response. I've opened up a PR: https://github.com/django/django/pull/15704 I've decided to moved the "ASGIStream" wrapper code into the Django code and get rid of the dependency as it is only a small part of it. My version of the code was nearly the same as the one fr

Django 4.1 alpha 1 released

2022-05-17 Thread Carlton Gibson
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2022/may/18/django-41-alpha-1-released/ -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this gro

Experience with black formatting in django

2022-05-17 Thread Tom Aldcroft
The astropy project is currently considering implementing code formatting with black, much as Django did in 2019. I was happy to see the case for transitioning to black formatting in Django DEP-0008 (https://github.com/django/deps/blob/main/final/0008-black.rst). I think it captures the key poi

Re: Performance does not scale when increasing file upload sizes

2022-05-17 Thread Carlton Gibson
Hi Noxx. This is interesting, thanks for the write-up. As a bit of history, initially ASGIRequests would read the whole body into memory, which was fine for an initial version, but led quickly enough to resource concerns. Andrew followed up with the SpooledTemporaryFile approach, as a nice next-s

Re: Performance does not scale when increasing file upload sizes

2022-05-17 Thread 'Noxx' via Django developers (Contributions to Django itself)
Hi all, I've played around a bit and would like to give you a heads up: WSGI and ASGI have only differences in how they parse incoming requests. As WSGI is synchronous the body is already provided as a ByteIO stream which is set directly on the HTTPRequest (wrapped as a LazyStream). On ASGI the