This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 'ipaddress' module, bad result for 'is_private' on "192.0.0.0"
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, trevormarvin
Priority: normal Keywords:

Created on 2020-12-29 00:42 by trevormarvin, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg383942 - (view) Author: Trevor Marvin (trevormarvin) Date: 2020-12-29 00:42
Tested on Python 3.6.9 with "ipaddress" module, module version 1.0.

ipaddress.ip_address('192.0.0.0').is_private

Incorrectly returns as 'True'.  Per RFC 1918 / BCP 5, section 3, the private IPv4 space sarting with '192' is only '192.168.0.0/16'.
msg383943 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-12-29 00:55
The ipaddress documentation references https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml, which says that 192.0.0.0/29 is reserved and not globally reachable. I think in that sense, it's a private address.
History
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86940
2020-12-29 01:51:46trevormarvinsetstatus: open -> closed
resolution: not a bug
stage: resolved
2020-12-29 00:55:17eric.smithsetnosy: + eric.smith
messages: + msg383943
2020-12-29 00:42:59trevormarvincreate