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

prepare for the deprecation/removal of the pytest_namespace hook #16

Closed
RonnyPfannschmidt opened this issue Nov 10, 2017 · 7 comments
Closed

Comments

@RonnyPfannschmidt
Copy link

in pytest we are in the process of deprecating the pytest_namespace hook, so this plugin would need a new location for its api that works when that hook is removed

@TvoroG
Copy link
Owner

TvoroG commented Nov 10, 2017

Hi! Thanks for informing me!
So one day pytest will stop invoking pytest_namespace and the right way of using these plugins would be just importing them?

@RonnyPfannschmidt
Copy link
Author

@TvoroG correct

@YannickJadoul
Copy link
Contributor

YannickJadoul commented Oct 1, 2018

If anyone else would be encountering the same error as I am: it seems that pytest.lazyfixture is now being added áfter conftest.py (cfr. https://docs.pytest.org/en/latest/deprecations.html#pytest-namespace).

So to use lazyfixture to create 'globally-shared fixtures', you will have to import pytest_lazyfixture and use pytest_lazyfixture.lazyfixture (if I got that correctly?)

m-rossi added a commit to m-rossi/jupyter-docx-bundler that referenced this issue May 19, 2019
@jmehnle
Copy link

jmehnle commented Nov 13, 2020

If anyone else would be encountering the same error as I am: it seems that pytest.lazyfixture is now being added áfter conftest.py (cfr. https://docs.pytest.org/en/latest/deprecations.html#pytest-namespace).

So to use lazyfixture to create 'globally-shared fixtures', you will have to import pytest_lazyfixture and use pytest_lazyfixture.lazyfixture (if I got that correctly?)

I had the exact same problem: I was trying to use pytest.lazy_fixture in conftest.py. Importing it from pytest_lazyfixture instead worked!

@piotr-dobrogost
Copy link

piotr-dobrogost commented May 21, 2021

deprecate pytest_namespace alltogetherpytest-dev/pytest#2639
remove pytest namespace hookpytest-dev/pytest#4421
#4421: Removed the implementation of the pytest_namespace hook. (note from changelog of pytest 4.1.0 (2019-01-05)) –
https://docs.pytest.org/en/stable/changelog.html#id648

@z33kz33k
Copy link

z33kz33k commented Nov 17, 2021

@TvoroG I appreciate your hard work. I really do. But, pls, for the love of everything that is good, do update the README. Thanks in advance.

@RonnyPfannschmidt
Copy link
Author

closing this as it seems to be resolved

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

6 participants