[Cython] uvloop issue in Cython3
matus valo
matusvalo at gmail.com
Mon Aug 14 13:25:35 EDT 2023
Hi All,
I was recently migrating uvloop to cython3 [1]. Unfortunately, after
switching to cython3, uvloop testsuite fails [2]. I am puzzled mainly about
following error:
======================================================================
ERROR: test_process_delayed_stdio__paused__no_stdin
(test_process.Test_UV_Process_Delayed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/uvloop/uvloop/tests/test_process.py", line 938,
in test_process_delayed_stdio__paused__no_stdin
__uvloop_sleep_after_fork=True))
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
return future.result()
File "/home/runner/work/uvloop/uvloop/tests/test_process.py", line 911,
in run_sub
**kwargs)
File "uvloop/loop.pyx", line 2808, in subprocess_shell
return await self.__subprocess_run(protocol_factory, args, shell=True,
File "uvloop/loop.pyx", line 2734, in
uvloop.loop.Loop._Loop__subprocess_run
@cython.iterable_coroutine
TypeError: _Loop__subprocess_run() got an unexpected keyword argument
'__uvloop_sleep_after_fork'
======================================================================
ERROR: test_process_delayed_stdio__paused__stdin_pipe
(test_process.Test_UV_Process_Delayed)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/uvloop/uvloop/tests/test_process.py", line 919,
in test_process_delayed_stdio__paused__stdin_pipe
__uvloop_sleep_after_fork=True))
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
return future.result()
File "/home/runner/work/uvloop/uvloop/tests/test_process.py", line 911,
in run_sub
**kwargs)
File "uvloop/loop.pyx", line 2808, in subprocess_shell
return await self.__subprocess_run(protocol_factory, args, shell=True,
File "uvloop/loop.pyx", line 2734, in
uvloop.loop.Loop._Loop__subprocess_run
@cython.iterable_coroutine
TypeError: _Loop__subprocess_run() got an unexpected keyword argument
'__uvloop_sleep_after_fork'
The issue is regarding calling this method:
https://github.com/MagicStack/uvloop/blob/1dd40f17f3b0d37e3779b6ad5041bab335142337/uvloop/loop.pyx#L2735-L2753
When the same code base is compiled in Cython 0.29.X and the test suite is
run, there is no such error. I tried to create a simple reproducer but
failed.
What do you think? Is it regression in Cython 3.0? Do you have any hint
where the root cause can be? If everything fails, I will try to bisect the
issue.
Matus
[1] https://github.com/MagicStack/uvloop/pull/534
[2] https://github.com/MagicStack/uvloop/pull/534/checks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/cython-devel/attachments/20230814/4cb7d973/attachment.html>
More information about the cython-devel
mailing list