-
Notifications
You must be signed in to change notification settings - Fork 200
Tear out Python 2 remnants #1576
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
Conversation
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.
Pull request overview
Removes legacy Python 2 source-encoding declarations (# -*- coding: utf-8 -*-) across the codebase, relying on Python 3’s default UTF-8 source encoding.
Changes:
- Removed redundant UTF-8 encoding cookies from library modules, tools scripts, tests, and Sphinx config.
- Cleaned up leading blank lines where the encoding header had been the only content.
Reviewed changes
Copilot reviewed 60 out of 60 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/version_bump.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-teardowntest.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-refreshtoken.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-markwatched.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-listtokens.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-listsettings.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-listdocattrs.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-listattrs.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-gettoken.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-dummyfiles.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-download.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-bootstraptest.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-backupwatched.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-autodelete.py | Removes redundant UTF-8 encoding cookie. |
| tools/plex-alertlistener.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_video.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_utils.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_sonos.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_server.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_search.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_playqueue.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_playlist.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_photo.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_navigation.py | Removes redundant UTF-8 encoding cookie / cleans leading blank lines. |
| tests/test_myplex.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_mixins.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_misc.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_media.py | Removes redundant UTF-8 encoding cookie / cleans leading blank lines. |
| tests/test_library.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_history.py | Removes redundant UTF-8 encoding cookie / cleans leading blank lines. |
| tests/test_collection.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_client.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_audio.py | Removes redundant UTF-8 encoding cookie. |
| tests/test_actions.py | Removes redundant UTF-8 encoding cookie / cleans leading blank lines. |
| tests/test__prepare.py | Removes redundant UTF-8 encoding cookie. |
| tests/conftest.py | Removes redundant UTF-8 encoding cookie. |
| tests/init.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/video.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/utils.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/sync.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/sonos.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/settings.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/server.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/playqueue.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/playlist.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/photo.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/myplex.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/mixins.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/media.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/library.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/exceptions.py | Removes redundant UTF-8 encoding cookie / cleans leading blank lines. |
| plexapi/const.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/config.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/collection.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/client.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/base.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/audio.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/alert.py | Removes redundant UTF-8 encoding cookie. |
| plexapi/init.py | Removes redundant UTF-8 encoding cookie. |
| docs/conf.py | Removes redundant UTF-8 encoding cookie from Sphinx config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JonnyWong16
left a comment
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.
Thanks.
* Refactor mixins * Fix filtersDict type hint * Refactor all mixins into separate module and files * Remove file encoding Ref.: #1576
Remove all the
coding: utf-8Python 2 kludges which were still present in most files, Python 3 does not need this.