Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn a few verb-only pytest fixtures into standard functions #4763

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Nov 22, 2023

[noissue]

@dralley dralley marked this pull request as ready for review November 22, 2023 04:16
@dralley
Copy link
Contributor Author

dralley commented Nov 22, 2023

@mdellweg

Probably not if someone started using it. That is until pulpcore 3.55.

I don't think we provide semantic versioning guarantees for test infrastructure? And any time we do test infra changes we often end up backporting it anyway, just to avoid incompatibility when future tests are added and backported.

None at all. Just use requests.get.

IMO, if we do that, and just eat the extra dependency, then we might as well just delete the function entirely. There's no point having an alias for a function as simple as requests.get

@mdellweg
Copy link
Member

Well now here is the question in the wild: Do we consider the pytest-plugins of pulpcore (and others) to be part of the plugin api, and therefore subject to the deprecation policy?
I'm almost about to say "Yes". I agree we could be a bit more relaxed at that front, but knowingly breaking plugin ci is still a bad habit. For sure I cannot decide this alone.

Having a goal to render http_get deleted in the future is something i can only support.

@gerrod3
Copy link
Contributor

gerrod3 commented Nov 27, 2023

I would say deprecate the fixtures, copy them to the utils and slowing switch tests over to importing the util functions. Once all the plugins have switched, then we can remove the fixtures.

@mdellweg
Copy link
Member

I would say deprecate the fixtures, copy them to the utils and slowing switch tests over to importing the util functions. Once all the plugins have switched, then we can remove the fixtures.

It's the lower bounds test that makes me think about proper deprecation and removal only in a breaking change release.

@@ -1060,7 +1060,6 @@ def _add_to_filesystem_cleanup(path):
pass


@pytest.fixture(scope="session")
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want this to stop being a fixture. It is using other fixtures.

@dralley dralley marked this pull request as draft December 4, 2023 03:57
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.

None yet

4 participants