Closed lelit closed 7 years ago
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.
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.
@lelit a fine piece of work. thank you so much!
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.
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.
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: https://github.com/jonathanslenders/python-prompt-toolkit/pull/446
this plays into our direction by providing dialogs
but might also cause some rework in whaaaaat
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.