Skip to content

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

@asottile

Description

@asottile

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions