From f07c20436991cec3dac011d87343f4008158e658 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Wed, 25 Feb 2026 14:01:14 -0600 Subject: [PATCH 1/2] Make a copy for __repr__ --- ada_url/ada_adapter.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ada_url/ada_adapter.py b/ada_url/ada_adapter.py index 0f757f5..0d62059 100644 --- a/ada_url/ada_adapter.py +++ b/ada_url/ada_adapter.py @@ -1,3 +1,4 @@ +from copy import deepcopy from enum import IntEnum from typing import ( Dict, @@ -271,11 +272,9 @@ def __str__(self): return self.href def __repr__(self): - password = self.password - self.password = '' - ret = f'' - self.password = password - return ret + duplicate = deepcopy(self) + duplicate.password = '' + return f'' @staticmethod def can_parse(url: str, base: Optional[str] = None) -> bool: From dfd680ae23754a961d8c65e536110afc80cabd9d Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Wed, 25 Feb 2026 14:01:19 -0600 Subject: [PATCH 2/2] Run the formatter --- ada_url/ada_build.py | 2 +- setup.py | 1 + update_sdist.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ada_url/ada_build.py b/ada_url/ada_build.py index 35b5f7d..1055efc 100644 --- a/ada_url/ada_build.py +++ b/ada_url/ada_build.py @@ -10,7 +10,7 @@ ada_obj = Extension( 'ada', define_macros=[('ADA_INCLUDE_URL_PATTERN', '0')], - language="c++", + language='c++', sources=['ada_url/ada.cpp'], include_dirs=[file_dir], extra_compile_args=compile_args, diff --git a/setup.py b/setup.py index df1aff4..2824f98 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ def build_extension(self, ext): ext.extra_objects[i] = objects[0] return super().build_extension(ext) + setup( cmdclass={'build_ext': build_ext}, cffi_modules=[ diff --git a/update_sdist.py b/update_sdist.py index 86ac6b5..51daec3 100644 --- a/update_sdist.py +++ b/update_sdist.py @@ -3,6 +3,7 @@ Run this script to remove compiled artifacts from source distribution tarballs. """ + from pathlib import Path from tarfile import open as tar_open from tempfile import TemporaryDirectory