mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
* GH-113171: Fix "private" (really non-global) IP address ranges The _private_networks variables, used by various is_private implementations, were missing some ranges and at the same time had overly strict ranges (where there are more specific ranges considered globally reachable by the IANA registries). This patch updates the ranges with what was missing or otherwise incorrect. I left 100.64.0.0/10 alone, for now, as it's been made special in [1] and I'm not sure if we want to undo that as I don't quite understand the motivation behind it. The _address_exclude_many() call returns 8 networks for IPv4, 121 networks for IPv6. [1] https://github.com/python/cpython/issues/61602
9 lines
358 B
ReStructuredText
9 lines
358 B
ReStructuredText
Fixed various false positives and false negatives in
|
|
|
|
* :attr:`ipaddress.IPv4Address.is_private` (see these docs for details)
|
|
* :attr:`ipaddress.IPv4Address.is_global`
|
|
* :attr:`ipaddress.IPv6Address.is_private`
|
|
* :attr:`ipaddress.IPv6Address.is_global`
|
|
|
|
Also in the corresponding :class:`ipaddress.IPv4Network` and :class:`ipaddress.IPv6Network`
|
|
attributes.
|