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

Add Python 3 compatibility #2

Merged
merged 13 commits into from
Mar 29, 2017
Merged

Add Python 3 compatibility #2

merged 13 commits into from
Mar 29, 2017

Conversation

lelit
Copy link
Contributor

@lelit lelit commented Mar 28, 2017

This set of commits do tiny cleanups and then make the library usable under Python 3, at least as far as automatic tests can tell.

@markfink
Copy link
Owner

wow. that is really cool! I was planning to add python3 support myself but did not find the time yet.
whaaaaat is pretty new. are you using it in your projects where you need python3 support? I can not look into this pull request today but I promise do do so asap.

@lelit
Copy link
Contributor Author

lelit commented Mar 28, 2017

Not yet, but if/when this is accepted, I will try to switch my tinject tool from inquirer to wha+t, should not be hard.

@markfink
Copy link
Owner

@lelit a fine piece of work. thank you so much!

@markfink markfink merged commit fc4014a into markfink:develop Mar 29, 2017
@lelit
Copy link
Contributor Author

lelit commented Mar 29, 2017

You're welcome! Unfortunately, it seems that I didn't spot all the places: common.py needs the

import sys
...
PY3 = sys.version_info[0] >= 3

if PY3:
    basestring = str

snippet too.

@lelit
Copy link
Contributor Author

lelit commented Mar 29, 2017

I may submit another PR for this if you prefer, but I think the best would be to create a test covering setup_validator and setup_simple_validator too. Let me know and I will try to do that as well.

@lelit lelit deleted the py3 branch March 31, 2017 07:00
@markfink
Copy link
Owner

you are absolutely right, the test coverage is not where I want it to be. If you like to contribute the test please go ahead.
please be aware that ptk 2.0 is coming: prompt-toolkit/python-prompt-toolkit#446
this plays into our direction by providing dialogs but might also cause some rework in whaaaaat

markfink added a commit that referenced this pull request Apr 1, 2017
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.

2 participants