-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Issue 415] Add support for python 3 #536
Conversation
3169b20
to
19c3c2c
Compare
@whimboo , can you take a look over this ? |
Hi @AndreiH. It's great to see that you pushed a first attempt for the Python3 support! Thanks a lot. Before I'm going to review this patch we should make sure that at least Travis CI also runs a job for Python3 for both Linux and Mac. This can be done by updating https://github.com/mozilla/mozdownload/blob/master/.travis.yml for the new platforms. For appveyor it might also be simple but we would most likely need a matrix in https://github.com/mozilla/mozdownload/blob/master/.appveyor.yml. |
19c3c2c
to
3ebbfe7
Compare
@AndreiH I have seen that you already modified the travis CI config. Please make sure to keep Python2.7 in the matrix. |
Thank you @whimboo , I have updated the matrix as it was before. |
@AndreiH now you removed Python3 again and only run Python2.7 jobs. What we want is to have both 2.7 and at least 3.6 tests running. |
Travis CI still doesn't pick up those other jobs. I assume that is because you changed the indentation from 4 to only 2. Make sure to revert it, and it might fix that particular problem. |
4113c0b
to
96d5bf4
Compare
Hello @whimboo ! From debugging and investigating I have reached the conclusion that it's because The single test that is failing is -> https://github.com/AndreiH/mozdownload/blob/master/tests/treeherder/test_api.py#L59 Fails with:
I currently xfailed with: Please let me know what you think and if you have any idea how to fix this test. Thank you ! |
96d5bf4
to
b8082fb
Compare
Hi!
Looking at the test failure in #536 (comment), I see:
It looks like the handle_rest_api test utility in this repo is generating the HTTP 500, not anything to do with Is there a reason that the custom |
(Comment edited to add the missing parts, whoops) |
ecfaa52
to
9a534cc
Compare
Thank you for the responses @edmorley @whimboo ! The PR is now ready for a full review @whimboo ! |
b0c2680
to
180090c
Compare
180090c
to
a3fee6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is great work @AndreiH! It looks mostly fine, but I have a couple of questions regarding the Travis CI changes, and some nits which need to be fixed. Please have a look at those.
5b60e47
to
0d68094
Compare
6dfdaf1
to
692f85b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have been easier to review when you wouldn't do a force push. But it looks way better now.
@@ -457,7 +457,7 @@ def is_build_dir(self, folder_name): | |||
def get_build_info_for_date(self, date, build_index=None): | |||
"""Return the build information for a given date.""" | |||
url = urljoin(self.base_url, self.monthly_build_list_regex) | |||
has_time = date and date.time() | |||
has_time = date and date.time() and date.strftime('%H-%M-%S') != '00-00-00' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due you know for which value of date this fails? Which test is causing that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I see in the stacktrace that there are already the args
and values which the tests fail with: https://travis-ci.org/mozilla/mozdownload/jobs/503557491
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As best pick one of those failing tests and run it alone by using the -k option like tox -- -k test_name
. Also specify -s so that you get all the output. I would like to know what date.time()
differs in between Python2.7 and Python3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test test_build_indices
I don't know why -s
command did what it should do. I add it at the end: tox -e py27 -- -k test_build_indices > output.txt -s
Python 3.6: https://gist.github.com/AndreiH/d8cb89dd509a7a4733d58ba706fbdb27
Python 2.7: https://gist.github.com/AndreiH/7b32e6c9a22cfb2212d58ab5d5602769
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here is the snippet for your testing: https://gist.github.com/whimboo/63ac15a7029fa2b6be9da33858fb0a91
Note the different behavior between Python2 and Python3. We have to get it fixed, and comparing to 00:00:00
is not a good idea given that at this second we also could have a sub folder.
@AndreiH will you have a chance to continue on this PR? Note, that there are also conflicts. |
@whimboo Unfortunately I cannot update this on a daily basis, my time is very limited now to work on this. |
We can wait a bit, no problem. There are also remote test failures I would like to see fixed first before merging this PR. |
Yes, let take it for now. It would also fail in Python2 for exactly this time, so that it isn't a regression. Note that we are going to skip the remote TB tests which cause those failures via #550. Once that landed I think we can also merge this PR. I just want to have a green test suite first. |
As just noticed the newly added |
@AndreiH thanks again for working on this patch! Very much appreciated to see py3 support coming up for the next mozdownload release. |
This PR is for Issue #415 to add support for Python 3