coala / coala

coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.
https://coala.io/
GNU Affero General Public License v3.0
3.55k stars 1.31k forks source link

pytest fails to run: TypeError: attrib() got an unexpected keyword argument 'converter' #6053

Open jayvdb opened 5 years ago

jayvdb commented 5 years ago

https://travis-ci.org/coala/coala/jobs/567291364

$ py.test
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/bin/py.test", line 7, in <module>
    from pytest import main
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pytest.py", line 10, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/fixtures.py", line 15, in <module>
    from _pytest import nodes
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/nodes.py", line 11, in <module>
    from _pytest.mark.structures import NodeKeywords, MarkInfo
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/mark/__init__.py", line 4, in <module>
    from .structures import (
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/mark/structures.py", line 306, in <module>
    class MarkInfo(object):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/_pytest/mark/structures.py", line 309, in MarkInfo
    _marks = attr.ib(converter=list)
TypeError: attrib() got an unexpected keyword argument 'converter'
jayvdb commented 5 years ago

Prior to that

Requirement already satisfied: attrs in /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (from packaging>=16.8->-r requirements.txt (line 7))

A bit annoying we cant see the version installed, but attrs-19.1.0 is the latest, but pytest only needs "attrs>=17.4.0" https://github.com/pytest-dev/pytest/blame/d4351ac5a287eb96521f09618bbbe1c73f4e6884/setup.py

KVGarg commented 5 years ago

Might be pytest was not installed completely at that point of time, because I just pushed my forked master branch to travis and the pytest is running as it should. https://travis-ci.org/KVGarg/coala/jobs/568352135 Just added 2 changes, first to install python v3.6.3 as if not added it would have installed v3.6.7 and other was to forcefully install setuptools==21

Used some of the changes mentioned in #6054, to get build green Getting green for the Test step: https://travis-ci.org/KVGarg/coala/builds/568372488

jayvdb commented 5 years ago

Might be pytest was not installed completely at that point of time

It is a persistent problem which has been happening for a while on master https://travis-ci.org/coala/coala/builds

pytest is installed, but pip is failing to get all of its dependencies installed correctly, because pip is ... pip, and using pip==9.0.1 adds extra complications as fewer people are testing with that, but newer pip breaks bears - long story.

Usually the trick is to pin something to force pip to get the dependencies upgraded.

I havent diagnosed what is the problem -- it could be that Python v3.6.3 is what is causing the problem, as you have it working with Python v3.6.7 without any extra dep pins. One negative of moving to xenial is that it isnt easy to choose which python version to test against - the bears repo does have the ability to install custom versions of python, but that is complicated.

Anyways, with dependency problems like this, getting the deps working on all repos is the primary objective, so development can continue. So getting the template into place on coala and coala-quickstart gets us much closer to being able to test CI changes on lots of repos to ensure the modification doesnt cause problems in a different repo.

KVGarg commented 5 years ago

Yes! the development shouldn't be affected due to any of the dependency breakage causing during CI build. It will be OK, if we move to xenial as it will allow us to making the system more strong to get it build on any python version, but I guess it will require a plenty of work to make it compatible to other versions too. Also, I guess we developers can start working on adding support for Python v3.7 after GSoC ends 😄