Skip to content

SG-45235 Remove obsolete Python 2-era vendored unit-test dependency system - #1134

Open
julien-lang wants to merge 2 commits into
masterfrom
ticket/SG-45235-remove-vendored-test-deps
Open

julien-lang wants to merge 2 commits into
masterfrom
ticket/SG-45235-remove-vendored-test-deps

Conversation

@julien-lang

@julien-lang julien-lang commented Sep 14, 2026

Copy link
Copy Markdown
Member

Problem

tk-core carried a vendored third-party unit-test dependency system, a legacy standalone test runner, and a Python 3 compile-check that have all been dead for years. They were leftover scaffolding from a half-finished 2023 cleanup and only confused anyone touching the test setup.

Background

The tests/python/third_party mechanism dates back to 2017 and was a Python 2-era design: test dependencies (coverage, unittest2, mock, setuptools) were committed into the repo so the suite could run under the pip-less Python shipped with Desktop. In 2023 the committed third_party/ folder was deleted and gitignored, and testing moved to pytest + pip via tk-toolchain, but the surrounding scaffolding, the legacy run_tests.* runner, and the compile_python3.* scripts were never removed. None of them are referenced by CI (tk-ci-tools) or azure-pipelines.yml.

Changes

  • Delete tests/python/requirements.txt, tests/python/upgrade_third_party.sh, and tests/python/README.md.
  • Remove the dead third_party sys.path insertion in tests/run_tests.py and the PYTHONPATH entry in tests/integration_tests/run_integration_tests.py.
  • Remove the tests/python/third_party entries from .gitignore and .gitattributes.
  • Delete the legacy unittest runner: tests/run_tests.py, run_tests.sh, run_tests.bat.
  • Delete the obsolete tests/compile_python3.sh / compile_python3.bat Python 3 compile-check.
  • Rewrite tests/README.md to document running the suite with pytest via tk-toolchain.

No functional change: CI already runs the tests via pytest with pip-installed coverage, and the removed paths/scripts were inert or unreferenced.

Testing

  • pre-commit passes on the changed files.
  • CI (pytest) exercises the suite; the removed runner and compile scripts were not part of CI.

Related

Copilot AI 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.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Removes obsolete Python 2-era vendored test dependency scaffolding and dead path references.

Changes:

  • Deletes legacy dependency files and updater documentation.
  • Removes obsolete third_party path entries.
  • Cleans related ignore rules and test documentation.
File summaries
File Description
tests/run_tests.py Removes obsolete vendored path insertion.
tests/README.md Removes outdated setup instructions.
tests/python/upgrade_third_party.sh Deletes unused updater script.
tests/python/requirements.txt Deletes obsolete dependency list.
tests/python/README.md Deletes obsolete dependency documentation.
tests/integration_tests/run_integration_tests.py Removes obsolete PYTHONPATH entry.
.gitignore Removes obsolete ignore rule.
.gitattributes Removes obsolete attribute rule.
Review details
  • Files reviewed: 7/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.11%. Comparing base (889c1cd) to head (51f2356).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1134      +/-   ##
==========================================
+ Coverage   80.09%   80.11%   +0.02%     
==========================================
  Files         203      203              
  Lines       19537    19537              
==========================================
+ Hits        15649    15653       +4     
+ Misses       3888     3884       -4     
Flag Coverage Δ
Linux 79.54% <ø> (ø)
Python-3.10 79.92% <ø> (+0.01%) ⬆️
Python-3.11 79.82% <ø> (+0.01%) ⬆️
Python-3.13 79.81% <ø> (ø)
Python-3.9 79.87% <ø> (ø)
Windows 79.58% <ø> (+0.02%) ⬆️
macOS 79.51% <ø> (ø)

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.

@julien-lang
julien-lang marked this pull request as ready for review September 15, 2026 20:20
@julien-lang
julien-lang requested review from a team, carlos-villavicencio-adsk, stevelittlefish and yungsiow and removed request for yungsiow September 15, 2026 20: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.

3 participants