Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-46415: Use f-string for ValueError in ↵ | Thomas Cellerier | 2022-05-03 | 1 | -9/+6 |
| | | | | | | | | | | | | | | | | | | | | | | ipaddress.ip_{address,network,interface} helper functions (#30642) `IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of (address description, netmask) as the address parameter. When the tuple-based address is used errors are not propagated correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments: In [7]: ipaddress.ip_network(("192.168.100.0", "fooo")) ... TypeError: not all arguments converted during string formatting Compared to: In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo")) ... NetmaskValueError: 'foo' is not a valid netmask Use an f-string to make sure the error is always properly formatted. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | ||||
* | bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465) | Raymond Hettinger | 2021-09-20 | 1 | -3/+3 |
| | |||||
* | bpo-33433 Fix private address checking for IPv4 mapped IPv6. (GH-26172) | Pete Wicken | 2021-05-17 | 1 | -1/+6 |
| | | | | | For IPv4 mapped IPv6 addresses, defer privacy check to the mapped IPv4 address. Solves bug where public mapped IPv4 addresses are considered private by the IPv6 check. Automerge-Triggered-By: GH:gpshead | ||||
* | bpo-36384: Leading zeros in IPv4 addresses are no longer tolerated (GH-25099) | Christian Heimes | 2021-05-02 | 1 | -0/+5 |
| | | | | | | | | | Reverts commit e653d4d8e820a7a004ad399530af0135b45db27a and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822) | Victor Stinner | 2020-08-11 | 1 | -2/+2 |
| | | | Automerge-Triggered-By: @tiran | ||||
* | bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736) | Eric L. Frederich | 2020-08-05 | 1 | -1/+1 |
| | |||||
* | bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface ↵ | Ravi Teja P | 2020-06-29 | 1 | -2/+2 |
| | | | | | | | | (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 | ||||
* | bpo-39481: remove generic classes from ipaddress/mmap (GH-20045) | Batuhan Taskaya | 2020-05-12 | 1 | -7/+0 |
| | | | These were added by mistake (see https://bugs.python.org/issue39481#msg366288). | ||||
* | bpo-39481: PEP 585 for ipaddress.py (GH-19418) | Batuhan Taşkaya | 2020-04-10 | 1 | -0/+6 |
| | |||||
* | bpo-28577: Special case added to IP v4 and v6 hosts for /32 and /128 ↵ | Pete Wicken | 2020-03-09 | 1 | -0/+4 |
| | | | | | | networks (GH-18757) The `.hosts()` method now returns the single address present in a /32 or /128 network. | ||||
* | bpo-35712: Make using NotImplemented in a boolean context issue a ↵ | MojoVampire | 2020-03-03 | 1 | -3/+3 |
| | | | | deprecation warning (GH-13195) | ||||
* | bpo-34788: Add support for scoped IPv6 addresses (GH-13772) | opavlyuk | 2020-02-26 | 1 | -2/+53 |
| | | | Automerge-Triggered-By: @asvetlov | ||||
* | bpo-32820: Simplify __format__ implementation for ipaddress. (GH-16378) | Serhiy Storchaka | 2019-09-27 | 1 | -40/+19 |
| | | | | Also cache the compiled RE for parsing the format specifier. | ||||
* | bpo-32820: __format__ method for ipaddress (#5627) | ewosborne | 2019-09-12 | 1 | -0/+72 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bits method and test_bits * Cleaned up assert string * blurb * added docstring * Faster method, per Eric Smith * redoing as __format__ * added ipv6 method * test cases and cleanup * updated news * cleanup and NEWS.d * cleaned up old NEWS * removed cut and paste leftover * one more cleanup * moved to regexp, moved away from v4- and v6-specific versions of __format__ * More cleanup, added ipv6 test cases * more cleanup * more cleanup * cleanup * cleanup * cleanup per review, part 1 * addressed review comments around help string and regexp matching * wrapped v6 test strings. contiguous integers: break at 72char. with underscores: break so that it looks clean. * 's' and '' tests for pv4 and ipv6 * whitespace cleanup * Remove trailing whitespace * Remove more trailing whitespace * Remove an excess blank line | ||||
* | bpo-36845: validate integer network prefix when constructing IP networks ↵ | Nicolai Moore | 2019-05-14 | 1 | -0/+4 |
| | | | | (GH-13298) | ||||
* | bpo-25430: improve performance of IPNetwork.__contains__ (GH-1785) | gescheit | 2019-04-30 | 1 | -2/+1 |
| | | | make a compare in bit-operation manner. | ||||
* | bpo-27860: ipaddress: fix Interface missed some attributes (GH-12836) | Inada Naoki | 2019-04-15 | 1 | -70/+40 |
| | | | | | | | 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 Naoki | 2019-04-15 | 1 | -26/+7 |
| | | | | * 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 Lapeyre | 2019-04-13 | 1 | -55/+0 |
| | |||||
* | bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577) | Joel Croteau | 2019-03-30 | 1 | -6/+0 |
| | | | | | | | | | 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 Zhang | 2018-03-21 | 1 | -71/+38 |
| | | | | | | 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. | ||||
* | ipaddress: Use str.isascii() instead of frozenset (GH-5811) | INADA Naoki | 2018-02-23 | 1 | -3/+2 |
| | |||||
* | bpo-20825: Containment test for ip_network in ip_network. | Cheryl Sabella | 2017-10-22 | 1 | -6/+23 |
| | |||||
* | bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (#879) | s-sanjay | 2017-04-01 | 1 | -2/+4 |
| | | | | | | | | 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 | ||||
* | Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__ | Berker Peksag | 2016-06-11 | 1 | -2/+2 |
| | | | | Patch by Gareth Rees. | ||||
* | Issue #21386: Implement missing IPv4Address.is_global property | Berker Peksag | 2016-06-11 | 1 | -0/+7 |
| | | | | | | It was documented since 07a5610bae9d. Initial patch by Roger Luethi. | ||||
* | Issue #26457: Fixed the subnets() methods in IP network classes for the case | Serhiy Storchaka | 2016-03-01 | 1 | -9/+9 |
| | | | | | when resulting prefix length is equal to maximal prefix length. Based on patch by Xiang Zhang. | ||||
* | Issue #16261: Converted some bare except statements to except statements | Serhiy Storchaka | 2015-05-20 | 1 | -2/+2 |
| | | | | with specified exception type. Original patch by Ramchandra Apte. | ||||
* | Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address. | Serhiy Storchaka | 2015-03-07 | 1 | -13/+12 |
| | |||||
* | Issue #23268: Fixed bugs in the comparison of ipaddress classes. | Serhiy Storchaka | 2015-01-26 | 1 | -40/+7 |
|\ | |||||
| * | Issue #23268: Fixed bugs in the comparison of ipaddress classes. | Serhiy Storchaka | 2015-01-26 | 1 | -40/+7 |
| | | |||||
* | | Issue #23266: Restore the performance of ipaddress.collapse_addresses() whith | Serhiy Storchaka | 2015-01-18 | 1 | -20/+16 |
| | | | | | | | | duplicated addresses and simplify the code. | ||||
* | | Issue #23133: Pickling of ipaddress objects now produces more compact and | Serhiy Storchaka | 2015-01-18 | 1 | -7/+14 |
| | | | | | | | | portable representation. | ||||
* | | Issue #23266: Much faster implementation of ipaddress.collapse_addresses() ↵ | Antoine Pitrou | 2015-01-18 | 1 | -6/+10 |
| | | | | | | | | when there are many non-consecutive addresses. | ||||
* | | PEP 479: Use the return-keyword instead of raising StopIteration inside a ↵ | Raymond Hettinger | 2014-11-23 | 1 | -1/+1 |
| | | | | | | | | generators. | ||||
* | | Issue #22823: Use set literals instead of creating a set from a list | Raymond Hettinger | 2014-11-09 | 1 | -1/+1 |
| | | |||||
* | | Issue #22186: Fix typos in Lib/. | Berker Peksag | 2014-10-19 | 1 | -1/+1 |
|\ \ | |/ | | | | | Patch by Févry Thibault. | ||||
| * | Issue #22186: Fix typos in Lib/. | Berker Peksag | 2014-10-19 | 1 | -1/+1 |
| | | | | | | | | Patch by Févry Thibault. | ||||
* | | Refactor precomputed constants in the ipaddress module (suggested by ↵ | Antoine Pitrou | 2014-05-23 | 1 | -58/+67 |
| | | | | | | | | Charles-François) | ||||
* | | Issue #21513: Speedup some properties of IP addresses (IPv4Address, ↵ | Antoine Pitrou | 2014-05-23 | 1 | -51/+69 |
| | | | | | | | | IPv6Address) such as .is_private or .is_multicast. | ||||
* | | Issue #20826: Optimize ipaddress.collapse_addresses(). | Antoine Pitrou | 2014-05-15 | 1 | -27/+26 |
| | | |||||
* | | Issue #21487: Optimize ipaddress.summarize_address_range() and ↵ | Antoine Pitrou | 2014-05-15 | 1 | -21/+7 |
| | | | | | | | | ipaddress.{IPv4Network,IPv6Network}.subnets(). | ||||
* | | Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and ↵ | Antoine Pitrou | 2014-05-15 | 1 | -79/+119 |
| | | | | | | | | ipaddress.IPv6Network. | ||||
* | | Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an ↵ | Antoine Pitrou | 2014-05-12 | 1 | -21/+74 |
| | | | | | | | | (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. Smith | 2014-04-14 | 1 | -0/+29 |
|/ | |||||
* | Issue #19157: Include the broadcast address in the usuable hosts for IPv6 | Peter Moody | 2014-03-11 | 1 | -0/+12 |
| | | | | in ipaddress. | ||||
* | Merge fix for #18805 from 3.3 | Nick Coghlan | 2014-02-08 | 1 | -65/+83 |
|\ | |||||
| * | Issue #18805: better netmask validation in ipaddress | Nick Coghlan | 2014-02-08 | 1 | -65/+83 |
| | | |||||
* | | #17400: correct handling of 100.64.0.0/10, fixing the docs and updating NEWS | Peter Moody | 2013-10-24 | 1 | -12/+15 |
| | | |||||
* | | #17400: fix documentation, add cache to is_global and correctly handle ↵ | Peter Moody | 2013-10-22 | 1 | -3/+5 |
| | | | | | | | | 100.64.0.0/10 |