* cc: Carlton Gibson (added)
* status: new => closed
* resolution: => needsinfo
Comment:
Thanks for the report, however, I'm puzzled, `process_request()` has never
accepted or passed a `scope` (even before
1d1ddffc27cd55c011298cd09bfa4de3fa73cf7a), so how this can be a
regression? Also, `scope` is an element of `request` so why you need to
pass it separately and call `set_script_prefix()`. This should be already
handled by
[https://github.com/django/django/blob/9cefdfc43f0bae696b56fa5a0bf22346f85affff/django/core/handlers/asgi.py#L172-L190
ASGIHandler].
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Root path handling was adjusted in Uvicorn just recently.
https://github.com/encode/uvicorn/pull/2213
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:4>
all i can say is that when we upgraded to django 5 from 4.2.9, all the
template url references outside of static files lost their root_path
prefixes. By making these changes I was able to get the root_path passed
back to the templates. If you have another way to resolve this, please but
I have not been able to get the ROOT_PATH from uvicorn asgi server passed
back to our application without this. I used git bisect to identify the
specific commit that caused this. And by adding the scope, it restored the
django 4 behavior.
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:5>
> all i can say is that when we upgraded to django 5 from 4.2.9
Are you sure that it's not related with the `uvicorn` update?
> I used git bisect to identify the specific commit that caused this.
Can you add a regression test? You had to have one to actually bisect.
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:6>
I will add a regression test
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:7>
It may be that process_request does not need scope but just
run_get_response. I will determine what exactly is needed with the
regression test
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:8>
@Michael. `set_script_prefix` targets a `Local`, so if we change thread
maybe the value gets lost, but I'm not seeing yet how that can be
happening (in anything related to
1d1ddffc27cd55c011298cd09bfa4de3fa73cf7a) — Happy to have a look once
you've got a reproduce. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:9>
* cc: Sören Weber (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/35169#comment:10>