GH-49046: [Dev][Python] Remove unused scripts under python/scripts - #50640
Conversation
test_imports.py and test_leak.py are leftovers from an older test layout. Neither is referenced by CI, packaging or the pytest suite, and neither is documented. Their test_-prefixed names have also caused accidental pytest collection in the past (ARROW-1033). The remaining scripts in that directory are untouched: run_emscripten_tests.py is invoked from ci/scripts/python_test_emscripten.sh, and update_stub_docstrings.py is used to refresh type stub docstrings.
|
|
|
This removes both scripts, matching the direction in the issue (#49046) test_leak.py was mentioned as potentially useful as a snippet showing how to check for leaks, if documented. This PR removes it, following the "I would probably remove them" comment. |
|
|
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit eb19b7f. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
Resolves #49046
python/scripts/test_imports.pyandpython/scripts/test_leak.pyare leftovers from an oldertest layout. They are not referenced by CI, packaging or the pytest suite, and are not
documented anywhere. Their
test_-prefixed names have also caused accidental pytest collectionin the past (ARROW-1033). This follows the suggestion on the issue to remove them.
Deletes
python/scripts/test_imports.pyandpython/scripts/test_leak.py.The other two scripts in that directory are untouched and still in use:
run_emscripten_tests.py(invoked fromci/scripts/python_test_emscripten.sh) andupdate_stub_docstrings.py.The issue description raised the option of keeping
test_leak.pyas a documented snippet forchecking leaks. This PR removes it, following the later comment. Happy to restore and document
it under the developer docs instead if reviewers prefer.
Are these changes tested?
No new tests, this only removes files that nothing references. I grepped
ci/,dev/,python/setup.py,python/pyproject.tomlandpython/MANIFEST.infor references and foundnone. The only remaining mention in the repository is a historical
CHANGELOG.mdentry forARROW-1033, left as is.
Are there any user-facing changes?
No.
AI usage disclosure
I used Claude Code to grep the repository for remaining references to the two scripts and to
help draft this description. The change itself is a two file deletion, and I reviewed both the
search results and the diff.