Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-04-05 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

 In [changeset:"4d2ef9bb826db76acb5ed7609a9162de9b651921" 4d2ef9b]:
 {{{#!CommitTicketReference repository=""
 revision="4d2ef9bb826db76acb5ed7609a9162de9b651921"
 Refs #35169 -- Added test for ASGIRequest root_path handling.
 }}}
-- 
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/0107018ead988a4a-eebaad0f-0fed-4a2c-9cf3-4f3c64720662-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-04-05 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Carlton Gibson):

 I've created a [https://github.com/django/django/pull/18048 PR adding a
 test for this here]. The test passes (on both main and stable/4.2.x
 branches).

 Comment from there:

 > Possible change may be in 041b0a3 @sarahboyce: maybe folks have
 FORCE_SCRIPT_NAME set to a non-None value. That's the sort of thing once
 might have done when experimenting with mounting under a root_path.
 > If it's not that, then I'm out of ideas without a reproduce.
-- 
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/0107018ead1b3c30-01815dbb-3c4b-41a0-be21-1bd3811f41de-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-03-19 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by ajslater):

 I've run into the same problem, except with hypercorn.
 script prefixes are no longer prefixed from hypercorn root_path with
 Django 5.0.0+ They are prefixed with Django 4.2.11 and the same hypercorn
 version.

 My workaround right now is to manually call `set_script_prefix()` in my
 `urls.py`:
 {{{
 from django.urls import set_script_prefix
 from myapp.settings import MANUALLY_PARSED_HYPERCORN_SETTINGS

 set_script_prefix(MANUALLY_PARSED_HYPERCORN_SETTINGS.root_path)

 urlpatterns = [ ... ]
 }}}
-- 
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/0107018e59b44fe5-d07b2ead-5808-4cfe-b0eb-f22a4ceed17b-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-13 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sören Weber):

 * cc: Sören Weber (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/0107018da68c56e2-9b576eb7-6319-4a47-97bf-75476897dd3b-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Carlton Gibson):

 @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: 
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/0107018d7e87ffc2-efa4bd4a-22b3-4293-bb7a-e5cd08bba05c-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Michael Smith):

 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: 
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/0107018d7e7dc605-a3903e56-ed99-4c90-94c8-9d6d7dd51187-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Michael Smith):

 I will add a regression test
-- 
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/0107018d7e7a6798-82cefb3c-3cfa-4968-b602-be58fb24bf29-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Mariusz Felisiak):

 > 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: 
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/0107018d7e6dca0c-0cc266ca-45e0-4568-9af8-c366187b781c-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Michael Smith):

 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: 
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/0107018d7e67e149-2d26ea9a-a05f-47f8-9323-9398a4c0d8c5-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Carlton Gibson):

 Root path handling was adjusted in Uvicorn just recently.
 https://github.com/encode/uvicorn/pull/2213
-- 
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/0107018d7e66e647-247b6a7a-db5f-411f-a405-583bb675d5a9-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * 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/9cefdfc43f0bae696b56fa5a0bf22346f85a/django/core/handlers/asgi.py#L172-L190
 ASGIHandler].
-- 
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/0107018d7e5c3cfa-41efdfdd-6ff0-48f0-86b1-90da421c40ce-00%40eu-central-1.amazonses.com.


Re: [Django] #35169: updated asgi handler for disconnects does not process ROOT_PATH (was: updates asgi handler for disconnects does not process ROOT_PATH)

2024-02-06 Thread Django
#35169: updated asgi handler for disconnects does not process ROOT_PATH
-+-
 Reporter:  Michael Smith|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  asgi, handler,   | Triage Stage:
  root_path  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Michael Smith):

 * summary:  updates asgi handler for disconnects does not process ROOT_PATH
 => updated asgi handler for disconnects does not process ROOT_PATH

-- 
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/0107018d7e322370-25f5fa04-dfe5-49bc-8739-2f60cf5e6307-00%40eu-central-1.amazonses.com.