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

Replace pytest-relaxed with plain pytest.raises #1665

Closed
wants to merge 1 commit into from

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Apr 16, 2020

There is really no technical reason to bring pytest-relaxed to call
@raises as a decorator while plain pytest works just fine. Plus,
pytest.raises() is used in test_sftp already.

pytest-relaxed causes humongous breakage to other packages
on the system. It has been banned from Gentoo for this reason.

This is alternative to #1543 that doesn't remove tests.

@mgorny
Copy link
Contributor Author

mgorny commented Aug 31, 2020

Ping.

@bnavigator
Copy link

Any plans to merge this?

pytest-relaxed is broken with pytest > 5.4, even with bitprophet/pytest-relaxed#10, it is broken with pytest > 6.1

bitprophet/pytest-relaxed#12

Copy link

@radez radez left a comment

Choose a reason for hiding this comment

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

+1 to remove this dependency

There is really no technical reason to bring pytest-relaxed to call
@raises as a decorator while plain pytest works just fine.  Plus,
pytest.raises() is used in test_sftp already.

pytest-relaxed causes humongous breakage to other packages
on the system.  It has been banned from Gentoo for this reason.
@mgorny
Copy link
Contributor Author

mgorny commented May 17, 2022

Ping. Two years have passed already.

@bskinn
Copy link
Contributor

bskinn commented May 17, 2022

Thanks for pinging to bring this back up.

pytest-relaxed causes humongous breakage to other packages on the system. It has been banned from Gentoo for this reason.

Other packages on what system?

Are you saying that paramiko might be packaged into Gentoo, if not for the pytest-relaxed dependency? In other words, is there strong interest in paramiko being packaged in Gentoo, but it's blocked?

@mgorny
Copy link
Contributor Author

mgorny commented May 17, 2022

pytest-relaxed causes humongous breakage to other packages on the system. It has been banned from Gentoo for this reason.

Other packages on what system?

On a Gentoo system. Basically, when pytest-relaxed was installed in order to run paramiko's tests, we've seen huge fallout from other Python packages. Please bear in mind that pytest loads all installed plugins by default, and pytest-relaxed changes its behavior quite a lot.

Are you saying that paramiko might be packaged into Gentoo, if not for the pytest-relaxed dependency? In other words, is there strong interest in paramiko being packaged in Gentoo, but it's blocked?

It is packaged in Gentoo, with this patch applied on top in order to make the tests work without pytest-relaxed. However, there is strong interest in not having to carry custom patches when the change actually should work for everyone.

@bskinn
Copy link
Contributor

bskinn commented May 17, 2022

Got it - thanks for the context!

@bitprophet
Copy link
Member

Basically, when pytest-relaxed was installed in order to run paramiko's tests, we've seen huge fallout from other Python packages. Please bear in mind that pytest loads all installed plugins by default, and pytest-relaxed changes its behavior quite a lot.

pytest-relaxed needs some love, but it still seems a bit odd that this is my problem here in paramiko or pytest-relaxed, instead of it being a configuration issue when packaging pytest-using kit such that the test phase only uses its specific deps (or such that the prod install facing stage isn't including test-only dependencies).

Surely there are other pytest plugins out there that cause breaking changes - I find it hard to believe that a build/test regime that boils down to "install a very large subset of all pytest plugins all at the same time" was working swimmingly until relaxed came along?


I am actually intending to use more pytest-relaxed in Paramiko's suite in the near/mid future, not less, so I can't merge this. However, I would definitely like to give pytest-relaxed the love it needs to work with newer pytests at the very least, and I'm certainly open to discussions about any truly bad behavior that remains after that point.

@bitprophet bitprophet closed this Jun 3, 2022
@mgorny
Copy link
Contributor Author

mgorny commented Jun 4, 2022

I'm not claiming that everything works "swimmingly". I'm talking about the difference between 5% of packages sometimes failing, and 95% of packages being totally broken.

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

5 participants