Skip to content

refactor: remove unused PYTEST_VERSION and packaging import#141

Merged
edgarrmondragon merged 2 commits into
mainfrom
remove-unused-pytest-version
Jun 17, 2026
Merged

refactor: remove unused PYTEST_VERSION and packaging import#141
edgarrmondragon merged 2 commits into
mainfrom
remove-unused-pytest-version

Conversation

@henryiii

@henryiii henryiii commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Did a quick scan of the repo, this came up.

🤖 AI text below 🤖

PYTEST_VERSION was computed in plugin.py but never referenced. The plugin handles pytest 7/8/9 differences by duck-typing on report.longrepr rather than branching on a version check, so the constant was dead code.

Removing it also drops the runtime from packaging import version import. packaging is not a declared dependency of this package — it was only available transitively via pytest — so the plugin no longer relies on an undeclared import. (plugin_test.py keeps its own PYTEST_VERSION, which is used to skip the subtests test on pytest < 9.)

Test suite passes unchanged.

`PYTEST_VERSION` was computed but never referenced in the plugin;
pytest version differences are handled by duck-typing on
`report.longrepr` instead. Removing it also drops the runtime import
of `packaging`, which is not a declared dependency (it was only
available transitively via pytest).

Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii force-pushed the remove-unused-pytest-version branch from cdea5e2 to 7161970 Compare June 17, 2026 21:35
@edgarrmondragon edgarrmondragon merged commit c28d7ab into main Jun 17, 2026
15 checks passed
@edgarrmondragon edgarrmondragon deleted the remove-unused-pytest-version branch June 17, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants