-
Notifications
You must be signed in to change notification settings - Fork 205
SG-38306 Python2 Removal - Part 3 - Cleanup imports #400
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
base: ticket/SG-38306-python2-removal-future-wording
Are you sure you want to change the base?
SG-38306 Python2 Removal - Part 3 - Cleanup imports #400
Conversation
9850464
to
6e89b98
Compare
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
This PR is part of a Python 2 removal effort that focuses on cleaning up imports throughout the codebase. The changes replace deprecated six.moves
imports with their standard Python 3 equivalents, simplify base64 encoding logic, and remove legacy Python 2/3 compatibility code.
Key changes include:
- Replacing
six.moves
imports with direct Python 3 standard library imports - Simplifying base64 encoding by using
base64.encodebytes
directly - Removing deprecated JSON import fallback logic and Python 2/3 compatibility code
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/test_unit.py | Replaces six.moves.urllib with direct urllib.request and urllib.error imports |
tests/test_client.py | Removes JSON import fallback logic and base64 compatibility code, adds direct stdlib imports |
tests/test_api.py | Replaces six.moves imports with direct urllib imports |
tests/base.py | Adds direct configparser and json imports, removes Python 2.6 compatibility code |
shotgun_api3/shotgun.py | Major cleanup replacing six.moves imports with direct stdlib imports and simplifying base64 usage |
shotgun_api3/lib/mockgun/schema.py | Replaces six.moves.cPickle with direct pickle import |
docs/cookbook/examples/ami_handler.rst | Updates documentation example to use direct urllib.parse import |
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
six.moves
importsPR orders
WIP