-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add installation and test support for python3. #406
Add installation and test support for python3. #406
Conversation
This change is not strictly related to python 3, but having distinct cache location make it easier to test py27 and py34 since the format of the underling db is incompatible.
While the "real" functools.lru_cache is available in python3, unfortunately the RawConfigParser object is unhashable. I'm not seeing any difference in test times, so the optimization was probabably premature anyway.
I give this a try and I can confirm that pip-insallation works as do some simple tests I ran with gitlab and trello. 👍 Github seems to work with a plain text token in bugwarriorrc but when using an oracle, I got the following crash:
I'm using the |
@gdetrez I'm not surprised there are python3 bugs. As long as there aren't python2 regressions though, I'd like to go ahead and merge this and deal with python3 bugs that the test suite doesn't catch in future PR's. (And add the missing tests when feasible.) Any objections to merging as is? |
@ryneeverett the following code added to test_github.py catch the bug:
Maybe this approach can be improved and expanded to the testsuite using parameterized test. |
@ryneeverett I don't have an objection to merging this now and fixing issues later. But I think @ralphbean wanted to make a new release (#339) in which case it might be safer to merge this PR after. But #339 haven't been updated since July so I don't know if it is still happening. |
@gdetrez Agreed. I'll give @ralphbean a few days to respond, but if we don't hear anything I for a bit I may go ahead and merge. It would be a lot simpler to make new PR's 2-to-3 compatible than to keep fixing and rebasing this branch. |
Yeah, sorry I've been MIA. I'm getting some py2 regressions with this: Python 2.7.12 (default, Sep 29 2016, 12:52:02)
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from future import standard_library
>>> standard_library.install_aliases()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/threebean/.virtualenvs/bugwarrior/lib/python2.7/site-packages/future-0.16.0-py2.7.egg/future/standard_library/__init__.py", line 483, in install_aliases
import test
File "test.py", line 5, in <module>
with open('/tmp/npm.txt', 'rb') as npm_file:
IOError: [Errno 2] No such file or directory: '/tmp/npm.txt' Anybody else seeing this? |
Looks like I only get that failure with |
This version is giving us problems. See discussion in #406.
@irl, have you looked at packaging |
Thanks for fixing the build @ralphbean! I had no idea what the problem was but I learned the hard way that doing a github rebase-merge breaks the ability to auto-revert a PR. |
This adds the test proposed by @wfranzini and fixes the TypeError reported by @gdetrez in GothenburgBitFactory#406 (TypeError: Can't convert 'bytes' object to str implicitly).
This adds the test proposed by @wfranzini and fixes the TypeError reported by @gdetrez in GothenburgBitFactory#406 (TypeError: Can't convert 'bytes' object to str implicitly).
This adds the test proposed by @wfranzini and fixes the TypeError reported by @gdetrez in GothenburgBitFactory#406 (TypeError: Can't convert 'bytes' object to str implicitly).
This adds the test proposed by @wfranzini and fixes the TypeError reported by @gdetrez in GothenburgBitFactory#406 (TypeError: Can't convert 'bytes' object to str implicitly).
This is a rebase and update of @wfranzini's work in #387. We had a remarkable number of merge conflicts in such a short time.
This is great progress on #25, but I think we ought to do significant manual testing before closing that issue and declaring python3 compatibility 'done'.