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

Pytest emits deprecation warning: "A private pytest class or function was used" #673

Closed
allanlewis opened this issue Feb 13, 2024 · 3 comments

Comments

@allanlewis
Copy link

I'm using pytest-bdd 7.0.1 and was bumping my sub-dependencies. With Pytest 8 I started to get a warning caused by this line: https://github.com/pytest-dev/pytest-bdd/blob/7.0.1/src/pytest_bdd/steps.py#L211-L218

pytest.PytestDeprecationWarning: A private pytest class or function was used.

The root cause appears to be this change in Pytest.

@judgeaxl
Copy link

As of pytest 8.1.x this is now a hard fail as the internals have changed:

TypeError: FixtureDef.__init__() got an unexpected keyword argument 'fixturemanager'

@pnuu
Copy link

pnuu commented Mar 11, 2024

I was about to open a new issue about the FixtureDef failure. Downgrading pytest to 8.0.2 seems to be the best option for now.

@youtux
Copy link
Contributor

youtux commented Mar 17, 2024

Fixed in #680. I just released version 7.1.2 with the fix.

Note: You will still see the warning with pytest 8.0, but if you bump to 8.1 then you shouldn't see it anymore.

@youtux youtux closed this as completed Mar 17, 2024
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

No branches or pull requests

4 participants