Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jayvdb opened this issue Aug 4, 2019 · 4 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Aug 4, 2019

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
Copy link
Member Author

jayvdb commented Aug 4, 2019

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

@jayvdb jayvdb self-assigned this Aug 4, 2019
jayvdb added a commit to jayvdb/coala that referenced this issue Aug 4, 2019
coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Disable new template for JinjaBear due to its inability
to handle indentation.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
jayvdb added a commit to jayvdb/coala that referenced this issue Aug 5, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Disable new template for JinjaBear due to its inability
to handle indentation.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
jayvdb added a commit to jayvdb/coala that referenced this issue Aug 5, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

Disable new template for JinjaBear due to its inability
to handle indentation.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
@KVGarg
Copy link
Contributor

KVGarg commented Aug 6, 2019

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
Copy link
Member Author

jayvdb commented Aug 7, 2019

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.

jayvdb added a commit to jayvdb/coala that referenced this issue Aug 7, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
akshatkarani pushed a commit to akshatkarani/coala that referenced this issue Aug 7, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
@KVGarg
Copy link
Contributor

KVGarg commented Aug 7, 2019

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 😄

KVGarg pushed a commit to KVGarg/coala that referenced this issue Aug 7, 2019
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.
akshatkarani pushed a commit to akshatkarani/coala that referenced this issue Aug 7, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
Utkarsh1308 pushed a commit to Utkarsh1308/coala that referenced this issue Aug 20, 2019
Implements https://gitlab.com/coala/mobans/merge_requests/135
working around the lxml dependency problem on Python 3.4.

coala#6053 is only
occurring in the Travis trusty environment.
Upgrading to xenial bypasses that problem, but
requires a few workarounds, especially replacing the
Python 3.4.2 job with Python '3.4' which causes
Travis to provide Python 3.4.8.

Add gravis to template to switch jdk versions on Xenial.

Uninstall setuptools multiple times on Xenial for the same
reason it was required once on Trusty.  Also remove
unnecessary pipenv which causes pip to complain about
incompatibilities.

Bump setuptools dependency to match the version defined
in mobans.

.misc/check_moban.sh is no longer needed as the
Travis template provides a moban job, and the latest
moban handles branches.

Related to coala#4708
Related to coala#6053
Related to coala/coala-bears#2940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants