[py]: replace dead battery imghdr with filetype#14771
[py]: replace dead battery imghdr with filetype#14771VietND96 merged 3 commits intoSeleniumHQ:trunkfrom
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 |
VietND96
left a comment
There was a problem hiding this comment.
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
imghdrmodule will be a dead battery starting with Python 3.13, replaced the tests to usefiletypeinsteadTypes of changes
Checklist
PR Type
Bug fix, Enhancement
Description
imghdrmodule withfiletypefor image type checking in various screenshot tests.filetype.guess.filetypeas a dependency inrequirements.txtand Bazel build configuration.cryptographyanddebugpyversions in the lock file and removed unused dependencies.Changes walkthrough 📝
takes_screenshots_tests.py
Replace `imghdr` with `filetype` in screenshot testspy/test/selenium/webdriver/common/takes_screenshots_tests.py
imghdrwithfiletypefor image type checking.filetype.guessfor 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
imghdrwithfiletypefor full page screenshot tests.filetype.guessfor MIME type validation.remote_connection_tests.py
Use `filetype` for image type checking in remote testspy/test/selenium/webdriver/remote/remote_connection_tests.py
imghdrwithfiletypefor remote connection tests.filetype.guessfor MIME type validation.BUILD.bazel
Add `filetype` to Bazel test dependenciespy/BUILD.bazel
filetypeas a new test dependency.requirements.txt
Add `filetype` to Python requirementspy/requirements.txt
filetype==1.2.0to the requirements.requirements_lock.txt
Update locked dependencies and add `filetype`py/requirements_lock.txt
cryptographyanddebugpyversions.filetypewith specific hashes.jeepneyandsecretstorage.