#23891: Revise deprecation / removal timeline for IPAddressField
-------------------------------------+-------------------------------------
Reporter: MarkusH | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | 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 timgraham):
An idea is to move the deprecation warning of `IPAddressField` to the
system checks framework (and suggest doing the same for third-party
fields). It could be a `Warning` in 1.8 (maybe 1.7 too if we want to
resolve the issue about not being able to silence warnings in old
migrations) and `Error` in 1.9. I can investigate this approach a bit more
if the feedback is positive.
Here is a stub that could be kept around in 1.9 (and longer if necessary)
to allow people to migrate away from it.
{{{
class IPAddressField(Field):
def __init__(self, *args, **kwargs):
kwargs['max_length'] = 15
super(IPAddressField, self).__init__(*args, **kwargs)
def deconstruct(self):
name, path, args, kwargs = super(IPAddressField,
self).deconstruct()
del kwargs['max_length']
return name, path, args, kwargs
def get_internal_type(self):
return 'IPAddressField'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23891#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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.6aa0a4d97471d0a60d9e2c3b6113bbc6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.