cuisine icon indicating copy to clipboard operation
cuisine copied to clipboard

python3 support?

Open observerss opened this issue 11 years ago • 14 comments

trying to pip install cuisine in py3 failed with

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/ob/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/threading.py", line 639, in _bootstrap_inner
    self.run()
  File "/Users/ob/.pythonbrew/pythons/Python-3.3.0/lib/python3.3/threading.py", line 596, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/ob/.virtualenvs/mastiff3/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/index.py", line 245, in _get_queued_page
    page = self._get_page(location, req)
  File "/Users/ob/.virtualenvs/mastiff3/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/index.py", line 337, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File "/Users/ob/.virtualenvs/mastiff3/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/index.py", line 466, in get_page
    inst = cls(u(contents), real_url, headers)
  File "/Users/ob/.virtualenvs/mastiff3/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/backwardcompat.py", line 44, in u
    return s.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Downloading/unpacking cuisine
  Downloading cuisine-0.5.1.tar.gz
  Running setup.py egg_info for package cuisine
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/ob/.virtualenvs/mastiff3/build/cuisine/setup.py", line 10, in <module>
        file("src/cuisine.py").readlines())[0].split("=")[1])
    NameError: name 'file' is not defined
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/ob/.virtualenvs/mastiff3/build/cuisine/setup.py", line 10, in <module>

    file("src/cuisine.py").readlines())[0].split("=")[1])

NameError: name 'file' is not defined

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/ob/.virtualenvs/mastiff3/build/cuisine
Storing complete log in /Users/ob/.pip/pip.log

observerss avatar Feb 27 '13 05:02 observerss

Thanks, I'll look into that!

sebastien avatar Feb 27 '13 12:02 sebastien

Cuisine can be make py3k compatible quite easily but there's still fabric and paramiko which don't support it at the moment as far as I know (at least not their stable releases).

jstasiak avatar May 01 '13 00:05 jstasiak

Is anyone working in this issue right now? If not, I'll do it!

victorpantoja avatar Dec 11 '13 16:12 victorpantoja

I am trying to fix this, and I found I need to fix fabric python 3 support first.

unionx avatar Oct 17 '14 07:10 unionx

Yes, Cuisine itself should be easy to port, but Fabric is the problematic one. Le 2014-10-17 03:22, "帝归" [email protected] a écrit :

I am trying to fix this, and I found I need to fix fabric python 3 support first.

— Reply to this email directly or view it on GitHub https://github.com/sebastien/cuisine/issues/133#issuecomment-59475773.

sebastien avatar Oct 17 '14 12:10 sebastien

@sebastien

I checked some fabric's issues, and they are struggling in python 3 support and python 2.5 compatibility. Maybe I can do something for fabric first.

unionx avatar Oct 18 '14 04:10 unionx

Yes or help remove the dependency on fabric altogether. The only things that cuisine really depend on are "connect" and "run". Implementing the same functions on top of a Python 3 SSH library would do the trick. Le 2014-10-18 00:36, "帝归" [email protected] a écrit :

@sebastien https://github.com/sebastien

I checked some fabric's issues, and they are struggling in python 3 support and python 2.5 compatibility. Maybe I can do something for fabric first.

— Reply to this email directly or view it on GitHub https://github.com/sebastien/cuisine/issues/133#issuecomment-59598865.

sebastien avatar Oct 19 '14 15:10 sebastien

How about using @mathiasertl 's fork? Hopefully, we can make compatible changes.

pip install git+https://github.com/mathiasertl/fabric.git

shon avatar Oct 06 '17 11:10 shon

That's an option, did you test it? I'd be happy to make some updates for Py3K compatibility

sebastien avatar Oct 06 '17 13:10 sebastien

Hey guys,

Perhaps I can shed a little light on this:

  • My port is also available via pip: pip install Fabric3.
  • Paramiko is compatible with Python3
  • Upstream Fabric rejected multiple merge requests for Python3 support by me and others, because they absolutely must support Python 2.4 (!) and 2.5, which they think is still very widely used.

mathiasertl avatar Oct 06 '17 14:10 mathiasertl

Happy to hear it's available though pip. I don't understand Fabric's rationale -- who uses 2.5 these days? And even then, why not simply make a maintenance branch of Fabric -- there's no reason to be stuck in Python's middle ages.

sebastien avatar Oct 06 '17 14:10 sebastien

It's simple, there is a "version 2", it's not yet on GitHub so there is no code to show for it, but the alpha for the new code (once again, there is no GitHub repo) will be out soon:

Since January 2016 all issues concerning Python3 are just closed and locked without comment by the maintainer.

mathiasertl avatar Oct 06 '17 15:10 mathiasertl

Wait, I just found out that since last April there now actually is an alpha vor v2: http://bitprophet.org/blog/2017/04/17/fabric-2-alpha-beta

I haven't looked at it though!

mathiasertl avatar Oct 06 '17 15:10 mathiasertl

http://www.fabfile.org/changelog.html Fabric v2 is released! Does cuisine also correspond to Python 3?

masahitojp avatar May 12 '18 02:05 masahitojp