[Django] #27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces

170 views
Skip to first unread message

Django

unread,
Feb 22, 2017, 8:58:58 PM2/22/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
-----------------------------------------+------------------------
Reporter: Chris Lamb | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The URL namespacing warning (urls.W005) does not consider nested URL
namespaces. For example, if your root namespace includes two different
urlconfs via namespace="foo" and namespace="bar" but each of these
urlconfs includes another distinct urlconf but with the same namespace
argument (eg. namespace="baz"), then you get:

(urls.W005) URL namespace 'baz' isn't unique. You may not be able to
reverse all URLs in this namespace

This doesn't seem right as "foo:baz:view-a" and "bar:baz:view-b" are
entirely independent.

I am seeing this a bit as I typically separate the user and admin parts of
an app using nested apps and simply use "admin" as the "baz" in the above
examples to avoid DRY in the fully-qualified urls.

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

Django

unread,
Feb 22, 2017, 9:27:26 PM2/22/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
--------------------------------------+------------------------------------

Reporter: Chris Lamb | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

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

* type: Uncategorized => Bug
* component: Uncategorized => Core (System checks)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


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

Django

unread,
Feb 22, 2017, 10:16:49 PM2/22/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
--------------------------------------+------------------------------------

Reporter: Chris Lamb | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/8102 PR]

(No tests yet.)

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

Django

unread,
Feb 23, 2017, 3:22:44 AM2/23/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
--------------------------------------+------------------------------------

Reporter: Chris Lamb | Owner: nobody
Type: Bug | Status: new
Component: Core (System checks) | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

Comment (by Chris Lamb):

[https://github.com/django/django/pull/8102#issuecomment-281925838 PR
updated with tests]

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

Django

unread,
Feb 24, 2017, 10:13:56 AM2/24/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
--------------------------------------+------------------------------------

Reporter: Chris Lamb | Owner: nobody
Type: Bug | Status: closed

Component: Core (System checks) | Version: 1.11
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
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:"8d4885ede578b5beef7626cd31bbd19a95bd678a" 8d4885ed]:
{{{
#!CommitTicketReference repository=""
revision="8d4885ede578b5beef7626cd31bbd19a95bd678a"
Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested
namespaces.
}}}

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

Django

unread,
Feb 24, 2017, 2:08:13 PM2/24/17
to django-...@googlegroups.com
#27874: URL namespacing warning (urls.W005) does not consider nested URL namespaces
--------------------------------------+------------------------------------

Reporter: Chris Lamb | Owner: nobody
Type: Bug | Status: closed
Component: Core (System checks) | Version: 1.11
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
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:"0417bf47a6fd00d9a6a4c711780ce01f35f62d59" 0417bf47]:
{{{
#!CommitTicketReference repository=""
revision="0417bf47a6fd00d9a6a4c711780ce01f35f62d59"
[1.11.x] Fixed #27874 -- Fixed URL namespace warning (urls.W005) for
nested namespaces.

Backport of 8d4885ede578b5beef7626cd31bbd19a95bd678a from master
}}}

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

Reply all
Reply to author
Forward
0 new messages