diff --git a/py/selenium/webdriver/common/proxy.py b/py/selenium/webdriver/common/proxy.py index 1f69720321a04..d4af3338171a1 100644 --- a/py/selenium/webdriver/common/proxy.py +++ b/py/selenium/webdriver/common/proxy.py @@ -17,8 +17,6 @@ """The Proxy implementation.""" -import warnings - class ProxyTypeFactory: """Factory for proxy types.""" @@ -66,14 +64,6 @@ def __get__(self, obj, cls): def __set__(self, obj, value): if self.name == "autodetect" and not isinstance(value, bool): raise ValueError("Autodetect proxy value needs to be a boolean") - if self.name == "ftpProxy": - # TODO: Remove ftpProxy in future version and remove deprecation warning - # https://github.com/SeleniumHQ/selenium/issues/15905 - warnings.warn( - "ftpProxy is deprecated and will be removed in the future", - DeprecationWarning, - stacklevel=2, - ) getattr(obj, "_verify_proxy_type_compatibility")(self.p_type) setattr(obj, "proxyType", self.p_type) setattr(obj, self.name, value) @@ -84,7 +74,6 @@ class Proxy: proxyType = ProxyType.UNSPECIFIED autodetect = False - ftpProxy = "" # TODO: Remove ftpProxy in future version and remove deprecation warning httpProxy = "" noProxy = "" proxyAutoconfigUrl = "" @@ -98,10 +87,6 @@ class Proxy: auto_detect = _ProxyTypeDescriptor("autodetect", ProxyType.AUTODETECT) """Proxy autodetection setting (boolean).""" - # TODO: Remove ftpProxy in future version and remove deprecation warning - ftp_proxy = _ProxyTypeDescriptor("ftpProxy", ProxyType.MANUAL) - """FTP proxy address (deprecated).""" - http_proxy = _ProxyTypeDescriptor("httpProxy", ProxyType.MANUAL) """HTTP proxy address.""" @@ -135,15 +120,6 @@ def __init__(self, raw=None): if raw: if "proxyType" in raw and raw["proxyType"]: self.proxy_type = ProxyType.load(raw["proxyType"]) - # TODO: Remove ftpProxy in future version and remove deprecation warning - # https://github.com/SeleniumHQ/selenium/issues/15905 - if "ftpProxy" in raw and raw["ftpProxy"]: - warnings.warn( - "ftpProxy is deprecated and will be removed in the future", - DeprecationWarning, - stacklevel=2, - ) - self.ftp_proxy = raw["ftpProxy"] if "httpProxy" in raw and raw["httpProxy"]: self.http_proxy = raw["httpProxy"] if "noProxy" in raw and raw["noProxy"]: @@ -186,10 +162,8 @@ def _verify_proxy_type_compatibility(self, compatible_proxy): def to_capabilities(self): proxy_caps = {"proxyType": self.proxyType["string"].lower()} - # TODO: Remove ftpProxy in future version and remove deprecation warning proxies = [ "autodetect", - "ftpProxy", "httpProxy", "proxyAutoconfigUrl", "sslProxy", diff --git a/py/test/selenium/webdriver/common/proxy_tests.py b/py/test/selenium/webdriver/common/proxy_tests.py index df287593f3640..821042c290de7 100644 --- a/py/test/selenium/webdriver/common/proxy_tests.py +++ b/py/test/selenium/webdriver/common/proxy_tests.py @@ -22,9 +22,6 @@ MANUAL_PROXY = { "httpProxy": "some.url:1234", - # TODO: Remove ftpProxy in future (currently deprecated) - # https://github.com/SeleniumHQ/selenium/issues/15905 - "ftpProxy": "ftp.proxy", "noProxy": "localhost, foo.localhost", "sslProxy": "ssl.proxy:1234", "socksProxy": "socks.proxy:65555", @@ -45,9 +42,6 @@ def test_can_add_manual_proxy_to_options(): proxy = Proxy() proxy.http_proxy = MANUAL_PROXY["httpProxy"] - # TODO: Remove ftpProxy in future (currently deprecated) - # https://github.com/SeleniumHQ/selenium/issues/15905 - proxy.ftp_proxy = MANUAL_PROXY["ftpProxy"] proxy.no_proxy = MANUAL_PROXY["noProxy"] proxy.sslProxy = MANUAL_PROXY["sslProxy"] proxy.socksProxy = MANUAL_PROXY["socksProxy"] @@ -102,9 +96,6 @@ def test_can_init_manual_proxy(): assert ProxyType.MANUAL == proxy.proxy_type assert MANUAL_PROXY["httpProxy"] == proxy.http_proxy - # TODO: Remove ftpProxy in future (currently deprecated) - # https://github.com/SeleniumHQ/selenium/issues/15905 - assert MANUAL_PROXY["ftpProxy"] == proxy.ftp_proxy assert MANUAL_PROXY["noProxy"] == proxy.no_proxy assert MANUAL_PROXY["sslProxy"] == proxy.sslProxy assert MANUAL_PROXY["socksProxy"] == proxy.socksProxy @@ -129,9 +120,6 @@ def test_can_init_empty_proxy(): proxy = Proxy() assert ProxyType.UNSPECIFIED == proxy.proxy_type assert "" == proxy.http_proxy - # TODO: Remove ftpProxy in future (currently deprecated) - # https://github.com/SeleniumHQ/selenium/issues/15905 - assert "" == proxy.ftp_proxy assert "" == proxy.no_proxy assert "" == proxy.sslProxy assert "" == proxy.socksProxy