Skip to content

Extend instance method fixture deprecation to all higher scopes#14774

Open
The-Compiler wants to merge 1 commit into
pytest-dev:mainfrom
The-Compiler:deprecate-class-fixt-higher-scope
Open

Extend instance method fixture deprecation to all higher scopes#14774
The-Compiler wants to merge 1 commit into
pytest-dev:mainfrom
The-Compiler:deprecate-class-fixt-higher-scope

Conversation

@The-Compiler

Copy link
Copy Markdown
Member

The original deprecation in #14071 only targetted class-scoped fixtures, but the same issue exists if someone implements a module/package/session-scoped fixture as an instance method.

@The-Compiler
The-Compiler requested a review from nicoddemus July 24, 2026 08:22
@The-Compiler
The-Compiler force-pushed the deprecate-class-fixt-higher-scope branch 2 times, most recently from fe8223a to 7416018 Compare July 24, 2026 09:12
@The-Compiler
The-Compiler force-pushed the main branch 2 times, most recently from cb2ee5b to ced9022 Compare July 24, 2026 09:22
The original deprecation in pytest-dev#14071 only targetted class-scoped fixtures,
but the same issue exists if someone implements a module/package/session-scoped
fixture as an instance method.

Closes pytest-dev#14765
@The-Compiler
The-Compiler force-pushed the deprecate-class-fixt-higher-scope branch from 7416018 to 78a1938 Compare July 24, 2026 09:25
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 24, 2026

@bluetech 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.

Good catch, thanks. These are less common which is why we didn't think about it.

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