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

Pure python2.7 compatibility #42

Closed
wants to merge 2 commits into from
Closed

Pure python2.7 compatibility #42

wants to merge 2 commits into from

Conversation

jaywon
Copy link

@jaywon jaywon commented Jun 14, 2018

See full details commit history but there were issues in installation with the mixture of Python3 and Python2.7 libraries/environment so I refactored to be dependent on Python2.7 only due to the hard requirement of the mechanize library which would need to be replaced for Python3 compatibility.

Awesome tool, hope this helps! 🎈

- Had issues with missing dependency for requests
- Had errors/warnings for mechanize performance if not using the
python-Levenshtein dependency. Install removed warning. Believe
this was a performance optimization for prettytable
- Added versions for stability/compatibility and ease of
installation
Had issues with the mixture of some Python2.7 and Python3 packages,
so I made the project completely depdendent only on Python2.7 with
the following changes:

I chose to go with the Python2.7 requirement over Python3 because
the `mechanize` library has no Python3 compatible version.

- Use Python2.7 urllib and urlparse libraries for compatible
functionality of the python3 urllib merged library
- Updated all `input` methods to `raw_input` to fix type errors
for user input
- Change test from `builtins.zip` to `future_builtins.zip` which
was added to Python2.7 since the library was coming to Python3
- Correct misleading error message about version of python noting
Python2.7 requirement

I have tested all changes in a clean Python2.7 virtualenv and
to my knowledge all functionality is intact with the changes.
@jaywon jaywon mentioned this pull request Jun 14, 2018
@jaywon
Copy link
Author

jaywon commented Jun 14, 2018

Will resolve #41 if accepted. 😃

@s0md3v
Copy link
Owner

s0md3v commented Jun 14, 2018

I am sorry but I tried to drop Python 2 support in the latest release so I can't merge this one.
Sorry again and thanks for your contribution.

@s0md3v s0md3v closed this Jun 14, 2018
@s0md3v s0md3v added the invalid label Jun 14, 2018
@jaywon
Copy link
Author

jaywon commented Jun 14, 2018

All about moving forward with Python3, the problem is that the mechanize module is only supported in Python2.7 so it's not a full Python3 compliant. You still must have Python2.7 installed on the system and it makes it difficult to virtualize the environment.

I guess I could be more helpful by looking at what mechanize is doing and trying to come up with an alternate solution?

Release today looks great btw, great refactor!

@s0md3v
Copy link
Owner

s0md3v commented Jun 14, 2018

I know and I replaced mechanize with requests already ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants