New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Python 3 #13

Closed
thijstriemstra opened this Issue Dec 13, 2012 · 46 comments

Comments

Projects
None yet
@thijstriemstra

thijstriemstra commented Dec 13, 2012

It would be nice to support Python 3 at some point. Getting this error at the moment when running python3.3 setup.py build:

File "setup.py", line 185
    except Exception, exc:
                ^
SyntaxError: invalid syntax
@ask

This comment has been minimized.

Show comment
Hide comment
@ask

ask Dec 17, 2012

Member

Yeah, Python 3 support is planned, but it would most likely also require changes at the C level

Member

ask commented Dec 17, 2012

Yeah, Python 3 support is planned, but it would most likely also require changes at the C level

@jensenbox

This comment has been minimized.

Show comment
Hide comment
@jensenbox

jensenbox Nov 9, 2013

Same issue here - enclosed is a larger stack trace:

Downloading/unpacking librabbitmq (from -r /home/christian/documents/projects/rh/requirements.txt (line 41))
  Downloading librabbitmq-1.0.2.tar.gz (455kB): 455kB downloaded
  Running setup.py egg_info for package librabbitmq
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_christian/librabbitmq/setup.py", line 185
        except Exception, exc:
                        ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/pip_build_christian/librabbitmq/setup.py", line 185

    except Exception, exc:

                    ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_christian/librabbitmq
Storing complete log in /home/christian/.pip/pip.log

jensenbox commented Nov 9, 2013

Same issue here - enclosed is a larger stack trace:

Downloading/unpacking librabbitmq (from -r /home/christian/documents/projects/rh/requirements.txt (line 41))
  Downloading librabbitmq-1.0.2.tar.gz (455kB): 455kB downloaded
  Running setup.py egg_info for package librabbitmq
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_christian/librabbitmq/setup.py", line 185
        except Exception, exc:
                        ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/pip_build_christian/librabbitmq/setup.py", line 185

    except Exception, exc:

                    ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_christian/librabbitmq
Storing complete log in /home/christian/.pip/pip.log
@uschen

This comment has been minimized.

Show comment
Hide comment
@uschen

uschen Nov 14, 2013

Any schedule for 3 support?

uschen commented Nov 14, 2013

Any schedule for 3 support?

@ask

This comment has been minimized.

Show comment
Hide comment
@ask

ask Nov 15, 2013

Member

Not yet. Need to port the C code too and I haven't even looked at the changes in the Python 3 C API.

Member

ask commented Nov 15, 2013

Not yet. Need to port the C code too and I haven't even looked at the changes in the Python 3 C API.

@kamikaze

This comment has been minimized.

Show comment
Hide comment
@kamikaze

kamikaze Dec 4, 2013

Have the same problem with 1.0.3

kamikaze commented Dec 4, 2013

Have the same problem with 1.0.3

@w3iBStime

This comment has been minimized.

Show comment
Hide comment
@w3iBStime

w3iBStime Mar 14, 2014

Thanks for a great library!
+1 for Py3.

w3iBStime commented Mar 14, 2014

Thanks for a great library!
+1 for Py3.

@w3iBStime

This comment has been minimized.

Show comment
Hide comment
@w3iBStime

w3iBStime Mar 14, 2014

From initial digging, it looks like it'll need, among other things(?):

#if PY_MAJOR_VERSION >=3
#  define Py_TPFLAGS_HAVE_ITER 0
#endif

https://mail.python.org/pipermail/python-porting/2012-April/000289.html

Adding PyTypeObject *ob_type; to PyRabbitMQ_Connection (via the PyObject_HEAD_INIT macro? http://docs.python.org/3.3/c-api/typeobj.html)

...and some changes related to string encoding (everything is unicode under Py3). E.g.,

  • PyString_FromString -> PyUnicode_FromString
  • PyString_AsString -> PyUnicode_AsEncodedString

2to3 appears to take care of most of the Python code.

w3iBStime commented Mar 14, 2014

From initial digging, it looks like it'll need, among other things(?):

#if PY_MAJOR_VERSION >=3
#  define Py_TPFLAGS_HAVE_ITER 0
#endif

https://mail.python.org/pipermail/python-porting/2012-April/000289.html

Adding PyTypeObject *ob_type; to PyRabbitMQ_Connection (via the PyObject_HEAD_INIT macro? http://docs.python.org/3.3/c-api/typeobj.html)

...and some changes related to string encoding (everything is unicode under Py3). E.g.,

  • PyString_FromString -> PyUnicode_FromString
  • PyString_AsString -> PyUnicode_AsEncodedString

2to3 appears to take care of most of the Python code.

@jbonfante

This comment has been minimized.

Show comment
Hide comment
@jbonfante

jbonfante Apr 2, 2014

+1 for py3

jbonfante commented Apr 2, 2014

+1 for py3

@timdawborn

This comment has been minimized.

Show comment
Hide comment
@timdawborn

timdawborn commented Apr 9, 2014

+1

@kamikaze

This comment has been minimized.

Show comment
Hide comment
@kamikaze

kamikaze commented Apr 25, 2014

+1

@bosr

This comment has been minimized.

Show comment
Hide comment
@bosr

bosr commented May 6, 2014

+1

@sgeoffrey

This comment has been minimized.

Show comment
Hide comment
@sgeoffrey

sgeoffrey commented May 27, 2014

+1

@synthead

This comment has been minimized.

Show comment
Hide comment
@synthead

synthead May 30, 2014

Ditto. I'd love to see Python 3 support!

synthead commented May 30, 2014

Ditto. I'd love to see Python 3 support!

@adampl

This comment has been minimized.

Show comment
Hide comment
@adampl

adampl commented Jun 3, 2014

+1

@omerzimp

This comment has been minimized.

Show comment
Hide comment
@omerzimp

omerzimp Jun 10, 2014

@ask What do you think about converting the bindings to CFFI so that Python 3 bindings would be possible and PyPy would be supported?

omerzimp commented Jun 10, 2014

@ask What do you think about converting the bindings to CFFI so that Python 3 bindings would be possible and PyPy would be supported?

@davidfischer-ch

This comment has been minimized.

Show comment
Hide comment
@davidfischer-ch

davidfischer-ch commented Jun 10, 2014

+1

@ask

This comment has been minimized.

Show comment
Hide comment
@ask

ask Jun 10, 2014

Member

@omerzimp I don't know how powerful CFFI is, and if that is possible, but that is something I have been considering. I doubt I would have the time to do so anytime soon though.

Member

ask commented Jun 10, 2014

@omerzimp I don't know how powerful CFFI is, and if that is possible, but that is something I have been considering. I doubt I would have the time to do so anytime soon though.

@Xiol

This comment has been minimized.

Show comment
Hide comment
@Xiol

Xiol Jun 12, 2014

+1

Last thing holding me back from porting my stuff across to Python 3 entirely!

Xiol commented Jun 12, 2014

+1

Last thing holding me back from porting my stuff across to Python 3 entirely!

@w3iBStime

This comment has been minimized.

Show comment
Hide comment
@w3iBStime

w3iBStime Jun 12, 2014

@Xiol : If you can live with the performance, py-amqp (https://pypi.python.org/pypi/amqp/) is compatible with Python 3.

I also had to work around an issue with heartbeats since my consumers are long-running (the work-around is available here: celery/py-amqp#37 (comment))

w3iBStime commented Jun 12, 2014

@Xiol : If you can live with the performance, py-amqp (https://pypi.python.org/pypi/amqp/) is compatible with Python 3.

I also had to work around an issue with heartbeats since my consumers are long-running (the work-around is available here: celery/py-amqp#37 (comment))

@glyphobet

This comment has been minimized.

Show comment
Hide comment
@glyphobet

glyphobet commented Jul 24, 2014

+1

@hwkns

This comment has been minimized.

Show comment
Hide comment
@hwkns

hwkns commented Aug 30, 2014

+1

@hovissimo

This comment has been minimized.

Show comment
Hide comment
@hovissimo

hovissimo Sep 8, 2014

One more voice wishing for Python 3 support

hovissimo commented Sep 8, 2014

One more voice wishing for Python 3 support

@vitaly4uk

This comment has been minimized.

Show comment
Hide comment
@vitaly4uk

vitaly4uk commented Oct 24, 2014

+1

@ngonzalvez

This comment has been minimized.

Show comment
Hide comment
@ngonzalvez

ngonzalvez commented Nov 17, 2014

+1

@jsalvet

This comment has been minimized.

Show comment
Hide comment
@jsalvet

jsalvet commented Nov 19, 2014

+1000

@littlezz

This comment has been minimized.

Show comment
Hide comment
@littlezz

littlezz commented Dec 23, 2014

+1

@grahamc

This comment has been minimized.

Show comment
Hide comment
@grahamc

grahamc Feb 17, 2015

Oh what the heck, +1

grahamc commented Feb 17, 2015

Oh what the heck, +1

@dwieeb

This comment has been minimized.

Show comment
Hide comment
@dwieeb

dwieeb commented Feb 18, 2015

+1

@zloy531

This comment has been minimized.

Show comment
Hide comment
@zloy531

zloy531 commented Feb 23, 2015

+1

@gavinmh

This comment has been minimized.

Show comment
Hide comment
@gavinmh

gavinmh Feb 23, 2015

+1 for Python3

gavinmh commented Feb 23, 2015

+1 for Python3

@r-darwish

This comment has been minimized.

Show comment
Hide comment
@r-darwish

r-darwish commented Mar 11, 2015

+1

@mark-adams

This comment has been minimized.

Show comment
Hide comment
@mark-adams

mark-adams commented Mar 13, 2015

+1

@mstajdohar

This comment has been minimized.

Show comment
Hide comment
@mstajdohar

mstajdohar commented Mar 19, 2015

+1

@dgelvin

This comment has been minimized.

Show comment
Hide comment
@dgelvin

dgelvin Mar 25, 2015

Made a first attempt at this here.

dgelvin commented Mar 25, 2015

Made a first attempt at this here.

@iyn

This comment has been minimized.

Show comment
Hide comment
@iyn

iyn commented Apr 21, 2015

+1

@aidanlister

This comment has been minimized.

Show comment
Hide comment
@aidanlister

aidanlister commented May 10, 2015

+1

@underyx

This comment has been minimized.

Show comment
Hide comment
@underyx

underyx commented May 12, 2015

+1

@btoueg

This comment has been minimized.

Show comment
Hide comment
@btoueg

btoueg commented Jun 10, 2015

+1

@mastak

This comment has been minimized.

Show comment
Hide comment
@mastak

mastak commented Jun 15, 2015

+1

@ajutras

This comment has been minimized.

Show comment
Hide comment
@ajutras

ajutras commented Jun 18, 2015

+1

@thedrow thedrow referenced this issue Jun 20, 2015

Closed

Celery Kickstarter Ideas #2655

0 of 21 tasks complete
@anthraxx

This comment has been minimized.

Show comment
Hide comment
@anthraxx

anthraxx commented Jun 24, 2015

+1

@arthurk

This comment has been minimized.

Show comment
Hide comment
@arthurk

arthurk commented Jul 24, 2015

+1

@malinoff

This comment has been minimized.

Show comment
Hide comment
@malinoff

malinoff Jul 24, 2015

Member

I think it is enough of "+1"s. I'm going to lock this issue not because we won't add python 3 support, but to avoid messing up our mailboxes.

If anybody of "+1"ers have some time, please spend it on creating pull requests for python 3 support. Thank you.

Member

malinoff commented Jul 24, 2015

I think it is enough of "+1"s. I'm going to lock this issue not because we won't add python 3 support, but to avoid messing up our mailboxes.

If anybody of "+1"ers have some time, please spend it on creating pull requests for python 3 support. Thank you.

@celery celery locked and limited conversation to collaborators Jul 24, 2015

@auvipy

This comment has been minimized.

Show comment
Hide comment
@auvipy

auvipy Aug 6, 2016

Member

@ask @malinoff I am gonna tackle this issue to support python3

Member

auvipy commented Aug 6, 2016

@ask @malinoff I am gonna tackle this issue to support python3

@auvipy auvipy self-assigned this Aug 6, 2016

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Aug 9, 2016

Member

I think the next step would be to improve the test suite. We especially need to test the Connection object and its methods return types.

Member

berkerpeksag commented Aug 9, 2016

I think the next step would be to improve the test suite. We especially need to test the Connection object and its methods return types.

@thedrow

This comment has been minimized.

Show comment
Hide comment
@thedrow

thedrow May 30, 2018

Contributor

Finally fixed. :)

Contributor

thedrow commented May 30, 2018

Finally fixed. :)

@thedrow thedrow closed this May 30, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.