Skip to content

--host ::1 (IPv6) builds a broken URL and crashes the port check #70

Description

@ldbumble
public_url('::1', 7787)   -> 'http://::1:7787'        # should be http://[::1]:7787
urlsplit(that).port       -> ValueError
_busy('::1', 7787)        -> socket.gaierror          # always opens an IPv4 socket

Where: taskuary/cli.py - public_url and _busy.

Done when an IPv6 host is bracketed in the URL, and _busy works for it (for example socket.create_connection, or the address family from getaddrinfo).

Test - extend test_public_url_rewrites_wildcard_bind in tests/test_config.py with public_url('::1', 7787) == 'http://[::1]:7787', and check _busy('::1', <a free port>) returns False instead of raising.


Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions