Skip to content
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

Unable to use Haigha with python3 #48

Open
Equidamoid opened this issue Mar 30, 2014 · 1 comment
Open

Unable to use Haigha with python3 #48

Equidamoid opened this issue Mar 30, 2014 · 1 comment

Comments

@Equidamoid
Copy link

When trying to install Haigha from git:

[16:44:11] vvs@randir haigha % python3.2 setup.py clean                          
running clean
[16:44:40] vvs@randir haigha % python3.2 setup.py build         
running build
running build_py
[16:44:44] vvs@randir haigha % python3.2 setup.py install --user
running install
running bdist_egg
running egg_info
writing haigha.egg-info/PKG-INFO
writing top-level names to haigha.egg-info/top_level.txt
writing dependency_links to haigha.egg-info/dependency_links.txt
reading manifest file 'haigha.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'scripts/'
warning: no files found matching '*.py' under directory 'haigha/'
no previously-included directories found matching '*.pyc'
writing manifest file 'haigha.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.8-x86_64/egg
creating build/bdist.macosx-10.8-x86_64/egg/haigha
copying build/lib/haigha/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
copying build/lib/haigha/channel.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
copying build/lib/haigha/channel_pool.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
creating build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/basic_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/channel_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/exchange_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/protocol_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/queue_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/classes/transaction_class.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/classes
copying build/lib/haigha/connection.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
creating build/bdist.macosx-10.8-x86_64/egg/haigha/connections
copying build/lib/haigha/connections/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/connections
copying build/lib/haigha/connections/rabbit_connection.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/connections
copying build/lib/haigha/exceptions.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
creating build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/content_frame.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/frame.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/header_frame.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/heartbeat_frame.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/frames/method_frame.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/frames
copying build/lib/haigha/message.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
copying build/lib/haigha/reader.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
creating build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/transports/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/transports/event_transport.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/transports/gevent_transport.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/transports/socket_transport.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/transports/transport.py -> build/bdist.macosx-10.8-x86_64/egg/haigha/transports
copying build/lib/haigha/writer.py -> build/bdist.macosx-10.8-x86_64/egg/haigha
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/channel.py to channel.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/channel_pool.py to channel_pool.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/basic_class.py to basic_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/channel_class.py to channel_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/exchange_class.py to exchange_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/protocol_class.py to protocol_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/queue_class.py to queue_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/classes/transaction_class.py to transaction_class.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/connection.py to connection.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/connections/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/connections/rabbit_connection.py to rabbit_connection.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/exceptions.py to exceptions.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/content_frame.py to content_frame.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/frame.py to frame.cpython-32.pyc
  File "build/bdist.macosx-10.8-x86_64/egg/haigha/frames/frame.py", line 65
    raise Frame.FormatError, str(e), sys.exc_info()[-1]
                           ^
SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/header_frame.py to header_frame.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/heartbeat_frame.py to heartbeat_frame.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/frames/method_frame.py to method_frame.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/message.py to message.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/reader.py to reader.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/transports/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/transports/event_transport.py to event_transport.cpython-32.pyc
  File "build/bdist.macosx-10.8-x86_64/egg/haigha/transports/event_transport.py", line 13
    print 'Failed to load EventSocket and event modules'
                                                       ^
SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/transports/gevent_transport.py to gevent_transport.cpython-32.pyc
  File "build/bdist.macosx-10.8-x86_64/egg/haigha/transports/gevent_transport.py", line 21
    print 'Failed to load gevent modules'
                                        ^
SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/transports/socket_transport.py to socket_transport.cpython-32.pyc
  File "build/bdist.macosx-10.8-x86_64/egg/haigha/transports/socket_transport.py", line 25
    def connect(self, (host,port), klass=socket.socket):
                      ^
SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/transports/transport.py to transport.cpython-32.pyc
byte-compiling build/bdist.macosx-10.8-x86_64/egg/haigha/writer.py to writer.cpython-32.pyc
creating build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying haigha.egg-info/PKG-INFO -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying haigha.egg-info/SOURCES.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying haigha.egg-info/dependency_links.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying haigha.egg-info/top_level.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/haigha-0.7.0-py3.2.egg' and adding 'build/bdist.macosx-10.8-x86_64/egg' to it
removing 'build/bdist.macosx-10.8-x86_64/egg' (and everything under it)
Processing haigha-0.7.0-py3.2.egg
Removing /Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg
Copying haigha-0.7.0-py3.2.egg to /Users/vvs/Library/Python/3.2/lib/python/site-packages
haigha 0.7.0 is already the active version in easy-install.pth

Installed /Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg
Processing dependencies for haigha==0.7.0
Finished processing dependencies for haigha==0.7.0

I've tried to invoke 2to3, installation succeeded but Connection constructor throwed an exception:

  File "/Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg/haigha/connection.py", line 98, in __init__
  File "/Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg/haigha/writer.py", line 186, in write_table
  File "/Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg/haigha/writer.py", line 195, in _write_item
  File "/Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg/haigha/writer.py", line 143, in write_shortstr
  File "/Users/vvs/Library/Python/3.2/lib/python/site-packages/haigha-0.7.0-py3.2.egg/haigha/writer.py", line 79, in write_octet
TypeError: an integer is required
@awestendorf
Copy link
Member

I was afraid of that. In my recent work I noted that there were some things that didn't look right and that the either Py3 support needed to be undeclared or fixed. I prefer to the latter, I'll try to fix that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants