ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Python3 support #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?

0.6.1

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project?

Yes

Which broker are you using (RabbitMQ?) which version?

RabbitMQ 1.6

Which version of Python?

3.1.2

What steps will reproduce the problem?
1. python3 setup.py install
2.
3.

What is the expected output? What do you see instead?

expected output
===========
python3.1 setup.py install
running install
running build
running build_py
copying amqplib/client_0_8/__init__.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/abstract_channel.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/basic_message.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/channel.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/connection.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/method_framing.py -> build/lib/amqplib/client_0_8
copying amqplib/client_0_8/serialization.py -> build/lib/amqplib/client_0_8
running install_lib
copying build/lib/amqplib/client_0_8/__init__.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/abstract_channel.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/basic_message.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/channel.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/connection.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/method_framing.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
copying build/lib/amqplib/client_0_8/serialization.py -> 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/__init__.py to __init__.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/abstract_channel.py to abstract_channel.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/basic_message.py to basic_message.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/channel.py to channel.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/connection.py to connection.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/method_framing.py to method_framing.pyc
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/serialization.py to serialization.pyc
running install_egg_info
Removing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib-0.6.2_devel-py3.1.egg-info
Writing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib-0.6.2_devel-py3.1.egg-info

Actual Output
=========
python3.1 setup.py install
running install
running build
running build_py
running install_lib
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/method_framing.py to method_framing.pyc
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/amqplib/client_0_8/method_framing.py", line 128
    except Exception, e:
                    ^
SyntaxError: invalid syntax

byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib/client_0_8/serialization.py to serialization.pyc
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/amqplib/client_0_8/serialization.py", line 55
    print hex + ''.join(char_dump)
            ^
SyntaxError: invalid syntax

running install_egg_info
Removing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib-0.6.2_devel-py3.1.egg-info
Writing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/am
qplib-0.6.2_devel-py3.1.egg-info

Please provide any additional information below.

Running the following two commands over the source seems to allow it to install

2to3-3.1 amqplib/ -w
2to3-3.1 setup.py -w

How can I help add python3 support?

Original issue reported on code.google.com by kelsey.h...@gmail.com on 14 Jul 2010 at 11:44

GoogleCodeExporter commented 9 years ago
yo i have the same issue,

does the above means

1) except Exception as e:

2) print (hex + ''.join(char_dump))

for 3k right?

Original comment by Adrian.Migraso on 4 Jan 2011 at 9:36

GoogleCodeExporter commented 9 years ago

Original comment by barry.pe...@gmail.com on 28 Mar 2011 at 6:17