-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Issues in ipaddress.collapse_addresses() #149722
Copy link
Copy link
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
No status
Bug report
The following issues was discovered during reviewing #141842:
ipaddress.collapse_addresses()supports not only IP networks, but also IP addresses and a mix of them. There are dedicated tests, but this is not documented.ipaddress.collapse_addresses()contains code for supporting also IP interfaces, but it always was broken (it would work if interfaces were not subclasses of addresses). The test for mix of IP addresses and IP interfaces is mislabeled (it says a mix of addresses and networks) and partially commented out (it only tests addresses now, which is mostly a duplicate of other test).My plan for a fix:
For new version only:
Linked PRs