Skip to content

SG-43906 Remove Python 3.7/3.8 compatibility code#454

Open
stevelittlefish wants to merge 1 commit into
masterfrom
sg-43906-remove-py37-support
Open

SG-43906 Remove Python 3.7/3.8 compatibility code#454
stevelittlefish wants to merge 1 commit into
masterfrom
sg-43906-remove-py37-support

Conversation

@stevelittlefish

Copy link
Copy Markdown

Summary

  • Simplify the version guard in shotgun_api3/__init__.py to a single 3.9 check, matching the pattern already adopted in tk-core (c6204ccd).
  • Remove the dead pre-3.8 branch in Shotgun._split_url(), which used the deprecated urllib.parse.splituser. setup.py already requires python_requires>=3.9.0, so both the old <3.7 hard-block/<3.9 warning split and the <3.8 URL-parsing branch were unreachable.

Test plan

  • python3 -m pytest tests/test_unit.py — 34 passed
  • Manual check of _split_url against the exact cases in tests/test_client.py::test_split_url (auth+port, port only, no auth, numeric-only auth) — all match expected output
  • tests/test_client.py::test_split_url itself requires a live Shotgun site config not available in this environment — please run in CI

Part of epic SG-36195.

🤖 Generated with Claude Code

- Simplify the version guard in shotgun_api3/__init__.py to a single
  3.9 check, matching the pattern already adopted in tk-core.
- Remove the dead pre-3.8 branch in Shotgun._split_url(), which used
  the deprecated urllib.parse.splituser. setup.py already requires
  python_requires>=3.9.0, so both branches were unreachable.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.83%. Comparing base (db056df) to head (49c0c3b).

Files with missing lines Patch % Lines
shotgun_api3/__init__.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #454      +/-   ##
==========================================
+ Coverage   78.76%   78.83%   +0.06%     
==========================================
  Files           7        7              
  Lines        1851     1847       -4     
==========================================
- Hits         1458     1456       -2     
+ Misses        393      391       -2     
Flag Coverage Δ
Linux 78.83% <90.90%> (+0.06%) ⬆️
Python-3.10 78.77% <90.90%> (+0.06%) ⬆️
Python-3.11 78.77% <90.90%> (+0.06%) ⬆️
Python-3.13 78.77% <90.90%> (+0.06%) ⬆️
Python-3.9 78.76% <90.90%> (+0.06%) ⬆️
Windows 78.89% <100.00%> (+0.03%) ⬆️
macOS 78.83% <90.90%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stevelittlefish
stevelittlefish requested a review from a team July 17, 2026 10:31

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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