FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Handle --version eagerly to avoid loading the entire infrastructure by nicoddemus · Pull Request #13575 · pytest-dev/pytest · GitHub

Handle --version eagerly to avoid loading the entire infrastructure - #13575

Merged
nicoddemus merged 1 commit into
pytest-dev:mainfrom
nicoddemus:update-13480-changelog
Oct 11, 2025
Merged

Handle --version eagerly to avoid loading the entire infrastructure#13575
nicoddemus merged 1 commit into
pytest-dev:mainfrom
nicoddemus:update-13480-changelog

Conversation

Copy link
Copy Markdown
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 Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jun 28, 2025
Comment thread testing/test_config.py
@@ -612,20 +612,14 @@ def pytest_addoption(parser):
assert config.getini("custom") == "1"

def test_absolute_win32_path(self, pytester: Pytester) -> None:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

nicoddemus force-pushed the update-13480-changelog branch from 7bde507 to cdd40ed Compare July 26, 2025 01:06

bluetech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

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 force-pushed the update-13480-changelog branch from cdd40ed to 1315e7e Compare October 11, 2025 20:46
nicoddemus enabled auto-merge (squash) October 11, 2025 20:46
nicoddemus disabled auto-merge October 11, 2025 21:20
nicoddemus merged commit 661682c into pytest-dev:main Oct 11, 2025
32 of 33 checks passed
nicoddemus deleted the update-13480-changelog branch October 11, 2025 21:20
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Apr 11, 2026
nicoddemus added a commit that referenced this pull request Apr 21, 2026
nicoddemus added a commit that referenced this pull request Apr 21, 2026
This regressed in #13575.

Fixes #14381.

(cherry picked from commit d72943a)

Co-authored-by: Bruno Oliveira <bruno@pytest.org>
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

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


Back | FazBrowse Home | New Git URL