-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[py]: replace dead battery imghdr with filetype #14771
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
As CI result, need to run ./scripts/format.sh once |
@VietND96 ran the formatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@AutomatedTester PTAL.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Closes #14765
imghdr
module will be a dead battery starting with Python 3.13, replaced the tests to usefiletype
insteadTypes of changes
Checklist
PR Type
Bug fix, Enhancement
Description
imghdr
module withfiletype
for image type checking in various screenshot tests.filetype.guess
.filetype
as a dependency inrequirements.txt
and Bazel build configuration.cryptography
anddebugpy
versions in the lock file and removed unused dependencies.Changes walkthrough 📝
takes_screenshots_tests.py
Replace `imghdr` with `filetype` in screenshot tests
py/test/selenium/webdriver/common/takes_screenshots_tests.py
imghdr
withfiletype
for image type checking.filetype.guess
for MIME type validation.ff_takes_full_page_screenshots_tests.py
Update full page screenshot tests to use `filetype`
py/test/selenium/webdriver/firefox/ff_takes_full_page_screenshots_tests.py
imghdr
withfiletype
for full page screenshot tests.filetype.guess
for MIME type validation.remote_connection_tests.py
Use `filetype` for image type checking in remote tests
py/test/selenium/webdriver/remote/remote_connection_tests.py
imghdr
withfiletype
for remote connection tests.filetype.guess
for MIME type validation.BUILD.bazel
Add `filetype` to Bazel test dependencies
py/BUILD.bazel
filetype
as a new test dependency.requirements.txt
Add `filetype` to Python requirements
py/requirements.txt
filetype==1.2.0
to the requirements.requirements_lock.txt
Update locked dependencies and add `filetype`
py/requirements_lock.txt
cryptography
anddebugpy
versions.filetype
with specific hashes.jeepney
andsecretstorage
.