Author ned.deily
Recipients Joel Croteau, eric.smith, ncoghlan, ned.deily, pmoody
Date 2019-03-30.15:44:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553960672.73.0.856293099819.issue36384@roundup.psfhosted.org>
In-reply-to
Content
ipaddress is behaving as documented:

"The following constitutes a valid IPv4 address:

A string in decimal-dot notation, consisting of four decimal integers in the inclusive range 0–255, separated by dots (e.g. 192.168.0.1). Each integer represents an octet (byte) in the address. Leading zeroes are tolerated only for values less than 8 (as there is no ambiguity between the decimal and octal interpretations of such strings). [...]"

https://docs.python.org/3/library/ipaddress.html

I can sort of understand imposing that restriction in a Python 2 world where leading zeros implied octal and Python 3 outright rejects such forms of integers to avoid the ambiguity.  That said, there's no particular reason why the components of an IPv4 string acceptable to ipaddress *have* to follow the same rules so I'm +0 on making the change at all.  It's a bit of a stretch to consider it a bug when it appears to be behaving as documented but I would expect such a change to fix more problems than causing them so I'm OK if you want to backport it.

But, in any case, the documentation for 3.8 and/or 3.7 needs to be updated.
History
Date User Action Args
2019-03-30 15:44:32ned.deilysetrecipients: + ned.deily, ncoghlan, eric.smith, pmoody, Joel Croteau
2019-03-30 15:44:32ned.deilysetmessageid: <1553960672.73.0.856293099819.issue36384@roundup.psfhosted.org>
2019-03-30 15:44:32ned.deilylinkissue36384 messages
2019-03-30 15:44:32ned.deilycreate