Skip to content

Deprecate self in class-scoped fixtures on base classes (#10819) (#14011)#14071

Merged
nicoddemus merged 6 commits into
pytest-dev:mainfrom
yastcher:fix/14011-10819-correct-class-fixtures
May 14, 2026
Merged

Deprecate self in class-scoped fixtures on base classes (#10819) (#14011)#14071
nicoddemus merged 6 commits into
pytest-dev:mainfrom
yastcher:fix/14011-10819-correct-class-fixtures

Conversation

@yastcher
Copy link
Copy Markdown
Contributor

@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch 3 times, most recently from 6c5967f to 9772d0c Compare December 28, 2025 17:21
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Dec 28, 2025
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch from 9772d0c to acd357c Compare December 29, 2025 18:41
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch from acd357c to ff1759c Compare January 12, 2026 02:25
Comment thread testing/test_inherit_class_fixture.py Outdated
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch 9 times, most recently from 98b0e10 to 395b55c Compare January 20, 2026 01:17
@yastcher yastcher changed the title correct-class-fixtures (#10819) (#14011) Resolves by deprecating the incorrect usage pattern and documenting the correct approach (#10819) (#14011) Jan 22, 2026
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch 3 times, most recently from d8935c9 to 959c305 Compare January 29, 2026 20:45
Comment thread src/_pytest/deprecated.py
Comment thread testing/test_inherit_class_fixture.py Outdated
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch from 959c305 to 1100ad2 Compare January 30, 2026 18:46
@yastcher yastcher requested a review from nicoddemus January 30, 2026 19:05
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch 2 times, most recently from 5cafff1 to 0f3894c Compare February 3, 2026 01:23
@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented Feb 3, 2026

Could you rephrase the PR title? It's rather vague.

@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch from 0f3894c to df2e44d Compare February 3, 2026 15:35
@yastcher yastcher changed the title Resolves by deprecating the incorrect usage pattern and documenting the correct approach (#10819) (#14011) Deprecate self in class-scoped fixtures on base classes (#10819) (#14011) Feb 3, 2026
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch 2 times, most recently from cdc35a9 to c03fb35 Compare February 10, 2026 19:15
@yastcher yastcher force-pushed the fix/14011-10819-correct-class-fixtures branch from c03fb35 to 15141ed Compare February 10, 2026 19:16
@nicoddemus nicoddemus enabled auto-merge (squash) May 14, 2026 13:22
@nicoddemus
Copy link
Copy Markdown
Member

Thanks @yastcher and sorry for the delay!

@nicoddemus nicoddemus merged commit 8571cf8 into pytest-dev:main May 14, 2026
33 checks passed
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.

Inherit fixture from baseclass with class scope fails Fixture with scope=class and autouse=True is not executed from mother's test class

4 participants