Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors setupmeta.run_program() and related SCM execution paths to use a structured RunResult (via subprocess.run()), while removing several legacy features (old setuptools hook alias, deprecated commands, and pygradle-style versioning) and updating tests/scenario fixtures accordingly.
Changes:
- Refactors program execution and git SCM interactions to consistently return/consume
RunResultobjects. - Removes legacy commands (
entrypoints,cleanall), old setuptools v50registerhook alias, and pygradle versioning support. - Updates tests, scenario outputs, documentation, and CI workflows to match the new behavior.
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Adds wheel for py37 and adjusts coverage config paths/output. |
| tests/test_versioning.py | Updates expectations/log capture around tracing + SCM behavior changes. |
| tests/test_setup_py.py | Moves legacy setup.py execution tests into a dedicated test module. |
| tests/test_scm.py | Updates SCM tests for new output/warning/RunResult behavior. |
| tests/test_scenarios.py | Uses setupmeta.run_program() for adhoc scenario replay and sets env flags via monkeypatch. |
| tests/test_model.py | Removes pygradle version env test and related imports. |
| tests/test_content.py | Removes tests for removed helpers (decode, which, legacy run_program API) and updates listify coverage. |
| tests/test_commands.py | Updates console width test and removes cleanall command test. |
| tests/scenarios/via_req_files/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/simple-src/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/readmes/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/pinned/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/packaged/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/disabled/expected.txt | Removes entrypoints and cleanall expectations from disabled scenario. |
| tests/scenarios/disabled/.commands | Drops cleanall from scenario command list. |
| tests/scenarios/complex-reqs/expected.txt | Removes entrypoints output from scenario expectations. |
| tests/scenarios/bogus/setup.py | Adjusts bogus versioning data shape used by scenarios. |
| tests/scenarios/bogus/expected.txt | Updates expected output/error text for new bump error messaging and removed commands. |
| tests/scenarios/README.rst | Updates scenario docs to reflect command set run during scenario tests. |
| tests/scenarios.py | Updates scenario runner (command list, git wrapper, preparation logging, replay diff handling). |
| tests/conftest.py | Refactors git helpers, output capture helpers, and output cleaning around RunResult. |
| setupmeta/versioning.py | Tightens format parsing and updates bump error messaging; removes pygradle env support. |
| setupmeta/scm.py | Refactors git execution into run_git()/git_output(), adds ignore/warn behavior, adds diff report API. |
| setupmeta/model.py | Removes explicitness tracking from definitions and simplifies get_pip() import probing. |
| setupmeta/hook.py | Removes deprecated setuptools v50 register alias hook. |
| setupmeta/commands.py | Removes legacy commands and adjusts git status display to use new diff reporting API. |
| setupmeta/init.py | Refactors run_program() to return RunResult, adds path caching, updates tracing and console width detection. |
| setup.py | Removes entrypoints for deleted commands and modernizes bootstrap subprocess handling; sets setuptools minimum. |
| pyproject.toml | Disables TD rule selection (commented out). |
| examples/via-cfg/expected.txt | Removes entrypoints output from example expectations. |
| examples/single/expected.txt | Removes entrypoints output from example expectations. |
| examples/hierarchical/expected.txt | Removes entrypoints output from example expectations. |
| examples/direct/expected.txt | Removes entrypoints output from example expectations. |
| docs/versioning.rst | Documents tag matching behavior change trajectory and clarifies historical defaults. |
| docs/commands.rst | Removes documentation for deleted cleanall and entrypoints commands. |
| HISTORY.rst | Updates 3.9.0 release notes to reflect removed features and refactors. |
| .github/workflows/tests.yml | Changes git identity used during CI runs. |
| .github/workflows/release.yml | Changes git identity used during release workflow runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed commands:
entrypoints,cleanallRemoved old
registerhook used with setuptools v50Removed support for pygradle-style versioning
Refactored usage of
subrocess.run(), removed last left overs from the py2 days