[Django] #28593: DEP 0201: Simplified routing syntax

22 views
Skip to first unread message

Django

unread,
Sep 13, 2017, 3:17:41 PM9/13/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
---------------------------------------+------------------------
Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
[https://github.com/django/deps/blob/master/accepted/0201-simplified-
routing-syntax.rst DEP]

--
Ticket URL: <https://code.djangoproject.com/ticket/28593>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 13, 2017, 4:49:09 PM9/13/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
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
-----------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"ee4043f7355f077583ca4c1749db7d5211f0855e" ee4043f]:
{{{
#!CommitTicketReference repository=""
revision="ee4043f7355f077583ca4c1749db7d5211f0855e"
Refs #28593 -- Moved django.conf.urls.include() to django.urls().

The old location remains for backwards compatibility. Documentation
will be updated separately along with the rest of the URL routing changes.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:1>

Django

unread,
Sep 20, 2017, 6:06:15 PM9/20/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

The code work happened at [https://github.com/django/django/pull/7482 PR
7482] and the documentation at [https://github.com/django/django/pull/7542
PR 7542] and later [https://github.com/django/django/pull/9072 PR 9072].

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:2>

Django

unread,
Sep 20, 2017, 6:40:54 PM9/20/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"df41b5a05d4e00e80e73afe629072e37873e767a" df41b5a0]:
{{{
#!CommitTicketReference repository=""
revision="df41b5a05d4e00e80e73afe629072e37873e767a"
Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.

Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:3>

Django

unread,
Sep 22, 2017, 10:47:22 AM9/22/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6f7279c4b1db894eb431c182ea9df5d665b3f726" 6f7279c]:
{{{
#!CommitTicketReference repository=""
revision="6f7279c4b1db894eb431c182ea9df5d665b3f726"
Refs #28593 -- Made URLResolver._populate() more resilient to signal
interrupts.

_populate() sets the populating attribute to prevent infinite recursion in
case a urlconf includes itself. The flag is a threadlocal to avoid a race
condition [1] where one thread sets the flag and another checks it, then
proceeds to access data that's supposed to be populated (e.g.
_reverse_dict)
but isn't yet.

The potential still exists for a thread to set the threadlocal, then be
interrupted by a signal such as SIGALRM and raise before resetting the
threadlocal flag. In this scenario, subsequent calls to _populate() in the
same thread will short-circuit erroneously.

The bulk of the method was already wrapped in a try/finally in df41b5a,
but
since a signal interrupt can occur at any line executed by the
interpreter,
this moves up the try to ensure threadlocal gets reset.

[1]: https://groups.google.com/d/msg/django-
developers/D_bIeinKHjE/4NmVQUJqAgAJ
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:4>

Django

unread,
Sep 30, 2017, 8:33:21 PM9/30/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"f0ffa3f4ea277f9814285085fde20baff60fc386" f0ffa3f4]:
{{{
#!CommitTicketReference repository=""
revision="f0ffa3f4ea277f9814285085fde20baff60fc386"
Refs #27025, #28593 -- Fixed "invalid escape sequence" warnings in
urls/resolvers.py.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:5>

Django

unread,
Sep 30, 2017, 8:38:04 PM9/30/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"5091bb6a07caf4afe5d43c83a045c3f04a441dc3" 5091bb6]:
{{{
#!CommitTicketReference repository=""
revision="5091bb6a07caf4afe5d43c83a045c3f04a441dc3"
[2.0.x] Refs #27025, #28593 -- Fixed "invalid escape sequence" warnings in
urls/resolvers.py.

Backport of f0ffa3f4ea277f9814285085fde20baff60fc386 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:6>

Django

unread,
Nov 8, 2017, 8:44:12 AM11/8/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3ae9c356c5d4b89caf8343aa3ffe0a66e713c9fd" 3ae9c356]:
{{{
#!CommitTicketReference repository=""
revision="3ae9c356c5d4b89caf8343aa3ffe0a66e713c9fd"
Refs #28593 -- Updated old class names in comments following URL routing
changes.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:7>

Django

unread,
Nov 8, 2017, 8:44:33 AM11/8/17
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"a977ae91390b603c27fc4b5f3e8d3e4eea3dce1f" a977ae9]:
{{{
#!CommitTicketReference repository=""
revision="a977ae91390b603c27fc4b5f3e8d3e4eea3dce1f"
[2.0.x] Refs #28593 -- Updated old class names in comments following URL
routing changes.

Backport of 3ae9c356c5d4b89caf8343aa3ffe0a66e713c9fd from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:8>

Django

unread,
May 13, 2019, 12:32:07 PM5/13/19
to django-...@googlegroups.com
#28593: DEP 0201: Simplified routing syntax
-----------------------------+---------------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: New feature | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7619a33665ccc138c1583a2cce5a5de6d86c9cb4" 7619a336]:
{{{
#!CommitTicketReference repository=""
revision="7619a33665ccc138c1583a2cce5a5de6d86c9cb4"
Refs #28593 -- Changed url() to path() in comments following URL routing
changes.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28593#comment:9>

Reply all
Reply to author
Forward
0 new messages