Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#31534 closed Cleanup/optimization (fixed)

Deprecate django.conf.urls.url().

Reported by: David Smith Owned by: David Smith
Component: Core (URLs) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The docs for django.conf.urls.url say:

This function is an alias to django.urls.re_path(). It’s likely to be deprecated in a future release.

It looks like the change was made in this commit back in 2016 (Django 2.0). Given some years have passed, is it now the time to deprecate this function?

Change History (7)

comment:1 by Mariusz Felisiak, 4 years ago

Component: UncategorizedCore (URLs)
Summary: Depreciate django.conf.urls.urlDeprecate django.conf.urls.url().
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 3.0master

Agreed. We can deprecate it in Django 3.1 and remove in Django 4.0. Aymeric proposed to deprecate it in Django 3.1 when we discussed DEP 201.

comment:2 by David Smith, 4 years ago

Owner: changed from nobody to David Smith
Status: newassigned

comment:3 by David Smith, 4 years ago

Has patch: set
Last edited 4 years ago by Mariusz Felisiak (previous) (diff)

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 2522559d:

Fixed #31534 -- Deprecated django.conf.urls.url().

comment:5 by GitHub <noreply@…>, 4 years ago

In 437196da:

Refs #31534 -- Improved django.conf.urls.url() warning message with stacklevel=2.

Use stacklevel=2 to show the calling site.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 6e3c5439:

[3.1.x] Refs #31534 -- Improved django.conf.urls.url() warning message with stacklevel=2.

Use stacklevel=2 to show the calling site.
Backport of 437196da9a386bd4cc62b0ce3f2de4aba468613d from master

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 98ae3925:

Refs #31534 -- Removed django.conf.urls.url() per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top