hask icon indicating copy to clipboard operation
hask copied to clipboard

bug in file __init__.py

Open wannaphong opened this issue 9 years ago • 6 comments

I want to install hask. On Python 3.4.3 64 bit in windows 8.1 I using

git clone https://github.com/billpmurphy/hask
cd hask
python setup.py install

but

Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    import hask
  File "C:\Users\วรรณพงษ์\hask\hask\__init__.py", line 8, in <module>
    import lang
ImportError: No module named 'lang'

No module named 'lang'.

wannaphong avatar Aug 10 '15 07:08 wannaphong

Hask is only compatible with Python 2.7 at the moment, but Python 3 support is coming soon.

billpmurphy avatar Aug 10 '15 11:08 billpmurphy

I played with Python 3 bit:

The main issues are:

  • relative imports
  • __div__ (and __rdiv__) is gone because is integer division is gone and / acts like //
  • long is gone
  • unicode --> str, str --> bytes
  • cmp is gone, use comp = (a > b) - (a < b)
  • use string.ascii_uppercase instead of string.uppercase
  • many types not in the types module anymore

pya avatar Aug 10 '15 11:08 pya

Is there a roadmap for Py3 compatibility?

justanr avatar Aug 10 '15 12:08 justanr

Since there seems to be a lot of interest, I will try to work on this ASAP. I didn't have a particular roadmap in mind besides starting with lang and working outwards. Pull requests that make progress will definitely get merged.

billpmurphy avatar Aug 10 '15 16:08 billpmurphy

In my opinion Python-Future is the best way for a single source approach. You can go module by module and always have a running Python 2 version with lots of Python-3-like features. I think it is better than the library six.

pya avatar Aug 12 '15 15:08 pya

Thanks--I have been reading about the tradeoffs between Python-Future and six, and this is a helpful recommendation.

billpmurphy avatar Aug 12 '15 18:08 billpmurphy