Skip to content

Conversation

nicoddemus
Copy link
Member

Currently, handling --version in pytest_cmdline_main requires loading the entire infrastructure, which can be slow depending on the installed plugins.

This change introduces a marginal behavioral difference, though it should not cause any issues in practice.

Fixes #13574

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jun 28, 2025
@@ -612,20 +612,14 @@ def pytest_addoption(parser):
assert config.getini("custom") == "1"

def test_absolute_win32_path(self, pytester: Pytester) -> None:
Copy link
Member Author

Choose a reason for hiding this comment

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

I tracked this test to this changelog entry:

* Fix win32 path issue when puttinging custom config file with absolute path 
  in ``pytest.main("-c your_absolute_path")``.

Seems --version being in the config file has nothing to do with the original issue.

Currently, handling `--version` in `pytest_cmdline_main` requires loading the entire infrastructure, which can be slow depending on the installed plugins.

This change introduces a marginal behavioral difference, though it should not cause any issues in practice.

Fixes pytest-dev#13574
@nicoddemus nicoddemus force-pushed the update-13480-changelog branch from 7bde507 to cdd40ed Compare July 26, 2025 01:06
Copy link
Member

@bluetech bluetech left a comment

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
bot:chronographer:provided (automation) changelog entry is part of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytest --version should not load all plugins
2 participants