Skip to content

Commit 699b0bf

Browse files
committed
[py] Update deprecation message
1 parent 2dfe666 commit 699b0bf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

py/selenium/webdriver/common/proxy.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __set__(self, obj, value):
7070
# TODO: Remove ftpProxy in future version and remove deprecation warning
7171
# https://github.com/SeleniumHQ/selenium/issues/15905
7272
warnings.warn(
73-
"ftpProxy is deprecated and will be removed in the future. Browsers no longer support FTP proxies.",
73+
"ftpProxy is deprecated and will be removed in the future",
7474
DeprecationWarning,
7575
stacklevel=2,
7676
)
@@ -257,7 +257,14 @@ def __init__(self, raw=None):
257257
if "proxyType" in raw and raw["proxyType"]:
258258
self.proxy_type = ProxyType.load(raw["proxyType"])
259259
# TODO: Remove ftpProxy in future version and remove deprecation warning
260+
# https://github.com/SeleniumHQ/selenium/issues/15905
260261
if "ftpProxy" in raw and raw["ftpProxy"]:
262+
if self.name == "ftpProxy":
263+
warnings.warn(
264+
"ftpProxy is deprecated and will be removed in the future",
265+
DeprecationWarning,
266+
stacklevel=2,
267+
)
261268
self.ftp_proxy = raw["ftpProxy"]
262269
if "httpProxy" in raw and raw["httpProxy"]:
263270
self.http_proxy = raw["httpProxy"]

0 commit comments

Comments
 (0)