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

/test/test_readv.py fails to run on Ubuntu and FreeBSD #83

Open
coder03 opened this issue Dec 7, 2016 · 1 comment
Open

/test/test_readv.py fails to run on Ubuntu and FreeBSD #83

coder03 opened this issue Dec 7, 2016 · 1 comment

Comments

@coder03
Copy link

coder03 commented Dec 7, 2016

chatty@ubuntu:~shrapnel/test$ python test_readv.py
E

ERROR: test_readv (main.Test)
Test readv.

Traceback (most recent call last):
File "test_readv.py", line 113, in test_readv
'01234567'))
File "test_readv.py", line 77, in testit
blocks = coro.with_timeout(5, s.readv, block_receives)
File "coro/_coro.pyx", line 1111, in coro._coro.sched.with_timeout (coro/_coro.c:16399)
TypeError: Argument 'size_list' has incorrect type (expected list, got tuple)


Ran 1 test in 0.001s

FAILED (errors=1)
7: Tue Dec 6 22:26:19 2016 thread 7 (<bound method TestSession.run of <main.TestSession instance at 0x7f1f252603f8>>): error '('coro/oserrors.pyx coro.oserrors.map_exception (coro/oserrors.c:874)|44', "<class 'coro.oserrors.EPIPE'>", '[Errno 32] Broken pipe', '[coro/_coro.pyx coro._coro._wrap1 (coro/_coro.c:12115)|772] [test_readv.py run|63] [coro/socket.pyx coro._coro.sock.send (coro/_coro.c:27626)|282] [coro/socket.pyx coro._coro.sock.send (coro/_coro.c:27500)|314] [coro/pyrex_helpers.pyx coro._coro.raise_oserror (coro/_coro.c:3879)|32] [coro/oserrors.pyx coro.oserrors.map_exception (coro/oserrors.c:874)|44]')'
chatty@ubuntu:~shrapnel/test$

@samrushing
Copy link
Member

I tried changing the test to pass lists instead of tuples, that was not enough. Now it's complaining that 'tuple' object does not support item assignment on socket.pyx::559.

Looks like this kinda thing no longer works:

x = PyTuple_New(1)
x[0] = 1

The code either needs to use PyTuple_SetItem (or something with a name similar to that), or needs to be rewritten in a simpler style that plays better with today's smarter Cython.

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