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

Make constants file 2/3 compatilbe #937

Closed
wants to merge 2 commits into from
Closed

Make constants file 2/3 compatilbe #937

wants to merge 2 commits into from

Conversation

blackHatMonkey
Copy link
Member

Constants file in now both python2 and python3 compatible.

Constants file in now both python2 and python3 compatible.
@@ -1,6 +1,8 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# pylint: skip-file
from __future__ import unicode_literals
from builtins import range
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The builtins library is not included in Python by default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sophron Thanks for catching that. I included the future library in the setup.py but for some reason it still fails. Any idea why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the builtins library that is missing.

In overall, I'm against adding a new dependency for the sake of Python v3 compliancy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That dependency will only be temporary. After the code is 2/3 compatible we will remove the future library and get rid of the boilerplate. This method allows us to still work on the project as opposed to stopping all development and change the code base to python 3. I opened #426 January of 2017. It is now June of 2018 and we have not converted a single line of code. With only a year and half left on python 2 life support I think it is time to move on to python 3.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most proper way is to have a specific branch of Wifiphisher that runs on Python 3. When the time comes, we can switch our master to that branch.

But for now, master doesn't need to include these.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sophron I'm fine with this but what happens if we add a feature or fix a bug in master? It will need to be merged in both master and python3 branch and there might be some differences there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be merged in master but periodically the python3 branch should be synced.

Add the futuer library to the list of dependencies.
@blackHatMonkey blackHatMonkey changed the base branch from master to python3 June 11, 2018 15:58
@blackHatMonkey
Copy link
Member Author

@sophron I have changed the target of this PR to python3 branch.

blackHatMonkey added a commit that referenced this pull request Jun 11, 2018
Since python3 branch was added to move the code to python3 the travis
must be run on there as well.
seealso #937
@blackHatMonkey blackHatMonkey force-pushed the python3 branch 2 times, most recently from 5142314 to 395d371 Compare July 1, 2018 16:18
@blackHatMonkey blackHatMonkey deleted the 2to3 branch July 7, 2018 13:30
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.

None yet

2 participants