[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Pete Wicken added the comment: I've opened a PR that should hopefully address this issue. -- ___ Python tracker <https://bugs.python.org/issue33433> ___ ___

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-16 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch pull_requests: +24799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26172 ___ Python tracker <https://bugs.python.org/issu

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24255 pull_request: https://github.com/python/cpython/pull/25536 ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24252 pull_request: https://github.com/python/cpython/pull/25533 ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2021-04-22 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +24251 pull_request: https://github.com/python/cpython/pull/25532 ___ Python tracker <https://bugs.python.org/issue28

[issue42935] Pickle can't import builtins at exit

2021-01-16 Thread Pete Wicken
Pete Wicken added the comment: Out of curiosity, why is there not much we can do? I'm not familiar enough with Python's C code to appreciate the difficulty of making the builtins available at the point where the pickle save is run when exiting. The fact that this segfaults in the 3.8

[issue42935] Pickle can't import builtins at exit

2021-01-15 Thread Pete Wicken
New submission from Pete Wicken : Originally found as an issue in Lib/shelve.py; if we attempt to pickle a builtin as the program is exiting then Modules/_pickle.c will fail at the point of the PyImport_Import in save_global. In CPython3.8 this causes a segfault, in CPython3.9

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-05-11 Thread Pete Wicken
Pete Wicken added the comment: The patch for this has been merged - I guess this can be closed now? -- ___ Python tracker <https://bugs.python.org/issue28

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2020-03-03 Thread Pete Wicken
Change by Pete Wicken : -- nosy: +Wicken ___ Python tracker <https://bugs.python.org/issue33433> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-03 Thread Pete Wicken
Pete Wicken added the comment: Ok it was bugging me that they were different, so I also added the same logic for IPv6Networks. -- ___ Python tracker <https://bugs.python.org/issue28

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-02 Thread Pete Wicken
Pete Wicken added the comment: I've had a go at implementing this. I did not implement for IPv6 as this was not mentioned here, but it seems like it would make sense for it as well. I can add that in too if you like. -- ___ Python tracker <ht

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-03-02 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch nosy: +Wicken nosy_count: 5.0 -> 6.0 pull_requests: +18112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18757 ___ Python tracker <https://bugs.python.org/i

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: +18053 pull_request: https://github.com/python/cpython/pull/18691 ___ Python tracker <https://bugs.python.org/issue39

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- pull_requests: -18050 ___ Python tracker <https://bugs.python.org/issue39710> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken
Change by Pete Wicken : -- nosy: +Wicken nosy_count: 3.0 -> 4.0 pull_requests: +18050 pull_request: https://github.com/python/cpython/pull/18691 ___ Python tracker <https://bugs.python.org/issu

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
Pete Wicken added the comment: 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. --

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
Change by Pete Wicken : -- components: +Library (Lib) type: -> behavior versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue38750> ___ _

[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-08 Thread Pete Wicken
New submission from Pete Wicken : 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

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-05 Thread Pete Wicken
Pete Wicken added the comment: Looks like this happens because the is_private method that gets called is from _BaseNetwork, which checks if the network address '0.0.0.0' and the broadcast address '255.255.255.255' are both private, which they are as 0.0.0.0 falls into 0.0.0.0/8. I think

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-03 Thread Pete Wicken
Change by Pete Wicken : -- keywords: +patch pull_requests: +16548 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17036 ___ Python tracker <https://bugs.python.org/issu

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-02 Thread Pete Wicken
Pete Wicken added the comment: Given the comments above I appreciate that this is actually due to the padding being the total field width rather than the padding of the digits themselves. Having revised the documentation again, I believe this following line is explaining it: "

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-10-31 Thread Pete Wicken
New submission from Pete Wicken : When formatting an integer as a hexadecimal value, the '#' alternate form modifier inserts a preceding '0x'. If this is used in combination with padding modifiers, the '0x' is counted as part of the overall width, which does not feel like the natural