Joel Croteau
e653d4d8e8
bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)
...
Stop rejecting IPv4 octets with leading zeroes as ambiguously octal.
Plenty of other tools generate decimal IPv4 octets with leading zeroes,
so keeping this check hurts interoperability.
Patch by Joel Croteau.
2019-03-31 00:53:48 +10:00
Xiang Zhang
10b134a07c
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
...
The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.
2018-03-21 08:25:13 +08:00
INADA Naoki
58a1096761
ipaddress: Use str.isascii() instead of frozenset (GH-5811)
2018-02-23 20:02:41 +09:00
Cheryl Sabella
91dc64ba3f
bpo-20825: Containment test for ip_network in ip_network.
2017-10-22 23:39:49 +02:00
s-sanjay
7bd8d3e794
bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. ( #879 )
...
the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie
add more ip_interface comparison tests
2017-04-01 09:09:53 +03:00
Berker Peksag
28dc1186a8
Issue #20508 : Improve exception message of IPv{4,6}Network.__getitem__
...
Patch by Gareth Rees.
2016-06-11 22:30:05 +03:00
Berker Peksag
742192a4fe
Issue #21386 : Implement missing IPv4Address.is_global property
...
It was documented since 07a5610bae9d.
Initial patch by Roger Luethi.
2016-06-11 22:11:47 +03:00
Serhiy Storchaka
bb0dbd583b
Issue #26457 : Fixed the subnets() methods in IP network classes for the case
...
when resulting prefix length is equal to maximal prefix length.
Based on patch by Xiang Zhang.
2016-03-01 10:25:45 +02:00
Serhiy Storchaka
ba9ac5b5c4
Issue #16261 : Converted some bare except statements to except statements
...
with specified exception type. Original patch by Ramchandra Apte.
2015-05-20 10:33:40 +03:00
Serhiy Storchaka
88f64f392c
Issue #23103 : Reduced the memory consumption of IPv4Address and IPv6Address.
2015-03-07 20:08:34 +02:00
Serhiy Storchaka
ffd48c9e3d
Issue #23268 : Fixed bugs in the comparison of ipaddress classes.
2015-01-26 10:11:39 +02:00
Serhiy Storchaka
f186e128b6
Issue #23268 : Fixed bugs in the comparison of ipaddress classes.
2015-01-26 10:11:16 +02:00
Serhiy Storchaka
b53f0fbf96
Issue #23266 : Restore the performance of ipaddress.collapse_addresses() whith
...
duplicated addresses and simplify the code.
2015-01-19 00:41:32 +02:00
Serhiy Storchaka
5f38f5c502
Issue #23133 : Pickling of ipaddress objects now produces more compact and
...
portable representation.
2015-01-18 22:36:33 +02:00
Antoine Pitrou
e6f250ed90
Issue #23266 : Much faster implementation of ipaddress.collapse_addresses() when there are many non-consecutive addresses.
2015-01-18 16:22:47 +01:00
Raymond Hettinger
bb6c0aaebf
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
2014-11-22 22:14:41 -08:00
Raymond Hettinger
df1b699447
Issue #22823 : Use set literals instead of creating a set from a list
2014-11-09 15:56:33 -08:00
Berker Peksag
1ed2e69a4a
Issue #22186 : Fix typos in Lib/.
...
Patch by Févry Thibault.
2014-10-19 18:07:05 +03:00
Berker Peksag
f23530f569
Issue #22186 : Fix typos in Lib/.
...
Patch by Févry Thibault.
2014-10-19 18:04:38 +03:00
Antoine Pitrou
b19e75d0c0
Refactor precomputed constants in the ipaddress module (suggested by Charles-François)
2014-05-24 00:32:29 +02:00
Antoine Pitrou
f573ce9135
Issue #21513 : Speedup some properties of IP addresses (IPv4Address, IPv6Address) such as .is_private or .is_multicast.
2014-05-23 23:12:24 +02:00
Antoine Pitrou
1e71c53463
Issue #20826 : Optimize ipaddress.collapse_addresses().
2014-05-15 20:40:53 +02:00
Antoine Pitrou
824db30b3e
Issue #21487 : Optimize ipaddress.summarize_address_range() and ipaddress.{IPv4Network,IPv6Network}.subnets().
2014-05-15 20:21:48 +02:00
Antoine Pitrou
45aba189c6
Issue #21486 : Optimize parsing of netmasks in ipaddress.IPv4Network and ipaddress.IPv6Network.
2014-05-15 20:18:41 +02:00
Antoine Pitrou
5fb195f854
Issue #16531 : ipaddress.IPv4Network and ipaddress.IPv6Network now accept an (address, netmask) tuple argument, so as to easily construct network objects from existing addresses.
2014-05-12 20:36:46 +02:00
Eric V. Smith
ebdaaf4087
Issue #20480 : Add ipaddress.reverse_pointer. Patch by Leon Weber.
2014-04-14 12:58:07 -04:00
Peter Moody
1243c7d32c
Issue #19157 : Include the broadcast address in the usuable hosts for IPv6
...
in ipaddress.
2014-03-11 09:55:46 -07:00
Nick Coghlan
aad0ea0b59
Merge fix for #18805 from 3.3
2014-02-08 23:20:58 +10:00
Nick Coghlan
932346f572
Issue #18805 : better netmask validation in ipaddress
2014-02-08 23:17:36 +10:00
Peter Moody
e5019d5183
#17400 : correct handling of 100.64.0.0/10, fixing the docs and updating NEWS
2013-10-24 09:47:10 -07:00
Peter Moody
be9c1b133b
#17400 : fix documentation, add cache to is_global and correctly handle 100.64.0.0/10
2013-10-22 12:36:21 -07:00
Peter Moody
22c3176426
#17400 ; ipaddress should make it easy to identify rfc6598 addresses
2013-10-21 13:58:06 -07:00
Ezio Melotti
30b9d5d3af
#18705 : fix a number of typos. Patch by Févry Thibault.
2013-08-17 15:50:46 +03:00
Ezio Melotti
3f5db3940f
Fix a few typos and a double semicolon. Patch by Eitan Adler.
2013-01-27 06:20:14 +02:00
Eli Bendersky
948af23a77
Issue #15888 : fixing problems in ipaddress doctests. Patch by Chris Jerdonek
2012-10-07 07:23:50 -07:00
Nick Coghlan
db7920b978
Close #14814 : Avoid depending on struct by using newer features. Also use enumerate where appropriate (patch by Serhiy Storchaka). Declaring PEP 3144 final at this point - any further changes to code or docs can go in new issues.
2012-08-20 10:19:12 +10:00
Nick Coghlan
a8517ad3d9
Issue #14814 : document the Interface APIs and fix various problems with the string representations (initial patch by Eli Bendersky).
2012-08-20 10:04:26 +10:00
Nick Coghlan
e3ded955f3
Issue #14814 : Remove redundant property from interface objects - prefixlen can be accessed via the associated network object
2012-08-05 22:45:22 +10:00
Nick Coghlan
730f67f2fa
Issue 14814: Docs work showed some more cases of networks pretending to be addresses and highlighted the weird approach to implementing the 'is_whatever' properties. Impl now illustrates far more clearly that networks have a property if both their network and broadcast addresses have that property
2012-08-05 22:02:18 +10:00
Nick Coghlan
e0c3f5edc0
Close #15559 : Implementing __index__ creates a nasty interaction with the bytes constructor. At least for 3.3, ipaddress objects must now be explicitly converted with int() and thus can't be passed directly to the hex() builtin.
2012-08-05 18:20:17 +10:00
Nick Coghlan
07c4e33c07
Issue 14814: The new systematic tests aren't just about error reporting any more - change names accordingly. Added and tweaked some example to ensure they were covering the intended code paths
2012-07-08 23:06:45 +10:00
Nick Coghlan
27396a1807
Issue 14814: Remove dead function (noticed by Serhiy Storchaka)
2012-07-08 21:38:12 +10:00
Nick Coghlan
297b143c6d
Issue 14814: Further error case testing coverage and cleanups
2012-07-08 17:11:04 +10:00
Nick Coghlan
3008ec070f
Issue 14814: Ensure ordering semantics across all 3 entity types in ipaddress are consistent and well-defined
2012-07-08 00:45:33 +10:00
Nick Coghlan
9a9c28ce7a
Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__
2012-07-07 23:05:59 +10:00
Nick Coghlan
b582ecc562
Issue 14814: Explain how to get more error detail in the ipaddress tutorial, and tweak the display for octet errors in IPv4 (noticed the formatting problem when adding to the docs)
2012-07-07 22:15:22 +10:00
Nick Coghlan
7319f69f49
Issue 14814: Make the ipaddress code easier to follow by using newer language features (patch by Serhiy Storchaka)
2012-07-07 21:43:30 +10:00
Nick Coghlan
36f8dcde06
Issue 14814: Provide more informative error messages in ipaddress, and ensure that errors are caught as expected
2012-07-07 19:23:53 +10:00
Nick Coghlan
912238e3ac
Issue 14814: %s implies coercion with str() - remove a lot of redundant str() calls from the ipaddress implementation
2012-07-07 13:34:50 +10:00
Nick Coghlan
5cf896fea8
Issue 14814: Eliminate bytes warnings from ipaddress by correctly throwing an exception early when given bytes data of the wrong length. Also removes 2.x backwards compatibility code from associated tests.
2012-07-07 01:43:31 +10:00