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 deprecation warning about yield_fixture #5575

Closed
ThomasWaldmann opened this issue Dec 18, 2020 · 5 comments
Closed

pytest deprecation warning about yield_fixture #5575

ThomasWaldmann opened this issue Dec 18, 2020 · 5 comments
Assignees
Milestone

Comments

@ThomasWaldmann
Copy link
Member

pytest 6.2.1:

/vagrant/borg/borg/.tox/py36-none/lib/python3.6/site-packages/borg/testsuite/remote.py:73:
    PytestDeprecationWarning: @pytest.yield_fixture is deprecated.                                                                        
Use @pytest.fixture instead; they are the same.
Docs: https://docs.pytest.org/en/stable/warnings.html  

This should be fixed globally.

@ThomasWaldmann ThomasWaldmann added this to the 1.1.15 milestone Dec 18, 2020
@ThomasWaldmann
Copy link
Member Author

I've seen this in master branch, but guess it also applies to 1.1-maint.

@ThomasWaldmann ThomasWaldmann self-assigned this Dec 19, 2020
ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Dec 19, 2020
/vagrant/borg/borg/.tox/py36-none/lib/python3.6/site-packages/borg/testsuite/remote.py:73:
    PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
Use @pytest.fixture instead; they are the same.
Docs: https://docs.pytest.org/en/stable/warnings.html
ThomasWaldmann added a commit that referenced this issue Dec 19, 2020
…ation

use pytest.fixture instead of yield_fixture, fixes #5575
ThomasWaldmann added a commit that referenced this issue Dec 19, 2020
…ation-master

use pytest.fixture instead of yield_fixture, fixes #5575 (master)
@FelixSchwarz
Copy link
Contributor

Just wanted to note that this makes it harder to ship borgbackup in EPEL 7 as we have pytest 2.9.2 there. Not a big deal to create a patch for this issue but I hope we can keep using pytest 2.9 for some time.

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Jan 2, 2021

OK, so we need to revert #5577 and:

  • suppress the deprecation warning
  • or, use a pytest version that does not emit the warning

OTOH: 1.1.15 is already out, so @FelixSchwarz needs to patch anyway?

@ThomasWaldmann ThomasWaldmann reopened this Jan 2, 2021
@FelixSchwarz
Copy link
Contributor

I already added a revert manually: https://src.fedoraproject.org/rpms/borgbackup/tree/epel7

Also I don't think you have to revert this patch upstream. This is a patch with a straight-forward revert which I can carry for EPEL7. Of course official support for pytest 2.9 would be a bit easier but I don't want to place an unreasonable burden on upstream development.

@ThomasWaldmann
Copy link
Member Author

OK, so we'll keep it as is. Thanks for patching.

@ghost ghost mentioned this issue Aug 26, 2021
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

2 participants