[Django] #30747: Rename internal is_safe_url() to better state effective scope.

4 views
Skip to first unread message

Django

unread,
Sep 2, 2019, 6:01:37 AM9/2/19
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
------------------------------------------------+------------------------
Reporter: Carlton Gibson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: master
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 name of the private `django.utils.http.is_safe_url()` suggests it does
more than it really does.
Rename to `url_has_allowed_host_and_scheme()` to avoid possible confusion
here.

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

Django

unread,
Sep 2, 2019, 6:04:40 AM9/2/19
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
-------------------------------------+-------------------------------------

Reporter: Carlton Gibson | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Sep 2, 2019, 6:05:20 AM9/2/19
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
Type: | Gibson
Cleanup/optimization | Status: assigned
Component: Utilities | Version: master
Severity: Normal | 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 felixxm):

* owner: nobody => Carlton Gibson
* status: new => assigned
* stage: Unreviewed => Accepted


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

Django

unread,
Sep 2, 2019, 6:10:21 AM9/2/19
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
Type: | Gibson
Cleanup/optimization | Status: assigned
Component: Utilities | Version: master

Severity: Normal | 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 Claude Paroz):

Thanks for the extra effort implementing the deprecation!

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

Django

unread,
Sep 2, 2019, 11:50:24 AM9/2/19
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
Type: | Gibson
Cleanup/optimization | Status: closed
Component: Utilities | Version: master
Severity: Normal | 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 Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"4f61810751751b8c5070ce038ea57e949650e9e3" 4f61810]:
{{{
#!CommitTicketReference repository=""
revision="4f61810751751b8c5070ce038ea57e949650e9e3"
Fixed #30747 -- Renamed is_safe_url() to
url_has_allowed_host_and_scheme().
}}}

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

Django

unread,
Jan 14, 2021, 2:12:17 PM1/14/21
to django-...@googlegroups.com
#30747: Rename internal is_safe_url() to better state effective scope.
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
Type: | Gibson
Cleanup/optimization | Status: closed
Component: Utilities | Version: master

Severity: Normal | 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 Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"9e456f3166f6f4f7da9ec00e2160c1edc88fe5b3" 9e456f31]:
{{{
#!CommitTicketReference repository=""
revision="9e456f3166f6f4f7da9ec00e2160c1edc88fe5b3"
Refs #30747 -- Removed django.utils.http.is_safe_url() per deprecation
timeline.
}}}

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

Reply all
Reply to author
Forward
0 new messages