Skip to content

Consider entry points for PYTEST_PLUGINS and pytest_plugins#14752

Merged
Zac-HD merged 1 commit into
pytest-dev:mainfrom
Zac-HD:claude/pytest-pr-12616-k87kaq
Jul 22, 2026
Merged

Consider entry points for PYTEST_PLUGINS and pytest_plugins#14752
Zac-HD merged 1 commit into
pytest-dev:mainfrom
Zac-HD:claude/pytest-pr-12616-k87kaq

Conversation

@Zac-HD

@Zac-HD Zac-HD commented Jul 21, 2026

Copy link
Copy Markdown
Member

The PYTEST_PLUGINS environment variable and the pytest_plugins global variable previously accepted only importable module names, while the -p command-line option also accepted entry point names of installed plugins.

Pass consider_entry_points=True when importing plugin specs so that all three mechanisms behave consistently (fixes #12624). As a side effect, plugins specified by entry point name through these mechanisms now show up in the 'plugins:' line of the terminal header and in --traceconfig output, since entry-point loading records distribution info (fixes #12615).

Based on the original implementation by Marcel Telka, and thus closes #12616.

The PYTEST_PLUGINS environment variable and the pytest_plugins global
variable previously accepted only importable module names, while the -p
command-line option also accepted entry point names of installed plugins.

Pass consider_entry_points=True when importing plugin specs so that all
three mechanisms behave consistently (pytest-dev#12624).  As a side effect, plugins
specified by entry point name through these mechanisms now show up in the
'plugins:' line of the terminal header and in --traceconfig output, since
entry-point loading records distribution info (pytest-dev#12615).

Based on the original implementation by Marcel Telka in pytest-dev#12616.

Co-authored-by: Marcel Telka <marcel@telka.sk>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Zac-HD
Zac-HD requested a review from RonnyPfannschmidt July 21, 2026 21:02
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 21, 2026
@Zac-HD
Zac-HD enabled auto-merge (squash) July 21, 2026 21:03
@Zac-HD
Zac-HD merged commit 198eff1 into pytest-dev:main Jul 22, 2026
36 checks passed
@Zac-HD
Zac-HD deleted the claude/pytest-pr-12616-k87kaq branch July 22, 2026 05:47
pld-gitsync pushed a commit to pld-linux/python3-pytest that referenced this pull request Jul 22, 2026
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.

Consider entry points for PYTEST_PLUGINS and pytest_plugins Plugins loaded via PYTEST_PLUGINS or pytest_plugins are not reported

3 participants