satiricalguru opened a new pull request, #2221: URL: https://github.com/apache/libcloud/pull/2221
## Fix bracketed IPv6 endpoint parsing ### Description Fixes #2220. `Connection(url="https://[2001:db8::1]:8443/v1")` currently raises `ValueError` before making a request because `_tuple_from_url` splits the IPv6 address on its colons. Use the parsed URL's port for bracketed hosts and preserve the brackets for request URLs and the `Host` header. Existing DNS and IPv4 parsing stays intact. Add regression coverage for HTTP and HTTPS endpoints with default and explicit ports, checking the request path, mocked response, and `Host` header. Include a changelog entry. Verification on Python 3.12.16: - The four new IPv6 cases fail against the unchanged connection implementation and pass with this fix. - The normal non-serial suite passes: 8,273 tests and 49 subtests, with 19 skips; the two serial tests also pass. Internet tests are disabled and benchmarks and performance tests are excluded as in the project's test configuration. - All applicable pinned pre-commit hooks pass using Python 3.12, as does the error-only pylint check with the project's driver plugin. `git diff --check` passes. Codex generated this patch and its regression tests and ran the verification at the contributor's request. The requests in the new test are mocked; no live IPv6 service or cloud credentials were used. ### Status Done, ready for review. ### Checklist (tick everything that applies) - [x] [Code linting](https://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) - [x] Documentation (changelog) - [x] [Tests](https://libcloud.readthedocs.org/en/latest/testing.html) - [ ] [ICLA](https://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
