#35699: DatabaseOperations raise ValueError for valid GenericIPAddressField
(inet)
value with psycopg3
-------------------------------------+-------------------------------------
Reporter: florianvazelle | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version:
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
psycopg3,GenericIPAddressField | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
Thank you for your report.
Are you running into this issue by importing the
`django.db.backends.postgresql.psycopg_any.Inet` alias directly or through
of of Django's?
[https://github.com/django/django/blob/7adb6dd98d50a238f3eca8c15b16b5aec12575fd/django/db/models/fields/__init__.py#L2277-L2280
The only internal usage] of the `Inet` alias is through
`GenericIPAddressField` which only supports
[https://docs.djangoproject.com/en/5.1/ref/models/fields/#django.db.models.GenericIPAddressField
an IPv4 or IPv6 address]. In other words, `GenericIPAddressField` was
never meant to support IP ranges such as `192.168.1/24` in the first place
from my understanding.
--
Ticket URL: <https://code.djangoproject.com/ticket/35699#comment:2>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/010701917ae0202b-af52c6d7-da3b-4fb2-bf75-f7faa19a2a45-000000%40eu-central-1.amazonses.com.