Skip to content

SG-38306 Remove Python 2 - Part 10 - SSL #372

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

Open
wants to merge 6 commits into
base: SG-38306-python2-removal-six
Choose a base branch
from

Conversation

julien-lang
Copy link
Contributor

@julien-lang julien-lang commented Feb 25, 2025

@julien-lang julien-lang changed the title SG-38306 Break Python 2 compatibility SG-38306 Remove Python 2 compatibility Feb 25, 2025
@julien-lang julien-lang force-pushed the ticket/SG-38306-python2-removal branch from 22e8204 to c96c047 Compare February 26, 2025 17:43
@chadrik
Copy link

chadrik commented Jun 17, 2025

It would be great to see this merged

@chadrik
Copy link

chadrik commented Jun 17, 2025

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

@julien-lang
Copy link
Contributor Author

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-lang julien-lang force-pushed the ticket/SG-38306-python2-removal branch from 413afc6 to 74a0494 Compare July 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
Contributor Author

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-lang julien-lang requested a review from Copilot July 18, 2025 11:13
@julien-lang julien-lang marked this pull request as ready for review July 18, 2025 11:13
Copy link
Contributor

@Copilot 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 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
File Description
shotgun_api3/shotgun.py Removes SSL validation fallback logic, simplifies HTTPS handler, updates user agent generation
tests/test_client.py Updates test assertions to match new user agent format without SSL validation status
tests/test_api.py Removes tests for SHA-2 SSL error handling and validation fallback behavior
docs/reference.rst Removes documentation reference to NO_SSL_VALIDATION constant
docs/advanced/iron_python.rst Moves SSL-related workaround documentation to legacy section

@julien-lang julien-lang requested a review from a team July 18, 2025 11:20
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.

2 participants