Skip to content

fix: avoid deprecated class-scoped fixture instance method - #2746

Open
RblxDev-ALS wants to merge 1 commit into
facebook:mainfrom
RblxDev-ALS:fix/pytest-class-fixture
Open

RblxDev-ALS wants to merge 1 commit into
facebook:mainfrom
RblxDev-ALS:fix/pytest-class-fixture

Conversation

@RblxDev-ALS

Copy link
Copy Markdown

Make TestProphetCopy.data a static method because it does not use instance state. This removes the class-scoped instance-method fixture warning introduced in pytest 9.1 and avoids the planned pytest 10 incompatibility without changing fixture scope or data.

Validated on Windows with Python 3.14.5 and pytest 9.1.1 against this checkout's Python source, using the unchanged Stan model's compiled runtime from the Prophet 1.4.0 wheel:

  • Before: diagnostics suite — 27 passed, 1 PytestRemovedIn10Warning.
  • After: python -m pytest prophet/tests/test_diagnostics.py -q -W error::pytest.PytestRemovedIn10Warning — 27 passed, no warnings.

A fresh source build and the full test suite were not run locally.

@meta-cla meta-cla Bot added the CLA Signed label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant