-
Notifications
You must be signed in to change notification settings - Fork 205
SG-38306 Python2 Removal - Part 2 - Easy ones #399
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-imports-order
Are you sure you want to change the base?
SG-38306 Python2 Removal - Part 2 - Easy ones #399
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
This PR continues the removal of Python 2 compatibility code by dropping __future__
imports, cleaning up super()
calls, and replacing six
utilities and custom ensure_*
calls with native Python 3 constructs.
- Removed Python 2 shims (
__future__
,six
,ensure_*
) across tests and coreshotgun.py
- Simplified
super()
usage everywhere - Replaced binary/text conversions with native
bytes
/str
and updated payload encoding logic
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/test_proxy.py | Simplified super() calls |
tests/test_mockgun.py | Simplified super() calls |
tests/test_client.py | Replaced ensure_* in b64encode and test payloads |
tests/test_api_long.py | Removed __future__ import, swapped six.iteritems |
tests/test_api.py | Removed __future__ , replaced six.text_type/binary ; simplified paths and type checks |
tests/base.py | Simplified super() calls in base test classes |
shotgun_api3/shotgun.py | Removed six iteration, replaced ensure_* , reworked encoding/decoding, updated HTTP form encoding |
docs/reference.rst | Dropped outdated note about Python 2 text handling |
Comments suppressed due to low confidence (1)
shotgun_api3/shotgun.py:4765
- New branches handle
bytes
keys and values in form encoding; consider adding unit tests forencode()
that pass bytes and non-str types to ensure correct behavior.
for key, value in params:
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
PR orders
WIP