Skip to content

Conversation

@cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Dec 12, 2025

User description

🔗 Related Issues

#15905
#15906

💥 What does this PR do?

FTP proxy support was deprecated in Selenium 4.34.2 (#15906). This PR removes the code and tests completely from the Python bindings.

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR Type

Bug fix, Other


Description

  • Remove deprecated FTP proxy support from Python bindings

  • Delete ftpProxy attribute and ftp_proxy descriptor

  • Remove deprecation warnings and related TODO comments

  • Update proxy tests to remove FTP proxy references


Diagram Walkthrough

flowchart LR
  A["Proxy class with ftpProxy"] -->|Remove deprecated attribute| B["Proxy class without ftpProxy"]
  C["Deprecation warnings"] -->|Remove| D["Clean codebase"]
  E["FTP proxy tests"] -->|Remove| F["Updated test suite"]
Loading

File Walkthrough

Relevant files
Bug fix
proxy.py
Remove FTP proxy attribute and deprecation logic                 

py/selenium/webdriver/common/proxy.py

  • Removed import warnings statement
  • Deleted deprecation warning logic from _ProxyTypeDescriptor.__set__
    method
  • Removed ftpProxy class attribute initialization
  • Removed ftp_proxy descriptor definition and documentation
  • Removed FTP proxy handling from __init__ method
  • Removed ftpProxy from proxy capabilities list in to_capabilities
    method
+0/-26   
Tests
proxy_tests.py
Remove FTP proxy test cases and assertions                             

py/test/selenium/webdriver/common/proxy_tests.py

  • Removed ftpProxy entry from MANUAL_PROXY test dictionary
  • Removed FTP proxy assignment in test_can_add_manual_proxy_to_options
    test
  • Removed FTP proxy assertion in test_can_init_manual_proxy test
  • Removed FTP proxy assertion in test_can_init_empty_proxy test
  • Removed associated TODO comments and issue references
+0/-12   

@cgoldberg cgoldberg self-assigned this Dec 12, 2025
@selenium-ci selenium-ci added the C-py Python Bindings label Dec 12, 2025
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No audit scope: The new code only removes deprecated FTP proxy support and does not introduce or modify
any critical actions that would require audit logging, so compliance cannot be assessed
from this diff alone.

Referred Code
def __init__(self, raw=None):
    """Creates a new Proxy.

    Args:
        raw: Raw proxy data. If None, default class values are used.
    """
    if raw:
        if "proxyType" in raw and raw["proxyType"]:
            self.proxy_type = ProxyType.load(raw["proxyType"])
        if "httpProxy" in raw and raw["httpProxy"]:
            self.http_proxy = raw["httpProxy"]
        if "noProxy" in raw and raw["noProxy"]:
            self.no_proxy = raw["noProxy"]
        if "proxyAutoconfigUrl" in raw and raw["proxyAutoconfigUrl"]:
            self.proxy_autoconfig_url = raw["proxyAutoconfigUrl"]
        if "sslProxy" in raw and raw["sslProxy"]:
            self.sslProxy = raw["sslProxy"]
        if "autodetect" in raw and raw["autodetect"]:
            self.auto_detect = raw["autodetect"]
        if "socksProxy" in raw and raw["socksProxy"]:
            self.socks_proxy = raw["socksProxy"]


 ... (clipped 36 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@cgoldberg cgoldberg merged commit bcbd7da into SeleniumHQ:trunk Dec 16, 2025
25 checks passed
@cgoldberg cgoldberg deleted the py-remove-ftp-proxy-support branch December 16, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants