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

Pin runtime and test dependencies #316

Merged
merged 9 commits into from
Apr 9, 2022

Conversation

seifertm
Copy link
Contributor

Context

pytest-asyncio builds have previously failed due to breaking changes of test dependencies (#302) or build-time dependencies (#314). Issue #305 aims to introduce version pinning to the project dependencies to avoid those types of issues in the future.

Scope

This PR introduces version pinning for runtime dependencies.

At the moment runtime dependencies are declared in two places: setup.cfgand tox.ini. This PR does not address the fact that dependencies are declared in different places. It does not address pinning of build-time dependencies, either.

Changes

Runtime dependencies for testenv and testenv:pytest-min were moved to requirements.txt files in dependencies/default/ and dependencies/pytest-min, respectively. Each of the dependency sets contains a constraints.txt to pin the dependency versions.

Dependabot is supposed to automatically bump the entries in constraints.txt.

Additionally, this PR, declares runtime and test dependencies with lower bound (e.g. coverage >= 6.2) rather than fixed versions (coverage==6.2), where possible.

Benefit

  • Make the build pipeline more robust against breaking changes in dependencies and test dependencies.
  • Test against v6.1.0 and against the latest version of pytest rather than testing against v6.1.0 and v6.2.5.

I'd be happy to hear your feedback on this!

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
Constrained pytest to v7.1.1.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…testing" extra.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
… tox environment.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
… into the file pytest-min-requirements.txt.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…st-min-requirements.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…ent directories.

This allows Dependabot to update both dependency sets independently.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…ing" extra.

Adjusted constraints accordingly.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…testing" extra.

Adjusted constraints accordingly.

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
@seifertm seifertm merged commit 5629253 into pytest-dev:master Apr 9, 2022
@seifertm seifertm deleted the pin-dependencies branch October 23, 2023 06:15
@seifertm seifertm restored the pin-dependencies branch October 23, 2023 08:17
@seifertm seifertm deleted the pin-dependencies branch October 23, 2023 08:35
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

Successfully merging this pull request may close these issues.

1 participant