-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
py.test assert rewriting broken with Python 3.5a4+ #744
Comments
Original comment by Matthias Bussonnier (BitBucket: Carreau, GitHub: Carreau): This is due to 95886 , that fixes Missing *-unpacking generalizations and change the signature of |
Original comment by BitBucket: gvanrossum, GitHub: gvanrossum: But are you going to fix it? There is no compatibility guarantee for the ast module. |
Original comment by Matthias Bussonnier (BitBucket: Carreau, GitHub: Carreau): I don't know, I came across the same bug this morning, found this issue and started digging, I have never contributed to pytest either so I'm not that familiar with the codebase. The AST has no compat and not a lot of docs either, but I achieved to get a partial workaround here for now.NOt sure I have a lot of time to put on that next week, but I'll try. After it might be a start point for the maintainers of pytest. |
Original comment by BitBucket: gvanrossum, GitHub: gvanrossum: Oh, sorry. I don't know who's who on the project, and since you were the first and only one to reply to the bug, I assumed you were one of the maintainers. :-) Thanks for the fix! |
Original comment by Thomas Kluyver (BitBucket: takluyver, GitHub: takluyver): Re not a lot of docs: I maintain some extra documentation about working with ASTs at http://greentreesnakes.readthedocs.org/en/latest/ , though it doesn't yet describe Python 3.5. Pull requests welcome, especially once 3.5 is a bit closer to release. |
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): For the record, work is ongoing at https://bitbucket.org/pytest-dev/pytest/pull-request/296/astcall-signature-changed-on-35/diff , thanks to Matthias. Hopefully we can merge it soon and release pytest-2.7.2 with it. |
In Ubuntu, we're doing a test rebuild with Python 3.5 as the default Python 3 version: https://launchpad.net/~pythoneers/+archive/ubuntu/py35asdefault/+packages?batch=75 At least some of the failures are due to this but (which affects the test suites of those packages run at build time). I'll watch this bug and try to hotfix our pytest package for the rebuild once a patch is available. |
@dstufft says: --assert=plain may help temporarily. |
I looked at that bitbucket patch and unfortunately it doesn't make the test suite pass for me with Python 3.5 |
Just reconfirmed the bug. Still an issue with Python 3.5.0b3 (released July 5). This is a show-stopper for me doing any work with 3.5. I can't proceed without a working test rig. |
@jonathaneunice as a workaround, you can use |
I'm curious whether anyone is actively working on this issue. It's definitely the top related failure I'm seeing in our Ubuntu Python 3.5 test rebuilds. |
There's some work being done in #801, and any help there is appreciated. |
PR #801 is ready for merging, everybody is welcome to try it out! |
On Jul 16, 2015, at 05:53 PM, Bruno Oliveira wrote:
I took the patch and applied it to the Debian package, uploading it to my Thanks for working on this! It will make Python 3.5 users lives much happier. |
@warsaw - note I've heard plans about releasing 2.8 before EuroPython, and after 3.5 support is fixed. So this might happen very soon. @nicoddemus I vaguely remember @hpk42 said you could do the release if you feel like - are you planning to do that? Anything missing? 😄 |
Holger mentioned that he would like to first vendor pluggy into pytest before releasing
We were talking about making a |
This is now merged to master, not on the pytest-2.7 branch though. |
No problem, I will port it. Thanks @flub! |
Strange, Travis is now failing on both
Note that the python version for Travis' nightly build is now 3.6.0a0, which is different from the previous build of this branch that passed, Python 3.5.0a4+. Does any one know if there's been any changes from Travis in the last two days? |
In the last week, probably as we did complain to travis that "nighly" was stuck on 3.5a, they probably updated too aggressively. |
Will revert to stable when pytest-dev/pytest#744 is resolved
Will revert to stable when pytest-dev/pytest#744 is resolved
Will revert to stable when pytest-dev/pytest#744 is resolved
I'm sorry, but this whole issue became really big and confusing. I see that |
Here's the patch currently applied to the Debian version. I don't know if this is what upstream will commit, but it works for us in the meantime: https://alioth.debian.org/scm/viewvc.php/packages/pytest/trunk/debian/patches/issue744-py35-compat?view=markup&revision=33376&root=python-modules |
@ByteCommander it was already fixed in July in #801, and a new pytest version (2.7.3) with the fix was released today. So your best bet would be to update 😉 As a workaround, as mentioned earlier in this thread, you can use |
py.test 2.7.3 has been released with support for Python 3.5
|
On Sep 16, 2015, at 03:47 AM, Floris Bruynooghe wrote:
Thanks for that! Debian now has this version without the custom patch. :) |
For people using travis CI, use this command in travis.yml
|
@Toilal Any updates on your recommendation above? I'm still getting the originally posted traceback after using your fix. |
I don't know. I've dropped python 3.5 support in my projects.
|
No sorry, i've read 2.5 instead of 3.5. 3.5 is still supported of course,
|
@bmorris3 Looking at https://travis-ci.org/bmorris3/shampoo/jobs/120545149 you're running pytest 2.5.1, which is from December 2013. This was fixed in 2.7.3, and the current release is 2.9.1. In other words, please upgrade 😉 |
Thanks for pointing that out – I don't understand why my inclusion of:
in my |
I think that's going to get interpreted as the command |
@dstufft I wondered that myself in this commit, but it failed the tests similarly. |
* Reproduce the map() problem * Fix test on Python 3.5+ pytest-dev/pytest#744 * First aid for false positives caused by map([], '""') * Test nested map such as map([], 'map([], "v:val")') * Make performance better (but not measured) * Upgrade Vital.vim
Originally reported by: BitBucket: gvanrossum, GitHub: gvanrossum
I am experiencing a traceback ending thus:
I get this as soon as I have an assert statement in my test (even
assert True
).The text was updated successfully, but these errors were encountered: