Skip to content

Unpin pytest #3035

@rominf

Description

@rominf

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:

  • Unpin pytest.
  • Reorder the tests.
  • Write a note in CONTRIBUTING.md about this quirk. Another option is to add a linter that would inform about the need to reorder tests.

Metadata

Metadata

Labels

TriagedHas been looked at recently during old issue triage
No fields configured for issues without a type.

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions