ENH: Python3 support
- [x] Test w/ python 3.x, update as needed
- [x] Update travis.yml https://github.com/westurner/pyline/blob/master/travis.yml
- [x] Update tox.yml https://github.com/westurner/pyline/blob/master/tox.ini
- [x] Release a Python 3 compatible version of pyline to PyPI (v0.3.20)
- [ ] Handle the Python 3 mixed types sorting behavior
$ pyline --help
Traceback (most recent call last):
File "/usr/local/bin/pyline", line 7, in <module>
from pyline.pyline import main
File "/usr/local/lib/python3.5/site-packages/pyline/__init__.py", line 8, in <module>
__main__ = pyline.main
AttributeError: module 'pyline' has no attribute 'main'
This hasnt been released to PyPI, which is stuck on v0.3.16 while v0.3.17 has been tagged in the repo
This is blocking getting a pyline with Python 3 support uploaded to PyPi: From https://github.com/westurner/pyline/pull/29#discussion_r499090124 :
Python 3 fails on:
sorted(['a', None, 1])Due to docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
stackoverflow.com/a/47368476 is an implementation of Python 2-style sorting for Python 3.
- [x] Ask for permission to use in an open source project
- [ ] get permission
- [ ] Decide how to enable or disable this feature with CLI args
Solution for now: ~ transform None to "":
sorted([None, "b", "c"]) -> sorted(["", "b", "c"])
sorted([None, 1, "c"]) -> sorted(["", 1, "c"]) # which still errors; but shouldn't happen without a strange type cast function
I just released pyline v0.3.20 with Python 3 support to PyPI: https://pypi.org/project/pyline/