getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.8k stars 473 forks source link

Unpin pytest #3035

Open rominf opened 2 months ago

rominf commented 2 months ago

Problem Statement

As a Fedora packager I would like to have pytest to not have pin < 7.0.0, so that python-sentry-sdk could be tested in Fedora without workarounds. Also, pytest==7.0.0 was released on Feb 4, 2022.

All actual Fedora releases contain pytest>7.0.0 and installing an older version from PyPI during package build for testing is not possible. Thus, I unpinned it. Since some tests fail with pytest>7.0.0 because of the issue in pytest-forked, I had to find a way how to fix them. Luckily, thanks to this investigation there is a workaround: reorder the tests so that non-forked tests are not last in the file, see patch.

Solution Brainstorm

Of course, the best solution would be to fix the issue in pytest-forked, however it looks like a hard problem.

My suggestions:

szokeasaurusrex commented 2 months ago

@rominf Thank you for opening this issue, and for linking the investigation! We will place this issue on our internal backlog. However, you are also welcome to open a PR, if you would like – we might be able to implement your suggested changes more quickly that way.