Skip to content

Exception when printing file URLs #131

Description

@msrd0
$ uv pip install ada_url
Resolved 3 packages in 147ms
Downloading ada-url (1.7MiB)
 Downloaded ada-url
Prepared 1 package in 103ms
Installed 1 package in 15ms
 + ada-url==1.31.0

$ python
Python 3.13.13 (main, Apr  7 2026, 20:49:46) [Clang 22.1.1 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ada_url import URL
>>> url = URL("file://irgendwo/im/nirgendwo")
>>> url
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    url
  File "/home/msrd0/git/mddb-client/.venv/lib/python3.13/site-packages/ada_url/ada_adapter.py", line 276, in __repr__
    duplicate.password = ''
    ^^^^^^^^^^^^^^^^^^
  File "/home/msrd0/git/mddb-client/.venv/lib/python3.13/site-packages/ada_url/ada_adapter.py", line 265, in __setattr__
    raise ValueError(f'Invalid value for {attr}') from None
ValueError: Invalid value for password

This issue seems persistent for any type of file url – even file:/// triggers it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions