Skip to content

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Jan 29, 2026

Rationale for this change

Closes #2810, #393
Relates to #2743

This PR upgrades pytest to 9.0.2. In doing so, we also had to switch pytest-lazy-fixture to pytest-lazy-fixtures (notice the extra s) which is a maintained version https://github.com/dev-petrov/pytest-lazy-fixtures

Changed all references of pytest_lazyfixture to the new pytest_lazy_fixtures

Are these changes tested?

Are there any user-facing changes?

@kevinjqliu kevinjqliu changed the title Kevinjqliu/upgrade pytest infra: upgrade pytest and use pytest_lazy_fixtures Jan 29, 2026
Copy link
Contributor

@rambleraptor rambleraptor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a simple find and replace. Thanks for doing this!

Just for posterity: the new dependency is MIT licensed + had a release / commit within the last few months.



@pytest.fixture(
scope="session",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see scope="session" was removed from these fixtures, and the tests still pass was this not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removed because its references (random_table_identifier for example) is function scoped. so this needs to be function scoped too.

I think this is a new requirement from pytest-lazy-fixtures

Copy link
Contributor

@geruh geruh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM! Moving to tpytest-lazy-fixtures makes sense

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finding @kevinjqliu !

@kevinjqliu kevinjqliu requested a review from Fokko January 29, 2026 16:57
@kevinjqliu
Copy link
Contributor Author

thanks folks! truth me told, it was claudes idea to use pytest_lazy_fixtures 😄

@raulcd
Copy link
Member

raulcd commented Jan 29, 2026

thanks folks! truth me told, it was claudes idea to use pytest_lazy_fixtures 😄

I think is a great compromise. We could potentially still remove it in the future as shared here:
#2743

but that's a big refactor as we use it pretty extensively and I haven't found the time! Thanks for all the work you do!

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.

5 participants