Skip to content

Conversation

@julien-langjulien-langforce-pushed the ticket/SG-38306-python2-removal-cleanup-imports branch from 9850464 to 6e89b98CompareJuly 17, 2025 14:12
@julien-langjulien-langforce-pushed the ticket/SG-38306-python2-removal-mimetypes branch from 33e5200 to c4d1e30CompareJuly 17, 2025 14:36
@julien-langjulien-lang marked this pull request as ready for review July 17, 2025 14:52
@julien-langjulien-lang requested a review from CopilotJuly 17, 2025 14:53
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 pull request removes the deprecated Python 2.7 copy of the mimetypes module as part of the Python 2 removal effort. The codebase now exclusively uses Python's default mimetypes module since there are no longer any known issues with it after the transition away from Python 2.

Key changes:

  • Removes the bundled Python 2.7 mimetypes module that was used to work around Windows-specific bugs in Python 2.7.0-2.7.9
  • Simplifies the mimetypes import logic to directly import the standard library module
  • Removes associated test code that was validating the conditional import behavior

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

FileDescription
shotgun_api3/lib/mimetypes.pyComplete removal of the bundled Python 2.7 mimetypes module (598 lines deleted)
shotgun_api3/shotgun.pySimplifies mimetypes import by removing conditional logic and directly importing standard library module
tests/test_unit.pyRemoves test class and import for the deprecated mimetypes fix functionality
shotgun_api3/lib/README.mdRemoves documentation section explaining the bundled mimetypes module and associated Python 2.7 Windows bugs

@julien-langjulien-lang requested a review from a teamJuly 17, 2025 14:54
Copy link
Contributor

Choose a reason for hiding this comment

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

🚢

Base automatically changed from ticket/SG-38306-python2-removal-cleanup-imports to masterSeptember 10, 2025 14:08
@eduardoChaucaGallegoseduardoChaucaGallegos dismissed stale reviews from carlos-villavicencio-adsk and themself September 10, 2025 14:08

The base branch was changed.

@eduardoChaucaGallegoseduardoChaucaGallegos merged commit 8c5ef90 into masterSep 10, 2025
22 checks passed
@eduardoChaucaGallegoseduardoChaucaGallegos deleted the ticket/SG-38306-python2-removal-mimetypes branch September 10, 2025 14:54
@eduardoChaucaGallegoseduardoChaucaGallegos restored the ticket/SG-38306-python2-removal-mimetypes branch September 10, 2025 16:54
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.

4 participants

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