#16664: URLField's to_python method fails with ValueError on some urls on python
2.7
------------------------------------+------------------------
Reporter: zigzag | Owner:
Type: Bug | Status: new
Milestone: | Component: Forms
Version: SVN | 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 aaugustin):
* stage: Unreviewed => Accepted
Comment:
zigzag, your report doesn't mention Django at all — I nearly closed the
ticket as unrelated to Django! :)
Given the patch, if I understand correctly, the bug is that, since python
2.7, `django.forms.fields.URLField.to_python` can raise `ValueError`.
But a form field's `to_python` method shouldn't raise any exception other
than `ValidationError`.
This rule isn't written explicitly in
https://docs.djangoproject.com/en/1.3/ref/forms/validation/ but it's true
for Django's built-in form fields.
--
Ticket URL: <https://code.djangoproject.com/ticket/16664#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.