Skip to content
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

Version2 Support #15

Closed
wants to merge 21 commits into from
Closed

Version2 Support #15

wants to merge 21 commits into from

Conversation

CashWasabi
Copy link

This Branch is working with Python2 and Python3.

@raul5660
Copy link
Contributor

i don't mean to sound like an ass but do you know what changes you made and understand what you were doing?

@CashWasabi
Copy link
Author

I did a huge cleanup all over those files. I hope it's more obvious now which changes i made.

@jekyc jekyc mentioned this pull request Jun 23, 2015
@jekyc
Copy link
Owner

jekyc commented Jun 23, 2015

Hi Marc3lox,

Thanks for the pull request and the work put into porting wig to python 2.

I've updated issue #12 with a general comment on the two current pull requests. As they both solve the issue of supporting python 2 by creating completely separate classes for the python versions, I don't think that the result will be easy maintainable. I temporary suggestion could be to link to your fork in wig and the readme, just until a more permanent solution is found. Is this something you'd be interested in?

On a side note, I noticed that you're using the 'requests' lib. wig also made use of it in previous versions, but I decided to create a custom lib for it, as I ran into issues on some versions of 'requests' (can't remember which, but IIRC I think it was the version shipped with the Kali Linux distro at some point). I'd therefore prefer wig to not be dependent on any third party libs.

@roberth1988
Copy link

Hi Jekyc,

but developing a custom lib comes with higher maintenance efforts. I am using requests quite long with different versions => its clear that sometime some bugs pop in but in my opinion its better to use a well and active maintained library instead of a custom-made one.

@CashWasabi
Copy link
Author

Hey Jekyc,
even though I think "requests" would be a better decision on the long run i also managed to get a version running which supports wig on python2 without completly seperate classes and without requests. The only dependency is the pip module "futures" which enables "concurrent.futures" for python2. You can look at it in the branch called "wig-python2-support".

@jekyc
Copy link
Owner

jekyc commented Jun 25, 2015

Hi,

While I agree that using the 'requests' lib would be nice, I don't like the idea that a distro provide version 'requests' can make wig non-functional. I might decide to go back to 'requests' lib at a later point, but for now, I think sticking to wig's 'request2' the best solution. This lib is only about 350 lines, of which a large part would still be needed if wig were to switch to 'requests'.

@Marc3lox: I like the approach, and that the changes do not require separate libs. I've compared the two versions, but it is a bit difficult because tabs are changed to spaces (I know that spaces are indeed preferred over tabs according to PEP-8 (http://legacy.python.org/dev/peps/pep-0008/#tabs-or-spaces)). Is possible for you to change them back ?

@CashWasabi
Copy link
Author

Hey,
sure! As soon as I'm free I'll convert it back to tabs.

@CashWasabi CashWasabi closed this Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants