Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: pin pytest-selenium & pytest-variables to v2
Browse files Browse the repository at this point in the history
There is a dependency conflict for pytest in pytest-selenium v3, which conflictingly requires both:

- pytest v6:

https://github.com/pytest-dev/pytest-selenium/blob/8e0a5d549049a1db353ead98bf0b46f8ef04e014/pyproject.toml#L46

- pytest-metadata latest (via pytest-html), whose latest 3.0.0 requires pytest v7:

https://github.com/pytest-dev/pytest-metadata/blob/4f70f2ae74dc880772d445b1ee2cbe8d50bedcbd/pyproject.toml#L43

Pin pytest-selenium to v2 for now.

This resolves `make upgrade` error:

    There are incompatible versions in the resolved dependencies:
      pytest (from -r requirements/e2e.in (line 6))
      pytest<7.0.0,>=6.0.0 (from pytest-selenium==3.0.0->-r requirements/e2e.in (line 8))
      pytest>=2.4.2 (from pytest-variables==1.9.0->pytest-selenium==3.0.0->-r requirements/e2e.in (line 8))
      pytest>=7.0.0 (from pytest-metadata==3.0.0->pytest-html==3.2.0->pytest-selenium==3.0.0->-r requirements/e2e.in (line 8))
      pytest>=5.0.0 (from pytest-timeout==2.1.0->-r requirements/e2e.in (line 9))
      pytest>=2.7.3 (from pytest-base-url==1.4.2->pytest-selenium==3.0.0->-r requirements/e2e.in (line 8))
      pytest (from pytest-randomly==3.12.0->-r requirements/e2e.in (line 7))
      pytest!=6.0.0,>=5.0 (from pytest-html==3.2.0->pytest-selenium==3.0.0->-r requirements/e2e.in (line 8))

See pytest-dev/pytest-selenium#294 for potential upstream issue.

Also, pytest-variables v3 deprecated _variables, which is used by other pytest v2 libraries::

https://github.com/pytest-dev/pytest-variables/blob/13f4b2e4620c682ae0856e03b11106ad3b6e6894/CHANGES.rst

Pin pytest-variables to v2 for now.

This resolves `make acceptance` error:

    AttributeError: 'Config' object has no attribute '_variables'
  • Loading branch information
pshiu committed Jun 20, 2023
1 parent 110d834 commit 53c2889
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ idna==2.7
# TODO : Pinning this until we are sure there aren't any breaking changes, then we'll upgrade.
celery<5.0.0

# bok-choy 1.1.1 requires <4 (can remove once we have a version without that requirement)
# bok-choy 2.0.1 still requires selenium<4
# (bok-choy is now deprecated; updates unlikely)
# - pytest-selenium v3 has inconsistent pytest dependency requirements
# (see pytest-selenium/issues/294)
# - pytest-variables v3 uses pytest.stash instead of _variables. This
# conflicts with how pytest-selenium uses variables prior to v3.
selenium<4.0.0
pytest-selenium<4.0.0
pytest-selenium<3.0.0
pytest-variables<3.0.0

# pylint>2.12.2 requires a lot of quality fixes. Can be resolved later on.
pylint==2.12.2
Expand Down

0 comments on commit 53c2889

Please sign in to comment.