summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ipaddress.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface ↵Miss Islington (bot)2020-06-291-0/+12
| | | | | | | | | | | (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
* bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. ↵Miss Islington (bot)2019-08-041-24/+9
| | | | | | | | | | | (GH-14996) There was a discrepancy between the Python and C implementations. Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support to test mixed type comparison. (cherry picked from commit 17e52649c0e7e9389f1cc2444a53f059e24e6bca) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-36845: validate integer network prefix when constructing IP networks ↵Nicolai Moore2019-05-141-0/+16
| | | | (GH-13298)
* bpo-27860: ipaddress: fix Interface missed some attributes (GH-12836)Inada Naoki2019-04-151-1/+16
| | | | | | | IPv4Interface and IPv6Interface did not has netmask and hostmask attributes when its argument is bytes or int. This commit extracts method for constructors of Network and Interface, and ensure Interface class always provides them.
* bpo-27860: use cached_property (GH-12832)Inada Naoki2019-04-151-27/+10
| | | | * cached_property is more efficient than hand crafted cache. * In IPv[46]Network, `self.network.prefixlen` is same to `self._prefixlen`.
* bpo-35734: ipaddress: remove unused methods (GH-11591)Rémi Lapeyre2019-04-131-16/+1
|
* bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)Joel Croteau2019-03-301-9/+3
| | | | | | | | | 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.
* bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)Xiang Zhang2018-03-211-3/+23
| | | | | | 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.
* bpo-18802: Add more details to ipaddress documentation (GH-6083)Cheryl Sabella2018-03-211-0/+3
| | | | Original patch by Jon Foster and Berker Peksag.
* bpo-20825: Containment test for ip_network in ip_network.Cheryl Sabella2017-10-221-1/+86
|
* bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (#879)s-sanjay2017-04-011-8/+29
| | | | | | | | 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
* Use sequence repetition instead of bytes constructor with integer argument.Serhiy Storchaka2016-09-111-5/+5
|
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-3/+3
|
* Issue #23804: Merge spelling and NEWS fixes from 3.5Martin Panter2016-07-111-2/+2
|\
| * English spelling and grammar fixesMartin Panter2016-07-111-2/+2
| |
* | Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__Berker Peksag2016-06-111-0/+1
|/ | | | Patch by Gareth Rees.
* Issue #21386: Implement missing IPv4Address.is_global propertyBerker Peksag2016-06-111-0/+3
| | | | | | It was documented since 07a5610bae9d. Initial patch by Roger Luethi.
* #20973: add total ordering tests for ipaddressR David Murray2016-06-021-0/+33
| | | | Patch by Tommy Beadle.
* Issue #26457: Fixed the subnets() methods in IP network classes for the caseSerhiy Storchaka2016-03-011-0/+30
| | | | | when resulting prefix length is equal to maximal prefix length. Based on patch by Xiang Zhang.
* Remove a duplicate test_addresses key:value as identified by VincentGregory P. Smith2016-01-021-1/+0
| | | | Davis reviewing code.
* Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-021-2/+2
|\
| * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-2/+2
| | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address.Serhiy Storchaka2015-03-071-0/+7
| |
* | Issue #23268: Fixed bugs in the comparison of ipaddress classes.Serhiy Storchaka2015-01-261-5/+42
|\ \ | |/
| * Issue #23268: Fixed bugs in the comparison of ipaddress classes.Serhiy Storchaka2015-01-261-5/+42
| |
* | Issue #23266: Restore the performance of ipaddress.collapse_addresses() whithSerhiy Storchaka2015-01-181-5/+9
| | | | | | | | duplicated addresses and simplify the code.
* | Fixed tests for issue #23133 (pickling of IPv4Network was not tested).Serhiy Storchaka2015-01-181-4/+4
| |
* | Issue #23133: Pickling of ipaddress objects now produces more compact andSerhiy Storchaka2015-01-181-7/+24
| | | | | | | | portable representation.
* | Issue #23266: Much faster implementation of ipaddress.collapse_addresses() ↵Antoine Pitrou2015-01-181-1/+2
| | | | | | | | when there are many non-consecutive addresses.
* | #20815: small readability improvements in ipaddress tests.R David Murray2014-10-121-4/+9
|\ \ | |/
| * #20815: small readability improvements in ipaddress tests.R David Murray2014-10-121-4/+9
| | | | | | | | | | | | Patch by Michel Albert. We don't normally do patches that just tweak whitespace, but ipaddress is relatively new and the package maintainers approved the patch.
* | Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an ↵Antoine Pitrou2014-05-121-0/+113
| | | | | | | | (address, netmask) tuple argument, so as to easily construct network objects from existing addresses.
* | Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.Eric V. Smith2014-04-141-0/+8
|/
* Issue #20553. Use specific asserts in ipaddress tests.Serhiy Storchaka2014-02-081-18/+17
|\
| * Issue #20553. Use specific asserts in ipaddress tests.Serhiy Storchaka2014-02-081-18/+17
| |
* | Merge fix for #18805 from 3.3Nick Coghlan2014-02-081-20/+53
|\ \ | |/
| * Issue #18805: better netmask validation in ipaddressNick Coghlan2014-02-081-20/+53
| |
* | #17400: correct handling of 100.64.0.0/10, fixing the docs and updating NEWSPeter Moody2013-10-241-1/+3
| |
* | #17400: fix documentation, add cache to is_global and correctly handle ↵Peter Moody2013-10-221-0/+1
| | | | | | | | 100.64.0.0/10
* | #17400; ipaddress should make it easy to identify rfc6598 addressesPeter Moody2013-10-211-0/+9
|/
* Issue #14814: document the Interface APIs and fix various problems with the ↵Nick Coghlan2012-08-201-9/+7
| | | | string representations (initial patch by Eli Bendersky).
* Issue #14814: Remove redundant property from interface objects - prefixlen ↵Nick Coghlan2012-08-051-2/+2
| | | | can be accessed via the associated network object
* Issue 14814: Docs work showed some more cases of networks pretending to be ↵Nick Coghlan2012-08-051-2/+2
| | | | 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
* Close #15559: Implementing __index__ creates a nasty interaction with the ↵Nick Coghlan2012-08-051-8/+9
| | | | 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.
* Issue 14814: The new systematic tests aren't just about error reporting any ↵Nick Coghlan2012-07-081-26/+72
| | | | more - change names accordingly. Added and tweaked some example to ensure they were covering the intended code paths
* Issue 14814: Remove dead function (noticed by Serhiy Storchaka)Nick Coghlan2012-07-081-1/+0
|
* Issue 14814: Further error case testing coverage and cleanupsNick Coghlan2012-07-081-73/+67
|
* Issue 14814: Ensure ordering semantics across all 3 entity types in ↵Nick Coghlan2012-07-071-61/+97
| | | | ipaddress are consistent and well-defined
* Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__Nick Coghlan2012-07-071-1/+16
|
* Issue 14814: Explain how to get more error detail in the ipaddress tutorial, ↵Nick Coghlan2012-07-071-3/+3
| | | | and tweak the display for octet errors in IPv4 (noticed the formatting problem when adding to the docs)