You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having a problem with paths exceeding max path length on Windows, and this is apparently fixed in python 3.6 (I worked around the problem by moving the suite directory closer to drive root)
I'm not a python expert, but I've seen applications supporting both python 2 and 3 before by using import __future__. Would that be a possible migration path?
We don't have any current plans for supporting python 3. However, we're open to anyone who wants to put together a plan and PR for adding python 3 support while ensuring mx will continue to work on 2.7.
results from subprocess.check_output needing to be decoded into strings manually.
modules, types and functions being renamed.
I can see not much problems for 1-5, but 6 might be tricky to get to work with both versions.
I think 1 by far touches the most code, but it's also the most straight forward to do, as long as you don't mind using a print function instead of statement. I think that's a good place to start.
Thanks for the summary. I also just saw that Python 2.7 will no longer be supported as of Jan 1st 2020 so that's one more very good reason to adopt Python 3.
Are you planning to submit a PR that makes some of the changes you outlined above?
@dougxc I have a patch to move to using print function in the mx repo, and it turned out there's no need to install an extra package after all, so clients don't need to update anything. Are you OK with submitting changes one by one instead of one big patch that adds python 3 support?
I've looked a little more into getting mx to work with python 2 & 3, but some of the other changes I made in the past were changing some of the default encodings used, which meant that the XML parser couldn't recognize the encoding any more when running on python 2, since its went from ascii to unicode. (I haven't found a solution yet for that).
I think that with portable changes (like print function) we can at the very least get as close as possible to python 3 while still supporting python 2, and then if needed create a separate python 3 fork/branch to do the last few changes that are not compatible with python 2.
I will split up the branch into several PRs. I haven't posted all of them yet since some are not orthogonal and might conflict, so I'm waiting for some of the PRs to get merged first.
Hi @JornVernee sorry for delays on your PRs related to mx moving to Python 3 and Windows support. They are definitely very welcome and we will try and move them along.
@dougxc I thought the internal gating/process was just taking a while. I know there's been some conferences lately (e.g. devoxx) and I guess people have been going there as well?
It's no problem for me, I just made a bunch of PRs just to get them out there and make progress on that for myself :-)
Activity
dougxc commentedon Nov 10, 2018
We don't have any current plans for supporting python 3. However, we're open to anyone who wants to put together a plan and PR for adding python 3 support while ensuring mx will continue to work on 2.7.
JornVernee commentedon Nov 11, 2018
@dougxc I've looked into this once in the past. There were 6 issues I ran into;
import __future__in python 2.cmpfunction, but there are easy workaround for this.subprocess.check_outputneeding to be decoded into strings manually.I can see not much problems for 1-5, but 6 might be tricky to get to work with both versions.
I think 1 by far touches the most code, but it's also the most straight forward to do, as long as you don't mind using a print function instead of statement. I think that's a good place to start.
dougxc commentedon Nov 12, 2018
Thanks for the summary. I also just saw that Python 2.7 will no longer be supported as of Jan 1st 2020 so that's one more very good reason to adopt Python 3.
Are you planning to submit a PR that makes some of the changes you outlined above?
JornVernee commentedon Nov 12, 2018
@dougxc I have a patch to move to using
printfunction in themxrepo, and it turned out there's no need to install an extra package after all, so clients don't need to update anything. Are you OK with submitting changes one by one instead of one big patch that adds python 3 support?I've looked a little more into getting
mxto work with python 2 & 3, but some of the other changes I made in the past were changing some of the default encodings used, which meant that the XML parser couldn't recognize the encoding any more when running on python 2, since its went from ascii to unicode. (I haven't found a solution yet for that).I think that with portable changes (like print function) we can at the very least get as close as possible to python 3 while still supporting python 2, and then if needed create a separate python 3 fork/branch to do the last few changes that are not compatible with python 2.
dougxc commentedon Nov 12, 2018
While adding python 3 support to mx, I think fine grained pull requests to the master branch is the best way to go to avoid regressions.
JornVernee commentedon Nov 27, 2018
Been looking into this some more today.
The train seems to stop at some point because the current version of astroid 1.1.0 does not support new python 3 versions.
What is the reason for not updating to the latest version currently?
dougxc commentedon Nov 27, 2018
There no reason apart from no one having tested a more recent version ;-)
JornVernee commentedon Nov 27, 2018
Well... now somebody has: #176 ;)
JornVernee commentedon Nov 30, 2018
I currently have
mx --strict-compliance gate --strict-modepassing on themxsuite with both python 2.7.15 and 3.6.5You can find the changes here: https://github.com/JornVernee/mx/tree/p3_other
I will split up the branch into several PRs. I haven't posted all of them yet since some are not orthogonal and might conflict, so I'm waiting for some of the PRs to get merged first.
dougxc commentedon Nov 30, 2018
Hi @JornVernee sorry for delays on your PRs related to mx moving to Python 3 and Windows support. They are definitely very welcome and we will try and move them along.
JornVernee commentedon Nov 30, 2018
@dougxc I thought the internal gating/process was just taking a while. I know there's been some conferences lately (e.g. devoxx) and I guess people have been going there as well?
It's no problem for me, I just made a bunch of PRs just to get them out there and make progress on that for myself :-)
dougxc commentedon Nov 30, 2018
Ok, thanks for your understanding. The internal gating/process is currently quite manual.
JornVernee commentedon Jan 15, 2019
I will close this now since #184 was merged.