[py] Add --selenium-version to Selenium Manager args
User description
DON'T MERGE UNTIL #15755 IS COMPLETE!!!
(it will probably fail CI until then)
🔗 Related Issues
This implements the Python portion of #15754 This corresponds to the change in #15755
💥 What does this PR do?
This PR adds the --selenium-version argument when calling the Selenium Manager binary.
💡 Additional Considerations
Our current process is to bump the version number after a release.
i.e. Currently the latest released version is 4.38.0 and the development version is 4.39.0.202510242320. Next release will be 4.39.0.
This is pretty confusing, and nightly builds and development versions will be reporting stats to plausible corresponding to version 4.39.0.XXXXXXXXXXXX, even though 4.39.0 has not been released.
Do we really want that, or should be reconsider how we number development versions? I don't know how other languages usually handle this, but the convention in Python would be to append dev to the version number while in development.
i.e. After 4.38.0 is released, the version gets bumped to 4.39.dev until 4.39.0 is released.
https://packaging.python.org/en/latest/specifications/version-specifiers/#development-release-separators
🔄 Types of changes
- New feature (non-breaking change which adds functionality and tests!)
PR Type
Enhancement
Description
-
Adds
--selenium-versionargument to Selenium Manager binary calls -
Passes current Python Selenium version to Selenium Manager
-
Imports VERSION from selenium.webdriver module
-
Updates method docstring to reflect actual functionality
Diagram Walkthrough
flowchart LR
A["SeleniumManager.binary_paths()"] -->|imports| B["VERSION from selenium.webdriver"]
A -->|appends args| C["--selenium-version"]
C -->|passes| D["VERSION to Selenium Manager binary"]
File Walkthrough
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
| Security Compliance | |
| 🟢 | No security concerns identifiedNo security vulnerabilities detected by AI analysis. Human verification advised for critical code. |
| Ticket Compliance | |
| ⚪ | 🎫 No ticket provided
|
| Codebase Duplication Compliance | |
| ⚪ | Codebase context is not definedFollow the guide to enable codebase context checks. |
| Custom Compliance | |
| 🟢 |
Generic: Meaningful Naming and Self-Documenting CodeObjective: Ensure all identifiers clearly express their purpose and intent, making code Status: Passed
|
Generic: Secure Error HandlingObjective: To prevent the leakage of sensitive system information through error messages while Status: Passed
| |
Generic: Secure Logging PracticesObjective: To ensure logs are useful for debugging and auditing without exposing sensitive Status: Passed
| |
| ⚪ | Generic: Comprehensive Audit TrailsObjective: To create a detailed and reliable record of critical system actions for security analysis Status: Referred Code
|
Generic: Robust Error Handling and Edge Case ManagementObjective: Ensure comprehensive error handling that provides meaningful context and graceful Status: Referred Code
| |
Generic: Security-First Input Validation and Data HandlingObjective: Ensure all data inputs are validated, sanitized, and handled securely to prevent Status: Referred Code
| |
| |
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| Possible issue |
Avoid a potential circular importTo avoid a potential circular dependency, move the import of py/selenium/webdriver/common/selenium_manager.py [27-59]
Suggestion importance[1-10]: 8__ Why: The suggestion correctly identifies a potential circular import, which could cause a runtime | Medium |
| ||
Thanks for the PR, @cgoldberg!
The Python code looks good to me, but as explained in the additional considerations notes, the versioning of the development releases can be confusing. In my opinion, it would be better if unstable versions ended in "-dev" (or "-snapshot" or similar) rather than a number. But I don't know if that is very difficult to change. Also, I am unsure of the motivation for using that version number for unstable releases.