pyline icon indicating copy to clipboard operation
pyline copied to clipboard

ENH: Python3 support

Open westurner opened this issue 11 years ago • 5 comments

  • [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

westurner avatar Aug 24 '14 19:08 westurner

$ 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'

pahaz avatar Jul 18 '16 18:07 pahaz

This hasnt been released to PyPI, which is stuck on v0.3.16 while v0.3.17 has been tagged in the repo

jayvdb avatar May 14 '19 13:05 jayvdb

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

westurner avatar Oct 02 '20 23:10 westurner

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

westurner avatar Oct 03 '20 00:10 westurner

I just released pyline v0.3.20 with Python 3 support to PyPI: https://pypi.org/project/pyline/

westurner avatar Oct 03 '20 00:10 westurner