Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457956 - dev-python/py-amqp-1.0.6-r1: broken with python3*
Summary: dev-python/py-amqp-1.0.6-r1: broken with python3*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Corentin Chary (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-3.2
  Show dependency tree
 
Reported: 2013-02-17 12:55 UTC by Michał Górny
Modified: 2014-03-12 05:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log with python3.3 (build-python3.3.log,11.39 KB, text/plain)
2013-02-17 12:55 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-17 12:55:33 UTC
Created attachment 339140 [details]
Build log with python3.3

With python3.2, the tests fail with the following errors:

ERROR: test_table (test_serialization.TestSerialization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/py-amqp-1.0.6-r1/work/amqp-1.0.6-python3_3/funtests/test_serialization.py", line 304, in test_table
    w.write_table(val)
  File "/tmp/portage/dev-python/py-amqp-1.0.6-r1/work/amqp-1.0.6-python3_3/lib/amqp/serialization.py", line 300, in write_table
    table_data.write(pack('>ci', 'I', v))
struct.error: char format requires a bytes object of length 1

and a few similar ones.


Additionally, if you run the tests by hand (not omitting socket tests), you'd notice that error handling is broken in py3;

ERROR: test_with (test_with.TestChannel)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/amqp-1.0.6/funtests/test_with.py", line 33, in test_with
    with Connection(**settings.connect_args) as conn:
  File "/tmp/amqp-1.0.6/build/lib/amqp/connection.py", line 146, in __init__
    self.transport = create_transport(host, connect_timeout, ssl)
  File "/tmp/amqp-1.0.6/build/lib/amqp/transport.py", line 243, in create_transport
    return TCPTransport(host, connect_timeout)
  File "/tmp/amqp-1.0.6/build/lib/amqp/transport.py", line 89, in __init__
    raise socket.error(msg)
UnboundLocalError: local variable 'msg' referenced before assignment

and similar ones.

I will restrict python3 support in the -r1 ebuild.
Comment 1 Tolga Dalman 2013-05-03 10:27:15 UTC
Could you try py-amqp-1.1.0 ? It should have been fixed as per https://github.com/celery/py-amqp/blob/master/Changelog.
Comment 2 Patrick Lauer gentoo-dev 2014-03-12 05:15:46 UTC
New version doesn't do that anymore