approvals / approvals/ApprovalTests.Python

Support pytest<8.0 ??

Open
#266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
212
Forks
56
Avg merge
1m
Merged PRs (30d)
1

Description

Setting pytest version before 8.0.0 causes the min versions CI check to fail.

pytest before 8.0.0 consumes pkg_resources from the setuptools package. This was moved in setuptools version 71.

Some options:

  • stick with pytest 8.0.0. If a customer wants < 8.0 they can pair with us or pay us to figure it out.
  • add setuptools < 71 to requirements.prod.required.txt. This would block users from using newer setuptools.
  • add setuptools >= 70 to requirements.prod.required.txt. This would require users of older pytest to figure out that they need to pin their setuptools to an older version.
  • In pin_requirements_to_minimum_acceptable_version.py append requirements.prod.required.txt with setuptools==70. This would require users of older pytest to figure out that they need to pin their setuptools to an older version.
  • Add a runtime check to give a helpful message when setuptools is an incompatible version

Notes

It's good that we have a CI that tests against both the newest and oldest versions of each of our dependencies. Most libraries don't have that, so version incompatibilities are not uncommon in the Python ecosystem. We're already doing better than most. But it's important to note that we don't test against all the intermediate versions so there are lots of combinations that may not (probably don't) work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the minimum-version CI check and pin_requirements_to_minimum_acceptable_version.py, along with requirements.prod.required.txt. Reproduce the failure with pytest before 8.0.0 and setuptools 71 or newer, then clarify which compatibility option maintainers want. Done means the chosen policy is implemented and the minimum-version CI check passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.