pytest<4.3 + latest attrs => TypeError: attrib() got an unexpected keyword argument 'convert'

Created on 1 Oct 2019  路  2Comments  路  Source: pytest-dev/pytest

Seems attrs 19.2 contains a breaking change:

$ pytest --help
Traceback (most recent call last):
  File "/tmp/x/venv/bin/pytest", line 6, in <module>
    from pytest import main
  File "/tmp/x/venv/lib/python3.6/site-packages/pytest.py", line 13, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/fixtures.py", line 832, in <module>
    class FixtureFunctionMarker(object):
  File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/fixtures.py", line 834, in FixtureFunctionMarker
    params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'

The fix is to either upgrade pytest or to downgrade attrs

invalid

Most helpful comment

just creating this so there's visibility -- CC @hynek in case anyone hits this from the attrs side ;)

All 2 comments

just creating this so there's visibility -- CC @hynek in case anyone hits this from the attrs side ;)

To be clear, downgrade means attrs<19.2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jurisbu picture jurisbu  路  3Comments

jacquerie picture jacquerie  路  3Comments

nicoddemus picture nicoddemus  路  3Comments

RonnyPfannschmidt picture RonnyPfannschmidt  路  3Comments

thakkardharmik picture thakkardharmik  路  3Comments