From 1717827732b85ba5fda6f9b3d8cd4f2a1b6e3fa6 Mon Sep 17 00:00:00 2001 From: AHMET YILMAZ Date: Fri, 12 Sep 2025 11:10:38 +0800 Subject: [PATCH] refactor(BrowserConfig): change deprecation warning for 'proxy' parameter to UserWarning --- crawl4ai/async_configs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crawl4ai/async_configs.py b/crawl4ai/async_configs.py index 6688a54b..1ac8cd22 100644 --- a/crawl4ai/async_configs.py +++ b/crawl4ai/async_configs.py @@ -468,7 +468,7 @@ class BrowserConfig: self.channel = "" self.chrome_channel = "" if proxy: - warnings.warn("The 'proxy' parameter is deprecated and will be removed in a future release. Use 'proxy_config' instead.", DeprecationWarning) + warnings.warn("The 'proxy' parameter is deprecated and will be removed in a future release. Use 'proxy_config' instead.", UserWarning) self.proxy = proxy self.proxy_config = proxy_config if isinstance(self.proxy_config, dict): @@ -478,7 +478,6 @@ class BrowserConfig: if self.proxy and self.proxy_config: warnings.warn("Both 'proxy' and 'proxy_config' are provided. 'proxy_config' will take precedence.", UserWarning) - print(f"[DEBUG] Both proxy and proxy_config provided. Setting proxy to None.") self.proxy = None elif self.proxy: # Convert proxy string to ProxyConfig if proxy_config is not provided