Conversation
Pillow DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
plex.tv/devices.xml no longer returns the device token Ref.: https://forums.plex.tv/t/information-related-to-security-vulnerabilities/935164/17
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix three test-related issues: changing a Pillow API method call, marking a flaky test as xfail, and refactoring the JWT login test to not depend on the createMyPlexDevice utility function. However, one of the changes introduces a critical bug.
Changes:
- Added
@pytest.mark.xfailto the on-demand subtitles test to handle intermittent OpenSubtitles timeouts - Refactored JWT login test to manually create device using
MyPlexPinLogininstead ofcreateMyPlexDevicehelper - Attempted to update Pillow API from
getdata()toget_flattened_data()(this is incorrect)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_video.py | Marks flaky OpenSubtitles test as expected failure |
| tests/test_myplex.py | Refactors JWT test to manually implement device creation/deletion with MyPlexPinLogin and generateUUID |
| tests/conftest.py | Attempts to change Pillow Image API method (introduces a bug) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bias = ImageStat.Stat(thumb).mean[:3] | ||
| bias = [b - sum(bias) / 3 for b in bias] | ||
| for pixel in thumb.getdata(): | ||
| for pixel in thumb.get_flattened_data(): |
There was a problem hiding this comment.
The method get_flattened_data() does not exist in the Pillow (PIL) library. The correct method is getdata(), which returns a sequence of pixel values. This change will cause a runtime AttributeError when the function is called. The original code using thumb.getdata() was correct and should be reverted.
| for pixel in thumb.get_flattened_data(): | |
| for pixel in thumb.getdata(): |
Description
Image.getdata()toImage.get_flattened_data()Type of change
Please delete options that are not relevant.
Checklist: