[Django] #26424: Allow URLValidator to skip schemes validation

Yametazamwa mara 25
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

Django

hayajasomwa,
30 Mac 2016, 09:06:3630/03/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
----------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | 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 |
----------------------------------------+------------------------
As proposed by Claude in #26418, "provide some special value for `scheme`,
like `'__all__'`, to allow for all possible schemes (in the same spirit as
the `ModelForm` `fields` / `exclude` attributes).

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

Django

hayajasomwa,
30 Mac 2016, 09:53:4430/03/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | 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 claudep):

It's not exactly about skipping scheme validation, but a minimal
validation (e.g. all ascii letters and maximal length).

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

Django

hayajasomwa,
2 Apr 2016, 10:19:4702/04/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned

Component: Core (Other) | 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
------------------------------+------------------------------------
Changes (by burhan):

* owner: nobody => burhan
* status: new => assigned


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

Django

hayajasomwa,
4 Apr 2016, 08:40:5104/04/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/6388 PR] with some comments for
improvement.

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

Django

hayajasomwa,
20 Apr 2016, 12:30:1420/04/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned
Component: Core (Other) | 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 burhan):

* needs_better_patch: 1 => 0


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

Django

hayajasomwa,
21 Apr 2016, 18:44:4221/04/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


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

Django

hayajasomwa,
20 Mei 2016, 21:38:2420/05/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned
Component: Core (Other) | 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 timgraham):

* needs_better_patch: 1 => 0


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

Django

hayajasomwa,
9 Jun 2016, 20:53:3109/06/2016
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
------------------------------+------------------------------------
Reporter: timgraham | Owner: burhan
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


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

Django

hayajasomwa,
2 Des 2019, 09:16:3202/12/2019
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Baptiste
| Mispelon

Type: New feature | Status: assigned
Component: Core (Other) | 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 Baptiste Mispelon):

* owner: Burhan Khalid => Baptiste Mispelon


* needs_better_patch: 1 => 0


Comment:

I took Burhan Khalid's pull request and updated it to target the 3.1
release.

I also tweaked the regexp for the accepted schemes to better match the RFC
(I think).
As suggested by Tim in the previous pull request, I added a test to make
sure all currently assigned schemes [1] are validated by the regexp.

[https://github.com/django/django/pull/12171 PR here]

[1] https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

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

Django

hayajasomwa,
2 Des 2019, 10:14:0202/12/2019
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Baptiste
| Mispelon
Type: New feature | Status: assigned
Component: Core (Other) | 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 Carlton Gibson):

As I commented on the PR, I'm not 100% convinced we shouldn't be saying
that folks should create a custom validator for the known set of schemes
that they want to accept, rather than adding an `'__all__'`. What do
others think?

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

Django

hayajasomwa,
4 Des 2019, 03:46:3704/12/2019
kwa django-...@googlegroups.com
#26424: Allow URLValidator to skip schemes validation
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Baptiste
| Mispelon
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: wontfix
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):

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


Comment:

Agreed, I don't see a wide usage of `__all__`. In most of cases you want
to add some schemas which is
[https://docs.djangoproject.com/en/3.0/ref/validators/#django.core.validators.URLValidator.schemes
already possible]. I believe solving #25594 would be a real solution for
easy customizing the list of schemes.

--
Ticket URL: <https://code.djangoproject.com/ticket/26424#comment:10>

Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya