Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21386

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:ipaddress.IPv4Address.is_global not implemented
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.6, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: berker.peksag, eric.smith, ncoghlan, pmoody, python-dev, r.david.murray, rluethi, santoso.wijaya
Priority:normalKeywords:patch

Created on2014-04-29 11:35 byrluethi, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
ipv4addr_global.diffrluethi,2014-04-29 11:35
ipv4addr_global2-hg.diffrluethi,2014-05-18 14:36
issue21386_v3.diffberker.peksag,2016-06-10 22:07review
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)*(Python committer)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)*(Python committer)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)*(Python committer)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)(Python triager)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)*(Python committer)Date: 2016-06-11 19:13
Thanks Roger!
History
DateUserActionArgs
2022-04-11 14:58:02adminsetgithub: 65585
2016-06-11 19:13:06berker.peksagsetstatus: open -> closed
type: enhancement -> behavior
messages: +msg268253

resolution: fixed
stage: patch review -> resolved
2016-06-11 19:12:31python-devsetnosy: +python-dev
messages: +msg268252
2016-06-10 22:07:32berker.peksagsetfiles: +issue21386_v3.diff

messages: +msg268162
versions: + Python 3.6
2014-06-06 06:26:12rluethisetmessages: +msg219861
2014-05-24 01:14:34berker.peksagsetversions: - Python 3.4
nosy: +berker.peksag

messages: +msg219017

stage: patch review
2014-05-19 22:38:22santoso.wijayasetnosy: +santoso.wijaya
type: enhancement
2014-05-18 14:36:10rluethisetfiles: +ipv4addr_global2-hg.diff

messages: +msg218744
2014-05-17 13:26:21r.david.murraysetnosy: +r.david.murray
messages: +msg218701
2014-04-29 12:24:41eric.smithsetnosy: +ncoghlan,eric.smith,pmoody
2014-04-29 11:35:35rluethicreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp