Skip to content

[Ai slop]Deprecate and remove PytestPluginManager.getpluginIssue 5842 getplugin - #15188

Closed
gabrielesequeira wants to merge 4 commits into
pytest-dev:mainfrom
gabrielesequeira:issue-5842-getplugin
Closed

gabrielesequeira wants to merge 4 commits into
pytest-dev:mainfrom
gabrielesequeira:issue-5842-getplugin

Conversation

@gabrielesequeira

Copy link
Copy Markdown

Summary

This PR deprecates and removes PytestPluginManager.getplugin() in two steps:

  • Deprecation: Mark getplugin() as deprecated and migrate internal pytest usages to get_plugin().
  • Removal: Remove the deprecated method and its associated deprecation test.

This change completes the transition to get_plugin() as the supported API for retrieving registered plugins.

Testing

  • Configuration tests passed after both the deprecation and removal changes.
  • Related test suites were executed to check for regressions.
  • Some xdist integration tests failed because the installed pytest-xdist version still calls the removed getplugin() method.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Oct 16, 2026
@gabrielesequeira

Copy link
Copy Markdown
Author

Hi! While testing this change, I found that removing PytestPluginManager.getplugin() causes an internal error with Hypothesis 6.170.0, because its pytest plugin still calls getplugin("terminalreporter").

The relevant tests pass when the Hypothesis pytest plugin is disabled, but fail when it is enabled.

How would you recommend proceeding? Should this removal be coordinated with a fix in Hypothesis, or would it be better to postpone the removal until dependent plugins have migrated to get_plugin()?

Thanks for your guidance!

@RonnyPfannschmidt RonnyPfannschmidt changed the title Deprecate and remove PytestPluginManager.getpluginIssue 5842 getplugin [Ai slop]Deprecate and remove PytestPluginManager.getpluginIssue 5842 getplugin Oct 16, 2026
@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Its absolutely ludicrous to do deprecation then removal into a single pr

Deprecation and removal are months to years appart

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.

2 participants