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.

Author anudeepballa07
Recipients anudeepballa07, eric.smith
Date 2020-09-20.16:47:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAFjuGyf=umhR2W3WS-hu217icb43Kj0g02SFeZYy_86_8RqmvQ@mail.gmail.com>
In-reply-to <1600606818.79.0.63306089449.issue41820@roundup.psfhosted.org>
Content
Greetings,

Any Ip address containing 2 zeros or more are considered to be an invalid
IP address.

 '172.16.254.00' *is not* equivalent to '172.16.254.0'

I guess this small logic is causing the error

I hope it makes it clear from the below images.

Regards,
Raj.

[image: Screen Shot 2020-09-20 at 11.42.39 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.31 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.18 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.09 AM.png]

On Sun, 20 Sep 2020 at 08:00, Eric V. Smith <report@bugs.python.org> wrote:

>
> Eric V. Smith <eric@trueblade.com> added the comment:
>
> Simplified:
> >>> import ipaddress
> >>> print(ipaddress.ip_address('172.16.254.00').version)
> 4
>
> So your concern is that you think '172.16.254.00' (or equivalently,
> '172.16.254.0') shouldn't be treated as a valid IPv4 address. Is that
> correct?
>
> Can you tell us why you think it's not a valid IPv4 address? I think
> everything is working correctly here.
>
> ----------
> nosy: +eric.smith
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41820>
> _______________________________________
>
Files
File name Uploaded
Screen Shot 2020-09-20 at 11.42.09 AM.png anudeepballa07, 2020-09-20.16:47:56
Screen Shot 2020-09-20 at 11.42.18 AM.png anudeepballa07, 2020-09-20.16:47:56
Screen Shot 2020-09-20 at 11.42.31 AM.png anudeepballa07, 2020-09-20.16:47:56
Screen Shot 2020-09-20 at 11.42.39 AM.png anudeepballa07, 2020-09-20.16:47:56
History
Date User Action Args
2020-09-20 16:47:57anudeepballa07setrecipients: + anudeepballa07, eric.smith
2020-09-20 16:47:57anudeepballa07linkissue41820 messages
2020-09-20 16:47:56anudeepballa07create