SG-38306 Python2 Removal - Part 2 - Easy ones#399
Merged
eduardoChaucaGallegos merged 10 commits intomasterfrom Sep 10, 2025
Merged
SG-38306 Python2 Removal - Part 2 - Easy ones#399eduardoChaucaGallegos merged 10 commits intomasterfrom
eduardoChaucaGallegos merged 10 commits intomasterfrom
Conversation
This was referenced Jul 16, 2025
Merged
Contributor
There was a problem hiding this comment.
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/strand 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
byteskeys 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>
eduardoChaucaGallegos
previously approved these changes
Jul 18, 2025
Base automatically changed from
ticket/SG-38306-python2-imports-order
to
master
September 10, 2025 13:01
The base branch was changed.
eduardoChaucaGallegos
approved these changes
Sep 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR orders