-
Notifications
You must be signed in to change notification settings - Fork 532
Apply python-future for Python 3.4 support #1221
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
Conversation
For Python 3 I need to futurize |
@alexsavio - don't worry about prov for now. in fact if you want you can strip it out for now or use dummy functions in provenance.py i'm working on updating nipype's prov support to be compatible with current master which already supports py3. |
FAIL in both versions: nipype.algorithms.tests.test_splitmerge.test_split_and_merge |
If I remove |
@alexsavio - the thought process behind using pickle is to ensure that the contents of function_str could be hashed properly and also turned into a python function that can be executed. if there is a better way to achieve the same effect, we can definitely try it out. |
I have been busy with life. I'm currently stuck with unicodes, strings vs. Traits. |
@alexsavio can you rebase on current master? |
This is a place where using |
Hi @bcipolli, do you mean merging the current master to this PR? |
|
Like this? |
|
done |
I know, I haven't fixed everything yet |
@alexsavio I will try to rebase. I added some questions from reviewing some commits. Will let you know how it goes! |
I believe the Trait error is because |
Yes, definitely that is the case. Thanks @bcipolli! |
Temporary workaround is to relax from |
@alexsavio I force-pushed the rebase to your branch; you will need to rename/remove your current local branch to work on the force-pushed one. I will do a bit more investigation on other errors, now that the |
@alexsavio I think the strategy of applying changes globally (e.g.
I made the first change. The second one, however, I am starting to think should be removed everywhere. Otherwise, I don't think we have a hope for Py2 compatibility. What do you think? |
@bcipolli Thanks! Maybe you are right. I did the Of course I realised it could be problematic once I stomped on the Traits failures. That is why I was asking. I suppose we have also the option to use |
See the "Drawbacks" here, particularly the "user code" example: My intuition says to try and migrate without |
I guess you are right. |
@alexsavio I made a commit to remove |
@alexsavio I need a break from my work, so I will try out the above replacement. |
Hi @bcipolli I was out. How is it going? can I help? |
@bcipolli - the latest commits should take care of all the issues - let's see what circle says. also if you have a chance to scroll through this commit that would be great. |
@@ -9,6 +9,7 @@ dependencies: | |||
- "~/examples/fsl_course_data" | |||
override: | |||
- pip install --upgrade pip | |||
- pip install -r requirements.txt |
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.
Why do we need this? All dependencies should be in the setup.py file and picked up by
pip install -e .
I recommend removing requirements.txt from circle.yml. Keeping it may lead to tests passing, but pip-installed packages failing to run because some dependency was in in requirements.txt, but was left out of setup.py.
@chrisfilo - it's hard to read the circleci output, but am i understanding that the only error is in doc generation? |
both nosetest and doc generation are currently failing on this branch nosetest:
documentation:
and many similar |
Thanks @chrisfilo . I was able to reproduce the doc build issues locally; they are due to a missing blank line between the file docstring and first import. I can fix those. The other issue is due to output streams coming out unicode on python 2/3. Haven't figured out why this is yet. |
@satra @alexsavio tests are passing!! :) One last issue I thought of last night; the use of to confirm this won't cause any problem. |
@bcipolli - i'm going to open an issue for loads/dumps - i have no recollection why i wrote it with pickling. so we will monitor it in case we run into trouble, but otherwise i think this is ready for merging. @chrisfilo - could i leave it to you to take any last look and hit the merge button? |
Did you guys try to switch Circle to python 3 for one commit and see if the workflows still work? That would convince me that we are indeed P3 compatible. |
@chrisfilo no, we didn't. Any suggestion how to do that? |
According to this https://circleci.com/docs/language-python you need to add the following lines to circle.yml:
There are more versions available: https://circleci.com/docs/environment#python |
@chrisfilo could you help look over the failures? There were four. I looked over the text, and it wasn't clear to me what the problem might be, nor how to reproduce them locally. The easiest one to reproduce locally seemed to be:
|
The errors are indeed strange. I'll try rebuilding without cache. Hold tight it will take a while. |
* check for NIPYPE_NO_MATLAB before doing code that may throw. * Give better error messages when tools (dot) not installed. * update gitignore for all built files.
Please see #1253 |
Apply python-future for Python 3.4 support
woohoo! |
:) |
No description provided.