-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Add args to is_url_connectable #16212
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
base: trunk
Are you sure you want to change the base?
[py] Add args to is_url_connectable #16212
Conversation
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
🔗 Related Issues
Fixes #6046
Fixes #3904
💥 What does this PR do?
This PR adds
host
andscheme
args to theis_url_connectable
function in theutils
module.I can't find any references to this function in our codebase, but maybe somebody is using it externally? or maybe it's just leftover legacy code? Anyway, it seemed kind of crazy to have a utility method for checking URL connectivity where you can't specify a URL. This should make it more flexible.
🔧 Implementation Notes
The
host
andscheme
args are optional keyword args with default values identical to the old hardcoded values, so this shouldn't break anybody's code that may be using this function.I also included some minor cleanup of docstrings.
🔄 Types of changes
PR Type
Enhancement
Description
Add
host
andscheme
parameters tois_url_connectable
functionImprove docstring formatting and clarity across utility functions
Maintain backward compatibility with optional parameters
Diagram Walkthrough
File Walkthrough
utils.py
Enhanced URL connectivity utility with configurable parameters
py/selenium/webdriver/common/utils.py
host
andscheme
optional parameters tois_url_connectable
functionurllib
module for URL handling