satiricalguru opened a new issue, #2220:
URL: https://github.com/apache/libcloud/issues/2220

   ## Summary
   
   `Connection(url=...)` rejects valid bracketed IPv6 endpoints with 
`ValueError: too many values to unpack (expected 2)`.
   
   ## Detailed Information
   
   This reproduces on trunk at `b5bd859d254e6c0371c39a112cb2988f188bc176`, 
Apache Libcloud `4.0.0.dev0`, Python 3.12.16, macOS arm64.
   
   ```python
   from libcloud.common.base import Connection
   
   Connection(url="https://[2001:db8::1]:8443/v1";)
   ```
   
   `_tuple_from_url` splits the authority on every colon and unpacks it into a 
host and port. Colons inside an IPv6 address cause the unpacking to fail. The 
same error occurs for `http://[2001:db8::1]/v1` and `https://[2001:db8::1]/v1`, 
where the port should default to 80 or 443.
   
   Expected behavior is to preserve the bracketed IPv6 host, extract the port 
separately, and retain `/v1` as the request path. No live server or cloud 
credentials are needed to reproduce the constructor failure.
   
   Codex reproduced this through source inspection and local regression tests 
at the contributor's request.
   


-- 
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]

  • [I] Connection rejects bracke... satiricalguru (via GitHub) via notifications

Reply via email to