From 69116b65c25b2d7753c774ecc79b50e439efa54a Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Wed, 27 May 2026 09:22:42 -0500 Subject: [PATCH 1/2] Fix repr() for file:// URLs --- ada_url/ada_adapter.py | 3 ++- tests/test_ada_url.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ada_url/ada_adapter.py b/ada_url/ada_adapter.py index 0d62059..21078d6 100644 --- a/ada_url/ada_adapter.py +++ b/ada_url/ada_adapter.py @@ -273,7 +273,8 @@ def __str__(self): def __repr__(self): duplicate = deepcopy(self) - duplicate.password = '' + if duplicate.password: + duplicate.password = '' return f'' @staticmethod diff --git a/tests/test_ada_url.py b/tests/test_ada_url.py index ce82a97..57a6baf 100644 --- a/tests/test_ada_url.py +++ b/tests/test_ada_url.py @@ -203,6 +203,10 @@ def test_to_repr_password(self): str(urlobj), 'https://user:password1@example.org/something.txt' ) + def test_repr_file(self): + url = URL('file:///') + repr(url) + def test_check_url(self): for s, expected in ( ('https:example.org', True), From 4261e6aaf8ffdf16106d76bcadfc86850b5e21e4 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Wed, 27 May 2026 09:23:05 -0500 Subject: [PATCH 2/2] Bump version to 1.31.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 02d9b0f..4f1ef4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ada-url" -version = "1.31.0" +version = "1.31.1" authors = [ {name = "Bo Bayles", email = "bo@bbayles.com"}, ]