#36098: TypeError: object of type 'IPv6Address' has no len() when running tests
with GeoDjango
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: GIS | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):
Hello sysedit!
Replying to [comment:13 sysedit]:
> in Django 5.0.11 as the string is 40 char long and not 39. As this
ticket only fixes non-str handling, the exception will still be raised,
correct ?
Yes, this is correct.
> Should the max-length be raised to something larger, like 65 ?
https://superuser.com/questions/381022/how-many-characters-can-an-ip-
address-be seems to indicate that this would be the common value to handle
IPv6 with scope zone properly ?
You can customize the `max_length` yourself in your forms, see a wider
discussion in [https://forum.djangoproject.com/t/length-of-ipv6-address-
string/37953 this forum post], which I believe would solve the
`ValidationError` issue for your project.
--
Ticket URL: <https://code.djangoproject.com/ticket/36098#comment:14>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194843b4ec3-ce76b82b-dfe6-49b6-b6c5-e3d2a069992d-000000%40eu-central-1.amazonses.com.