GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updates for Cython3 by alan-brooks · Pull Request #587 · MagicStack/uvloop

Conversation

@alan-brooks

@alan-brooks alan-brooks commented Dec 28, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Remove SSL depreciation warnings
buillt on debian 12.6 python-3.11 Cython-3.0.7 libuv-1.46.0

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thesamesam and edgarrmondragon reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
alan-brooks added 4 commits December 28, 2023 12:18
@alan-brooks
Updates for Cython3
83ae19d
Remove SSL depreciation warnings
buillt on debian 12.6 python-3.22 Cython-3.0.7 libuv-1.46.0
@alan-brooks
_set_coroutine_debug has args difference in python 3.11
55bab4f
@alan-brooks
fix tests on python 3.8
95a147f
@alan-brooks
fix arg count for wrap()
ca06a74
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jan 14, 2024
@thesamesam
dev-python/uvloop: fix cython-3 compat
cd37f8e
Bug: MagicStack/uvloop#586
Bug: MagicStack/uvloop#587
Signed-off-by: Sam James <[email protected]>
@thesamesam thesamesam mentioned this pull request Jan 14, 2024
Please upgrade cython (3.0.x) #586
Closed
@jameshilliard

jameshilliard commented Feb 11, 2024

Copy link
Copy Markdown

@fantix Think you could take a look at this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hroncok hroncok mentioned this pull request Feb 27, 2024
libuv 1.48.0: getaddrinfo('', 0): OSError: [Errno 22] Invalid argument #596
Closed
@kloczek

kloczek commented Mar 17, 2024

Copy link
Copy Markdown

Looks like dependencies have not been updated

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...

ERROR Missing dependencies:
        Cython<0.30.0,>=0.29.36

With below patch

--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,7 +43,7 @@
     'pycodestyle~=2.9.0',
     'pyOpenSSL~=23.0.0',
     'mypy>=0.800',
-    'Cython(>=0.29.36,<0.30.0)',
+    'Cython(>=0.29.36)',
 ]
 docs = [
     'Sphinx~=4.1.2',
@@ -55,7 +55,7 @@
 requires = [
     "setuptools>=60",
     "wheel",
-    "Cython(>=0.29.36,<0.30.0)",
+    "Cython(>=0.29.36)",
 ]
 build-backend = "setuptools.build_meta"

I was able to build uvloop however pytest fails in few units

Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-uvloop-0.19.0-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-uvloop-0.19.0-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network' --import-mode importlib
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0
configfile: pyproject.toml
testpaths: tests
plugins: hypothesis-6.99.5
collected 504 items

tests/test_aiohttp.py ....
tests/test_base.py .......................................................................................
tests/test_context.py ..................s....s......
tests/test_cython.py .
tests/test_dealloc.py F
tests/test_dns.py ..................FFs..............................
tests/test_executors.py ....
tests/test_fs_event.py ..
tests/test_libuv_api.py ..
tests/test_pipes.py ............
tests/test_process.py ..Traceback (most recent call last):
  File "<string>", line 29, in <module>
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>
    from uvloop.loop import Loop as __BaseLoop  # NOQA
ModuleNotFoundError: No module named 'uvloop.loop'
F...............................................................................
tests/test_process_spawning.py .
tests/test_regr1.py .
tests/test_runner.py ..
tests/test_signals.py F.Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>
    from uvloop.loop import Loop as __BaseLoop  # NOQA
ModuleNotFoundError: No module named 'uvloop.loop'
F..FFFFFFF.Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>
    from uvloop.loop import Loop as __BaseLoop  # NOQA
ModuleNotFoundError: No module named 'uvloop.loop'
F.FFFFFF
tests/test_sockets.py .................................
tests/test_sourcecode.py ss
tests/test_tcp.py ...............................................................s................s.s.ss.ssssssss.ss..ssssssss
tests/test_testbase.py ...
tests/test_udp.py .......................
tests/test_unix.py ..................................

========================================================================================= FAILURES ==========================================================================================
________________________________________________________________________________ TestDealloc.test_dealloc_1 _________________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dealloc.py", line 61, in test_dealloc_1
    self.assertEqual(err, b'', 'stderr is not empty')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b'' : stderr is not empty
______________________________________________________________________________ Test_UV_DNS.test_getaddrinfo_8 _______________________________________________________________________________
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 33, in _test_getaddrinfo
    a1 = socket.getaddrinfo(*args, **kwargs)
  File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 107, in test_getaddrinfo_8
    self._test_getaddrinfo('', 0)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 48, in _test_getaddrinfo
    raise ex
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 38, in _test_getaddrinfo
    a2 = self.loop.run_until_complete(
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "uvloop/loop.pyx", line 1527, in getaddrinfo
    return await self._getaddrinfo(
OSError: [Errno 22] Invalid argument
______________________________________________________________________________ Test_UV_DNS.test_getaddrinfo_9 _______________________________________________________________________________
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 33, in _test_getaddrinfo
    a1 = socket.getaddrinfo(*args, **kwargs)
  File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 111, in test_getaddrinfo_9
    self._test_getaddrinfo(b'', 0)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 48, in _test_getaddrinfo
    raise ex
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_dns.py", line 38, in _test_getaddrinfo
    a2 = self.loop.run_until_complete(
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "uvloop/loop.pyx", line 1527, in getaddrinfo
    return await self._getaddrinfo(
OSError: [Errno 22] Invalid argument
_________________________________________________________________________ Test_UV_Process.test_process_double_close _________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_process.py", line 863, in test_process_double_close
    subprocess.run([sys.executable, '-c', script], check=True)
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', '\nimport os\nimport sys\nfrom unittest import mock\n\nimport asyncio\n\npipes = []\noriginal_os_pipe = os.pipe\ndef log_pipes():\n    pipe = original_os_pipe()\n    pipes.append(pipe)\n    return pipe\n\ndups = []\noriginal_os_dup = os.dup\ndef log_dups(*args, **kwargs):\n    dup = original_os_dup(*args, **kwargs)\n    dups.append(dup)\n    return dup\n\nwith mock.patch(\n    "os.close", wraps=os.close\n) as os_close, mock.patch(\n    "os.pipe", new=log_pipes\n), mock.patch(\n    "os.dup", new=log_dups\n):\n    import uvloop\n\n\nasync def test():\n    proc = await asyncio.create_subprocess_exec(\n        sys.executable, "-c", "pass"\n    )\n    await proc.communicate()\n\nuvloop.run(test())\n\nstdin, stdout, stderr = dups\n(r, w), = pipes\nassert os_close.mock_calls == [\n    mock.call(w),\n    mock.call(r),\n    mock.call(stderr),\n    mock.call(stdout),\n    mock.call(stdin),\n]\n']' returned non-zero exit status 1.
_____________________________________________________________________ Test_UV_Signals.test_signals_and_custom_handler_1 _____________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 296, in test_signals_and_custom_handler_1
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 280, in runner
    proc.send_signal(signal.SIGUSR1)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
________________________________________________________________________ Test_UV_Signals.test_signals_fork_in_thread ________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 382, in test_signals_fork_in_thread
    subprocess.check_call([
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', b'-W', b'ignore', b'-c', "\\\nimport asyncio\nimport multiprocessing\nimport signal\nimport sys\nimport threading\nimport uvloop\n\nmultiprocessing.set_start_method('fork')\n\ndef subprocess():\n    loop = uvloop.new_event_loop()\n    loop.add_signal_handler(signal.SIGINT, lambda *a: None)\n\ndef run():\n    loop = uvloop.new_event_loop()\n    loop.add_signal_handler(signal.SIGINT, lambda *a: None)\n    p = multiprocessing.Process(target=subprocess)\n    t = threading.Thread(target=p.start)\n    t.start()\n    t.join()\n    p.join()\n    sys.exit(p.exitcode)\n\nrun()\n"]' returned non-zero exit status 1.
__________________________________________________________________ Test_UV_Signals.test_signals_sigint_and_custom_handler ___________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 229, in test_signals_sigint_and_custom_handler
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 221, in runner
    proc.send_signal(signal.SIGHUP)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
____________________________________________________________________ Test_UV_Signals.test_signals_sigint_pycode_continue ____________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 98, in test_signals_sigint_pycode_continue
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 93, in runner
    proc.send_signal(signal.SIGINT)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
______________________________________________________________________ Test_UV_Signals.test_signals_sigint_pycode_stop ______________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 53, in test_signals_sigint_pycode_stop
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 48, in runner
    proc.send_signal(signal.SIGINT)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
________________________________________________________________________ Test_UV_Signals.test_signals_sigint_uvcode _________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 137, in test_signals_sigint_uvcode
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 133, in runner
    proc.send_signal(signal.SIGINT)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
_________________________________________________________________ Test_UV_Signals.test_signals_sigint_uvcode_two_loop_runs __________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 176, in test_signals_sigint_uvcode_two_loop_runs
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 172, in runner
    proc.send_signal(signal.SIGINT)
  File "/usr/lib64/python3.9/asyncio/subprocess.py", line 138, in send_signal
    self._transport.send_signal(signal)
  File "uvloop/handles/process.pyx", line 667, in uvloop.loop.UVProcessTransport.send_signal
    self._check_proc()
  File "uvloop/handles/process.pyx", line 401, in uvloop.loop.UVProcessTransport._check_proc
    raise ProcessLookupError()
ProcessLookupError
_____________________________________________________________________ Test_UV_Signals.test_signals_wakeup_fd_unchanged ______________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 348, in test_signals_wakeup_fd_unchanged
    self.loop.run_until_complete(runner())
  File "uvloop/loop.pyx", line 1516, in uvloop.loop.Loop.run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 345, in runner
    self.assertEqual(err, b'')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
____________________________________________________________________ Test_AIO_Signals.test_signals_and_custom_handler_1 _____________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 296, in test_signals_and_custom_handler_1
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 293, in runner
    self.assertEqual(err, b'')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
_______________________________________________________________________ Test_AIO_Signals.test_signals_fork_in_thread ________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 382, in test_signals_fork_in_thread
    subprocess.check_call([
  File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', b'-W', b'ignore', b'-c', "\\\nimport asyncio\nimport multiprocessing\nimport signal\nimport sys\nimport threading\nimport uvloop\n\nmultiprocessing.set_start_method('fork')\n\ndef subprocess():\n    loop = asyncio.new_event_loop()\n    loop.add_signal_handler(signal.SIGINT, lambda *a: None)\n\ndef run():\n    loop = asyncio.new_event_loop()\n    loop.add_signal_handler(signal.SIGINT, lambda *a: None)\n    p = multiprocessing.Process(target=subprocess)\n    t = threading.Thread(target=p.start)\n    t.start()\n    t.join()\n    p.join()\n    sys.exit(p.exitcode)\n\nrun()\n"]' returned non-zero exit status 1.
__________________________________________________________________ Test_AIO_Signals.test_signals_sigint_and_custom_handler __________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 229, in test_signals_sigint_and_custom_handler
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 225, in runner
    self.assertEqual(err, b'')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
___________________________________________________________________ Test_AIO_Signals.test_signals_sigint_pycode_continue ____________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 98, in test_signals_sigint_pycode_continue
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 95, in runner
    self.assertEqual(err, b'')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
_____________________________________________________________________ Test_AIO_Signals.test_signals_sigint_pycode_stop ______________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 53, in test_signals_sigint_pycode_stop
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 50, in runner
    self.assertIn(b'KeyboardInterrupt', err)
  File "/usr/lib64/python3.9/unittest/case.py", line 1104, in assertIn
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib64/python3.9/unittest/case.py", line 676, in fail
    raise self.failureException(msg)
AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>\n    from uvloop.loop import Loop as __BaseLoop  # NOQA\nModuleNotFoundError: No module named \'uvloop.loop\'\n'
________________________________________________________________________ Test_AIO_Signals.test_signals_sigint_uvcode ________________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 137, in test_signals_sigint_uvcode
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 135, in runner
    self.assertIn(b'KeyboardInterrupt', err)
  File "/usr/lib64/python3.9/unittest/case.py", line 1104, in assertIn
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib64/python3.9/unittest/case.py", line 676, in fail
    raise self.failureException(msg)
AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>\n    from uvloop.loop import Loop as __BaseLoop  # NOQA\nModuleNotFoundError: No module named \'uvloop.loop\'\n'
_________________________________________________________________ Test_AIO_Signals.test_signals_sigint_uvcode_two_loop_runs _________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 176, in test_signals_sigint_uvcode_two_loop_runs
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 174, in runner
    self.assertIn(b'KeyboardInterrupt', err)
  File "/usr/lib64/python3.9/unittest/case.py", line 1104, in assertIn
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib64/python3.9/unittest/case.py", line 676, in fail
    raise self.failureException(msg)
AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvloop/__init__.py", line 9, in <module>\n    from uvloop.loop import Loop as __BaseLoop  # NOQA\nModuleNotFoundError: No module named \'uvloop.loop\'\n'
_____________________________________________________________________ Test_AIO_Signals.test_signals_wakeup_fd_unchanged _____________________________________________________________________
Traceback (most recent call last):
  File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 348, in test_signals_wakeup_fd_unchanged
    self.loop.run_until_complete(runner())
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_signals.py", line 345, in runner
    self.assertEqual(err, b'')
  File "/usr/lib64/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.9/unittest/case.py", line 830, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
===================================================================================== warnings summary ======================================================================================
tests/test_aiohttp.py::Test_UV_AioHTTP::test_aiohttp_graceful_shutdown
tests/test_aiohttp.py::Test_AIO_AioHTTP::test_aiohttp_graceful_shutdown
  /home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/tests/test_aiohttp.py:81: NotAppKeyWarning: It is recommended to use web.AppKey instances for keys.
  https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
    app['websockets'] = weakref.WeakSet()

tests/test_aiohttp.py::Test_UV_AioHTTP::test_aiohttp_graceful_shutdown
tests/test_aiohttp.py::Test_AIO_AioHTTP::test_aiohttp_graceful_shutdown
  /usr/lib64/python3.9/site-packages/aiohttp/web_runner.py:95: DeprecationWarning: shutdown_timeout should be set on BaseRunner
    super().__init__(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_context.py:435: this seems to be a bug in asyncio
SKIPPED [1] tests/test_context.py:578: this seems to be a bug in asyncio
SKIPPED [1] tests/test_dns.py:210: Skipped
SKIPPED [1] tests/test_sourcecode.py:13: flake8 module is missing
SKIPPED [1] tests/test_sourcecode.py:40: mypy module is missing
SKIPPED [2] tests/test_tcp.py:2654: Skipped
SKIPPED [1] tests/test_tcp.py:3023: bpo-39951
SKIPPED [1] tests/test_tcp.py:1769: Skipped
SKIPPED [1] tests/test_tcp.py:1483: Skipped
SKIPPED [1] tests/test_tcp.py:1447: Skipped
SKIPPED [1] tests/test_tcp.py:2079: asyncio does not support SSL over SSL
SKIPPED [1] tests/test_tcp.py:3105: Skipped
SKIPPED [1] tests/test_tcp.py:2586: Skipped
SKIPPED [1] tests/test_tcp.py:2816: Skipped
SKIPPED [1] tests/test_tcp.py:2225: asyncio does not support renegotiation
SKIPPED [1] tests/test_tcp.py:2443: Skipped
SKIPPED [1] tests/test_tcp.py:2345: Skipped
SKIPPED [1] tests/test_tcp.py:2883: Skipped
SKIPPED [1] tests/test_tcp.py:2941: Skipped
SKIPPED [1] tests/test_tcp.py:1535: Skipped
SKIPPED [1] tests/test_tcp.py:1835: Skipped
SKIPPED [1] tests/test_tcp.py:1656: Skipped
SKIPPED [1] tests/test_tcp.py:1705: Skipped
SKIPPED [1] tests/test_tcp.py:1997: Skipped
SKIPPED [1] tests/test_tcp.py:1934: Skipped
SKIPPED [1] tests/test_tcp.py:1520: Skipped
SKIPPED [1] tests/test_tcp.py:2507: Skipped
FAILED tests/test_dealloc.py::TestDealloc::test_dealloc_1 - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b'' : stderr is not empty
FAILED tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_8 - OSError: [Errno 22] Invalid argument
FAILED tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_9 - OSError: [Errno 22] Invalid argument
FAILED tests/test_process.py::Test_UV_Process::test_process_double_close - subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', '\nimport os\nimport sys\nfrom unittest import mock\n\nimport asyncio\n\npipes = []\noriginal_os_pipe = os.pipe\ndef ...
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_and_custom_handler_1 - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_fork_in_thread - subprocess.CalledProcessError: Command '['/usr/bin/python3', b'-W', b'ignore', b'-c', "\\\nimport asyncio\nimport multiprocessing\nimport signal\nimport sys\nimport threading\nimport u...
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_sigint_and_custom_handler - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_sigint_pycode_continue - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_sigint_pycode_stop - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_sigint_uvcode - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_sigint_uvcode_two_loop_runs - ProcessLookupError
FAILED tests/test_signals.py::Test_UV_Signals::test_signals_wakeup_fd_unchanged - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_and_custom_handler_1 - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_fork_in_thread - subprocess.CalledProcessError: Command '['/usr/bin/python3', b'-W', b'ignore', b'-c', "\\\nimport asyncio\nimport multiprocessing\nimport signal\nimport sys\nimport threading\nimport u...
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_sigint_and_custom_handler - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_sigint_pycode_continue - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_sigint_pycode_stop - AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvlo...
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_sigint_uvcode - AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvlo...
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_sigint_uvcode_two_loop_runs - AssertionError: b'KeyboardInterrupt' not found in b'Traceback (most recent call last):\n  File "<string>", line 3, in <module>\n  File "/home/tkloczko/rpmbuild/BUILD/uvloop-0.19.0/uvlo...
FAILED tests/test_signals.py::Test_AIO_Signals::test_signals_wakeup_fd_unchanged - AssertionError: b'Traceback (most recent call last):\n  Fil[235 chars]\'\n' != b''
============================================================ 20 failed, 456 passed, 28 skipped, 4 warnings in 102.03s (0:01:42) =============================================================
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kloczek

kloczek commented Mar 17, 2024

Copy link
Copy Markdown

Those fails are looking similar to what I've reported against older version #429 so looks like PR is OK 😋

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alan-brooks

alan-brooks commented Mar 17, 2024

Copy link
Copy Markdown
Contributor Author

thanks missed those dependencis

kloczek reacted with thumbs up emoji kloczek reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@musicinmybrain musicinmybrain mentioned this pull request May 27, 2024
Test failures with Python 3.13.0b1 in 4.4.0 agronholm/anyio#737
Closed
2 tasks done
@edgarrmondragon

edgarrmondragon commented Jul 5, 2024

Copy link
Copy Markdown
Contributor

@fantix are there any blockers for merging this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fantix

fantix commented Aug 15, 2024

Copy link
Copy Markdown
Member

This looks promising! Sorry for the delay. I'm aiming to merge this weekend or next.

edgarrmondragon and epsilon-0 reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edgarrmondragon edgarrmondragon mentioned this pull request Aug 15, 2024
Test with Python 3.13 #610
Merged
fantix
fantix reviewed Aug 26, 2024
View reviewed changes

@fantix fantix left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check all the new noexcept functions - looks like some of them may still raise Python exceptions. Are those required for Cython 3 or it's just an optimization?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread uvloop/cbhandles.pyx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread uvloop/includes/system.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread uvloop/loop.pxd Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread uvloop/loop.pxd Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread uvloop/loop.pxd Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/test_process.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

fantix added 2 commits August 25, 2024 23:47
@fantix
Merge branch 'master' into cython3_update
c11671c
@fantix
Use Cython 3.0 and fix deprecated test
a73522b
@fantix fantix mentioned this pull request Aug 27, 2024
uvloop fails to build with Python 3.13-rc1 #622
Closed
fantix added 6 commits August 27, 2024 16:34
@fantix
Fix the dunder param issue differently
932f546
@fantix
Revert tmp debugging
f63df46
@fantix
Restore consts.pxi without DEF
c48173d
@fantix
Dorp unused env and only emit linenums in debug
7562c1e
@fantix
Partially revert the WIN32 changes
fb95d4e
Feel free to open a new PR to add them back
@fantix
Revert noexcept on _get_write_buffer_size()
5b03fdd
@fantix

fantix commented Aug 28, 2024

Copy link
Copy Markdown
Member

I didn't check all the new noexcept functions - looks like some of them may still raise Python exceptions. Are those required for Cython 3 or it's just an optimization?

I'm taking them out one by one as of now - feel free to drop an answer here and we can start a new PR to carefully add them back.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

fantix added 4 commits August 28, 2024 12:03
@fantix
Revert noexcept on _is_reading()
8793035
@fantix
Revert noexcept because _fatal_error() may raise
d387089
* __uv_stream_on_read_common()
* __uv_stream_on_read_impl()
* __uv_stream_on_write_impl()
@fantix
Revert some more noexcept
2e57927
@fantix
_set_coroutine_debug() doesn't need to be cpdef?
b2f6897
fantix
fantix approved these changes Aug 28, 2024
View reviewed changes

@fantix fantix left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go now. @1st1 wanna take a look too?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@fantix
Merge branch 'master' into cython3_update
232cd3f
1st1
1st1 approved these changes Aug 28, 2024
View reviewed changes
@fantix
fantix merged commit 3fba9fa into MagicStack:master Aug 28, 2024
@Vizonex Vizonex mentioned this pull request Aug 30, 2024
library to help add dependency on win/uv loop Vizonex/Winloop#33
Closed
fantix added a commit that referenced this pull request Oct 14, 2024
@fantix
uvloop 0.21.0
40e8a34
Changes
=======

* Add cleanup_socket param on create_unix_server() (#623)
  (by @fantix in d6114d2)

Fixes
=====

* Use cythonized SO_REUSEPORT rather than the unwrapped native one. (#609)
  (by @ptribble in 4083a94 for #550)

* UDP errors should result in protocol.error_received (#601)
  (by @jensbjorgensen in 3c3bbef)

* Updates for Cython3 (#587)
  (by @alan-brooks in 3fba9fa for #587)

* Test with Python 3.13 (#610)
  (by @edgarrmondragon in fb5a139)
@fantix fantix mentioned this pull request Oct 14, 2024
uvloop 0.21.0 #633
Merged
jakirkham
jakirkham reviewed Oct 15, 2024
View reviewed changes

@jakirkham jakirkham left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! 🙏

Had a question about one of the changes below

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread uvloop/handles/stream.pyx
Comment on lines -1 to +5
DEF __PREALLOCED_BUFS = 4
cdef extern from *:
'''
enum {__PREALLOCED_BUFS = 4};
'''
const bint __PREALLOCED_BUFS

@jakirkham jakirkham Oct 15, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am curious whether it would make sense to make this a Cython enum (or if there was some issue seen doing that)

Suggested change
DEF __PREALLOCED_BUFS = 4
cdef extern from *:
'''
enum {__PREALLOCED_BUFS = 4};
'''
const bint __PREALLOCED_BUFS
cdef enum:
__PREALLOCED_BUFS = 4

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@fantix fantix Oct 15, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this is a good suggestion - it pretty much generates the same C code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jakirkham jakirkham Oct 15, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Fantix! 🙏

Submitted a PR: #634

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jakirkham jakirkham mentioned this pull request Oct 15, 2024
Use Cython enum for __PREALLOCED_BUFS #634
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fantix fantix fantix approved these changes
@1st1 1st1 1st1 approved these changes
+1 more reviewer
@jakirkham jakirkham jakirkham left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@alan-brooks @jameshilliard @kloczek @edgarrmondragon @fantix @1st1 @jakirkham
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.