#35807: Clarify django.urls.set_urlconf scoping behaviour
-------------------------------+--------------------------------------
Reporter: Enrico Zini | Owner: (none)
Type: Uncategorized | Status: closed
Component: Documentation | Version: 5.0
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
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* resolution: needsinfo => invalid
Comment:
Firstly, just for Django, set_urlconf is not public API so you shouldn't
use it. Rather prefer the documented `HttpRequest.urlconf` attribute
([https://docs.djangoproject.com/en/5.1/ref/request-
response/#django.http.HttpRequest.urlconf docs]) to set per-tenant URLs in
a middleware, if that's your strategy.
Secondly, the [https://github.com/django/asgiref/issues/473 linked asgiref
issue (#473)] is in progress, and should be resolved shortly. (Setting
locals has been leaking out of asyncio tasks since the recent v3.8, which
is a regression.) It's not a Django issue.
If you need further advice please see
TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/35807#comment:2>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019265e33043-dfd91d58-d865-494e-802d-33256a7c4f3b-000000%40eu-central-1.amazonses.com.