Skip to content

Comments

doc: fix removed pytest.config reference in historical-notes#14216

Open
cluster2600 wants to merge 2 commits intopytest-dev:mainfrom
cluster2600:fix-historical-notes-pytest-config-removed
Open

doc: fix removed pytest.config reference in historical-notes#14216
cluster2600 wants to merge 2 commits intopytest-dev:mainfrom
cluster2600:fix-historical-notes-pytest-config-removed

Conversation

@cluster2600
Copy link

Summary

The documentation on "Conditions as strings instead of booleans" in historical-notes.rst showed pytest.config.getvalue() as the "modern equivalent" of string-based skipif conditions. However, pytest.config was removed in pytest 5.0 (see deprecations page).

This led readers to believe they could use pytest.config as a current approach when in fact it no longer exists.

Changes

  • Replaced the broken pytest.config.getvalue() code example with a working modern equivalent using request.config.getoption() in an autouse fixture.
  • Added a note explaining that pytest.config was removed in pytest 5.0 and linking to the deprecations page.
  • Updated the second note to reference request.config.getoption() instead of the removed API.

Fixes #12377

cluster2600 and others added 2 commits February 19, 2026 15:13
pytest.config was removed in pytest 5.0, but the documentation on
'Conditions as strings instead of booleans' still showed it as the
modern equivalent of string-based skipif conditions.

Replace the broken example with the current recommended approach using
request.config (via an autouse fixture), and add a note pointing to
the removal notice in the deprecations page.

Fixes pytest-dev#12377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Conditions as strings instead of booleans" docs act like pytest.config is still a thing

1 participant