Skip to content

Conversation

@julien-lang julien-lang requested a review from Copilot July 17, 2025 13:58
Copy link
Contributor

Copilot AI left a 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 core shotgun.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 for encode() that pass bytes and non-str types to ensure correct behavior.
        for key, value in params:

@julien-lang julien-lang marked this pull request as ready for review July 17, 2025 14:01
@julien-lang julien-lang requested a review from a team July 17, 2025 14:09
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from ticket/SG-38306-python2-imports-order to master September 10, 2025 13:01
@eduardoChaucaGallegos eduardoChaucaGallegos dismissed stale reviews from carlos-villavicencio-adsk and themself September 10, 2025 13:01

The base branch was changed.

@eduardoChaucaGallegos eduardoChaucaGallegos merged commit d3809cd into master Sep 10, 2025
22 checks passed
@eduardoChaucaGallegos eduardoChaucaGallegos deleted the ticket/SG-38306-python2-removal-future-wording branch September 10, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants