Closed zmingxie closed 6 years ago
I want to support Python 3 and I'm aiming to do so with the 1.0 release. I'm currently using it on Red Hat and they're still stuck on Python 2 :x:
Are you already working on this? If not, I don't mind contributing into this in my spare time.
I haven't started looking at it yet, but I would love any help on it! :D
On Mon, Aug 17, 2015 at 10:47 PM, Ming Xie notifications@github.com wrote:
Are you already working on this? If not, I don't mind contributing into this in my spare time.
— Reply to this email directly or view it on GitHub https://github.com/gaqzi/gocd-cli/issues/6#issuecomment-131847957.
"Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity." -- David Gelernter, Machine Beauty: Elegance and the Heart of Technology
Python 3 support has been added to py-gocd now, so that'll at least make it a little bit easier to get this going. I'm going to look at it some coming weekend if nothing else. :)
Awesome! That was actually my blocker earlier before I got busy with other stuffs. I will try to pick this up again tonight or tomorrow and test out with your python 3.0 support in py-gocd. Thanks!
I'm hitting 1 error from the test which I'm not sure how to fix yet.
@gaqzi Could you give me some hints?
============================================= FAILURES =============================================
____________________________ test_get_command_raises_reasonable_errors _____________________________
go_server = <MagicMock spec='Server' id='4576344888'>
def test_get_command_raises_reasonable_errors(go_server):
with pytest.raises(ImportError) as exc:
gocd_cli.utils.get_command(go_server, 'no-such-module', 'retrigger-failed')
assert 'gocd_cli.commands:' in str(exc)
with pytest.raises(AttributeError) as exc:
gocd_cli.utils.get_command(go_server, 'pipeline', 'no-such-command')
assert 'gocd_cli.commands.pipeline' in str(exc)
assert 'object has no attribute \'NoSuchCommand\'' in str(exc)
with pytest.raises(TypeError) as exc:
gocd_cli.utils.get_command(go_server, 'pipeline', 'retrigger-failed')
assert 'RetriggerFailed' in str(exc)
> assert '__init__() takes at least 3 arguments (2 given)' in str(exc)
E assert '__init__() takes at least 3 arguments (2 given)' in "/Users/mxie/dev/gocd-cli/.tox/py34/lib/python3.4/site-packages/gocd_cli/utils.py:99: TypeError: RetriggerFailed: __init__() missing 1 required positional argument: 'name'"
E + where "/Users/mxie/dev/gocd-cli/.tox/py34/lib/python3.4/site-packages/gocd_cli/utils.py:99: TypeError: RetriggerFailed: __init__() missing 1 required positional argument: 'name'" = str(<ExceptionInfo TypeError tblen=2>)
tests/test_utils.py:80: AssertionError
=============================== 1 failed, 60 passed in 0.22 seconds ===============================
First of all, great tool!
I tried to install this via pip with Python 3.4 on my Windows 7 box, and I hit so many errors from url lib. Do you have any plans to make this tool to support Python 3?