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

Python 3.5 test failures #131

Closed
benjaminp opened this issue Sep 1, 2015 · 7 comments
Closed

Python 3.5 test failures #131

benjaminp opened this issue Sep 1, 2015 · 7 comments

Comments

@benjaminp
Copy link
Owner

Originally reported by: Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw)


six hg head is not compatible with Python 3.5 (We're building against Python 3.5 in Ubuntu). ast module API breakage.

GLOB sdist-make: /home/barry/projects/debian/six/upstream/setup.py
py35 create: /home/barry/projects/debian/six/upstream/.tox/py35
py35 installdeps: pytest
py35 inst: /home/barry/projects/debian/six/upstream/.tox/dist/six-1.9.0.zip
py35 installed: py==1.4.30,pytest==2.7.2,six==1.9.0
py35 runtests: PYTHONHASHSEED='3069104211'
py35 runtests: commands[0] | py.test -rfsxX
============================= test session starts ==============================
platform linux -- Python 3.5.0 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/barry/projects/debian/six/upstream, inifile: setup.cfg
collected 0 items / 1 errors 

==================================== ERRORS ====================================
_________________________ ERROR collecting test_six.py _________________________
.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:969: in _find_and_load
    ???
<frozen importlib._bootstrap>:954: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:892: in _find_spec
    ???
<frozen importlib._bootstrap>:873: in _find_spec_legacy
    ???
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:137: in find_module
    source_stat, co = _rewrite_test(state, fn_pypath)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:278: in _rewrite_test
    rewrite_asserts(tree)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:336: in rewrite_asserts
    AssertionRewriter().run(mod)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:557: in run
    new.extend(self.visit(child))
/usr/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:665: in visit_Assert
    top_condition, explanation = self.visit(assert_.test)
/usr/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:796: in visit_Compare
    left_res, left_expl = self.visit(comp.left)
/usr/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:757: in visit_Call
    new_func, func_expl = self.visit(call.func)
/usr/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:757: in visit_Call
    new_func, func_expl = self.visit(call.func)
/usr/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:700: in visit_Name
    locs = ast.Call(self.builtin("locals"), [], [], None, None)
E   TypeError: Call constructor takes either 0 or 3 positional arguments
=========================== 1 error in 0.22 seconds ============================
ERROR: InvocationError: '/home/barry/projects/debian/six/upstream/.tox/py35/bin/py.test -rfsxX'
___________________________________ summary ___________________________________
ERROR:   py35: commands failed

@benjaminp
Copy link
Owner Author

Original comment by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw):


Likely related to pytest-dev/pytest#743

@benjaminp
Copy link
Owner Author

Original comment by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw):


A quick fix is:

diff -r cd1e81d33eaf tox.ini
--- a/tox.ini	Fri Aug 21 23:10:40 2015 -0700
+++ b/tox.ini	Tue Sep 01 18:09:02 2015 -0400
@@ -6,7 +6,7 @@
 
 [testenv]
 deps= pytest
-commands= py.test -rfsxX {posargs}
+commands= py.test -rfsxX {posargs} --assert=plain
 
 [testenv:flake8]
 basepython=python

@benjaminp
Copy link
Owner Author

Original comment by Matthias Liebig (Bitbucket: mliebig, GitHub: Unknown):


Please be aware that you are filing a bug against the wrong project. The failure occurs in pytest, not in six itself.

pytest-dev/pytest#744

@benjaminp
Copy link
Owner Author

Original comment by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw):


Yes sure, but until pytest gets fixed, using --assert=plain in six's tox.ini will work around the problem.

@benjaminp
Copy link
Owner Author

@warsaw, now that py.test has been fixed and released I assume you're good to go?

@benjaminp
Copy link
Owner Author

Original comment by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw):


@gutworth We are, thanks!

@benjaminp
Copy link
Owner Author

Original comment by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw):


py.test is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant