Skip to content

[py] Add client_config property and update deprecation messages #15674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 2025

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented Apr 27, 2025

User description

🔗 Related Issues

Fixes #15672

💥 What does this PR do?

This PR adds a client_config property to the RemoteConnection class, so it is part of the public API. This is useful for accessing the ClientConfig instance for getting/setting attributes used by the driver.

This PR also updates the deprecation warnings RemoteConnection to advise using this property.

Also added a test for setting timeout via RemoteConnection.client_config and updated unit tests to use this new property.

🔄 Types of changes

  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)

PR Type

Enhancement


Description

  • Add public client_config property to RemoteConnection

  • Update deprecation warnings to reference client_config

  • Improve clarity of migration path for deprecated methods


Changes walkthrough 📝

Relevant files
Enhancement
remote_connection.py
Add client_config property and update deprecation messages

py/selenium/webdriver/remote/remote_connection.py

  • Added a client_config property to expose _client_config publicly
  • Updated all deprecation warnings to reference client_config instead of
    ClientConfig instance
  • Clarified deprecation messages for constructor arguments
  • +14/-10 

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added the C-py Python Bindings label Apr 27, 2025
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Documentation Update

    The new client_config property has been added but lacks docstring documentation. Consider adding a docstring to explain what this property returns and how it should be used.

    @property
    def client_config(self):
        return self._client_config

    Copy link
    Contributor

    qodo-merge-pro bot commented Apr 27, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @cgoldberg cgoldberg merged commit e8331d1 into SeleniumHQ:trunk Apr 29, 2025
    17 checks passed
    @cgoldberg cgoldberg deleted the py-clientconfig-property branch April 29, 2025 23:19
    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.

    [🚀 Feature]: [py] Add property for RemoteConnection.client_config so it's part of the public API
    2 participants