Remove backward compatibility shim for ExpandableIPAddressField
Removes the deprecated ExpandableIPAddressField alias (renamed to ExpandableIPNetworkField in a prior release) per the v4.7.0 removal schedule. Closes #22053 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
00791344e6
commit
6ccd53ec0a
|
|
@ -1,5 +1,4 @@
|
|||
import re
|
||||
import warnings
|
||||
|
||||
import netaddr
|
||||
from django import forms
|
||||
|
|
@ -71,15 +70,3 @@ class ExpandableIPNetworkField(forms.CharField):
|
|||
if family == 6 and re.search(IP6_EXPANSION_PATTERN, value):
|
||||
return list(expand_ipnetwork_pattern(value.lower(), 6))
|
||||
return [value]
|
||||
|
||||
|
||||
# TODO: Remove in NetBox v4.7.0
|
||||
def __getattr__(name):
|
||||
if name == 'ExpandableIPAddressField':
|
||||
warnings.warn(
|
||||
"ExpandableIPAddressField has been renamed to ExpandableIPNetworkField. "
|
||||
"ExpandableIPAddressField will be removed in NetBox v4.7.0.",
|
||||
DeprecationWarning,
|
||||
)
|
||||
return ExpandableIPNetworkField
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue