Open raul5660 opened 9 years ago
Hi raul5660,
I've always thought of Python 2 vs 3 as support for one or the other, so I must admit that I haven't thought about supporting both of them at the same time.
If there is an easy and clean way to support both I'd be glad to implement it, but I'll have to look into how and if it can be done.
i'm currently working on a way to make it work for both
Hey guys,
I am currently trying to port your tool to python 2.x
So far i tried the following steps:
I used 3to2 to Backport Python 3.x specific Syntax changes, futures to polyfill the 3.x specific concurrent.futures module and requests for some urllib and urllib2 use cases you were doing. With this i managed to run wig with python 2.x but I'm still having some issues with some of the discovery classes and maybe request2.
Actually I think using requests could enable you to support Python 2.6 to 3.4. As far as i can see its the only issue I am having right now.
let me push the changes i've made because i've had it working except that i have to analyze how we differentiate between version and what not because i get weird results
I tried your branch but it didn't seem to work. That's why i created a pull request from Address-Base on my own, because mine is working right now.
"If there is an easy and clean way to support both I'd be glad to implement it, but I'll have to look into how and if it can be done." - @jekyc
Address-Base's code sadly doesn't follow this statement, i'm still reviewing the changes but from what i see most of the changes were to make all the strings unicode. Which is unnecessary but again i'm still reviewing and see what i can modify on my end to make it as clean as possible
Hi guys,
Thank you both for the interest in porting wig to python 2 - it seems like you've both put a lot of work into it.
This is a general comment on https://github.com/jekyc/wig/pull/14 and https://github.com/jekyc/wig/pull/15. Both of the pull requests have create parallel libraries in order to support python 2, which means that the work required to add features or do debugging doubles, which I don't think I'd have the time to do. An ideal solution would be one that minimizes the amount of extra work that needs to be done in the previously mentioned scenarios, which would also be more clean and easy. I still haven't come up with a solution myself, but a temporary "fix" could be to implement a check in wig, that determines the version of python, and if it is version 2, wig prints an error message to the user with a link to your project. If this is some your interested in please let me know. I'd then update both wig and the projects readme.
Is there any reason in particular that there isn't support for python 2.7?