Skip to content

Conversation

@julien-lang
Copy link
Member

@julien-langjulien-lang commented Feb 25, 2025

@julien-langjulien-lang changed the title SG-38306 Break Python 2 compatibilitySG-38306 Remove Python 2 compatibilityFeb 25, 2025
@julien-langjulien-langforce-pushed the ticket/SG-38306-python2-removal branch from 22e8204 to c96c047CompareFebruary 26, 2025 17:43
@chadrik
Copy link

It would be great to see this merged

@chadrik
Copy link

What is the oldest version of python that is officially supported by this API?

@julien-lang
Copy link
MemberAuthor

What is the oldest version of python that is officially supported by this API?

The oldest supported Python version is 3.9.

It would be great to see this merged

We are working on it but it is not done yet. It will take us a few more month to finish and merge it.

@julien-langjulien-langforce-pushed the ticket/SG-38306-python2-removal branch from 8c8a8fa to 6492b21CompareJuly 16, 2025 13:22
@julien-langjulien-langforce-pushed the SG-38306-python2-removal-six branch from 4961679 to 9a131faCompareJuly 17, 2025 19:25
@julien-langjulien-langforce-pushed the ticket/SG-38306-python2-removal branch from 413afc6 to 74a0494CompareJuly 17, 2025 19:34
Comment on lines -3846 to -3850
# This is the exact same block as the "except Exception" bellow.
# We need to do it here because the next except will match it
# otherwise and will not re-attempt.
# When we drop support of Python 2 and we will probably drop the
# next except, we might want to remove this except too.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is not accurate anymore after #379. So we remove the comment but keep the block.

@julien-langjulien-lang requested a review from CopilotJuly 18, 2025 11:13
@julien-langjulien-lang marked this pull request as ready for review July 18, 2025 11:13
Copy link
Contributor

CopilotAI 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 removes Python 2 support by simplifying SSL handling, eliminating the SSL validation fallback mechanism and custom CA store implementation that was needed for older Python versions. This is part of a series of PRs modernizing the codebase for Python 3 only.

  • Removes the global NO_SSL_VALIDATION flag and related SSL validation fallback logic
  • Simplifies HTTPS handler to use modern Python 3 SSL context creation
  • Updates user agent strings to remove SSL validation status indicators

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
shotgun_api3/shotgun.pyRemoves SSL validation fallback logic, simplifies HTTPS handler, updates user agent generation
tests/test_client.pyUpdates test assertions to match new user agent format without SSL validation status
tests/test_api.pyRemoves tests for SHA-2 SSL error handling and validation fallback behavior
docs/reference.rstRemoves documentation reference to NO_SSL_VALIDATION constant
docs/advanced/iron_python.rstMoves SSL-related workaround documentation to legacy section

@julien-langjulien-lang requested a review from a teamJuly 18, 2025 11:20
Copy link
Contributor

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 SG-38306-python2-removal-six to masterSeptember 10, 2025 22:07
@eduardoChaucaGallegoseduardoChaucaGallegos dismissed stale reviews from carlos-villavicencio-adsk and themself September 10, 2025 22:07

The base branch was changed.

@eduardoChaucaGallegoseduardoChaucaGallegos merged commit 0a03a6b into masterSep 10, 2025
22 checks passed
@eduardoChaucaGallegoseduardoChaucaGallegos deleted the ticket/SG-38306-python2-removal branch September 10, 2025 22:51
julien-lang added a commit that referenced this pull request Oct 15, 2025
julien-lang added a commit that referenced this pull request Oct 16, 2025
* Renove unused CACertsHTTPSConnection class Should have been removed in #372 * Update shotgun_api3/shotgun.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Sign up for freeto 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.

5 participants

@julien-lang@chadrik@carlos-villavicencio-adsk@eduardoChaucaGallegos