classification
Title: Solve IPv4 categorisation issues with the ipaddress module
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Wicken, pmoody, samjonas
Priority: normal Keywords:

Created on 2019-11-08 21:06 by Wicken, last changed 2020-01-01 08:39 by samjonas.

Messages (3)
msg356265 - (view) Author: Pete Wicken (Wicken) * Date: 2019-11-08 21:06
As alluded to in issue bpo-38655, the behaviour for getting categorising IPv4 networks is inconsistent with the IANA guideline, which the docs say it follows.

I'm proposing we either change the documentation so that it describes the behaviour that should actually be expected, or we rewrite some parts of the ipaddress module so that they follow the guidelines.

For the latter, my thoughts would be to actually implement the check table on the IANA page (https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml).

i.e for a given address, you can ask of it "is_forwardable", "is_globally_reachable", etc.
msg356267 - (view) Author: Pete Wicken (Wicken) * Date: 2019-11-08 21:55
In addition to my previous comment, I think a more generic "is_special" could cover everything in the IANA special purpose address table for ease of checking anything that isn't publicly available IP.
msg359148 - (view) Author: sam jonas (samjonas) Date: 2020-01-01 08:39
Hi i am also facing the same issue, please provide a good solution
History
Date User Action Args
2020-01-01 08:39:08samjonassetnosy: + samjonas
messages: + msg359148
2019-11-15 19:02:13terry.reedysetnosy: + pmoody
2019-11-08 21:55:44Wickensetmessages: + msg356267
2019-11-08 21:06:31Wickensettype: behavior
components: + Library (Lib)
versions: + Python 3.9
2019-11-08 21:06:11Wickencreate