
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-04-29 11:35 byrluethi, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| ipv4addr_global.diff | rluethi,2014-04-29 11:35 | |||
| ipv4addr_global2-hg.diff | rluethi,2014-05-18 14:36 | |||
| issue21386_v3.diff | berker.peksag,2016-06-10 22:07 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg217511 -(view) | Author: Roger Luethi (rluethi)* | Date: 2014-04-29 11:35 | |
Lib/ipaddress.py does not implement is_global for IPv4Address, in contrast to the documentation which states for IPv4Address.is_global: "True if the address is allocated for public networks."A patch like the one attached to this report should fix that. | |||
| msg218701 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2014-05-17 13:26 | |
The patch looks correct to me, but we also need tests. | |||
| msg218744 -(view) | Author: Roger Luethi (rluethi)* | Date: 2014-05-18 14:36 | |
New patch includes tests.Lightly tested with Python 3.4 (because trunk doesn't build for me right now): tests fail without patch, pass with patch.Patch re-diffed against trunk. | |||
| msg219017 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2014-05-24 01:14 | |
+ @property+ def is_global(self):+ return (not self in IPv4Network('100.64.0.0/10') andCan IPv4Network('100.64.0.0/10') moved to the _IPv4Constants class (e.g. _IPv4Constants._global_network = IPv4Network('100.64.0.0/10')) afterhttp://hg.python.org/cpython/rev/e5d963cb6afc (see alsoissue 21513)+ not self.is_private) | |||
| msg219861 -(view) | Author: Roger Luethi (rluethi)* | Date: 2014-06-06 06:26 | |
Seeing that the patch merged forissue 21513 left the existing test for 100.64.0.0 (IPv4 network) untouched, I think it would make more sense to make that address a constant everywhere in a separate patch (if that is indeed desirable). | |||
| msg268162 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2016-06-10 22:07 | |
Here is an updated patch that uses my proposal inmsg219017. Since this is already documented athttps://docs.python.org/3.5/library/ipaddress.html#ipaddress.IPv4Address.is_global I think it should also go into 3.5. | |||
| msg268252 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-06-11 19:12 | |
New changesetd65191861599 by Berker Peksag in branch '3.5':Issue#21386: Implement missing IPv4Address.is_global propertyhttps://hg.python.org/cpython/rev/d65191861599New changeset1519ca772e54 by Berker Peksag in branch 'default':Issue#21386: Merge from 3.5https://hg.python.org/cpython/rev/1519ca772e54 | |||
| msg268253 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2016-06-11 19:13 | |
Thanks Roger! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:02 | admin | set | github: 65585 |
| 2016-06-11 19:13:06 | berker.peksag | set | status: open -> closed type: enhancement -> behavior messages: +msg268253 resolution: fixed stage: patch review -> resolved |
| 2016-06-11 19:12:31 | python-dev | set | nosy: +python-dev messages: +msg268252 |
| 2016-06-10 22:07:32 | berker.peksag | set | files: +issue21386_v3.diff messages: +msg268162 versions: + Python 3.6 |
| 2014-06-06 06:26:12 | rluethi | set | messages: +msg219861 |
| 2014-05-24 01:14:34 | berker.peksag | set | versions: - Python 3.4 nosy: +berker.peksag messages: +msg219017 stage: patch review |
| 2014-05-19 22:38:22 | santoso.wijaya | set | nosy: +santoso.wijaya type: enhancement |
| 2014-05-18 14:36:10 | rluethi | set | files: +ipv4addr_global2-hg.diff messages: +msg218744 |
| 2014-05-17 13:26:21 | r.david.murray | set | nosy: +r.david.murray messages: +msg218701 |
| 2014-04-29 12:24:41 | eric.smith | set | nosy: +ncoghlan,eric.smith,pmoody |
| 2014-04-29 11:35:35 | rluethi | create | |