uvloop-0.8.1/0000775000372000037200000000000013156037661013716 5ustar travistravis00000000000000uvloop-0.8.1/MANIFEST.in0000664000372000037200000000056613156036740015460 0ustar travistravis00000000000000recursive-include docs *.py *.rst recursive-include examples *.py recursive-include tests *.py *.pem recursive-include uvloop *.pyx *.pxd *.pxi *.py *.c *.h recursive-include vendor/libuv * recursive-exclude vendor/libuv/.git * recursive-exclude vendor/libuv/docs * recursive-exclude vendor/libuv/img * include LICENSE-MIT LICENSE-APACHE README.rst Makefile performance.png uvloop-0.8.1/LICENSE-MIT0000664000372000037200000000211513156036740015346 0ustar travistravis00000000000000The MIT License Copyright (c) 2015-present MagicStack Inc. http://magic.io Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. uvloop-0.8.1/README.rst0000664000372000037200000000405513156036740015406 0ustar travistravis00000000000000.. image:: https://travis-ci.org/MagicStack/uvloop.svg?branch=master :target: https://travis-ci.org/MagicStack/uvloop .. image:: https://img.shields.io/pypi/v/uvloop.svg :target: https://pypi.python.org/pypi/uvloop uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. The project documentation can be found `here `_. Please also check out the `wiki `_. Performance ----------- uvloop makes asyncio 2-4x faster. .. image:: performance.png :target: http://magic.io/blog/uvloop-blazing-fast-python-networking/ The above chart shows the performance of an echo server with different message sizes. The *sockets* benchmark uses ``loop.sock_recv()`` and ``loop.sock_sendall()`` methods; the *streams* benchmark uses asyncio high-level streams, created by the ``asyncio.start_server()`` function; and the *protocol* benchmark uses ``loop.create_server()`` with a simple echo protocol. Read more about uvloop `performance `_. Installation ------------ uvloop requires Python 3.5 and is available on PyPI. Use pip to install it:: $ pip install uvloop Using uvloop ------------ To make asyncio use uvloop, you can install the uvloop event loop policy: .. code:: python import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) Alternatively, you can create an instance of the loop manually, using: .. code:: python loop = uvloop.new_event_loop() asyncio.set_event_loop(loop) Development of uvloop --------------------- To build uvloop, you'll need Cython and Python 3.5. The best way is to create a virtual env, so that you'll have ``cython`` and ``python`` commands pointing to the correct tools. 1. ``git clone --recursive git@github.com:MagicStack/uvloop.git`` 2. ``cd uvloop`` 3. ``make`` 4. ``make test`` License ------- uvloop is dual-licensed under MIT and Apache 2.0 licenses. uvloop-0.8.1/LICENSE-APACHE0000664000372000037200000002500613156036740015642 0ustar travistravis00000000000000 Copyright (c) 2015-present MagicStack Inc. http://magic.io Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. uvloop-0.8.1/tests/0000775000372000037200000000000013156037661015060 5ustar travistravis00000000000000uvloop-0.8.1/tests/test_futures.py0000664000372000037200000003651513156036740020175 0ustar travistravis00000000000000# LICENSE: PSF. import asyncio import concurrent.futures import re import sys import threading import unittest import uvloop from asyncio import test_utils from uvloop import _testbase as tb from unittest import mock from test import support # Most of the tests are copied from asyncio def _fakefunc(f): return f def first_cb(): pass def last_cb(): pass class _TestFutures: def create_future(self): raise NotImplementedError def test_future_initial_state(self): f = self.create_future() self.assertFalse(f.cancelled()) self.assertFalse(f.done()) f.cancel() self.assertTrue(f.cancelled()) def test_future_cancel(self): f = self.create_future() self.assertTrue(f.cancel()) self.assertTrue(f.cancelled()) self.assertTrue(f.done()) self.assertRaises(asyncio.CancelledError, f.result) self.assertRaises(asyncio.CancelledError, f.exception) self.assertRaises(asyncio.InvalidStateError, f.set_result, None) self.assertRaises(asyncio.InvalidStateError, f.set_exception, None) self.assertFalse(f.cancel()) def test_future_result(self): f = self.create_future() self.assertRaises(asyncio.InvalidStateError, f.result) f.set_result(42) self.assertFalse(f.cancelled()) self.assertTrue(f.done()) self.assertEqual(f.result(), 42) self.assertEqual(f.exception(), None) self.assertRaises(asyncio.InvalidStateError, f.set_result, None) self.assertRaises(asyncio.InvalidStateError, f.set_exception, None) self.assertFalse(f.cancel()) def test_future_exception(self): exc = RuntimeError() f = self.create_future() self.assertRaises(asyncio.InvalidStateError, f.exception) if sys.version_info[:3] > (3, 5, 1): # StopIteration cannot be raised into a Future - CPython issue26221 self.assertRaisesRegex(TypeError, "StopIteration .* cannot be raised", f.set_exception, StopIteration) f.set_exception(exc) self.assertFalse(f.cancelled()) self.assertTrue(f.done()) self.assertRaises(RuntimeError, f.result) self.assertEqual(f.exception(), exc) self.assertRaises(asyncio.InvalidStateError, f.set_result, None) self.assertRaises(asyncio.InvalidStateError, f.set_exception, None) self.assertFalse(f.cancel()) def test_future_exception_class(self): f = self.create_future() f.set_exception(RuntimeError) self.assertIsInstance(f.exception(), RuntimeError) def test_future_yield_from_twice(self): f = self.create_future() def fixture(): yield 'A' x = yield from f yield 'B', x y = yield from f yield 'C', y g = fixture() self.assertEqual(next(g), 'A') # yield 'A'. self.assertEqual(next(g), f) # First yield from f. f.set_result(42) self.assertEqual(next(g), ('B', 42)) # yield 'B', x. # The second "yield from f" does not yield f. self.assertEqual(next(g), ('C', 42)) # yield 'C', y. def test_future_repr(self): self.loop.set_debug(True) f_pending_debug = self.create_future() frame = f_pending_debug._source_traceback[-1] self.assertEqual(repr(f_pending_debug), '' % (frame[0], frame[1])) f_pending_debug.cancel() self.loop.set_debug(False) f_pending = self.create_future() self.assertEqual(repr(f_pending), '') f_pending.cancel() f_cancelled = self.create_future() f_cancelled.cancel() self.assertEqual(repr(f_cancelled), '') f_result = self.create_future() f_result.set_result(4) self.assertEqual(repr(f_result), '') self.assertEqual(f_result.result(), 4) exc = RuntimeError() f_exception = self.create_future() f_exception.set_exception(exc) self.assertEqual(repr(f_exception), '') self.assertIs(f_exception.exception(), exc) def func_repr(func): filename, lineno = test_utils.get_function_source(func) text = '%s() at %s:%s' % (func.__qualname__, filename, lineno) return re.escape(text) f_one_callbacks = self.create_future() f_one_callbacks.add_done_callback(_fakefunc) fake_repr = func_repr(_fakefunc) self.assertRegex(repr(f_one_callbacks), r'' % fake_repr) f_one_callbacks.cancel() self.assertEqual(repr(f_one_callbacks), '') f_two_callbacks = self.create_future() f_two_callbacks.add_done_callback(first_cb) f_two_callbacks.add_done_callback(last_cb) first_repr = func_repr(first_cb) last_repr = func_repr(last_cb) self.assertRegex(repr(f_two_callbacks), r'' % (first_repr, last_repr)) f_many_callbacks = self.create_future() f_many_callbacks.add_done_callback(first_cb) for i in range(8): f_many_callbacks.add_done_callback(_fakefunc) f_many_callbacks.add_done_callback(last_cb) cb_regex = r'%s, <8 more>, %s' % (first_repr, last_repr) self.assertRegex(repr(f_many_callbacks), r'' % cb_regex) f_many_callbacks.cancel() self.assertEqual(repr(f_many_callbacks), '') def test_future_copy_state(self): if sys.version_info[:3] < (3, 5, 1): raise unittest.SkipTest() from asyncio.futures import _copy_future_state f = self.create_future() f.set_result(10) newf = self.create_future() _copy_future_state(f, newf) self.assertTrue(newf.done()) self.assertEqual(newf.result(), 10) f_exception = self.create_future() f_exception.set_exception(RuntimeError()) newf_exception = self.create_future() _copy_future_state(f_exception, newf_exception) self.assertTrue(newf_exception.done()) self.assertRaises(RuntimeError, newf_exception.result) f_cancelled = self.create_future() f_cancelled.cancel() newf_cancelled = self.create_future() _copy_future_state(f_cancelled, newf_cancelled) self.assertTrue(newf_cancelled.cancelled()) @mock.patch('asyncio.base_events.logger') def test_future_tb_logger_abandoned(self, m_log): fut = self.create_future() del fut self.assertFalse(m_log.error.called) @mock.patch('asyncio.base_events.logger') def test_future_tb_logger_result_unretrieved(self, m_log): fut = self.create_future() fut.set_result(42) del fut self.assertFalse(m_log.error.called) @mock.patch('asyncio.base_events.logger') def test_future_tb_logger_result_retrieved(self, m_log): fut = self.create_future() fut.set_result(42) fut.result() del fut self.assertFalse(m_log.error.called) def test_future_wrap_future(self): def run(arg): return (arg, threading.get_ident()) ex = concurrent.futures.ThreadPoolExecutor(1) f1 = ex.submit(run, 'oi') f2 = asyncio.wrap_future(f1, loop=self.loop) res, ident = self.loop.run_until_complete(f2) self.assertIsInstance(f2, asyncio.Future) self.assertEqual(res, 'oi') self.assertNotEqual(ident, threading.get_ident()) def test_future_wrap_future_future(self): f1 = self.create_future() f2 = asyncio.wrap_future(f1) self.assertIs(f1, f2) def test_future_wrap_future_use_global_loop(self): with mock.patch('asyncio.futures.events') as events: events.get_event_loop = lambda: self.loop def run(arg): return (arg, threading.get_ident()) ex = concurrent.futures.ThreadPoolExecutor(1) f1 = ex.submit(run, 'oi') f2 = asyncio.wrap_future(f1) self.assertIs(self.loop, f2._loop) def test_future_wrap_future_cancel(self): f1 = concurrent.futures.Future() f2 = asyncio.wrap_future(f1, loop=self.loop) f2.cancel() test_utils.run_briefly(self.loop) self.assertTrue(f1.cancelled()) self.assertTrue(f2.cancelled()) def test_future_wrap_future_cancel2(self): f1 = concurrent.futures.Future() f2 = asyncio.wrap_future(f1, loop=self.loop) f1.set_result(42) f2.cancel() test_utils.run_briefly(self.loop) self.assertFalse(f1.cancelled()) self.assertEqual(f1.result(), 42) self.assertTrue(f2.cancelled()) def test_future_source_traceback(self): self.loop.set_debug(True) future = self.create_future() lineno = sys._getframe().f_lineno - 1 self.assertIsInstance(future._source_traceback, list) self.assertEqual(future._source_traceback[-2][:3], (__file__, lineno, 'test_future_source_traceback')) def check_future_exception_never_retrieved(self, debug): last_ctx = None def handler(loop, context): nonlocal last_ctx last_ctx = context self.loop.set_debug(debug) self.loop.set_exception_handler(handler) def memory_error(): try: raise MemoryError() except BaseException as exc: return exc exc = memory_error() future = self.create_future() if debug: source_traceback = future._source_traceback future.set_exception(exc) future = None support.gc_collect() test_utils.run_briefly(self.loop) self.assertIsNotNone(last_ctx) self.assertIs(last_ctx['exception'], exc) self.assertEqual(last_ctx['message'], 'Future exception was never retrieved') if debug: tb = last_ctx['source_traceback'] self.assertEqual(tb[-2].name, 'check_future_exception_never_retrieved') def test_future_exception_never_retrieved(self): self.check_future_exception_never_retrieved(False) def test_future_exception_never_retrieved_debug(self): self.check_future_exception_never_retrieved(True) def test_future_wrap_future(self): from uvloop.loop import _wrap_future def run(arg): return (arg, threading.get_ident()) ex = concurrent.futures.ThreadPoolExecutor(1) f1 = ex.submit(run, 'oi') f2 = _wrap_future(f1, loop=self.loop) res, ident = self.loop.run_until_complete(f2) self.assertIsInstance(f2, asyncio.Future) self.assertEqual(res, 'oi') self.assertNotEqual(ident, threading.get_ident()) def test_future_wrap_future_future(self): from uvloop.loop import _wrap_future f1 = self.create_future() f2 = _wrap_future(f1) self.assertIs(f1, f2) def test_future_wrap_future_cancel(self): from uvloop.loop import _wrap_future f1 = concurrent.futures.Future() f2 = _wrap_future(f1, loop=self.loop) f2.cancel() test_utils.run_briefly(self.loop) self.assertTrue(f1.cancelled()) self.assertTrue(f2.cancelled()) def test_future_wrap_future_cancel2(self): from uvloop.loop import _wrap_future f1 = concurrent.futures.Future() f2 = _wrap_future(f1, loop=self.loop) f1.set_result(42) f2.cancel() test_utils.run_briefly(self.loop) self.assertFalse(f1.cancelled()) self.assertEqual(f1.result(), 42) self.assertTrue(f2.cancelled()) class _TestFuturesDoneCallbacks: def run_briefly(self): test_utils.run_briefly(self.loop) def _make_callback(self, bag, thing): # Create a callback function that appends thing to bag. def bag_appender(future): bag.append(thing) return bag_appender def _new_future(self): raise NotImplementedError def test_future_callbacks_invoked_on_set_result(self): bag = [] f = self._new_future() f.add_done_callback(self._make_callback(bag, 42)) f.add_done_callback(self._make_callback(bag, 17)) self.assertEqual(bag, []) f.set_result('foo') self.run_briefly() self.assertEqual(bag, [42, 17]) self.assertEqual(f.result(), 'foo') def test_future_callbacks_invoked_on_set_exception(self): bag = [] f = self._new_future() f.add_done_callback(self._make_callback(bag, 100)) self.assertEqual(bag, []) exc = RuntimeError() f.set_exception(exc) self.run_briefly() self.assertEqual(bag, [100]) self.assertEqual(f.exception(), exc) def test_future_remove_done_callback(self): bag = [] f = self._new_future() cb1 = self._make_callback(bag, 1) cb2 = self._make_callback(bag, 2) cb3 = self._make_callback(bag, 3) # Add one cb1 and one cb2. f.add_done_callback(cb1) f.add_done_callback(cb2) # One instance of cb2 removed. Now there's only one cb1. self.assertEqual(f.remove_done_callback(cb2), 1) # Never had any cb3 in there. self.assertEqual(f.remove_done_callback(cb3), 0) # After this there will be 6 instances of cb1 and one of cb2. f.add_done_callback(cb2) for i in range(5): f.add_done_callback(cb1) # Remove all instances of cb1. One cb2 remains. self.assertEqual(f.remove_done_callback(cb1), 6) self.assertEqual(bag, []) f.set_result('foo') self.run_briefly() self.assertEqual(bag, [2]) self.assertEqual(f.result(), 'foo') ############################################################################### # Tests Matrix ############################################################################### class Test_UV_UV_create_future(_TestFutures, tb.UVTestCase): # Test uvloop.Loop.create_future def create_future(self): return self.loop.create_future() class Test_UV_UV_Future(_TestFutures, tb.UVTestCase): # Test that uvloop.Future can be instantiated directly def create_future(self): return uvloop.Future(loop=self.loop) class Test_UV_AIO_Futures(_TestFutures, tb.UVTestCase): def create_future(self): return asyncio.Future(loop=self.loop) class Test_AIO_Futures(_TestFutures, tb.AIOTestCase): def create_future(self): return asyncio.Future(loop=self.loop) class Test_UV_UV_FuturesCallbacks(_TestFuturesDoneCallbacks, tb.UVTestCase): def _new_future(self): return self.loop.create_future() class Test_UV_AIO_FuturesCallbacks(_TestFuturesDoneCallbacks, tb.UVTestCase): def _new_future(self): return asyncio.Future(loop=self.loop) class Test_AIO_FuturesCallbacks(_TestFuturesDoneCallbacks, tb.AIOTestCase): def _new_future(self): return asyncio.Future(loop=self.loop) uvloop-0.8.1/tests/test_sockets.py0000664000372000037200000001066113156036740020145 0ustar travistravis00000000000000import asyncio import select import socket import sys import unittest from uvloop import _testbase as tb _SIZE = 1024 * 1024 class _TestSockets: async def recv_all(self, sock, nbytes): buf = b'' while len(buf) < nbytes: buf += await self.loop.sock_recv(sock, nbytes - len(buf)) return buf def test_socket_connect_recv_send(self): if self.is_asyncio_loop() and sys.version_info[:3] == (3, 5, 2): # See https://github.com/python/asyncio/pull/366 for details. raise unittest.SkipTest() def srv_gen(): yield tb.write(b'helo') data = yield tb.read(4 * _SIZE) self.assertEqual(data, b'ehlo' * _SIZE) yield tb.write(b'O') yield tb.write(b'K') # We use @asyncio.coroutine & `yield from` to test # the compatibility of Cython's 'async def' coroutines. @asyncio.coroutine def client(sock, addr): yield from self.loop.sock_connect(sock, addr) data = yield from self.recv_all(sock, 4) self.assertEqual(data, b'helo') yield from self.loop.sock_sendall(sock, b'ehlo' * _SIZE) data = yield from self.recv_all(sock, 2) self.assertEqual(data, b'OK') with tb.tcp_server(srv_gen) as srv: sock = socket.socket() with sock: sock.setblocking(False) self.loop.run_until_complete(client(sock, srv.addr)) def test_socket_accept_recv_send(self): async def server(): sock = socket.socket() sock.setblocking(False) with sock: sock.bind(('127.0.0.1', 0)) sock.listen() fut = self.loop.run_in_executor(None, client, sock.getsockname()) client_sock, _ = await self.loop.sock_accept(sock) with client_sock: data = await self.recv_all(client_sock, _SIZE) self.assertEqual(data, b'a' * _SIZE) await fut def client(addr): sock = socket.socket() with sock: sock.connect(addr) sock.sendall(b'a' * _SIZE) self.loop.run_until_complete(server()) def test_socket_failed_connect(self): sock = socket.socket() with sock: sock.bind(('127.0.0.1', 0)) addr = sock.getsockname() async def run(): sock = socket.socket() with sock: sock.setblocking(False) with self.assertRaises(ConnectionRefusedError): await self.loop.sock_connect(sock, addr) self.loop.run_until_complete(run()) def test_socket_blocking_error(self): self.loop.set_debug(True) sock = socket.socket() with sock: with self.assertRaisesRegex(ValueError, 'must be non-blocking'): self.loop.run_until_complete( self.loop.sock_recv(sock, 0)) with self.assertRaisesRegex(ValueError, 'must be non-blocking'): self.loop.run_until_complete( self.loop.sock_sendall(sock, b'')) with self.assertRaisesRegex(ValueError, 'must be non-blocking'): self.loop.run_until_complete( self.loop.sock_accept(sock)) with self.assertRaisesRegex(ValueError, 'must be non-blocking'): self.loop.run_until_complete( self.loop.sock_connect(sock, (b'', 0))) class TestUVSockets(_TestSockets, tb.UVTestCase): @unittest.skipUnless(hasattr(select, 'epoll'), 'Linux only test') def test_socket_sync_remove(self): # See https://github.com/MagicStack/uvloop/issues/61 for details sock = socket.socket() epoll = select.epoll.fromfd(self.loop._get_backend_id()) try: cb = lambda: None sock.bind(('127.0.0.1', 0)) sock.listen(0) fd = sock.fileno() self.loop.add_reader(fd, cb) self.loop.run_until_complete(asyncio.sleep(0.01, loop=self.loop)) self.loop.remove_reader(fd) with self.assertRaises(FileNotFoundError): epoll.modify(fd, 0) finally: sock.close() self.loop.close() epoll.close() class TestAIOSockets(_TestSockets, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_process.py0000664000372000037200000005027213156036740020152 0ustar travistravis00000000000000import asyncio import contextlib import os import signal import subprocess import sys import tempfile import time from asyncio import test_utils from uvloop import _testbase as tb class _TestProcess: def test_process_env_1(self): async def test(): cmd = 'echo $FOO$BAR' env = {'FOO': 'sp', 'BAR': 'am'} proc = await asyncio.create_subprocess_shell( cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) out, _ = await proc.communicate() self.assertEqual(out, b'spam\n') self.assertEqual(proc.returncode, 0) self.loop.run_until_complete(test()) def test_process_cwd_1(self): async def test(): cmd = 'pwd' env = {} cwd = '/' proc = await asyncio.create_subprocess_shell( cmd, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) out, _ = await proc.communicate() self.assertEqual(out, b'/\n') self.assertEqual(proc.returncode, 0) self.loop.run_until_complete(test()) def test_process_preexec_fn_1(self): # Copied from CPython/test_suprocess.py # DISCLAIMER: Setting environment variables is *not* a good use # of a preexec_fn. This is merely a test. async def test(): cmd = sys.executable proc = await asyncio.create_subprocess_exec( cmd, '-c', 'import os,sys;sys.stdout.write(os.getenv("FRUIT"))', stdout=subprocess.PIPE, preexec_fn=lambda: os.putenv("FRUIT", "apple"), loop=self.loop) out, _ = await proc.communicate() self.assertEqual(out, b'apple') self.assertEqual(proc.returncode, 0) self.loop.run_until_complete(test()) def test_process_preexec_fn_2(self): # Copied from CPython/test_suprocess.py def raise_it(): raise ValueError("spam") async def test(): cmd = sys.executable proc = await asyncio.create_subprocess_exec( cmd, '-c', 'import time; time.sleep(10)', preexec_fn=raise_it, loop=self.loop) await proc.communicate() started = time.time() try: self.loop.run_until_complete(test()) except subprocess.SubprocessError as ex: self.assertIn('preexec_fn', ex.args[0]) if ex.__cause__ is not None: # uvloop will set __cause__ self.assertIs(type(ex.__cause__), ValueError) self.assertEqual(ex.__cause__.args[0], 'spam') else: self.fail( 'exception in preexec_fn did not propagate to the parent') if time.time() - started > 5: self.fail( 'exception in preexec_fn did not kill the child process') def test_process_executable_1(self): async def test(): proc = await asyncio.create_subprocess_exec( b'doesnotexist', b'-c', b'print("spam")', executable=sys.executable, stdout=subprocess.PIPE, loop=self.loop) out, err = await proc.communicate() self.assertEqual(out, b'spam\n') self.loop.run_until_complete(test()) def test_process_pid_1(self): async def test(): prog = '''\ import os print(os.getpid()) ''' cmd = sys.executable proc = await asyncio.create_subprocess_exec( cmd, b'-c', prog, stdin=subprocess.PIPE, stdout=subprocess.PIPE, loop=self.loop) pid = proc.pid expected_result = '{}\n'.format(pid).encode() out, err = await proc.communicate() self.assertEqual(out, expected_result) self.loop.run_until_complete(test()) def test_process_send_signal_1(self): async def test(): prog = '''\ import signal def handler(signum, frame): if signum == signal.SIGUSR1: print('WORLD') signal.signal(signal.SIGUSR1, handler) a = input() print(a) a = input() print(a) exit(11) ''' cmd = sys.executable proc = await asyncio.create_subprocess_exec( cmd, b'-c', prog, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) proc.stdin.write(b'HELLO\n') await proc.stdin.drain() self.assertEqual(await proc.stdout.readline(), b'HELLO\n') proc.send_signal(signal.SIGUSR1) proc.stdin.write(b'!\n') await proc.stdin.drain() self.assertEqual(await proc.stdout.readline(), b'WORLD\n') self.assertEqual(await proc.stdout.readline(), b'!\n') self.assertEqual(await proc.wait(), 11) self.loop.run_until_complete(test()) def test_process_streams_basic_1(self): async def test(): prog = '''\ import sys while True: a = input() if a == 'stop': exit(20) elif a == 'stderr': print('OUCH', file=sys.stderr) else: print('>' + a + '<') ''' cmd = sys.executable proc = await asyncio.create_subprocess_exec( cmd, b'-c', prog, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) self.assertGreater(proc.pid, 0) self.assertIs(proc.returncode, None) transp = proc._transport with self.assertRaises(NotImplementedError): # stdin is WriteTransport transp.get_pipe_transport(0).pause_reading() with self.assertRaises((NotImplementedError, AttributeError)): # stdout is ReadTransport transp.get_pipe_transport(1).write(b'wat') proc.stdin.write(b'foobar\n') await proc.stdin.drain() out = await proc.stdout.readline() self.assertEqual(out, b'>foobar<\n') proc.stdin.write(b'stderr\n') await proc.stdin.drain() out = await proc.stderr.readline() self.assertEqual(out, b'OUCH\n') proc.stdin.write(b'stop\n') await proc.stdin.drain() exitcode = await proc.wait() self.assertEqual(exitcode, 20) self.loop.run_until_complete(test()) def test_process_streams_stderr_to_stdout(self): async def test(): prog = '''\ import sys print('out', flush=True) print('err', file=sys.stderr, flush=True) ''' proc = await asyncio.create_subprocess_exec( sys.executable, '-c', prog, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, loop=self.loop) out, err = await proc.communicate() self.assertIsNone(err) self.assertEqual(out, b'out\nerr\n') self.loop.run_until_complete(test()) def test_process_streams_devnull(self): async def test(): prog = '''\ import sys print('out', flush=True) print('err', file=sys.stderr, flush=True) ''' proc = await asyncio.create_subprocess_exec( sys.executable, '-c', prog, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, loop=self.loop) out, err = await proc.communicate() self.assertIsNone(err) self.assertIsNone(out) self.loop.run_until_complete(test()) def test_process_streams_pass_fds(self): async def test(): prog = '''\ import sys, os assert sys.argv[1] == '--' inherited = int(sys.argv[2]) non_inherited = int(sys.argv[3]) os.fstat(inherited) try: os.fstat(non_inherited) except: pass else: raise RuntimeError() print("OK") ''' with tempfile.TemporaryFile() as inherited, \ tempfile.TemporaryFile() as non_inherited: proc = await asyncio.create_subprocess_exec( sys.executable, '-c', prog, '--', str(inherited.fileno()), str(non_inherited.fileno()), stdout=subprocess.PIPE, stderr=subprocess.PIPE, pass_fds=(inherited.fileno(),), loop=self.loop) out, err = await proc.communicate() self.assertEqual(err, b'') self.assertEqual(out, b'OK\n') self.loop.run_until_complete(test()) class _AsyncioTests: # Program blocking PROGRAM_BLOCKED = [sys.executable, '-c', 'import time; time.sleep(3600)'] # Program copying input to output PROGRAM_CAT = [ sys.executable, '-c', ';'.join(('import sys', 'data = sys.stdin.buffer.read()', 'sys.stdout.buffer.write(data)'))] def test_stdin_not_inheritable(self): # asyncio issue #209: stdin must not be inheritable, otherwise # the Process.communicate() hangs @asyncio.coroutine def len_message(message): code = 'import sys; data = sys.stdin.read(); print(len(data))' proc = yield from asyncio.create_subprocess_exec( sys.executable, '-c', code, stdin=asyncio.subprocess.PIPE, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, close_fds=False, loop=self.loop) stdout, stderr = yield from proc.communicate(message) exitcode = yield from proc.wait() return (stdout, exitcode) output, exitcode = self.loop.run_until_complete(len_message(b'abc')) self.assertEqual(output.rstrip(), b'3') self.assertEqual(exitcode, 0) def test_stdin_stdout(self): args = self.PROGRAM_CAT @asyncio.coroutine def run(data): proc = yield from asyncio.create_subprocess_exec( *args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, loop=self.loop) # feed data proc.stdin.write(data) yield from proc.stdin.drain() proc.stdin.close() # get output and exitcode data = yield from proc.stdout.read() exitcode = yield from proc.wait() return (exitcode, data) task = run(b'some data') task = asyncio.wait_for(task, 60.0, loop=self.loop) exitcode, stdout = self.loop.run_until_complete(task) self.assertEqual(exitcode, 0) self.assertEqual(stdout, b'some data') def test_communicate(self): args = self.PROGRAM_CAT @asyncio.coroutine def run(data): proc = yield from asyncio.create_subprocess_exec( *args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, loop=self.loop) stdout, stderr = yield from proc.communicate(data) return proc.returncode, stdout task = run(b'some data') task = asyncio.wait_for(task, 60.0, loop=self.loop) exitcode, stdout = self.loop.run_until_complete(task) self.assertEqual(exitcode, 0) self.assertEqual(stdout, b'some data') def test_start_new_session(self): # start the new process in a new session create = asyncio.create_subprocess_shell('exit 8', start_new_session=True, loop=self.loop) proc = self.loop.run_until_complete(create) exitcode = self.loop.run_until_complete(proc.wait()) self.assertEqual(exitcode, 8) def test_shell(self): create = asyncio.create_subprocess_shell('exit 7', loop=self.loop) proc = self.loop.run_until_complete(create) exitcode = self.loop.run_until_complete(proc.wait()) self.assertEqual(exitcode, 7) def test_kill(self): args = self.PROGRAM_BLOCKED create = asyncio.create_subprocess_exec(*args, loop=self.loop) proc = self.loop.run_until_complete(create) proc.kill() returncode = self.loop.run_until_complete(proc.wait()) self.assertEqual(-signal.SIGKILL, returncode) def test_terminate(self): args = self.PROGRAM_BLOCKED create = asyncio.create_subprocess_exec(*args, loop=self.loop) proc = self.loop.run_until_complete(create) proc.terminate() returncode = self.loop.run_until_complete(proc.wait()) self.assertEqual(-signal.SIGTERM, returncode) def test_send_signal(self): code = 'import time; print("sleeping", flush=True); time.sleep(3600)' args = [sys.executable, '-c', code] create = asyncio.create_subprocess_exec(*args, stdout=subprocess.PIPE, loop=self.loop) proc = self.loop.run_until_complete(create) @asyncio.coroutine def send_signal(proc): # basic synchronization to wait until the program is sleeping line = yield from proc.stdout.readline() self.assertEqual(line, b'sleeping\n') proc.send_signal(signal.SIGHUP) returncode = (yield from proc.wait()) return returncode returncode = self.loop.run_until_complete(send_signal(proc)) self.assertEqual(-signal.SIGHUP, returncode) def test_cancel_process_wait(self): # Issue #23140: cancel Process.wait() @asyncio.coroutine def cancel_wait(): proc = yield from asyncio.create_subprocess_exec( *self.PROGRAM_BLOCKED, loop=self.loop) # Create an internal future waiting on the process exit task = self.loop.create_task(proc.wait()) self.loop.call_soon(task.cancel) try: yield from task except asyncio.CancelledError: pass # Cancel the future task.cancel() # Kill the process and wait until it is done proc.kill() yield from proc.wait() self.loop.run_until_complete(cancel_wait()) def test_cancel_make_subprocess_transport_exec(self): @asyncio.coroutine def cancel_make_transport(): coro = asyncio.create_subprocess_exec(*self.PROGRAM_BLOCKED, loop=self.loop) task = self.loop.create_task(coro) self.loop.call_soon(task.cancel) try: yield from task except asyncio.CancelledError: pass # ignore the log: # "Exception during subprocess creation, kill the subprocess" with test_utils.disable_logger(): self.loop.run_until_complete(cancel_make_transport()) def test_cancel_post_init(self): @asyncio.coroutine def cancel_make_transport(): coro = self.loop.subprocess_exec(asyncio.SubprocessProtocol, *self.PROGRAM_BLOCKED) task = self.loop.create_task(coro) self.loop.call_soon(task.cancel) try: yield from task except asyncio.CancelledError: pass # ignore the log: # "Exception during subprocess creation, kill the subprocess" with test_utils.disable_logger(): self.loop.run_until_complete(cancel_make_transport()) test_utils.run_briefly(self.loop) class Test_UV_Process(_TestProcess, tb.UVTestCase): def test_process_lated_stdio_init(self): class TestProto: def __init__(self): self.lost = 0 self.stages = [] def connection_made(self, transport): self.stages.append(('CM', transport)) def pipe_data_received(self, fd, data): if fd == 1: self.stages.append(('STDOUT', data)) def pipe_connection_lost(self, fd, exc): if fd == 1: self.stages.append(('STDOUT', 'LOST')) def process_exited(self): self.stages.append('PROC_EXIT') def connection_lost(self, exc): self.stages.append(('CL', self.lost, exc)) self.lost += 1 async def run(**kwargs): return await self.loop.subprocess_shell( lambda: TestProto(), 'echo 1', **kwargs) with self.subTest('paused, stdin pipe'): transport, proto = self.loop.run_until_complete( run(stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, __uvloop_sleep_after_fork=True)) self.assertIsNot(transport, None) self.assertEqual(transport.get_returncode(), 0) self.assertEqual( set(proto.stages), { ('CM', transport), 'PROC_EXIT', ('STDOUT', b'1\n'), ('STDOUT', 'LOST'), ('CL', 0, None) }) with self.subTest('paused, no stdin'): transport, proto = self.loop.run_until_complete( run(stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, __uvloop_sleep_after_fork=True)) self.assertIsNot(transport, None) self.assertEqual(transport.get_returncode(), 0) self.assertEqual( set(proto.stages), { ('CM', transport), 'PROC_EXIT', ('STDOUT', b'1\n'), ('STDOUT', 'LOST'), ('CL', 0, None) }) with self.subTest('no pause, no stdin'): transport, proto = self.loop.run_until_complete( run(stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)) self.loop.run_until_complete(transport._wait()) self.assertEqual(transport.get_returncode(), 0) self.assertIsNot(transport, None) self.assertEqual( set(proto.stages), { ('CM', transport), 'PROC_EXIT', ('STDOUT', b'1\n'), ('STDOUT', 'LOST'), ('CL', 0, None) }) def test_process_streams_redirect(self): # This won't work for asyncio implementation of subprocess async def test(): prog = bR''' import sys print('out', flush=True) print('err', file=sys.stderr, flush=True) ''' proc = await asyncio.create_subprocess_exec( sys.executable, '-c', prog, loop=self.loop) out, err = await proc.communicate() self.assertIsNone(out) self.assertIsNone(err) with tempfile.NamedTemporaryFile('w') as stdout: with tempfile.NamedTemporaryFile('w') as stderr: with contextlib.redirect_stdout(stdout): with contextlib.redirect_stderr(stderr): self.loop.run_until_complete(test()) stdout.flush() stderr.flush() with open(stdout.name, 'rb') as so: self.assertEqual(so.read(), b'out\n') with open(stderr.name, 'rb') as se: self.assertEqual(se.read(), b'err\n') class Test_AIO_Process(_TestProcess, tb.AIOTestCase): pass class TestAsyncio_UV_Process(_AsyncioTests, tb.UVTestCase): pass class TestAsyncio_AIO_Process(_AsyncioTests, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_testbase.py0000664000372000037200000000253613156036740020306 0ustar travistravis00000000000000import unittest from uvloop import _testbase as tb class TestBaseTest(unittest.TestCase): def test_duplicate_methods(self): with self.assertRaisesRegex(RuntimeError, 'duplicate test Foo.test_a'): class Foo(tb.BaseTestCase): def test_a(self): pass def test_b(self): pass def test_a(self): # NOQA pass def test_duplicate_methods_parent_1(self): class FooBase: def test_a(self): pass with self.assertRaisesRegex(RuntimeError, 'duplicate test Foo.test_a.*' 'defined in FooBase'): class Foo(FooBase, tb.BaseTestCase): def test_b(self): pass def test_a(self): pass def test_duplicate_methods_parent_2(self): class FooBase(tb.BaseTestCase): def test_a(self): pass with self.assertRaisesRegex(RuntimeError, 'duplicate test Foo.test_a.*' 'defined in FooBase'): class Foo(FooBase): def test_b(self): pass def test_a(self): pass uvloop-0.8.1/tests/test_dns.py0000664000372000037200000001316313156036740017256 0ustar travistravis00000000000000import socket import unittest from uvloop import _testbase as tb class BaseTestDNS: def _test_getaddrinfo(self, *args, **kwargs): err = None try: a1 = socket.getaddrinfo(*args, **kwargs) except socket.gaierror as ex: err = ex try: a2 = self.loop.run_until_complete( self.loop.getaddrinfo(*args, **kwargs)) except socket.gaierror as ex: if err is not None: self.assertEqual(ex.args, err.args) else: ex.__context__ = err raise ex except OSError as ex: ex.__context__ = err raise ex else: if err is not None: raise err self.assertEqual(a1, a2) def _test_getnameinfo(self, *args, **kwargs): err = None try: a1 = socket.getnameinfo(*args, **kwargs) except Exception as ex: err = ex try: a2 = self.loop.run_until_complete( self.loop.getnameinfo(*args, **kwargs)) except Exception as ex: if err is not None: if ex.__class__ is not err.__class__: print(ex, err) self.assertIs(ex.__class__, err.__class__) self.assertEqual(ex.args, err.args) else: raise else: if err is not None: raise err self.assertEqual(a1, a2) def test_getaddrinfo_1(self): self._test_getaddrinfo('example.com', 80) self._test_getaddrinfo('example.com', 80, type=socket.SOCK_STREAM) def test_getaddrinfo_2(self): self._test_getaddrinfo('example.com', 80, flags=socket.AI_CANONNAME) def test_getaddrinfo_3(self): self._test_getaddrinfo('a' + '1' * 50 + '.wat', 800) def test_getaddrinfo_4(self): self._test_getaddrinfo('example.com', 80, family=-1) self._test_getaddrinfo('example.com', 80, type=socket.SOCK_STREAM, family=-1) def test_getaddrinfo_5(self): self._test_getaddrinfo('example.com', '80') self._test_getaddrinfo('example.com', '80', type=socket.SOCK_STREAM) def test_getaddrinfo_6(self): self._test_getaddrinfo(b'example.com', b'80') self._test_getaddrinfo(b'example.com', b'80', type=socket.SOCK_STREAM) def test_getaddrinfo_7(self): self._test_getaddrinfo(None, 0) self._test_getaddrinfo(None, 0, type=socket.SOCK_STREAM) def test_getaddrinfo_8(self): self._test_getaddrinfo('', 0) self._test_getaddrinfo('', 0, type=socket.SOCK_STREAM) def test_getaddrinfo_9(self): self._test_getaddrinfo(b'', 0) self._test_getaddrinfo(b'', 0, type=socket.SOCK_STREAM) def test_getaddrinfo_10(self): self._test_getaddrinfo(None, None) self._test_getaddrinfo(None, None, type=socket.SOCK_STREAM) def test_getaddrinfo_11(self): self._test_getaddrinfo(b'example.com', '80') self._test_getaddrinfo(b'example.com', '80', type=socket.SOCK_STREAM) def test_getaddrinfo_12(self): self._test_getaddrinfo('127.0.0.1', '80') self._test_getaddrinfo('127.0.0.1', '80', type=socket.SOCK_STREAM) def test_getaddrinfo_13(self): self._test_getaddrinfo(b'127.0.0.1', b'80') self._test_getaddrinfo(b'127.0.0.1', b'80', type=socket.SOCK_STREAM) def test_getaddrinfo_14(self): self._test_getaddrinfo(b'127.0.0.1', b'http') self._test_getaddrinfo(b'127.0.0.1', b'http', type=socket.SOCK_STREAM) def test_getaddrinfo_15(self): self._test_getaddrinfo('127.0.0.1', 'http') self._test_getaddrinfo('127.0.0.1', 'http', type=socket.SOCK_STREAM) def test_getaddrinfo_16(self): self._test_getaddrinfo('localhost', 'http') self._test_getaddrinfo('localhost', 'http', type=socket.SOCK_STREAM) def test_getaddrinfo_17(self): self._test_getaddrinfo(b'localhost', 'http') self._test_getaddrinfo(b'localhost', 'http', type=socket.SOCK_STREAM) def test_getaddrinfo_18(self): self._test_getaddrinfo('localhost', b'http') self._test_getaddrinfo('localhost', b'http', type=socket.SOCK_STREAM) def test_getaddrinfo_19(self): self._test_getaddrinfo('::1', 80) self._test_getaddrinfo('::1', 80, type=socket.SOCK_STREAM) def test_getaddrinfo_20(self): self._test_getaddrinfo('127.0.0.1', 80) self._test_getaddrinfo('127.0.0.1', 80, type=socket.SOCK_STREAM) ###### def test_getnameinfo_1(self): self._test_getnameinfo(('127.0.0.1', 80), 0) def test_getnameinfo_2(self): self._test_getnameinfo(('127.0.0.1', 80, 1231231231213), 0) def test_getnameinfo_3(self): self._test_getnameinfo(('127.0.0.1', 80, 0, 0), 0) def test_getnameinfo_4(self): self._test_getnameinfo(('::1', 80), 0) def test_getnameinfo_5(self): self._test_getnameinfo(('localhost', 8080), 0) class Test_UV_DNS(BaseTestDNS, tb.UVTestCase): def test_getaddrinfo_close_loop(self): # Test that we can close the loop with a running # DNS query. try: # Check that we have internet connection socket.getaddrinfo('example.com', 80) except socket.error: raise unittest.SkipTest async def run(): fut = self.loop.getaddrinfo('example.com', 80) fut.cancel() self.loop.stop() try: self.loop.run_until_complete(run()) finally: self.loop.close() class Test_AIO_DNS(BaseTestDNS, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_base.py0000664000372000037200000005220013156036740017377 0ustar travistravis00000000000000import asyncio import fcntl import logging import os import threading import time import uvloop import unittest import weakref from unittest import mock from uvloop._testbase import UVTestCase, AIOTestCase class _TestBase: def test_close(self): self.assertFalse(self.loop._closed) self.assertFalse(self.loop.is_closed()) self.loop.close() self.assertTrue(self.loop._closed) self.assertTrue(self.loop.is_closed()) # it should be possible to call close() more than once self.loop.close() self.loop.close() # operation blocked when the loop is closed f = asyncio.Future(loop=self.loop) self.assertRaises(RuntimeError, self.loop.run_forever) self.assertRaises(RuntimeError, self.loop.run_until_complete, f) def test_handle_weakref(self): wd = weakref.WeakValueDictionary() h = self.loop.call_soon(lambda: None) wd['h'] = h # Would fail without __weakref__ slot. def test_call_soon(self): calls = [] def cb(inc): calls.append(inc) self.loop.stop() self.loop.call_soon(cb, 10) h = self.loop.call_soon(cb, 100) self.assertIn('.cb', repr(h)) h.cancel() self.assertIn('cancelled', repr(h)) self.loop.call_soon(cb, 1) self.loop.run_forever() self.assertEqual(calls, [10, 1]) def test_call_soon_base_exc(self): def cb(): raise KeyboardInterrupt() self.loop.call_soon(cb) with self.assertRaises(KeyboardInterrupt): self.loop.run_forever() self.assertFalse(self.loop.is_closed()) def test_calls_debug_reporting(self): def run_test(debug, meth, stack_adj): context = None def handler(loop, ctx): nonlocal context context = ctx self.loop.set_debug(debug) self.loop.set_exception_handler(handler) def cb(): 1 / 0 meth(cb) self.assertIsNone(context) self.loop.run_until_complete(asyncio.sleep(0.05, loop=self.loop)) self.assertIs(type(context['exception']), ZeroDivisionError) self.assertTrue(context['message'].startswith( 'Exception in callback')) if debug: tb = context['source_traceback'] self.assertEqual(tb[-1 + stack_adj].name, 'run_test') else: self.assertFalse('source_traceback' in context) del context for debug in (True, False): for meth_name, meth, stack_adj in ( ('call_soon', self.loop.call_soon, 0), ('call_later', # `-1` accounts for lambda lambda *args: self.loop.call_later(0.01, *args), -1) ): with self.subTest(debug=debug, meth_name=meth_name): run_test(debug, meth, stack_adj) def test_now_update(self): async def run(): st = self.loop.time() time.sleep(0.05) return self.loop.time() - st delta = self.loop.run_until_complete(run()) self.assertTrue(delta > 0.049 and delta < 0.6) def test_call_later_1(self): calls = [] def cb(inc=10, stop=False): calls.append(inc) self.assertTrue(self.loop.is_running()) if stop: self.loop.call_soon(self.loop.stop) self.loop.call_later(0.05, cb) # canceled right away h = self.loop.call_later(0.05, cb, 100, True) self.assertIn('.cb', repr(h)) h.cancel() self.assertIn('cancelled', repr(h)) self.loop.call_later(0.05, cb, 1, True) self.loop.call_later(1000, cb, 1000) # shouldn't be called started = time.monotonic() self.loop.run_forever() finished = time.monotonic() self.assertEqual(calls, [10, 1]) self.assertFalse(self.loop.is_running()) self.assertLess(finished - started, 0.1) self.assertGreater(finished - started, 0.04) def test_call_later_2(self): # Test that loop.call_later triggers an update of # libuv cached time. async def main(): await asyncio.sleep(0.001, loop=self.loop) time.sleep(0.01) await asyncio.sleep(0.01, loop=self.loop) started = time.monotonic() self.loop.run_until_complete(main()) delta = time.monotonic() - started self.assertGreater(delta, 0.019) def test_call_later_negative(self): calls = [] def cb(arg): calls.append(arg) self.loop.stop() self.loop.call_later(-1, cb, 'a') self.loop.run_forever() self.assertEqual(calls, ['a']) def test_call_at(self): if os.environ.get('TRAVIS_OS_NAME'): # Time seems to be really unpredictable on Travis. raise unittest.SkipTest('time is not monotonic on Travis') i = 0 def cb(inc): nonlocal i i += inc self.loop.stop() at = self.loop.time() + 0.05 self.loop.call_at(at, cb, 100).cancel() self.loop.call_at(at, cb, 10) started = time.monotonic() self.loop.run_forever() finished = time.monotonic() self.assertEqual(i, 10) self.assertLess(finished - started, 0.07) self.assertGreater(finished - started, 0.045) def test_check_thread(self): def check_thread(loop, debug): def cb(): pass loop.set_debug(debug) if debug: msg = ("Non-thread-safe operation invoked on an " "event loop other than the current one") with self.assertRaisesRegex(RuntimeError, msg): loop.call_soon(cb) with self.assertRaisesRegex(RuntimeError, msg): loop.call_later(60, cb) with self.assertRaisesRegex(RuntimeError, msg): loop.call_at(loop.time() + 60, cb) else: loop.call_soon(cb) loop.call_later(60, cb) loop.call_at(loop.time() + 60, cb) def check_in_thread(loop, event, debug, create_loop, fut): # wait until the event loop is running event.wait() try: if create_loop: loop2 = self.new_loop() try: asyncio.set_event_loop(loop2) check_thread(loop, debug) finally: asyncio.set_event_loop(None) loop2.close() else: check_thread(loop, debug) except Exception as exc: loop.call_soon_threadsafe(fut.set_exception, exc) else: loop.call_soon_threadsafe(fut.set_result, None) def test_thread(loop, debug, create_loop=False): event = threading.Event() fut = asyncio.Future(loop=loop) loop.call_soon(event.set) args = (loop, event, debug, create_loop, fut) thread = threading.Thread(target=check_in_thread, args=args) thread.start() loop.run_until_complete(fut) thread.join() # raise RuntimeError if the thread has no event loop test_thread(self.loop, True) # check disabled if debug mode is disabled test_thread(self.loop, False) # raise RuntimeError if the event loop of the thread is not the called # event loop test_thread(self.loop, True, create_loop=True) # check disabled if debug mode is disabled test_thread(self.loop, False, create_loop=True) def test_run_once_in_executor_plain(self): called = [] def cb(arg): called.append(arg) async def runner(): await self.loop.run_in_executor(None, cb, 'a') self.loop.run_until_complete(runner()) self.assertEqual(called, ['a']) def test_set_debug(self): self.loop.set_debug(True) self.assertTrue(self.loop.get_debug()) self.loop.set_debug(False) self.assertFalse(self.loop.get_debug()) def test_run_until_complete_type_error(self): self.assertRaises( TypeError, self.loop.run_until_complete, 'blah') def test_run_until_complete_loop(self): task = asyncio.Future(loop=self.loop) other_loop = self.new_loop() self.addCleanup(other_loop.close) self.assertRaises( ValueError, other_loop.run_until_complete, task) def test_run_until_complete_error(self): async def foo(): raise ValueError('aaa') with self.assertRaisesRegex(ValueError, 'aaa'): self.loop.run_until_complete(foo()) def test_debug_slow_callbacks(self): logger = logging.getLogger('asyncio') self.loop.set_debug(True) self.loop.slow_callback_duration = 0.2 self.loop.call_soon(lambda: time.sleep(0.3)) with mock.patch.object(logger, 'warning') as log: self.loop.run_until_complete(asyncio.sleep(0, loop=self.loop)) self.assertEqual(log.call_count, 1) # format message msg = log.call_args[0][0] % log.call_args[0][1:] self.assertIn('Executing It Works!' * 10000 class HttpRequestHandler(aiohttp.server.ServerHttpProtocol): async def handle_request(self, message, payload): response = aiohttp.Response( self.writer, 200, http_version=message.version ) response.add_header('Content-Type', 'text/html') response.add_header('Content-Length', str(len(PAYLOAD))) response.send_headers() response.write(PAYLOAD) await response.write_eof() asyncio.set_event_loop(self.loop) f = self.loop.create_server( lambda: HttpRequestHandler(keepalive_timeout=1), '0.0.0.0', '0') srv = self.loop.run_until_complete(f) port = srv.sockets[0].getsockname()[1] async def test(): for addr in (('localhost', port), ('127.0.0.1', port)): async with aiohttp.ClientSession() as client: async with client.get('http://{}:{}'.format(*addr)) as r: self.assertEqual(r.status, 200) self.assertEqual(len(await r.text()), len(PAYLOAD)) self.loop.run_until_complete(test()) srv.close() self.loop.run_until_complete(srv.wait_closed()) @unittest.skipIf(skip_tests, "no aiohttp module") class Test_UV_AioHTTP(_TestAioHTTP, tb.UVTestCase): pass @unittest.skipIf(skip_tests, "no aiohttp module") class Test_AIO_AioHTTP(_TestAioHTTP, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_executors.py0000664000372000037200000000204113156036740020504 0ustar travistravis00000000000000import asyncio import concurrent.futures from uvloop import _testbase as tb def fib(n): if n < 2: return 1 return fib(n - 2) + fib(n - 1) class _TestExecutors: def run_pool_test(self, pool_factory): async def run(): pool = pool_factory() with pool: coros = [] for i in range(0, 10): coros.append(self.loop.run_in_executor(pool, fib, i)) res = await asyncio.gather(*coros, loop=self.loop) self.assertEqual(res, fib10) await asyncio.sleep(0.01, loop=self.loop) fib10 = [fib(i) for i in range(10)] self.loop.run_until_complete(run()) def test_executors_process_pool_01(self): self.run_pool_test(concurrent.futures.ProcessPoolExecutor) def test_executors_process_pool_02(self): self.run_pool_test(concurrent.futures.ThreadPoolExecutor) class TestUVExecutors(_TestExecutors, tb.UVTestCase): pass class TestAIOExecutors(_TestExecutors, tb.AIOTestCase): pass uvloop-0.8.1/tests/certs/0000775000372000037200000000000013156037661016200 5ustar travistravis00000000000000uvloop-0.8.1/tests/certs/ssl_key.pem0000664000372000037200000000162413156036740020354 0ustar travistravis00000000000000-----BEGIN PRIVATE KEY----- MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANtb0+YrKuxevGpm LrjaUhZSgz6zFAmuGFmKmUbdjmfv9zSmmdsQIksK++jK0Be9LeZy20j6ahOfuVa0 ufEmPoP7Fy4hXegKZR9cCWcIe/A6H2xWF1IIJLRTLaU8ol/I7T+um5HD5AwAwNPP USNU0Eegmvp+xxWu3NX2m1Veot85AgMBAAECgYA3ZdZ673X0oexFlq7AAmrutkHt CL7LvwrpOiaBjhyTxTeSNWzvtQBkIU8DOI0bIazA4UreAFffwtvEuPmonDb3F+Iq SMAu42XcGyVZEl+gHlTPU9XRX7nTOXVt+MlRRRxL6t9GkGfUAXI3XxJDXW3c0vBK UL9xqD8cORXOfE06rQJBAP8mEX1ERkR64Ptsoe4281vjTlNfIbs7NMPkUnrn9N/Y BLhjNIfQ3HFZG8BTMLfX7kCS9D593DW5tV4Z9BP/c6cCQQDcFzCcVArNh2JSywOQ ZfTfRbJg/Z5Lt9Fkngv1meeGNPgIMLN8Sg679pAOOWmzdMO3V706rNPzSVMME7E5 oPIfAkEA8pDddarP5tCvTTgUpmTFbakm0KoTZm2+FzHcnA4jRh+XNTjTOv98Y6Ik eO5d1ZnKXseWvkZncQgxfdnMqqpj5wJAcNq/RVne1DbYlwWchT2Si65MYmmJ8t+F 0mcsULqjOnEMwf5e+ptq5LzwbyrHZYq5FNk7ocufPv/ZQrcSSC+cFwJBAKvOJByS x56qyGeZLOQlWS2JS3KJo59XuLFGqcbgN9Om9xFa41Yb4N9NvplFivsvZdw3m1Q/ SPIXQuT8RMPDVNQ= -----END PRIVATE KEY----- uvloop-0.8.1/tests/certs/ssl_cert.pem0000664000372000037200000000154313156036740020521 0ustar travistravis00000000000000-----BEGIN CERTIFICATE----- MIICVDCCAb2gAwIBAgIJANfHOBkZr8JOMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV BAYTAlhZMRcwFQYDVQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9u IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMDEw MDgyMzAxNTZaFw0yMDEwMDUyMzAxNTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH Ew5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZvdW5k YXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw gYkCgYEA21vT5isq7F68amYuuNpSFlKDPrMUCa4YWYqZRt2OZ+/3NKaZ2xAiSwr7 6MrQF70t5nLbSPpqE5+5VrS58SY+g/sXLiFd6AplH1wJZwh78DofbFYXUggktFMt pTyiX8jtP66bkcPkDADA089RI1TQR6Ca+n7HFa7c1fabVV6i3zkCAwEAAaMYMBYw FAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBBQUAA4GBAHPctQBEQ4wd BJ6+JcpIraopLn8BGhbjNWj40mmRqWB/NAWF6M5ne7KpGAu7tLeG4hb1zLaldK8G lxy2GPSRF6LFS48dpEj2HbMv2nvv6xxalDMJ9+DicWgAKTQ6bcX2j3GUkCR0g/T1 CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX -----END CERTIFICATE----- uvloop-0.8.1/tests/test_signals.py0000664000372000037200000001611413156036740020131 0ustar travistravis00000000000000import asyncio import signal import subprocess import sys import time from uvloop import _testbase as tb DELAY = 0.1 class _TestSignal: NEW_LOOP = None @tb.silence_long_exec_warning() def test_signals_sigint_pycode_stop(self): async def runner(): PROG = R"""\ import asyncio import uvloop import time from uvloop import _testbase as tb async def worker(): print('READY', flush=True) time.sleep(200) @tb.silence_long_exec_warning() def run(): loop = """ + self.NEW_LOOP + """ asyncio.set_event_loop(loop) try: loop.run_until_complete(worker()) finally: loop.close() run() """ proc = await asyncio.create_subprocess_exec( sys.executable, b'-c', PROG, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) await proc.stdout.readline() time.sleep(DELAY) proc.send_signal(signal.SIGINT) out, err = await proc.communicate() self.assertIn(b'KeyboardInterrupt', err) self.assertEqual(out, b'') self.loop.run_until_complete(runner()) @tb.silence_long_exec_warning() def test_signals_sigint_pycode_continue(self): async def runner(): PROG = R"""\ import asyncio import uvloop import time from uvloop import _testbase as tb async def worker(): print('READY', flush=True) try: time.sleep(200) except KeyboardInterrupt: print("oups") await asyncio.sleep(0.5) print('done') @tb.silence_long_exec_warning() def run(): loop = """ + self.NEW_LOOP + """ asyncio.set_event_loop(loop) try: loop.run_until_complete(worker()) finally: loop.close() run() """ proc = await asyncio.create_subprocess_exec( sys.executable, b'-c', PROG, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) await proc.stdout.readline() time.sleep(DELAY) proc.send_signal(signal.SIGINT) out, err = await proc.communicate() self.assertEqual(err, b'') self.assertEqual(out, b'oups\ndone\n') self.loop.run_until_complete(runner()) @tb.silence_long_exec_warning() def test_signals_sigint_uvcode(self): async def runner(): PROG = R"""\ import asyncio import uvloop srv = None async def worker(): global srv cb = lambda *args: None srv = await asyncio.start_server(cb, '127.0.0.1', 0) print('READY', flush=True) loop = """ + self.NEW_LOOP + """ asyncio.set_event_loop(loop) loop.create_task(worker()) try: loop.run_forever() finally: srv.close() loop.run_until_complete(srv.wait_closed()) loop.close() """ proc = await asyncio.create_subprocess_exec( sys.executable, b'-c', PROG, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) await proc.stdout.readline() time.sleep(DELAY) proc.send_signal(signal.SIGINT) out, err = await proc.communicate() self.assertIn(b'KeyboardInterrupt', err) self.loop.run_until_complete(runner()) @tb.silence_long_exec_warning() def test_signals_sigint_and_custom_handler(self): async def runner(): PROG = R"""\ import asyncio import signal import uvloop srv = None async def worker(): global srv cb = lambda *args: None srv = await asyncio.start_server(cb, '127.0.0.1', 0) print('READY', flush=True) def handler_sig(say): print(say, flush=True) exit() def handler_hup(say): print(say, flush=True) loop = """ + self.NEW_LOOP + """ loop.add_signal_handler(signal.SIGINT, handler_sig, '!s-int!') loop.add_signal_handler(signal.SIGHUP, handler_hup, '!s-hup!') asyncio.set_event_loop(loop) loop.create_task(worker()) try: loop.run_forever() finally: srv.close() loop.run_until_complete(srv.wait_closed()) loop.close() """ proc = await asyncio.create_subprocess_exec( sys.executable, b'-c', PROG, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) await proc.stdout.readline() time.sleep(DELAY) proc.send_signal(signal.SIGHUP) time.sleep(DELAY) proc.send_signal(signal.SIGINT) out, err = await proc.communicate() self.assertEqual(err, b'') self.assertIn(b'!s-hup!', out) self.assertIn(b'!s-int!', out) self.loop.run_until_complete(runner()) @tb.silence_long_exec_warning() def test_signals_and_custom_handler_1(self): async def runner(): PROG = R"""\ import asyncio import signal import uvloop srv = None async def worker(): global srv cb = lambda *args: None srv = await asyncio.start_server(cb, '127.0.0.1', 0) print('READY', flush=True) def handler1(): print("GOTIT", flush=True) def handler2(): assert loop.remove_signal_handler(signal.SIGUSR1) print("REMOVED", flush=True) def handler_hup(): exit() loop = """ + self.NEW_LOOP + """ asyncio.set_event_loop(loop) loop.add_signal_handler(signal.SIGUSR1, handler1) loop.add_signal_handler(signal.SIGUSR2, handler2) loop.add_signal_handler(signal.SIGHUP, handler_hup) loop.create_task(worker()) try: loop.run_forever() finally: srv.close() loop.run_until_complete(srv.wait_closed()) loop.close() """ proc = await asyncio.create_subprocess_exec( sys.executable, b'-c', PROG, stdout=subprocess.PIPE, stderr=subprocess.PIPE, loop=self.loop) await proc.stdout.readline() time.sleep(DELAY) proc.send_signal(signal.SIGUSR1) time.sleep(DELAY) proc.send_signal(signal.SIGUSR1) time.sleep(DELAY) proc.send_signal(signal.SIGUSR2) time.sleep(DELAY) proc.send_signal(signal.SIGUSR1) time.sleep(DELAY) proc.send_signal(signal.SIGUSR1) time.sleep(DELAY) proc.send_signal(signal.SIGHUP) out, err = await proc.communicate() self.assertEqual(err, b'') self.assertEqual(b'GOTIT\nGOTIT\nREMOVED\n', out) self.loop.run_until_complete(runner()) def test_signals_invalid_signal(self): with self.assertRaisesRegex(RuntimeError, 'sig {} cannot be caught'.format( signal.SIGKILL)): self.loop.add_signal_handler(signal.SIGKILL, lambda *a: None) def test_signals_coro_callback(self): async def coro(): pass with self.assertRaisesRegex(TypeError, 'coroutines cannot be used'): self.loop.add_signal_handler(signal.SIGHUP, coro) class Test_UV_Signals(_TestSignal, tb.UVTestCase): NEW_LOOP = 'uvloop.new_event_loop()' class Test_AIO_Signals(_TestSignal, tb.AIOTestCase): NEW_LOOP = 'asyncio.new_event_loop()' uvloop-0.8.1/tests/test_udp.py0000664000372000037200000001357613156036740017272 0ustar travistravis00000000000000import asyncio import socket import uvloop import sys from asyncio import test_utils from uvloop import _testbase as tb class MyDatagramProto(asyncio.DatagramProtocol): done = None def __init__(self, loop=None): self.state = 'INITIAL' self.nbytes = 0 if loop is not None: self.done = asyncio.Future(loop=loop) def connection_made(self, transport): self.transport = transport assert self.state == 'INITIAL', self.state self.state = 'INITIALIZED' def datagram_received(self, data, addr): assert self.state == 'INITIALIZED', self.state self.nbytes += len(data) def error_received(self, exc): assert self.state == 'INITIALIZED', self.state raise exc def connection_lost(self, exc): assert self.state == 'INITIALIZED', self.state self.state = 'CLOSED' if self.done: self.done.set_result(None) class _TestUDP: def test_create_datagram_endpoint_addrs(self): class TestMyDatagramProto(MyDatagramProto): def __init__(inner_self): super().__init__(loop=self.loop) def datagram_received(self, data, addr): super().datagram_received(data, addr) self.transport.sendto(b'resp:' + data, addr) for lc in (('127.0.0.1', 0), None): if lc is None and not isinstance(self.loop, uvloop.Loop): # TODO This looks like a bug in asyncio -- if no local_addr # and no remote_addr are specified, the connection # that asyncio creates is not bound anywhere. return with self.subTest(local_addr=lc): coro = self.loop.create_datagram_endpoint( TestMyDatagramProto, local_addr=lc, family=socket.AF_INET) s_transport, server = self.loop.run_until_complete(coro) host, port = s_transport.get_extra_info('sockname') self.assertIsInstance(server, TestMyDatagramProto) self.assertEqual('INITIALIZED', server.state) self.assertIs(server.transport, s_transport) extra = {} if hasattr(socket, 'SO_REUSEPORT') and \ sys.version_info[:3] >= (3, 5, 1): extra['reuse_port'] = True coro = self.loop.create_datagram_endpoint( lambda: MyDatagramProto(loop=self.loop), family=socket.AF_INET, remote_addr=None if lc is None else (host, port), **extra) transport, client = self.loop.run_until_complete(coro) self.assertIsInstance(client, MyDatagramProto) self.assertEqual('INITIALIZED', client.state) self.assertIs(client.transport, transport) transport.sendto(b'xxx', (host, port) if lc is None else None) test_utils.run_until(self.loop, lambda: server.nbytes) self.assertEqual(3, server.nbytes) test_utils.run_until(self.loop, lambda: client.nbytes) # received self.assertEqual(8, client.nbytes) # extra info is available self.assertIsNotNone(transport.get_extra_info('sockname')) # close connection transport.close() self.loop.run_until_complete(client.done) self.assertEqual('CLOSED', client.state) server.transport.close() self.loop.run_until_complete(server.done) def test_create_datagram_endpoint_ipv6_family(self): class TestMyDatagramProto(MyDatagramProto): def __init__(inner_self): super().__init__(loop=self.loop) def datagram_received(self, data, addr): super().datagram_received(data, addr) self.transport.sendto(b'resp:' + data, addr) coro = self.loop.create_datagram_endpoint( TestMyDatagramProto, local_addr=None, family=socket.AF_INET6) s_transport = None try: s_transport, server = self.loop.run_until_complete(coro) finally: if s_transport: s_transport.close() def test_create_datagram_endpoint_sock(self): sock = None local_address = ('127.0.0.1', 0) infos = self.loop.run_until_complete( self.loop.getaddrinfo( *local_address, type=socket.SOCK_DGRAM)) for family, type, proto, cname, address in infos: try: sock = socket.socket(family=family, type=type, proto=proto) sock.setblocking(False) sock.bind(address) except: pass else: break else: assert False, 'Can not create socket.' with sock: try: f = self.loop.create_datagram_endpoint( lambda: MyDatagramProto(loop=self.loop), sock=sock) except TypeError as ex: # asyncio in 3.5.0 doesn't have the 'sock' argument if 'got an unexpected keyword argument' not in ex.args[0]: raise else: tr, pr = self.loop.run_until_complete(f) self.assertIsInstance(pr, MyDatagramProto) tr.close() self.loop.run_until_complete(pr.done) class Test_UV_UDP(_TestUDP, tb.UVTestCase): def test_create_datagram_endpoint_wrong_sock(self): sock = socket.socket(socket.AF_INET) with sock: coro = self.loop.create_datagram_endpoint(lambda: None, sock=sock) with self.assertRaisesRegex(ValueError, 'A UDP Socket was expected'): self.loop.run_until_complete(coro) class Test_AIO_UDP(_TestUDP, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_pipes.py0000664000372000037200000001742213156036740017614 0ustar travistravis00000000000000import asyncio import io import os from asyncio import test_utils from uvloop import _testbase as tb # All tests are copied from asyncio (mostly as-is) class MyReadPipeProto(asyncio.Protocol): done = None def __init__(self, loop=None): self.state = ['INITIAL'] self.nbytes = 0 self.transport = None if loop is not None: self.done = asyncio.Future(loop=loop) def connection_made(self, transport): self.transport = transport assert self.state == ['INITIAL'], self.state self.state.append('CONNECTED') def data_received(self, data): assert self.state == ['INITIAL', 'CONNECTED'], self.state self.nbytes += len(data) def eof_received(self): assert self.state == ['INITIAL', 'CONNECTED'], self.state self.state.append('EOF') def connection_lost(self, exc): if 'EOF' not in self.state: self.state.append('EOF') # It is okay if EOF is missed. assert self.state == ['INITIAL', 'CONNECTED', 'EOF'], self.state self.state.append('CLOSED') if self.done: self.done.set_result(None) class MyWritePipeProto(asyncio.BaseProtocol): done = None def __init__(self, loop=None): self.state = 'INITIAL' self.transport = None if loop is not None: self.done = asyncio.Future(loop=loop) def connection_made(self, transport): self.transport = transport assert self.state == 'INITIAL', self.state self.state = 'CONNECTED' def connection_lost(self, exc): assert self.state == 'CONNECTED', self.state self.state = 'CLOSED' if self.done: self.done.set_result(None) class _BasePipeTest: def test_read_pipe(self): proto = MyReadPipeProto(loop=self.loop) rpipe, wpipe = os.pipe() pipeobj = io.open(rpipe, 'rb', 1024) @asyncio.coroutine def connect(): t, p = yield from self.loop.connect_read_pipe( lambda: proto, pipeobj) self.assertIs(p, proto) self.assertIs(t, proto.transport) self.assertEqual(['INITIAL', 'CONNECTED'], proto.state) self.assertEqual(0, proto.nbytes) self.loop.run_until_complete(connect()) os.write(wpipe, b'1') test_utils.run_until(self.loop, lambda: proto.nbytes >= 1) self.assertEqual(1, proto.nbytes) os.write(wpipe, b'2345') test_utils.run_until(self.loop, lambda: proto.nbytes >= 5) self.assertEqual(['INITIAL', 'CONNECTED'], proto.state) self.assertEqual(5, proto.nbytes) os.close(wpipe) self.loop.run_until_complete(proto.done) self.assertEqual( ['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state) # extra info is available self.assertIsNotNone(proto.transport.get_extra_info('pipe')) def test_read_pty_output(self): proto = MyReadPipeProto(loop=self.loop) master, slave = os.openpty() master_read_obj = io.open(master, 'rb', 0) @asyncio.coroutine def connect(): t, p = yield from self.loop.connect_read_pipe(lambda: proto, master_read_obj) self.assertIs(p, proto) self.assertIs(t, proto.transport) self.assertEqual(['INITIAL', 'CONNECTED'], proto.state) self.assertEqual(0, proto.nbytes) self.loop.run_until_complete(connect()) os.write(slave, b'1') test_utils.run_until(self.loop, lambda: proto.nbytes) self.assertEqual(1, proto.nbytes) os.write(slave, b'2345') test_utils.run_until(self.loop, lambda: proto.nbytes >= 5) self.assertEqual(['INITIAL', 'CONNECTED'], proto.state) self.assertEqual(5, proto.nbytes) # On Linux, transport raises EIO when slave is closed -- # ignore it. self.loop.set_exception_handler(lambda loop, ctx: None) os.close(slave) self.loop.run_until_complete(proto.done) self.assertEqual( ['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state) # extra info is available self.assertIsNotNone(proto.transport.get_extra_info('pipe')) def test_write_pipe(self): rpipe, wpipe = os.pipe() os.set_blocking(rpipe, False) pipeobj = io.open(wpipe, 'wb', 1024) proto = MyWritePipeProto(loop=self.loop) connect = self.loop.connect_write_pipe(lambda: proto, pipeobj) transport, p = self.loop.run_until_complete(connect) self.assertIs(p, proto) self.assertIs(transport, proto.transport) self.assertEqual('CONNECTED', proto.state) transport.write(b'1') data = bytearray() def reader(data): try: chunk = os.read(rpipe, 1024) except BlockingIOError: return len(data) data += chunk return len(data) test_utils.run_until(self.loop, lambda: reader(data) >= 1) self.assertEqual(b'1', data) transport.write(b'2345') test_utils.run_until(self.loop, lambda: reader(data) >= 5) self.assertEqual(b'12345', data) self.assertEqual('CONNECTED', proto.state) os.close(rpipe) # extra info is available self.assertIsNotNone(proto.transport.get_extra_info('pipe')) # close connection proto.transport.close() self.loop.run_until_complete(proto.done) self.assertEqual('CLOSED', proto.state) def test_write_pipe_disconnect_on_close(self): rsock, wsock = test_utils.socketpair() rsock.setblocking(False) pipeobj = io.open(wsock.detach(), 'wb', 1024) proto = MyWritePipeProto(loop=self.loop) connect = self.loop.connect_write_pipe(lambda: proto, pipeobj) transport, p = self.loop.run_until_complete(connect) self.assertIs(p, proto) self.assertIs(transport, proto.transport) self.assertEqual('CONNECTED', proto.state) transport.write(b'1') data = self.loop.run_until_complete(self.loop.sock_recv(rsock, 1024)) self.assertEqual(b'1', data) rsock.close() self.loop.run_until_complete(proto.done) self.assertEqual('CLOSED', proto.state) def test_write_pty(self): master, slave = os.openpty() os.set_blocking(master, False) slave_write_obj = io.open(slave, 'wb', 0) proto = MyWritePipeProto(loop=self.loop) connect = self.loop.connect_write_pipe(lambda: proto, slave_write_obj) transport, p = self.loop.run_until_complete(connect) self.assertIs(p, proto) self.assertIs(transport, proto.transport) self.assertEqual('CONNECTED', proto.state) transport.write(b'1') data = bytearray() def reader(data): try: chunk = os.read(master, 1024) except BlockingIOError: return len(data) data += chunk return len(data) test_utils.run_until(self.loop, lambda: reader(data) >= 1, timeout=10) self.assertEqual(b'1', data) transport.write(b'2345') test_utils.run_until(self.loop, lambda: reader(data) >= 5, timeout=10) self.assertEqual(b'12345', data) self.assertEqual('CONNECTED', proto.state) os.close(master) # extra info is available self.assertIsNotNone(proto.transport.get_extra_info('pipe')) # close connection proto.transport.close() self.loop.run_until_complete(proto.done) self.assertEqual('CLOSED', proto.state) class Test_UV_Pipes(_BasePipeTest, tb.UVTestCase): pass class Test_AIO_Pipes(_BasePipeTest, tb.AIOTestCase): pass uvloop-0.8.1/tests/test_cython.py0000664000372000037200000000167513156036740020003 0ustar travistravis00000000000000import asyncio from uvloop._testbase import UVTestCase class TestCythonIntegration(UVTestCase): def test_cython_coro_is_coroutine(self): from uvloop.loop import _test_coroutine_1 from asyncio.coroutines import _format_coroutine coro = _test_coroutine_1() self.assertEqual(_format_coroutine(coro), '_test_coroutine_1()') self.assertEqual(_test_coroutine_1.__qualname__, '_test_coroutine_1') self.assertEqual(_test_coroutine_1.__name__, '_test_coroutine_1') self.assertTrue(asyncio.iscoroutine(coro)) fut = asyncio.ensure_future(coro, loop=self.loop) self.assertTrue(isinstance(fut, asyncio.Future)) self.assertTrue(isinstance(fut, asyncio.Task)) fut.cancel() with self.assertRaises(asyncio.CancelledError): self.loop.run_until_complete(fut) _format_coroutine(coro) # This line checks against Cython segfault coro.close() uvloop-0.8.1/tests/__init__.py0000664000372000037200000000060213156036740017164 0ustar travistravis00000000000000import os.path import sys import unittest import unittest.runner def suite(): test_loader = unittest.TestLoader() test_suite = test_loader.discover( os.path.dirname(__file__), pattern='test_*.py') return test_suite if __name__ == '__main__': runner = unittest.runner.TextTestRunner() result = runner.run(suite()) sys.exit(not result.wasSuccessful()) uvloop-0.8.1/tests/test_tcp.py0000664000372000037200000007664113156036740017272 0ustar travistravis00000000000000import asyncio import gc import socket import unittest.mock import uvloop import ssl import sys import threading from uvloop import _testbase as tb class MyBaseProto(asyncio.Protocol): connected = None done = None def __init__(self, loop=None): self.transport = None self.state = 'INITIAL' self.nbytes = 0 if loop is not None: self.connected = asyncio.Future(loop=loop) self.done = asyncio.Future(loop=loop) def connection_made(self, transport): self.transport = transport assert self.state == 'INITIAL', self.state self.state = 'CONNECTED' if self.connected: self.connected.set_result(None) def data_received(self, data): assert self.state == 'CONNECTED', self.state self.nbytes += len(data) def eof_received(self): assert self.state == 'CONNECTED', self.state self.state = 'EOF' def connection_lost(self, exc): assert self.state in ('CONNECTED', 'EOF'), self.state self.state = 'CLOSED' if self.done: self.done.set_result(None) class _TestTCP: def test_create_server_1(self): if self.is_asyncio_loop() and sys.version_info[:3] == (3, 5, 2): # See https://github.com/python/asyncio/pull/366 for details. raise unittest.SkipTest() CNT = 0 # number of clients that were successful TOTAL_CNT = 25 # total number of clients that test will create TIMEOUT = 5.0 # timeout for this test A_DATA = b'A' * 1024 * 1024 B_DATA = b'B' * 1024 * 1024 async def handle_client(reader, writer): nonlocal CNT data = await reader.readexactly(len(A_DATA)) self.assertEqual(data, A_DATA) writer.write(b'OK') data = await reader.readexactly(len(B_DATA)) self.assertEqual(data, B_DATA) writer.writelines([b'S', b'P']) writer.write(bytearray(b'A')) writer.write(memoryview(b'M')) await writer.drain() writer.close() CNT += 1 async def test_client(addr): sock = socket.socket() with sock: sock.setblocking(False) await self.loop.sock_connect(sock, addr) await self.loop.sock_sendall(sock, A_DATA) buf = b'' while len(buf) != 2: buf += await self.loop.sock_recv(sock, 1) self.assertEqual(buf, b'OK') await self.loop.sock_sendall(sock, B_DATA) buf = b'' while len(buf) != 4: buf += await self.loop.sock_recv(sock, 1) self.assertEqual(buf, b'SPAM') async def start_server(): nonlocal CNT CNT = 0 addrs = ('127.0.0.1', 'localhost') if not isinstance(self.loop, uvloop.Loop): # Hack to let tests run on Python 3.5.0 # (asyncio doesn't support multiple hosts in 3.5.0) addrs = '127.0.0.1' srv = await asyncio.start_server( handle_client, addrs, 0, family=socket.AF_INET, loop=self.loop) srv_socks = srv.sockets self.assertTrue(srv_socks) addr = srv_socks[0].getsockname() tasks = [] for _ in range(TOTAL_CNT): tasks.append(test_client(addr)) await asyncio.wait_for( asyncio.gather(*tasks, loop=self.loop), TIMEOUT, loop=self.loop) self.loop.call_soon(srv.close) await srv.wait_closed() # Check that the server cleaned-up proxy-sockets for srv_sock in srv_socks: self.assertEqual(srv_sock.fileno(), -1) async def start_server_sock(): nonlocal CNT CNT = 0 sock = socket.socket() sock.bind(('127.0.0.1', 0)) addr = sock.getsockname() srv = await asyncio.start_server( handle_client, None, None, family=socket.AF_INET, loop=self.loop, sock=sock) srv_socks = srv.sockets self.assertTrue(srv_socks) tasks = [] for _ in range(TOTAL_CNT): tasks.append(test_client(addr)) await asyncio.wait_for( asyncio.gather(*tasks, loop=self.loop), TIMEOUT, loop=self.loop) srv.close() await srv.wait_closed() # Check that the server cleaned-up proxy-sockets for srv_sock in srv_socks: self.assertEqual(srv_sock.fileno(), -1) self.loop.run_until_complete(start_server()) self.assertEqual(CNT, TOTAL_CNT) self.loop.run_until_complete(start_server_sock()) self.assertEqual(CNT, TOTAL_CNT) def test_create_server_2(self): with self.assertRaisesRegex(ValueError, 'nor sock were specified'): self.loop.run_until_complete(self.loop.create_server(object)) def test_create_server_3(self): ''' check ephemeral port can be used ''' async def start_server_ephemeral_ports(): for port_sentinel in [0, None]: srv = await self.loop.create_server( asyncio.Protocol, '127.0.0.1', port_sentinel, family=socket.AF_INET) srv_socks = srv.sockets self.assertTrue(srv_socks) host, port = srv_socks[0].getsockname() self.assertNotEqual(0, port) self.loop.call_soon(srv.close) await srv.wait_closed() # Check that the server cleaned-up proxy-sockets for srv_sock in srv_socks: self.assertEqual(srv_sock.fileno(), -1) self.loop.run_until_complete(start_server_ephemeral_ports()) def test_create_server_4(self): sock = socket.socket() sock.bind(('127.0.0.1', 0)) with sock: addr = sock.getsockname() with self.assertRaisesRegex(OSError, "error while attempting.*\('127.*: " "address already in use"): self.loop.run_until_complete( self.loop.create_server(object, *addr)) def test_create_server_5(self): # Test that create_server sets the TCP_IPV6ONLY flag, # so it can bind to ipv4 and ipv6 addresses # simultaneously. port = tb.find_free_port() async def runner(): srv = await self.loop.create_server( asyncio.Protocol, None, port) srv.close() await srv.wait_closed() self.loop.run_until_complete(runner()) def test_create_server_6(self): if not hasattr(socket, 'SO_REUSEPORT'): raise unittest.SkipTest( 'The system does not support SO_REUSEPORT') if sys.version_info[:3] < (3, 5, 1): raise unittest.SkipTest( 'asyncio in CPython 3.5.0 does not have the ' 'reuse_port argument') port = tb.find_free_port() async def runner(): srv1 = await self.loop.create_server( asyncio.Protocol, None, port, reuse_port=True) srv2 = await self.loop.create_server( asyncio.Protocol, None, port, reuse_port=True) srv1.close() srv2.close() await srv1.wait_closed() await srv2.wait_closed() self.loop.run_until_complete(runner()) def test_create_connection_1(self): CNT = 0 TOTAL_CNT = 100 def server(): data = yield tb.read(4) self.assertEqual(data, b'AAAA') yield tb.write(b'OK') data = yield tb.read(4) self.assertEqual(data, b'BBBB') yield tb.write(b'SPAM') async def client(addr): reader, writer = await asyncio.open_connection( *addr, loop=self.loop) writer.write(b'AAAA') self.assertEqual(await reader.readexactly(2), b'OK') re = r'(a bytes-like object)|(must be byte-ish)' with self.assertRaisesRegex(TypeError, re): writer.write('AAAA') writer.write(b'BBBB') self.assertEqual(await reader.readexactly(4), b'SPAM') nonlocal CNT CNT += 1 writer.close() async def client_2(addr): sock = socket.socket() sock.connect(addr) reader, writer = await asyncio.open_connection( sock=sock, loop=self.loop) writer.write(b'AAAA') self.assertEqual(await reader.readexactly(2), b'OK') writer.write(b'BBBB') self.assertEqual(await reader.readexactly(4), b'SPAM') nonlocal CNT CNT += 1 writer.close() def run(coro): nonlocal CNT CNT = 0 srv = tb.tcp_server(server, max_clients=TOTAL_CNT, backlog=TOTAL_CNT) srv.start() tasks = [] for _ in range(TOTAL_CNT): tasks.append(coro(srv.addr)) self.loop.run_until_complete( asyncio.gather(*tasks, loop=self.loop)) srv.join() self.assertEqual(CNT, TOTAL_CNT) run(client) run(client_2) def test_create_connection_2(self): sock = socket.socket() with sock: sock.bind(('127.0.0.1', 0)) addr = sock.getsockname() async def client(): reader, writer = await asyncio.open_connection( *addr, loop=self.loop) async def runner(): with self.assertRaises(ConnectionRefusedError): await client() self.loop.run_until_complete(runner()) def test_create_connection_3(self): CNT = 0 TOTAL_CNT = 100 def server(): data = yield tb.read(4) self.assertEqual(data, b'AAAA') yield tb.close() async def client(addr): reader, writer = await asyncio.open_connection( *addr, loop=self.loop) writer.write(b'AAAA') with self.assertRaises(asyncio.IncompleteReadError): await reader.readexactly(10) writer.close() nonlocal CNT CNT += 1 def run(coro): nonlocal CNT CNT = 0 srv = tb.tcp_server(server, max_clients=TOTAL_CNT, backlog=TOTAL_CNT) srv.start() tasks = [] for _ in range(TOTAL_CNT): tasks.append(coro(srv.addr)) self.loop.run_until_complete( asyncio.gather(*tasks, loop=self.loop)) srv.join() self.assertEqual(CNT, TOTAL_CNT) run(client) def test_create_connection_4(self): sock = socket.socket() sock.close() async def client(): reader, writer = await asyncio.open_connection( sock=sock, loop=self.loop) async def runner(): with self.assertRaisesRegex(OSError, 'Bad file'): await client() self.loop.run_until_complete(runner()) def test_transport_shutdown(self): CNT = 0 # number of clients that were successful TOTAL_CNT = 100 # total number of clients that test will create TIMEOUT = 5.0 # timeout for this test async def handle_client(reader, writer): nonlocal CNT data = await reader.readexactly(4) self.assertEqual(data, b'AAAA') writer.write(b'OK') writer.write_eof() writer.write_eof() await writer.drain() writer.close() CNT += 1 async def test_client(addr): reader, writer = await asyncio.open_connection( *addr, loop=self.loop) writer.write(b'AAAA') data = await reader.readexactly(2) self.assertEqual(data, b'OK') writer.close() async def start_server(): nonlocal CNT CNT = 0 srv = await asyncio.start_server( handle_client, '127.0.0.1', 0, family=socket.AF_INET, loop=self.loop) srv_socks = srv.sockets self.assertTrue(srv_socks) addr = srv_socks[0].getsockname() tasks = [] for _ in range(TOTAL_CNT): tasks.append(test_client(addr)) await asyncio.wait_for( asyncio.gather(*tasks, loop=self.loop), TIMEOUT, loop=self.loop) srv.close() await srv.wait_closed() self.loop.run_until_complete(start_server()) self.assertEqual(CNT, TOTAL_CNT) def test_tcp_handle_exception_in_connection_made(self): # Test that if connection_made raises an exception, # 'create_connection' still returns. # Silence error logging self.loop.set_exception_handler(lambda *args: None) fut = asyncio.Future(loop=self.loop) connection_lost_called = asyncio.Future(loop=self.loop) async def server(reader, writer): try: await reader.read() finally: writer.close() class Proto(asyncio.Protocol): def connection_made(self, tr): 1 / 0 def connection_lost(self, exc): connection_lost_called.set_result(exc) srv = self.loop.run_until_complete(asyncio.start_server( server, '127.0.0.1', 0, family=socket.AF_INET, loop=self.loop)) async def runner(): tr, pr = await asyncio.wait_for( self.loop.create_connection( Proto, *srv.sockets[0].getsockname()), timeout=1.0, loop=self.loop) fut.set_result(None) tr.close() self.loop.run_until_complete(runner()) srv.close() self.loop.run_until_complete(srv.wait_closed()) self.loop.run_until_complete(fut) self.assertIsNone( self.loop.run_until_complete(connection_lost_called)) class Test_UV_TCP(_TestTCP, tb.UVTestCase): def test_transport_get_extra_info(self): # This tests is only for uvloop. asyncio should pass it # too in Python 3.6. fut = asyncio.Future(loop=self.loop) async def handle_client(reader, writer): with self.assertRaises(asyncio.IncompleteReadError): data = await reader.readexactly(4) writer.close() # Previously, when we used socket.fromfd to create a socket # for UVTransports (to make get_extra_info() work), a duplicate # of the socket was created, preventing UVTransport from being # properly closed. # This test ensures that server handle will receive an EOF # and finish the request. fut.set_result(None) async def test_client(addr): t, p = await self.loop.create_connection( lambda: asyncio.Protocol(), *addr) if hasattr(t, 'get_protocol'): p2 = asyncio.Protocol() self.assertIs(t.get_protocol(), p) t.set_protocol(p2) self.assertIs(t.get_protocol(), p2) t.set_protocol(p) self.assertFalse(t._paused) t.pause_reading() self.assertTrue(t._paused) t.resume_reading() self.assertFalse(t._paused) sock = t.get_extra_info('socket') self.assertIs(sock, t.get_extra_info('socket')) sockname = sock.getsockname() peername = sock.getpeername() with self.assertRaisesRegex(RuntimeError, 'is used by transport'): self.loop.add_writer(sock.fileno(), lambda: None) with self.assertRaisesRegex(RuntimeError, 'is used by transport'): self.loop.remove_writer(sock.fileno()) with self.assertRaisesRegex(RuntimeError, 'is used by transport'): self.loop.add_reader(sock.fileno(), lambda: None) with self.assertRaisesRegex(RuntimeError, 'is used by transport'): self.loop.remove_reader(sock.fileno()) self.assertTrue(isinstance(sock, socket.socket)) self.assertEqual(t.get_extra_info('sockname'), sockname) self.assertEqual(t.get_extra_info('peername'), peername) t.write(b'OK') # We want server to fail. self.assertFalse(t._closing) t.abort() self.assertTrue(t._closing) await fut # Test that peername and sockname are available after # the transport is closed. self.assertEqual(t.get_extra_info('peername'), peername) self.assertEqual(t.get_extra_info('sockname'), sockname) async def start_server(): srv = await asyncio.start_server( handle_client, '127.0.0.1', 0, family=socket.AF_INET, loop=self.loop) addr = srv.sockets[0].getsockname() await test_client(addr) srv.close() await srv.wait_closed() self.loop.run_until_complete(start_server()) def test_create_server_float_backlog(self): # asyncio spits out a warning we cannot suppress async def runner(bl): await self.loop.create_server( asyncio.Protocol, None, 0, backlog=bl) for bl in (1.1, '1'): with self.subTest(backlog=bl): with self.assertRaisesRegex(TypeError, 'integer'): self.loop.run_until_complete(runner(bl)) def test_many_small_writes(self): N = 10000 TOTAL = 0 fut = self.loop.create_future() async def server(reader, writer): nonlocal TOTAL while True: d = await reader.read(10000) if not d: break TOTAL += len(d) fut.set_result(True) writer.close() async def run(): srv = await asyncio.start_server( server, '127.0.0.1', 0, family=socket.AF_INET, loop=self.loop) addr = srv.sockets[0].getsockname() r, w = await asyncio.open_connection(*addr, loop=self.loop) DATA = b'x' * 102400 # Test _StreamWriteContext with short sequences of writes w.write(DATA) await w.drain() for _ in range(3): w.write(DATA) await w.drain() for _ in range(10): w.write(DATA) await w.drain() for _ in range(N): w.write(DATA) try: w.write('a') except TypeError: pass await w.drain() for _ in range(N): w.write(DATA) await w.drain() w.close() await fut srv.close() await srv.wait_closed() self.assertEqual(TOTAL, N * 2 * len(DATA) + 14 * len(DATA)) self.loop.run_until_complete(run()) def test_tcp_handle_unclosed_gc(self): fut = self.loop.create_future() async def server(reader, writer): writer.transport.abort() fut.set_result(True) async def run(): addr = srv.sockets[0].getsockname() await asyncio.open_connection(*addr, loop=self.loop) await fut srv.close() await srv.wait_closed() srv = self.loop.run_until_complete(asyncio.start_server( server, '127.0.0.1', 0, family=socket.AF_INET, loop=self.loop)) if self.loop.get_debug(): rx = r'unclosed resource ' def __call__(self, *args): pass def format_coroutine(qualname, state, src, source_traceback, generator=False): if generator: state = '%s' % state else: state = '%s, defined' % state if source_traceback is not None: frame = source_traceback[-1] return ('coro=<%s() %s at %s> created at %s:%s' % (qualname, state, src, frame[0], frame[1])) else: return 'coro=<%s() %s at %s>' % (qualname, state, src) class _TestTasks: def test_task_repr(self): self.loop.set_debug(False) @asyncio.coroutine def notmuch(): yield from [] return 'abc' # test coroutine function self.assertEqual(notmuch.__name__, 'notmuch') self.assertEqual(notmuch.__qualname__, '_TestTasks.test_task_repr..notmuch') self.assertEqual(notmuch.__module__, __name__) filename, lineno = test_utils.get_function_source(notmuch) src = "%s:%s" % (filename, lineno) # test coroutine object gen = notmuch() coro_qualname = '_TestTasks.test_task_repr..notmuch' self.assertEqual(gen.__name__, 'notmuch') self.assertEqual(gen.__qualname__, coro_qualname) # test pending Task t = asyncio.Task(gen, loop=self.loop) t.add_done_callback(Dummy()) coro = format_coroutine(coro_qualname, 'running', src, t._source_traceback, generator=True) self.assertEqual(repr(t), '()]>' % coro) # test canceling Task t.cancel() # Does not take immediate effect! self.assertEqual(repr(t), '()]>' % coro) # test canceled Task self.assertRaises(asyncio.CancelledError, self.loop.run_until_complete, t) coro = format_coroutine(coro_qualname, 'done', src, t._source_traceback) self.assertEqual(repr(t), '' % coro) # test finished Task t = asyncio.Task(notmuch(), loop=self.loop) self.loop.run_until_complete(t) coro = format_coroutine(coro_qualname, 'done', src, t._source_traceback) self.assertEqual(repr(t), "" % coro) def test_task_basics(self): @asyncio.coroutine def outer(): a = yield from inner1() b = yield from inner2() return a + b @asyncio.coroutine def inner1(): return 42 @asyncio.coroutine def inner2(): return 1000 t = outer() self.assertEqual(self.loop.run_until_complete(t), 1042) def test_task_cancel_yield(self): @asyncio.coroutine def task(): while True: yield return 12 t = self.create_task(task()) test_utils.run_briefly(self.loop) # start coro t.cancel() self.assertRaises( asyncio.CancelledError, self.loop.run_until_complete, t) self.assertTrue(t.done()) self.assertTrue(t.cancelled()) self.assertFalse(t.cancel()) def test_task_cancel_inner_future(self): f = self.create_future() @asyncio.coroutine def task(): yield from f return 12 t = self.create_task(task()) test_utils.run_briefly(self.loop) # start task f.cancel() with self.assertRaises(asyncio.CancelledError): self.loop.run_until_complete(t) self.assertTrue(f.cancelled()) self.assertTrue(t.cancelled()) def test_task_cancel_both_task_and_inner_future(self): f = self.create_future() @asyncio.coroutine def task(): yield from f return 12 t = self.create_task(task()) self.assertEqual(asyncio.Task.all_tasks(loop=self.loop), {t}) test_utils.run_briefly(self.loop) f.cancel() t.cancel() with self.assertRaises(asyncio.CancelledError): self.loop.run_until_complete(t) self.assertTrue(t.done()) self.assertTrue(f.cancelled()) self.assertTrue(t.cancelled()) def test_task_cancel_task_catching(self): fut1 = self.create_future() fut2 = self.create_future() @asyncio.coroutine def task(): yield from fut1 try: yield from fut2 except asyncio.CancelledError: return 42 t = self.create_task(task()) test_utils.run_briefly(self.loop) self.assertIs(t._fut_waiter, fut1) # White-box test. fut1.set_result(None) test_utils.run_briefly(self.loop) self.assertIs(t._fut_waiter, fut2) # White-box test. t.cancel() self.assertTrue(fut2.cancelled()) res = self.loop.run_until_complete(t) self.assertEqual(res, 42) self.assertFalse(t.cancelled()) def test_task_cancel_task_ignoring(self): fut1 = self.create_future() fut2 = self.create_future() fut3 = self.create_future() @asyncio.coroutine def task(): yield from fut1 try: yield from fut2 except asyncio.CancelledError: pass res = yield from fut3 return res t = self.create_task(task()) test_utils.run_briefly(self.loop) self.assertIs(t._fut_waiter, fut1) # White-box test. fut1.set_result(None) test_utils.run_briefly(self.loop) self.assertIs(t._fut_waiter, fut2) # White-box test. t.cancel() self.assertTrue(fut2.cancelled()) test_utils.run_briefly(self.loop) self.assertIs(t._fut_waiter, fut3) # White-box test. fut3.set_result(42) res = self.loop.run_until_complete(t) self.assertEqual(res, 42) self.assertFalse(fut3.cancelled()) self.assertFalse(t.cancelled()) def test_task_cancel_current_task(self): @asyncio.coroutine def task(): t.cancel() self.assertTrue(t._must_cancel) # White-box test. # The sleep should be canceled immediately. yield from asyncio.sleep(100, loop=self.loop) return 12 t = self.create_task(task()) self.assertRaises( asyncio.CancelledError, self.loop.run_until_complete, t) self.assertTrue(t.done()) self.assertFalse(t._must_cancel) # White-box test. self.assertFalse(t.cancel()) def test_task_step_with_baseexception(self): @asyncio.coroutine def notmutch(): raise BaseException() task = self.create_task(notmutch()) self.assertRaises(BaseException, task._step) self.assertTrue(task.done()) self.assertIsInstance(task.exception(), BaseException) def test_task_step_result_future(self): # If coroutine returns future, task waits on this future. class Fut(asyncio.Future): def __init__(self, *args, **kwds): self.cb_added = False super().__init__(*args, **kwds) def add_done_callback(self, fn): self.cb_added = True super().add_done_callback(fn) fut = Fut(loop=self.loop) result = None @asyncio.coroutine def wait_for_future(): nonlocal result result = yield from fut t = self.create_task(wait_for_future()) test_utils.run_briefly(self.loop) self.assertTrue(fut.cb_added) res = object() fut.set_result(res) test_utils.run_briefly(self.loop) self.assertIs(res, result) self.assertTrue(t.done()) self.assertIsNone(t.result()) def test_task_step_result(self): @asyncio.coroutine def notmuch(): yield None yield 1 return 'ko' self.assertRaises( RuntimeError, self.loop.run_until_complete, notmuch()) def test_task_yield_vs_yield_from(self): fut = asyncio.Future(loop=self.loop) @asyncio.coroutine def wait_for_future(): yield fut task = wait_for_future() with self.assertRaises(RuntimeError): self.loop.run_until_complete(task) self.assertFalse(fut.done()) def test_task_current_task(self): self.assertIsNone(asyncio.Task.current_task(loop=self.loop)) @asyncio.coroutine def coro(loop): self.assertTrue(asyncio.Task.current_task(loop=loop) is task) task = self.create_task(coro(self.loop)) self.loop.run_until_complete(task) self.assertIsNone(asyncio.Task.current_task(loop=self.loop)) def test_task_current_task_with_interleaving_tasks(self): self.assertIsNone(asyncio.Task.current_task(loop=self.loop)) fut1 = self.create_future() fut2 = self.create_future() @asyncio.coroutine def coro1(loop): self.assertTrue(asyncio.Task.current_task(loop=loop) is task1) yield from fut1 self.assertTrue(asyncio.Task.current_task(loop=loop) is task1) fut2.set_result(True) @asyncio.coroutine def coro2(loop): self.assertTrue(asyncio.Task.current_task(loop=loop) is task2) fut1.set_result(True) yield from fut2 self.assertTrue(asyncio.Task.current_task(loop=loop) is task2) task1 = self.create_task(coro1(self.loop)) task2 = self.create_task(coro2(self.loop)) self.loop.run_until_complete(asyncio.wait((task1, task2), loop=self.loop)) self.assertIsNone(asyncio.Task.current_task(loop=self.loop)) def test_task_yield_future_passes_cancel(self): # Canceling outer() cancels inner() cancels waiter. proof = 0 waiter = self.create_future() @asyncio.coroutine def inner(): nonlocal proof try: yield from waiter except asyncio.CancelledError: proof += 1 raise else: self.fail('got past sleep() in inner()') @asyncio.coroutine def outer(): nonlocal proof try: yield from inner() except asyncio.CancelledError: proof += 100 # Expect this path. else: proof += 10 f = asyncio.ensure_future(outer(), loop=self.loop) test_utils.run_briefly(self.loop) f.cancel() self.loop.run_until_complete(f) self.assertEqual(proof, 101) self.assertTrue(waiter.cancelled()) def test_task_yield_wait_does_not_shield_cancel(self): # Canceling outer() makes wait() return early, leaves inner() # running. proof = 0 waiter = self.create_future() @asyncio.coroutine def inner(): nonlocal proof yield from waiter proof += 1 @asyncio.coroutine def outer(): nonlocal proof d, p = yield from asyncio.wait([inner()], loop=self.loop) proof += 100 f = asyncio.ensure_future(outer(), loop=self.loop) test_utils.run_briefly(self.loop) f.cancel() self.assertRaises( asyncio.CancelledError, self.loop.run_until_complete, f) waiter.set_result(None) test_utils.run_briefly(self.loop) self.assertEqual(proof, 1) ############################################################################### # Tests Matrix ############################################################################### class Test_UV_UV_Tasks(_TestTasks, tb.UVTestCase): def create_future(self): return self.loop.create_future() def create_task(self, coro): return self.loop.create_task(coro) class Test_UV_UV_Tasks_AIO_Future(_TestTasks, tb.UVTestCase): def create_future(self): return asyncio.Future(loop=self.loop) def create_task(self, coro): return self.loop.create_task(coro) class Test_UV_AIO_Tasks(_TestTasks, tb.UVTestCase): def create_future(self): return asyncio.Future(loop=self.loop) def create_task(self, coro): return asyncio.Task(coro, loop=self.loop) class Test_AIO_Tasks(_TestTasks, tb.AIOTestCase): def create_future(self): return asyncio.Future(loop=self.loop) def create_task(self, coro): return asyncio.Task(coro, loop=self.loop) uvloop-0.8.1/docs/0000775000372000037200000000000013156037661014646 5ustar travistravis00000000000000uvloop-0.8.1/docs/user/0000775000372000037200000000000013156037661015624 5ustar travistravis00000000000000uvloop-0.8.1/docs/user/index.rst0000664000372000037200000000131713156036740017464 0ustar travistravis00000000000000User Guide ========== This section of the documentation provides information about how to use uvloop. Installation ------------ `uvloop` is available from PyPI. It requires Python 3.5. Use pip to install it. .. code-block:: console $ pip install uvloop Using uvloop ------------ To make asyncio use the event loop provided by `uvloop`, you install the `uvloop` event loop policy: .. code-block:: python import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) Alternatively, you can create an instance of the loop manually, using: .. code-block:: python import asyncio import uvloop loop = uvloop.new_event_loop() asyncio.set_event_loop(loop) uvloop-0.8.1/docs/api/0000775000372000037200000000000013156037661015417 5ustar travistravis00000000000000uvloop-0.8.1/docs/api/index.rst0000664000372000037200000000047513156036740017263 0ustar travistravis00000000000000API === If you are looking for information on a specific function, class or method, this part of the documentation is for you. uvloop ------ .. autoclass:: uvloop.EventLoopPolicy :members: .. autofunction:: uvloop.new_event_loop .. autoclass:: uvloop.Loop :members: :undoc-members: :inherited-members: uvloop-0.8.1/docs/conf.py0000664000372000037200000000373613156036740016153 0ustar travistravis00000000000000#!/usr/bin/env python3 import alabaster import os import re import sys sys.path.insert(0, os.path.abspath('..')) with open(os.path.abspath('../setup.py'), 'rt') as f: _m = re.search(r'''VERSION\s*=\s*(?P'|")(?P[\d\.]+)(?P=q)''', f.read()) if not _m: raise RuntimeError('unable to read the version from setup.py') version = _m.group('ver') # -- General configuration ------------------------------------------------ extensions = [ 'sphinx.ext.autodoc', 'alabaster', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'uvloop' copyright = '2016-present, MagicStack, Inc' author = 'Yury Selivanov' release = version language = None exclude_patterns = ['_build'] pygments_style = 'sphinx' todo_include_todos = False # -- Options for HTML output ---------------------------------------------- html_theme = 'alabaster' html_theme_options = { 'description': 'uvloop is an ultra fast implementation of the ' 'asyncio event loop on top of libuv.', 'show_powered_by': False, } html_theme_path = [alabaster.get_path()] html_title = 'uvloop Documentation' html_short_title = 'uvloop' html_static_path = [] html_sidebars = { '**': [ 'about.html', 'navigation.html', ] } html_show_sourcelink = False html_show_sphinx = False html_show_copyright = True htmlhelp_basename = 'uvloopdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = {} latex_documents = [ (master_doc, 'uvloop.tex', 'uvloop Documentation', 'Yury Selivanov', 'manual'), ] # -- Options for manual page output --------------------------------------- man_pages = [ (master_doc, 'uvloop', 'uvloop Documentation', [author], 1) ] # -- Options for Texinfo output ------------------------------------------- texinfo_documents = [ (master_doc, 'uvloop', 'uvloop Documentation', author, 'uvloop', 'One line description of project.', 'Miscellaneous'), ] uvloop-0.8.1/docs/index.rst0000664000372000037200000000417613156036740016514 0ustar travistravis00000000000000.. image:: https://travis-ci.org/MagicStack/uvloop.svg?branch=master :target: https://travis-ci.org/MagicStack/uvloop .. image:: https://img.shields.io/pypi/status/uvloop.svg?maxAge=2592000?style=plastic :target: https://pypi.python.org/pypi/uvloop .. image:: https://img.shields.io/github/stars/magicstack/uvloop.svg?style=social&label=GitHub :target: https://github.com/MagicStack/uvloop uvloop ====== `uvloop` is a fast, drop-in replacement of the built-in asyncio event loop. `uvloop` is released under the MIT license. `uvloop` and asyncio, combined with the power of async/await in Python 3.5, makes it easier than ever to write high-performance networking code in Python. `uvloop` makes asyncio fast. In fact, it is at least 2x faster than nodejs, gevent, as well as any other Python asynchronous framework. The performance of uvloop-based asyncio is close to that of Go programs. You can read more about uvloop in this `blog post `_. Architecture ------------ The asyncio module, introduced by PEP 3156, is a collection of network transports, protocols, and streams abstractions, with a pluggable event loop. The event loop is the heart of asyncio. It provides APIs for: - scheduling calls, - transmitting data over the network, - performing DNS queries, - handling OS signals, - convenient abstractions to create servers and connections, - working with subprocesses asynchronously. `uvloop` implements the :class:`asyncio.AbstractEventLoop` interface which means that it provides a drop-in replacement of the asyncio event loop. `uvloop` is written in Cython and is built on top of libuv. libuv is a high performance, multiplatform asynchronous I/O library used by nodejs. Because of how wide-spread and popular nodejs is, libuv is fast and stable. `uvloop` implements all asyncio event loop APIs. High-level Python objects wrap low-level libuv structs and functions. Inheritance is used to keep the code DRY and ensure that any manual memory management is in sync with libuv primitives' lifespans. Contents -------- .. toctree:: :maxdepth: 1 user/index dev/index uvloop-0.8.1/docs/dev/0000775000372000037200000000000013156037661015424 5ustar travistravis00000000000000uvloop-0.8.1/docs/dev/index.rst0000664000372000037200000000541013156036740017262 0ustar travistravis00000000000000Developers Guide ================ The project is hosted on `GitHub `_. and uses `Travis `_ for Continuous Integration. A goal for the `uvloop` project is to provide a drop in replacement for the `asyncio` event loop. Any deviation from the behavior of the reference `asyncio` event loop is considered a bug. If you have found a bug or have an idea for an enhancement that would improve the library, use the `bug tracker `_. Get the source -------------- .. code-block:: console $ git clone --recursive git@github.com:MagicStack/uvloop.git The ``--recursive`` argument is important. It will fetch the ``libuv`` source from the `libuv` Github repository. Build ----- To build `uvloop`, you'll need ``Cython`` and Python 3.5. .. note:: The best way to work on `uvloop` is to create a virtual env, so that you'll have Cython and Python commands pointing to the correct tools. .. code-block:: console $ python3 -m venv myvenv $ cd myvenv $ source bin/activate $ cd .. Install Cython if not already present. .. code-block:: console $ pip install Cython Build `uvloop` by running the ``make`` rule from the top level directory. .. code-block:: console $ cd uvloop $ make Test ---- The easiest method to run all of the unit tests is to run the ``make test`` rule from the top level directory. This runs the standard library ``unittest`` tool which discovers all the unit tests and runs them. It actually runs them twice, once with the `PYTHONASYNCIODEBUG` enabled and once without. .. code-block:: console $ cd uvloop $ make test Individual Tests ++++++++++++++++ Individual unit tests can be run using the standard library ``unittest`` or ``pytest`` package. The easiest approach to ensure that ``uvloop`` can be found by Python is to install the package using ``pip``: .. code-block:: console $ cd uvloop $ pip install -e . You can then run the unit tests individually from the tests directory using ``unittest``: .. code-block:: console $ cd uvloop/tests $ python -m unittest test_tcp or using ``pytest``: .. code-block:: console $ cd uvloop/tests $ py.test -k test_signals_sigint_uvcode Documentation ------------- To rebuild the project documentation, developers should run the ``make docs`` rule from the top level directory. It performs a number of steps to create a new set of `sphinx `_ html content. This step requires Sphinx to be installed. Sphinx can be installed using pip: .. code-block:: console $ pip install sphinx Once Sphinx is available you can make the documentation using: .. code-block:: console $ make docs uvloop-0.8.1/uvloop/0000775000372000037200000000000013156037661015242 5ustar travistravis00000000000000uvloop-0.8.1/uvloop/loop.pyx0000664000372000037200000025747113156036740016772 0ustar travistravis00000000000000# cython: language_level=3, embedsignature=True import asyncio cimport cython from .includes.debug cimport UVLOOP_DEBUG from .includes cimport uv from .includes cimport system from .includes.python cimport PyMem_RawMalloc, PyMem_RawFree, \ PyMem_RawCalloc, PyMem_RawRealloc, \ PyUnicode_EncodeFSDefault, \ PyErr_SetInterrupt, \ PyOS_AfterFork, \ _PyImport_AcquireLock, \ _PyImport_ReleaseLock, \ _Py_RestoreSignals from libc.stdint cimport uint64_t from libc.string cimport memset, strerror, memcpy from libc cimport errno from cpython cimport PyObject from cpython cimport PyErr_CheckSignals, PyErr_Occurred from cpython cimport PyThread_get_thread_ident from cpython cimport Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF from cpython cimport PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, \ Py_buffer, PyBytes_AsString, PyBytes_CheckExact, \ Py_SIZE, PyBytes_AS_STRING from cpython cimport PyErr_CheckSignals from . import _noop include "includes/consts.pxi" include "includes/stdlib.pxi" include "errors.pyx" cdef _is_sock_stream(sock_type): # Linux's socket.type is a bitmask that can include extra info # about socket, therefore we can't do simple # `sock_type == socket.SOCK_STREAM`. return (sock_type & uv.SOCK_STREAM) == uv.SOCK_STREAM cdef _is_sock_dgram(sock_type): # Linux's socket.type is a bitmask that can include extra info # about socket, therefore we can't do simple # `sock_type == socket.SOCK_DGRAM`. return (sock_type & uv.SOCK_DGRAM) == uv.SOCK_DGRAM cdef isfuture(obj): if aio_isfuture is None: return isinstance(obj, aio_Future) else: return aio_isfuture(obj) @cython.no_gc_clear cdef class Loop: def __cinit__(self): cdef int err # Install PyMem* memory allocators if they aren't installed yet. __install_pymem() # Install pthread_atfork handlers __install_atfork() self.uvloop = \ PyMem_RawMalloc(sizeof(uv.uv_loop_t)) if self.uvloop is NULL: raise MemoryError() self.slow_callback_duration = 0.1 self._closed = 0 self._debug = 0 self._thread_is_main = 0 self._thread_id = 0 self._running = 0 self._stopping = 0 self._transports = weakref_WeakValueDictionary() self._timers = set() self._polls = dict() self._recv_buffer_in_use = 0 err = uv.uv_loop_init(self.uvloop) if err < 0: raise convert_error(err) self.uvloop.data = self self._init_debug_fields() self.active_process_handler = None self._last_error = None self._task_factory = None self._exception_handler = None self._default_executor = None self._queued_streams = set() self._ready = col_deque() self._ready_len = 0 self.handler_async = UVAsync.new( self, self._on_wake, self) self.handler_idle = UVIdle.new( self, new_MethodHandle( self, "loop._on_idle", self._on_idle, self)) # Needed to call `UVStream._exec_write` for writes scheduled # during `Protocol.data_received`. self.handler_check__exec_writes = UVCheck.new( self, new_MethodHandle( self, "loop._exec_queued_writes", self._exec_queued_writes, self)) self._ssock = self._csock = None self._signal_handlers = None self._coroutine_wrapper_set = False if hasattr(sys, 'get_asyncgen_hooks'): # Python >= 3.6 # A weak set of all asynchronous generators that are # being iterated by the loop. self._asyncgens = weakref_WeakSet() else: self._asyncgens = None # Set to True when `loop.shutdown_asyncgens` is called. self._asyncgens_shutdown_called = False def __init__(self): self.set_debug((not sys_ignore_environment and bool(os_environ.get('PYTHONASYNCIODEBUG')))) def __dealloc__(self): if self._running == 1: raise RuntimeError('deallocating a running event loop!') if self._closed == 0: aio_logger.error("deallocating an open event loop") return PyMem_RawFree(self.uvloop) self.uvloop = NULL cdef _init_debug_fields(self): self._debug_cc = bool(UVLOOP_DEBUG) if UVLOOP_DEBUG: self._debug_handles_current = col_Counter() self._debug_handles_closed = col_Counter() self._debug_handles_total = col_Counter() else: self._debug_handles_current = None self._debug_handles_closed = None self._debug_handles_total = None self._debug_uv_handles_total = 0 self._debug_uv_handles_freed = 0 self._debug_stream_read_cb_total = 0 self._debug_stream_read_eof_total = 0 self._debug_stream_read_errors_total = 0 self._debug_stream_read_cb_errors_total = 0 self._debug_stream_read_eof_cb_errors_total = 0 self._debug_stream_shutdown_errors_total = 0 self._debug_stream_listen_errors_total = 0 self._debug_stream_write_tries = 0 self._debug_stream_write_errors_total = 0 self._debug_stream_write_ctx_total = 0 self._debug_stream_write_ctx_cnt = 0 self._debug_stream_write_cb_errors_total = 0 self._debug_cb_handles_total = 0 self._debug_cb_handles_count = 0 self._debug_cb_timer_handles_total = 0 self._debug_cb_timer_handles_count = 0 self._poll_read_events_total = 0 self._poll_read_cb_errors_total = 0 self._poll_write_events_total = 0 self._poll_write_cb_errors_total = 0 self._sock_try_write_total = 0 self._debug_exception_handler_cnt = 0 cdef _setup_signals(self): self._ssock, self._csock = socket_socketpair() self._ssock.setblocking(False) self._csock.setblocking(False) try: signal_set_wakeup_fd(self._csock.fileno()) except ValueError: # Not the main thread self._ssock.close() self._csock.close() self._ssock = self._csock = None return self._add_reader( self._ssock.fileno(), new_MethodHandle( self, "Loop._read_from_self", self._read_from_self, self)) self._signal_handlers = {} cdef _shutdown_signals(self): if self._signal_handlers is None: return for sig in list(self._signal_handlers): self.remove_signal_handler(sig) signal_set_wakeup_fd(-1) self._remove_reader(self._ssock.fileno()) self._ssock.close() self._csock.close() cdef _read_from_self(self): while True: try: data = self._ssock.recv(4096) if not data: break self._process_self_data(data) except InterruptedError: continue except BlockingIOError: break cdef _process_self_data(self, data): for signum in data: if not signum: # ignore null bytes written by _write_to_self() continue self._handle_signal(signum) cdef _handle_signal(self, sig): cdef Handle handle try: handle = (self._signal_handlers[sig]) except KeyError: handle = None if handle is None: # Some signal that we aren't listening through # add_signal_handler. Invoke CPython eval loop # to let it being processed. PyErr_CheckSignals() _noop.noop() return if handle.cancelled: self.remove_signal_handler(sig) # Remove it properly. else: self._call_soon_handle(handle) self.handler_async.send() cdef _on_wake(self): if (self._ready_len > 0 or self._stopping) \ and not self.handler_idle.running: self.handler_idle.start() cdef _on_idle(self): cdef: int i, ntodo object popleft = self._ready.popleft Handle handler ntodo = len(self._ready) if self._debug: for i from 0 <= i < ntodo: handler = popleft() if handler.cancelled == 0: try: started = time_monotonic() handler._run() except BaseException as ex: self._stop(ex) return else: delta = time_monotonic() - started if delta > self.slow_callback_duration: aio_logger.warning( 'Executing %r took %.3f seconds', handler, delta) else: for i from 0 <= i < ntodo: handler = popleft() if handler.cancelled == 0: try: handler._run() except BaseException as ex: self._stop(ex) return if len(self._queued_streams): self._exec_queued_writes() self._ready_len = len(self._ready) if self._ready_len == 0 and self.handler_idle.running: self.handler_idle.stop() if self._stopping: uv.uv_stop(self.uvloop) # void cdef _stop(self, exc): if exc is not None: self._last_error = exc if self._stopping == 1: return self._stopping = 1 if not self.handler_idle.running: self.handler_idle.start() cdef __run(self, uv.uv_run_mode mode): # Although every UVHandle holds a reference to the loop, # we want to do everything to ensure that the loop will # never deallocate during the run -- so we do some # manual refs management. Py_INCREF(self) with nogil: err = uv.uv_run(self.uvloop, mode) Py_DECREF(self) if err < 0: raise convert_error(err) cdef _run(self, uv.uv_run_mode mode): cdef int err if self._closed == 1: raise RuntimeError('unable to start the loop; it was closed') if self._running == 1: raise RuntimeError('this event loop is already running.') if (aio_get_running_loop is not None and aio_get_running_loop() is not None): raise RuntimeError( 'Cannot run the event loop while another loop is running') if self._signal_handlers is None: self._setup_signals() # reset _last_error self._last_error = None self._thread_id = PyThread_get_thread_ident() self._thread_is_main = MAIN_THREAD_ID == self._thread_id self._running = 1 self.handler_check__exec_writes.start() self.handler_idle.start() if aio_set_running_loop is not None: aio_set_running_loop(self) try: self.__run(mode) finally: if aio_set_running_loop is not None: aio_set_running_loop(None) self.handler_check__exec_writes.stop() self.handler_idle.stop() self._thread_is_main = 0 self._thread_id = 0 self._running = 0 self._stopping = 0 if self._last_error is not None: # The loop was stopped with an error with 'loop._stop(error)' call raise self._last_error cdef _close(self): cdef int err if self._running == 1: raise RuntimeError("Cannot close a running event loop") if self._closed == 1: return self._closed = 1 for cb_handle in self._ready: cb_handle.cancel() self._ready.clear() self._ready_len = 0 if self._polls: for poll_handle in self._polls.values(): (poll_handle)._close() self._polls.clear() if self._timers: for timer_cbhandle in tuple(self._timers): timer_cbhandle.cancel() # Close all remaining handles self.handler_async._close() self.handler_idle._close() self.handler_check__exec_writes._close() __close_all_handles(self) self._shutdown_signals() # During this run there should be no open handles, # so it should finish right away self.__run(uv.UV_RUN_DEFAULT) if self._timers: raise RuntimeError( "new timers were queued during loop closing: {}" .format(self._timers)) if self._polls: raise RuntimeError( "new poll handles were queued during loop closing: {}" .format(self._polls)) if self._ready: raise RuntimeError( "new callbacks were queued during loop closing: {}" .format(self._ready)) err = uv.uv_loop_close(self.uvloop) if err < 0: raise convert_error(err) self.handler_async = None self.handler_idle = None self.handler_check__exec_writes = None executor = self._default_executor if executor is not None: self._default_executor = None executor.shutdown(wait=False) cdef uint64_t _time(self): # asyncio doesn't have a time cache, neither should uvloop. uv.uv_update_time(self.uvloop) # void return uv.uv_now(self.uvloop) cdef inline _queue_write(self, UVStream stream): self._queued_streams.add(stream) if not self.handler_check__exec_writes.running: self.handler_check__exec_writes.start() cdef _exec_queued_writes(self): if len(self._queued_streams) == 0: if self.handler_check__exec_writes.running: self.handler_check__exec_writes.stop() return cdef: UVStream stream int queued_len if UVLOOP_DEBUG: queued_len = len(self._queued_streams) for pystream in self._queued_streams: stream = pystream stream._exec_write() if UVLOOP_DEBUG: if len(self._queued_streams) != queued_len: raise RuntimeError( 'loop._queued_streams are not empty after ' '_exec_queued_writes') self._queued_streams.clear() if self.handler_check__exec_writes.running: self.handler_check__exec_writes.stop() cdef inline _call_soon(self, object callback, object args): cdef Handle handle handle = new_Handle(self, callback, args) self._call_soon_handle(handle) return handle cdef inline _call_soon_handle(self, Handle handle): self._check_closed() self._ready.append(handle) self._ready_len += 1; if not self.handler_idle.running: self.handler_idle.start() cdef _call_later(self, uint64_t delay, object callback, object args): return TimerHandle(self, callback, args, delay) cdef void _handle_exception(self, object ex): if isinstance(ex, Exception): self.call_exception_handler({'exception': ex}) else: # BaseException self._last_error = ex # Exit ASAP self._stop(None) cdef inline _check_signal(self, sig): if not isinstance(sig, int): raise TypeError('sig must be an int, not {!r}'.format(sig)) if not (1 <= sig < signal_NSIG): raise ValueError( 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) cdef inline _check_closed(self): if self._closed == 1: raise RuntimeError('Event loop is closed') cdef inline _check_thread(self): if self._thread_id == 0: return cdef long thread_id = PyThread_get_thread_ident() if thread_id != self._thread_id: raise RuntimeError( "Non-thread-safe operation invoked on an event loop other " "than the current one") cdef inline _new_future(self): return future_factory(loop=self) cdef _track_transport(self, UVBaseTransport transport): self._transports[transport._fileno()] = transport cdef _ensure_fd_no_transport(self, fd): cdef UVBaseTransport tr try: tr = (self._transports[fd]) except KeyError: pass else: if tr._is_alive(): raise RuntimeError( 'File descriptor {!r} is used by transport {!r}'.format( fd, tr)) cdef inline _add_reader(self, fd, Handle handle): cdef: UVPoll poll self._check_closed() try: poll = (self._polls[fd]) except KeyError: poll = UVPoll.new(self, fd) self._polls[fd] = poll poll.start_reading(handle) cdef inline _remove_reader(self, fd): cdef: UVPoll poll if self._closed == 1: return False try: poll = (self._polls[fd]) except KeyError: return False result = poll.stop_reading() if not poll.is_active(): del self._polls[fd] poll._close() return result cdef inline _add_writer(self, fd, Handle handle): cdef: UVPoll poll self._check_closed() try: poll = (self._polls[fd]) except KeyError: poll = UVPoll.new(self, fd) self._polls[fd] = poll poll.start_writing(handle) cdef inline _remove_writer(self, fd): cdef: UVPoll poll if self._closed == 1: return False try: poll = (self._polls[fd]) except KeyError: return False result = poll.stop_writing() if not poll.is_active(): del self._polls[fd] poll._close() return result cdef _getaddrinfo(self, object host, object port, int family, int type, int proto, int flags, int unpack): if isinstance(port, str): port = port.encode() elif isinstance(port, int): port = str(port).encode() if port is not None and not isinstance(port, bytes): raise TypeError('port must be a str, bytes or int') if isinstance(host, str): host = host.encode('idna') if host is not None: if not isinstance(host, bytes): raise TypeError('host must be a str or bytes') fut = self._new_future() def callback(result): if AddrInfo.isinstance(result): try: if unpack == 0: data = result else: data = (result).unpack() except Exception as ex: if not fut.cancelled(): fut.set_exception(ex) else: if not fut.cancelled(): fut.set_result(data) else: if not fut.cancelled(): fut.set_exception(result) AddrInfoRequest(self, host, port, family, type, proto, flags, callback) return fut cdef _getnameinfo(self, system.sockaddr *addr, int flags): cdef NameInfoRequest nr fut = self._new_future() def callback(result): if isinstance(result, tuple): fut.set_result(result) else: fut.set_exception(result) nr = NameInfoRequest(self, callback) nr.query(addr, flags) return fut cdef _sock_recv(self, fut, sock, n): cdef: Handle handle int fd fd = sock.fileno() if fut.cancelled(): self._remove_reader(fd) return try: data = sock.recv(n) except (BlockingIOError, InterruptedError): # No need to re-add the reader, let's just wait until # the poll handler calls this callback again. pass except Exception as exc: fut.set_exception(exc) self._remove_reader(fd) else: fut.set_result(data) self._remove_reader(fd) cdef _sock_sendall(self, fut, sock, data): cdef: Handle handle int n int fd fd = sock.fileno() if fut.cancelled(): self._remove_writer(fd) return try: n = sock.send(data) except (BlockingIOError, InterruptedError): # Try next time. return except Exception as exc: fut.set_exception(exc) self._remove_writer(fd) return if n == len(data): fut.set_result(None) self._remove_writer(fd) else: if n: if not isinstance(data, memoryview): data = memoryview(data) data = data[n:] handle = new_MethodHandle3( self, "Loop._sock_sendall", self._sock_sendall, self, fut, sock, data) self._add_writer(fd, handle) cdef _sock_accept(self, fut, sock): cdef: Handle handle fd = sock.fileno() if fut.cancelled(): self._remove_reader(fd) return try: conn, address = sock.accept() conn.setblocking(False) except (BlockingIOError, InterruptedError): # There is an active reader for _sock_accept, so # do nothing, it will be called again. pass except Exception as exc: fut.set_exception(exc) self._remove_reader(fd) else: fut.set_result((conn, address)) self._remove_reader(fd) cdef _sock_connect(self, fut, sock, address): cdef: Handle handle fd = sock.fileno() try: sock.connect(address) except (BlockingIOError, InterruptedError): # Issue #23618: When the C function connect() fails with EINTR, the # connection runs in background. We have to wait until the socket # becomes writable to be notified when the connection succeed or # fails. fut.add_done_callback(lambda fut: self._remove_writer(fd)) handle = new_MethodHandle3( self, "Loop._sock_connect", self._sock_connect_cb, self, fut, sock, address) self._add_writer(fd, handle) except Exception as exc: fut.set_exception(exc) else: fut.set_result(None) cdef _sock_connect_cb(self, fut, sock, address): if fut.cancelled(): return try: err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) if err != 0: # Jump to any except clause below. raise OSError(err, 'Connect call failed %s' % (address,)) except (BlockingIOError, InterruptedError): # socket is still registered, the callback will be retried later pass except Exception as exc: fut.set_exception(exc) else: fut.set_result(None) cdef _sock_set_reuseport(self, int fd): cdef: int err int reuseport_flag = 1 err = system.setsockopt( fd, uv.SOL_SOCKET, SO_REUSEPORT, &reuseport_flag, sizeof(reuseport_flag)) if err < 0: raise convert_error(-errno.errno) cdef _set_coroutine_wrapper(self, bint enabled): enabled = bool(enabled) if self._coroutine_wrapper_set == enabled: return wrapper = aio_debug_wrapper current_wrapper = sys_get_coroutine_wrapper() if enabled: if current_wrapper not in (None, wrapper): warnings.warn( "loop.set_debug(True): cannot set debug coroutine " "wrapper; another wrapper is already set %r" % current_wrapper, RuntimeWarning) else: sys_set_coroutine_wrapper(wrapper) self._coroutine_wrapper_set = True else: if current_wrapper not in (None, wrapper): warnings.warn( "loop.set_debug(False): cannot unset debug coroutine " "wrapper; another wrapper was set %r" % current_wrapper, RuntimeWarning) else: sys_set_coroutine_wrapper(None) self._coroutine_wrapper_set = False cdef _create_server(self, system.sockaddr *addr, object protocol_factory, Server server, object ssl, bint reuse_port, object backlog): cdef: TCPServer tcp int bind_flags tcp = TCPServer.new(self, protocol_factory, server, ssl, addr.sa_family) if reuse_port: self._sock_set_reuseport(tcp._fileno()) if addr.sa_family == uv.AF_INET6: # Disable IPv4/IPv6 dual stack support (enabled by # default on Linux) which makes a single socket # listen on both address families. bind_flags = uv.UV_TCP_IPV6ONLY else: bind_flags = 0 try: tcp.bind(addr, bind_flags) tcp.listen(backlog) except OSError as err: pyaddr = __convert_sockaddr_to_pyaddr(addr) tcp._close() raise OSError(err.errno, 'error while attempting ' 'to bind on address %r: %s' % (pyaddr, err.strerror.lower())) except: tcp._close() raise return tcp def _get_backend_id(self): """This method is used by uvloop tests and is not part of the API.""" return uv.uv_backend_fd(self.uvloop) def print_debug_info(self): cdef: int err uv.uv_rusage_t rusage if not UVLOOP_DEBUG: raise NotImplementedError err = uv.uv_getrusage(&rusage) if err < 0: raise convert_error(err) ################### OS print('---- Process info: -----') print('Process memory: {}'.format(rusage.ru_maxrss)) print('Number of signals: {}'.format(rusage.ru_nsignals)) print('') ################### Loop print('--- Loop debug info: ---') print('Loop time: {}'.format(self.time())) print('Errors logged: {}'.format( self._debug_exception_handler_cnt)) print() print('Callback handles: {: <8} | {}'.format( self._debug_cb_handles_count, self._debug_cb_handles_total)) print('Timer handles: {: <8} | {}'.format( self._debug_cb_timer_handles_count, self._debug_cb_timer_handles_total)) print() print(' alive | closed |') print('UVHandles python | libuv | total') print(' objs | handles |') print('-------------------------------+---------+---------') for name in sorted(self._debug_handles_total): print(' {: <18} {: >7} | {: >7} | {: >7}'.format( name, self._debug_handles_current[name], self._debug_handles_closed[name], self._debug_handles_total[name])) print() print('uv_handle_t (current: {}; freed: {}; total: {})'.format( self._debug_uv_handles_total - self._debug_uv_handles_freed, self._debug_uv_handles_freed, self._debug_uv_handles_total)) print() print('--- Streams debug info: ---') print('Write errors: {}'.format( self._debug_stream_write_errors_total)) print('Write without poll: {}'.format( self._debug_stream_write_tries)) print('Write contexts: {: <8} | {}'.format( self._debug_stream_write_ctx_cnt, self._debug_stream_write_ctx_total)) print('Write failed callbacks: {}'.format( self._debug_stream_write_cb_errors_total)) print() print('Read errors: {}'.format( self._debug_stream_read_errors_total)) print('Read callbacks: {}'.format( self._debug_stream_read_cb_total)) print('Read failed callbacks: {}'.format( self._debug_stream_read_cb_errors_total)) print('Read EOFs: {}'.format( self._debug_stream_read_eof_total)) print('Read EOF failed callbacks: {}'.format( self._debug_stream_read_eof_cb_errors_total)) print() print('Listen errors: {}'.format( self._debug_stream_listen_errors_total)) print('Shutdown errors {}'.format( self._debug_stream_shutdown_errors_total)) print() print('--- Polls debug info: ---') print('Read events: {}'.format( self._poll_read_events_total)) print('Read callbacks failed: {}'.format( self._poll_read_cb_errors_total)) print('Write events: {}'.format( self._poll_write_events_total)) print('Write callbacks failed: {}'.format( self._poll_write_cb_errors_total)) print() print('--- Sock ops successfull on 1st try: ---') print('Socket try-writes: {}'.format( self._sock_try_write_total)) print(flush=True) # Public API def __repr__(self): return '<{}.{} running={} closed={} debug={}>'.format( self.__class__.__module__, self.__class__.__name__, self.is_running(), self.is_closed(), self.get_debug()) def call_soon(self, callback, *args): """Arrange for a callback to be called as soon as possible. This operates as a FIFO queue: callbacks are called in the order in which they are registered. Each callback will be called exactly once. Any positional arguments after the callback will be passed to the callback when it is called. """ if self._debug == 1: self._check_thread() if args: return self._call_soon(callback, args) else: return self._call_soon(callback, None) def call_soon_threadsafe(self, callback, *args): """Like call_soon(), but thread-safe.""" if not args: args = None handle = self._call_soon(callback, args) self.handler_async.send() return handle def call_later(self, delay, callback, *args): """Arrange for a callback to be called at a given time. Return a Handle: an opaque object with a cancel() method that can be used to cancel the call. The delay can be an int or float, expressed in seconds. It is always relative to the current time. Each callback will be called exactly once. If two callbacks are scheduled for exactly the same time, it undefined which will be called first. Any positional arguments after the callback will be passed to the callback when it is called. """ self._check_closed() if self._debug == 1: self._check_thread() if delay < 0: delay = 0 cdef uint64_t when = (delay * 1000) if not args: args = None if when == 0: return self._call_soon(callback, args) else: return self._call_later(when, callback, args) def call_at(self, when, callback, *args): """Like call_later(), but uses an absolute time. Absolute time corresponds to the event loop's time() method. """ return self.call_later(when - self.time(), callback, *args) def time(self): """Return the time according to the event loop's clock. This is a float expressed in seconds since an epoch, but the epoch, precision, accuracy and drift are unspecified and may differ per event loop. """ return self._time() / 1000 def stop(self): """Stop running the event loop. Every callback already scheduled will still run. This simply informs run_forever to stop looping after a complete iteration. """ self._call_soon_handle( new_MethodHandle1( self, "Loop._stop", self._stop, self, None)) def run_forever(self): """Run the event loop until stop() is called.""" self._check_closed() mode = uv.UV_RUN_DEFAULT if self._stopping: # loop.stop() was called right before loop.run_forever(). # This is how asyncio loop behaves. mode = uv.UV_RUN_NOWAIT self._set_coroutine_wrapper(self._debug) if self._asyncgens is not None: old_agen_hooks = sys.get_asyncgen_hooks() sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, finalizer=self._asyncgen_finalizer_hook) try: self._run(mode) finally: self._set_coroutine_wrapper(False) if self._asyncgens is not None: sys.set_asyncgen_hooks(*old_agen_hooks) def close(self): """Close the event loop. The event loop must not be running. This is idempotent and irreversible. No other methods should be called after this one. """ self._close() def get_debug(self): return bool(self._debug) def set_debug(self, enabled): self._debug = bool(enabled) if self.is_running(): self._set_coroutine_wrapper(self._debug) def is_running(self): """Return whether the event loop is currently running.""" return bool(self._running) def is_closed(self): """Returns True if the event loop was closed.""" return bool(self._closed) def create_future(self): """Create a Future object attached to the loop.""" return self._new_future() def create_task(self, coro): """Schedule a coroutine object. Return a task object. """ self._check_closed() if self._task_factory is None: task = task_factory(coro, loop=self) else: task = self._task_factory(self, coro) return task def set_task_factory(self, factory): """Set a task factory that will be used by loop.create_task(). If factory is None the default task factory will be set. If factory is a callable, it should have a signature matching '(loop, coro)', where 'loop' will be a reference to the active event loop, 'coro' will be a coroutine object. The callable must return a Future. """ if factory is not None and not callable(factory): raise TypeError('task factory must be a callable or None') self._task_factory = factory def get_task_factory(self): """Return a task factory, or None if the default one is in use.""" return self._task_factory def run_until_complete(self, future): """Run until the Future is done. If the argument is a coroutine, it is wrapped in a Task. WARNING: It would be disastrous to call run_until_complete() with the same coroutine twice -- it would wrap it in two different Tasks and that can't be good. Return the Future's result, or raise its exception. """ self._check_closed() new_task = not isfuture(future) future = aio_ensure_future(future, loop=self) if new_task: # An exception is raised if the future didn't complete, so there # is no need to log the "destroy pending task" message future._log_destroy_pending = False done_cb = lambda fut: self.stop() future.add_done_callback(done_cb) try: self.run_forever() except: if new_task and future.done() and not future.cancelled(): # The coroutine raised a BaseException. Consume the exception # to not log a warning, the caller doesn't have access to the # local task. future.exception() raise future.remove_done_callback(done_cb) if not future.done(): raise RuntimeError('Event loop stopped before Future completed.') return future.result() def getaddrinfo(self, object host, object port, *, int family=0, int type=0, int proto=0, int flags=0): addr = __static_getaddrinfo_pyaddr(host, port, family, type, proto, flags) if addr is not None: fut = self._new_future() fut.set_result([addr]) return fut return self._getaddrinfo(host, port, family, type, proto, flags, 1) async def getnameinfo(self, sockaddr, int flags=0): cdef: AddrInfo ai_cnt system.addrinfo *ai system.sockaddr_in6 *sin6 if not isinstance(sockaddr, tuple): raise TypeError('getnameinfo() argument 1 must be a tuple') sl = len(sockaddr) if sl < 2 or sl > 4: raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') if sl > 2: flowinfo = sockaddr[2] if flowinfo < 0 or flowinfo > 0xfffff: raise OverflowError( 'getsockaddrarg: flowinfo must be 0-1048575.') else: flowinfo = 0 if sl > 3: scope_id = sockaddr[3] if scope_id < 0 or scope_id > 2 ** 32: raise OverflowError( 'getsockaddrarg: scope_id must be unsigned 32 bit integer') else: scope_id = 0 ai_cnt = await self._getaddrinfo( sockaddr[0], sockaddr[1], uv.AF_UNSPEC, # family uv.SOCK_DGRAM, # type 0, # proto uv.AI_NUMERICHOST, # flags 0) # unpack ai = ai_cnt.data if ai.ai_next: raise OSError("sockaddr resolved to multiple addresses") if ai.ai_family == uv.AF_INET: if sl > 2: raise OSError("IPv4 sockaddr must be 2 tuple") elif ai.ai_family == uv.AF_INET6: # Modify some fields in `ai` sin6 = ai.ai_addr sin6.sin6_flowinfo = system.htonl(flowinfo) sin6.sin6_scope_id = scope_id return await self._getnameinfo(ai.ai_addr, flags) async def create_server(self, protocol_factory, host=None, port=None, *, int family=uv.AF_UNSPEC, int flags=uv.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, # ignored, libuv sets it reuse_port=None): """A coroutine which creates a TCP server bound to host and port. The return value is a Server object which can be used to stop the service. If host is an empty string or None all interfaces are assumed and a list of multiple sockets will be returned (most likely one for IPv4 and another one for IPv6). The host parameter can also be a sequence (e.g. list) of hosts to bind to. family can be set to either AF_INET or AF_INET6 to force the socket to use IPv4 or IPv6. If not set it will be determined from host (defaults to AF_UNSPEC). flags is a bitmask for getaddrinfo(). sock can optionally be specified in order to use a preexisting socket object. backlog is the maximum number of queued connections passed to listen() (defaults to 100). ssl can be set to an SSLContext to enable SSL over the accepted connections. reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to expire. If not specified will automatically be set to True on UNIX. reuse_port tells the kernel to allow this endpoint to be bound to the same port as other existing endpoints are bound to, so long as they all set this flag when being created. This option is not supported on Windows. """ cdef: TCPServer tcp system.addrinfo *addrinfo Server server if sock is not None and sock.family == uv.AF_UNIX: if host is not None or port is not None: raise ValueError( 'host/port and sock can not be specified at the same time') return await self.create_unix_server( protocol_factory, sock=sock, ssl=ssl) server = Server(self) if ssl is not None and not isinstance(ssl, ssl_SSLContext): raise TypeError('ssl argument must be an SSLContext or None') if host is not None or port is not None: if sock is not None: raise ValueError( 'host/port and sock can not be specified at the same time') reuse_port = bool(reuse_port) if reuse_port and not has_SO_REUSEPORT: raise ValueError( 'reuse_port not supported by socket module') if host == '': hosts = [None] elif (isinstance(host, str) or not isinstance(host, col_Iterable)): hosts = [host] else: hosts = host fs = [self._getaddrinfo(host, port, family, uv.SOCK_STREAM, 0, flags, 0) for host in hosts] infos = await aio_gather(*fs, loop=self) completed = False try: for info in infos: addrinfo = (info).data while addrinfo != NULL: if addrinfo.ai_family == uv.AF_UNSPEC: raise RuntimeError('AF_UNSPEC in DNS results') tcp = self._create_server( addrinfo.ai_addr, protocol_factory, server, ssl, reuse_port, backlog) server._add_server(tcp) addrinfo = addrinfo.ai_next completed = True finally: if not completed: server.close() else: if sock is None: raise ValueError('Neither host/port nor sock were specified') if not _is_sock_stream(sock.type): raise ValueError( 'A Stream Socket was expected, got {!r}'.format(sock)) tcp = TCPServer.new(self, protocol_factory, server, ssl, uv.AF_UNSPEC) # See a comment on os_dup in create_connection fileno = os_dup(sock.fileno()) try: tcp._open(fileno) tcp._attach_fileobj(sock) tcp.listen(backlog) except: tcp._close() raise server._add_server(tcp) return server async def create_connection(self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None): """Connect to a TCP server. Create a streaming transport connection to a given Internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) pair. """ cdef: AddrInfo ai_local = None AddrInfo ai_remote TCPTransport tr system.addrinfo *rai = NULL system.addrinfo *lai = NULL system.addrinfo *rai_iter = NULL system.addrinfo *lai_iter = NULL system.addrinfo rai_static system.sockaddr_storage rai_addr_static system.addrinfo lai_static system.sockaddr_storage lai_addr_static object app_protocol object protocol object ssl_waiter if sock is not None and sock.family == uv.AF_UNIX: if host is not None or port is not None: raise ValueError( 'host/port and sock can not be specified at the same time') return await self.create_unix_connection( protocol_factory, None, sock=sock, ssl=ssl, server_hostname=server_hostname) app_protocol = protocol = protocol_factory() ssl_waiter = None if ssl: if server_hostname is None: if not host: raise ValueError('You must set server_hostname ' 'when using ssl without a host') server_hostname = host ssl_waiter = self._new_future() sslcontext = None if isinstance(ssl, bool) else ssl protocol = aio_SSLProtocol( self, app_protocol, sslcontext, ssl_waiter, False, server_hostname) else: if server_hostname is not None: raise ValueError('server_hostname is only meaningful with ssl') if host is not None or port is not None: if sock is not None: raise ValueError( 'host/port and sock can not be specified at the same time') fs = [] f1 = f2 = None try: __static_getaddrinfo( host, port, family, uv.SOCK_STREAM, proto, &rai_addr_static) except LookupError: f1 = self._getaddrinfo( host, port, family, uv.SOCK_STREAM, proto, flags, 0) # 0 == don't unpack fs.append(f1) else: rai_static.ai_addr = &rai_addr_static rai_static.ai_next = NULL rai = &rai_static if local_addr is not None: if not isinstance(local_addr, (tuple, list)) or \ len(local_addr) != 2: raise ValueError( 'local_addr must be a tuple of host and port') try: __static_getaddrinfo( local_addr[0], local_addr[1], family, uv.SOCK_STREAM, proto, &lai_addr_static) except LookupError: f2 = self._getaddrinfo( local_addr[0], local_addr[1], family, uv.SOCK_STREAM, proto, flags, 0) # 0 == don't unpack fs.append(f2) else: lai_static.ai_addr = &lai_addr_static lai_static.ai_next = NULL lai = &lai_static if len(fs): await aio_wait(fs, loop=self) if rai is NULL: ai_remote = f1.result() if ai_remote.data is NULL: raise OSError('getaddrinfo() returned empty list') rai = ai_remote.data if lai is NULL and f2 is not None: ai_local = f2.result() if ai_local.data is NULL: raise OSError( 'getaddrinfo() returned empty list for local_addr') lai = ai_local.data exceptions = [] rai_iter = rai while rai_iter is not NULL: tr = None try: waiter = self._new_future() tr = TCPTransport.new(self, protocol, None, waiter) if lai is not NULL: lai_iter = lai while lai_iter is not NULL: try: tr.bind(lai_iter.ai_addr) break except OSError as exc: exceptions.append(exc) lai_iter = lai_iter.ai_next else: tr._close() tr = None rai_iter = rai_iter.ai_next continue tr.connect(rai_iter.ai_addr) await waiter except OSError as exc: if tr is not None: tr._close() tr = None exceptions.append(exc) except: if tr is not None: tr._close() tr = None raise else: break rai_iter = rai_iter.ai_next else: # If they all have the same str(), raise one. model = str(exceptions[0]) if all(str(exc) == model for exc in exceptions): raise exceptions[0] # Raise a combined exception so the user can see all # the various error messages. raise OSError('Multiple exceptions: {}'.format( ', '.join(str(exc) for exc in exceptions))) else: if sock is None: raise ValueError( 'host and port was not specified and no sock specified') if not _is_sock_stream(sock.type): raise ValueError( 'A Stream Socket was expected, got {!r}'.format(sock)) waiter = self._new_future() tr = TCPTransport.new(self, protocol, None, waiter) try: # Why we use os.dup here and other places # --------------------------------------- # # Prerequisite: in Python 3.6, Python Socket Objects (PSO) # were fixed to raise an OSError if the `socket.close()` call # failed. So if the underlying FD is already closed, # `socket.close()` call will fail with OSError(EBADF). # # Problem: # # - Vanilla asyncio uses the passed PSO directly. When the # transport eventually closes the PSO, the PSO is marked as # 'closed'. If the user decides to close the PSO after # closing the loop, everything works normal in Python 3.5 # and 3.6. # # - asyncio+uvloop unwraps the FD from the passed PSO. # Eventually the transport is closed and so the FD. # If the user decides to close the PSO after closing the # loop, an OSError(EBADF) will be raised in Python 3.6. # # All in all, duping FDs makes sense, because uvloop # (and libuv) manage the FD once the user passes a PSO to # `loop.create_connection`. We don't want the user to have # any control of the FD once it is passed to uvloop. # See also: https://github.com/python/asyncio/pull/449 fileno = os_dup(sock.fileno()) # libuv will make socket non-blocking tr._open(fileno) tr._attach_fileobj(sock) tr._init_protocol() await waiter except: tr._close() raise if ssl: await ssl_waiter return protocol._app_transport, app_protocol else: return tr, protocol async def create_unix_server(self, protocol_factory, str path=None, *, backlog=100, sock=None, ssl=None): """A coroutine which creates a UNIX Domain Socket server. The return value is a Server object, which can be used to stop the service. path is a str, representing a file systsem path to bind the server socket to. sock can optionally be specified in order to use a preexisting socket object. backlog is the maximum number of queued connections passed to listen() (defaults to 100). ssl can be set to an SSLContext to enable SSL over the accepted connections. """ cdef: UnixServer pipe Server server = Server(self) if ssl is not None and not isinstance(ssl, ssl_SSLContext): raise TypeError('ssl argument must be an SSLContext or None') if path is not None: if sock is not None: raise ValueError( 'path and sock can not be specified at the same time') # We use Python sockets to create a UNIX server socket because # when UNIX sockets are created by libuv, libuv removes the path # they were bound to. This is different from asyncio, which # doesn't cleanup the socket path. sock = socket_socket(uv.AF_UNIX) try: sock.bind(path) except OSError as exc: sock.close() if exc.errno == errno.EADDRINUSE: # Let's improve the error message by adding # with what exact address it occurs. msg = 'Address {!r} is already in use'.format(path) raise OSError(errno.EADDRINUSE, msg) from None else: raise except: sock.close() raise else: if sock is None: raise ValueError( 'path was not specified, and no sock specified') if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): raise ValueError( 'A UNIX Domain Stream Socket was expected, got {!r}' .format(sock)) pipe = UnixServer.new(self, protocol_factory, server, ssl) try: # See a comment on os_dup in create_connection fileno = os_dup(sock.fileno()) pipe._open(fileno) except: pipe._close() sock.close() raise pipe._attach_fileobj(sock) try: pipe.listen(backlog) except: pipe._close() raise server._add_server(pipe) return server async def create_unix_connection(self, protocol_factory, path, *, ssl=None, sock=None, server_hostname=None): cdef: UnixTransport tr object app_protocol object protocol object ssl_waiter app_protocol = protocol = protocol_factory() ssl_waiter = None if ssl: if server_hostname is None: raise ValueError('You must set server_hostname ' 'when using ssl without a host') ssl_waiter = self._new_future() sslcontext = None if isinstance(ssl, bool) else ssl protocol = aio_SSLProtocol( self, app_protocol, sslcontext, ssl_waiter, False, server_hostname) else: if server_hostname is not None: raise ValueError('server_hostname is only meaningful with ssl') if path is not None: if isinstance(path, str): path = PyUnicode_EncodeFSDefault(path) if sock is not None: raise ValueError( 'path and sock can not be specified at the same time') waiter = self._new_future() tr = UnixTransport.new(self, protocol, None, waiter) tr.connect(path) try: await waiter except: tr._close() raise else: if sock is None: raise ValueError('no path and sock were specified') if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): raise ValueError( 'A UNIX Domain Stream Socket was expected, got {!r}' .format(sock)) waiter = self._new_future() tr = UnixTransport.new(self, protocol, None, waiter) try: # See a comment on os_dup in create_connection fileno = os_dup(sock.fileno()) # libuv will make socket non-blocking tr._open(fileno) tr._attach_fileobj(sock) tr._init_protocol() await waiter except: tr._close() raise if ssl: await ssl_waiter return protocol._app_transport, app_protocol else: return tr, protocol def default_exception_handler(self, context): """Default exception handler. This is called when an exception occurs and no exception handler is set, and can be called by a custom exception handler that wants to defer to the default behavior. The context parameter has the same meaning as in `call_exception_handler()`. """ message = context.get('message') if not message: message = 'Unhandled exception in event loop' exception = context.get('exception') if exception is not None: exc_info = (type(exception), exception, exception.__traceback__) else: exc_info = False log_lines = [message] for key in sorted(context): if key in {'message', 'exception'}: continue value = context[key] if key == 'source_traceback': tb = ''.join(tb_format_list(value)) value = 'Object created at (most recent call last):\n' value += tb.rstrip() else: try: value = repr(value) except Exception as ex: value = ('Exception in __repr__ {!r}; ' 'value type: {!r}'.format(ex, type(value))) log_lines.append('{}: {}'.format(key, value)) aio_logger.error('\n'.join(log_lines), exc_info=exc_info) def get_exception_handler(self): """Return an exception handler, or None if the default one is in use. """ return self._exception_handler def set_exception_handler(self, handler): """Set handler as the new event loop exception handler. If handler is None, the default exception handler will be set. If handler is a callable object, it should have a signature matching '(loop, context)', where 'loop' will be a reference to the active event loop, 'context' will be a dict object (see `call_exception_handler()` documentation for details about context). """ if handler is not None and not callable(handler): raise TypeError('A callable object or None is expected, ' 'got {!r}'.format(handler)) self._exception_handler = handler def call_exception_handler(self, context): """Call the current event loop's exception handler. The context argument is a dict containing the following keys: - 'message': Error message; - 'exception' (optional): Exception object; - 'future' (optional): Future instance; - 'handle' (optional): Handle instance; - 'protocol' (optional): Protocol instance; - 'transport' (optional): Transport instance; - 'socket' (optional): Socket instance. New keys maybe introduced in the future. Note: do not overload this method in an event loop subclass. For custom exception handling, use the `set_exception_handler()` method. """ if UVLOOP_DEBUG: self._debug_exception_handler_cnt += 1 if self._exception_handler is None: try: self.default_exception_handler(context) except Exception: # Second protection layer for unexpected errors # in the default implementation, as well as for subclassed # event loops with overloaded "default_exception_handler". aio_logger.error('Exception in default exception handler', exc_info=True) else: try: self._exception_handler(self, context) except Exception as exc: # Exception in the user set custom exception handler. try: # Let's try default handler. self.default_exception_handler({ 'message': 'Unhandled error in exception handler', 'exception': exc, 'context': context, }) except Exception: # Guard 'default_exception_handler' in case it is # overloaded. aio_logger.error('Exception in default exception handler ' 'while handling an unexpected error ' 'in custom exception handler', exc_info=True) def add_reader(self, fd, callback, *args): """Add a reader callback.""" self._ensure_fd_no_transport(fd) if len(args) == 0: args = None self._add_reader(fd, new_Handle(self, callback, args)) def remove_reader(self, fd): """Remove a reader callback.""" self._ensure_fd_no_transport(fd) self._remove_reader(fd) def add_writer(self, fd, callback, *args): """Add a writer callback..""" self._ensure_fd_no_transport(fd) if len(args) == 0: args = None self._add_writer(fd, new_Handle(self, callback, args)) def remove_writer(self, fd): """Remove a writer callback.""" self._ensure_fd_no_transport(fd) self._remove_writer(fd) def sock_recv(self, sock, n): """Receive data from the socket. The return value is a bytes object representing the data received. The maximum amount of data to be received at once is specified by nbytes. This method is a coroutine. """ cdef: Handle handle int fd if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = self._new_future() handle = new_MethodHandle3( self, "Loop._sock_recv", self._sock_recv, self, fut, sock, n) fd = sock.fileno() self._add_reader(fd, handle) return fut async def sock_sendall(self, sock, data): """Send data to the socket. The socket must be connected to a remote socket. This method continues to send data from data until either all data has been sent or an error occurs. None is returned on success. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully processed by the receiving end of the connection. This method is a coroutine. """ cdef: Handle handle int n int fd if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") if not data: return try: n = sock.send(data) except (BlockingIOError, InterruptedError): pass else: if UVLOOP_DEBUG: # This can be a partial success, i.e. only part # of the data was sent self._sock_try_write_total += 1 if n == len(data): return if not isinstance(data, memoryview): data = memoryview(data) data = data[n:] fut = self._new_future() handle = new_MethodHandle3( self, "Loop._sock_sendall", self._sock_sendall, self, fut, sock, data) fd = sock.fileno() self._add_writer(fd, handle) return await fut def sock_accept(self, sock): """Accept a connection. The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket on the other end of the connection. This method is a coroutine. """ cdef: Handle handle int fd if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = self._new_future() handle = new_MethodHandle2( self, "Loop._sock_accept", self._sock_accept, self, fut, sock) fd = sock.fileno() self._add_reader(fd, handle) return fut async def sock_connect(self, sock, address): """Connect to a remote socket at address. This method is a coroutine. """ if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = self._new_future() if sock.family == uv.AF_UNIX: self._sock_connect(fut, sock, address) await fut return _, _, _, _, address = (await self.getaddrinfo(*address))[0] self._sock_connect(fut, sock, address) await fut async def connect_accepted_socket(self, protocol_factory, sock, *, ssl=None): """Handle an accepted connection. This is used by servers that accept connections outside of asyncio but that use asyncio to handle connections. This method is a coroutine. When completed, the coroutine returns a (transport, protocol) pair. """ cdef: UVStream transport = None if ssl is not None and not isinstance(ssl, ssl_SSLContext): raise TypeError('ssl argument must be an SSLContext or None') if not _is_sock_stream(sock.type): raise ValueError( 'A Stream Socket was expected, got {!r}'.format(sock)) # See a comment on os_dup in create_connection fileno = os_dup(sock.fileno()) app_protocol = protocol_factory() waiter = self._new_future() transport_waiter = None if ssl is None: protocol = app_protocol transport_waiter = waiter else: protocol = aio_SSLProtocol( self, app_protocol, ssl, waiter, True, # server_side None) # server_hostname transport_waiter = None if sock.family == uv.AF_UNIX: transport = UnixTransport.new( self, protocol, None, transport_waiter) elif sock.family in (uv.AF_INET, uv.AF_INET6): transport = TCPTransport.new( self, protocol, None, transport_waiter) if transport is None: raise ValueError( 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') transport._open(fileno) transport._init_protocol() await waiter return transport, protocol def run_in_executor(self, executor, func, *args): if aio_iscoroutine(func) or aio_iscoroutinefunction(func): raise TypeError("coroutines cannot be used with run_in_executor()") self._check_closed() if executor is None: executor = self._default_executor if executor is None: executor = cc_ThreadPoolExecutor() self._default_executor = executor new_fut = self._new_future() _chain_future(executor.submit(func, *args), new_fut) return new_fut def set_default_executor(self, executor): self._default_executor = executor async def __subprocess_run(self, protocol_factory, args, stdin=subprocess_PIPE, stdout=subprocess_PIPE, stderr=subprocess_PIPE, universal_newlines=False, shell=True, bufsize=0, preexec_fn=None, close_fds=None, cwd=None, env=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, executable=None, pass_fds=(), # For tests only! Do not use in your code. Ever. __uvloop_sleep_after_fork=False ): # TODO: Implement close_fds (might not be very important in # Python 3.5, since all FDs aren't inheritable by default.) cdef: int debug_flags = 0 if universal_newlines: raise ValueError("universal_newlines must be False") if bufsize != 0: raise ValueError("bufsize must be 0") if startupinfo is not None: raise ValueError('startupinfo is not supported') if creationflags != 0: raise ValueError('creationflags is not supported') if executable is not None: args[0] = executable if __uvloop_sleep_after_fork: debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK waiter = self._new_future() protocol = protocol_factory() proc = UVProcessTransport.new(self, protocol, args, env, cwd, start_new_session, stdin, stdout, stderr, pass_fds, waiter, debug_flags, preexec_fn, restore_signals) try: await waiter except: proc.close() raise return proc, protocol def subprocess_shell(self, protocol_factory, cmd, *, shell=True, **kwargs): if not shell: raise ValueError("shell must be True") args = [cmd] if shell: args = [b'/bin/sh', b'-c'] + args return self.__subprocess_run(protocol_factory, args, shell=True, **kwargs) def subprocess_exec(self, protocol_factory, program, *args, shell=False, **kwargs): if shell: raise ValueError("shell must be False") args = list((program,) + args) return self.__subprocess_run(protocol_factory, args, shell=False, **kwargs) async def connect_read_pipe(self, proto_factory, pipe): """Register read pipe in event loop. Set the pipe to non-blocking mode. protocol_factory should instantiate object with Protocol interface. pipe is a file-like object. Return pair (transport, protocol), where transport supports the ReadTransport interface.""" cdef: ReadUnixTransport transp # See a comment on os_dup in create_connection int fileno = os_dup(pipe.fileno()) waiter = self._new_future() proto = proto_factory() transp = ReadUnixTransport.new(self, proto, None, waiter) transp._add_extra_info('pipe', pipe) transp._attach_fileobj(pipe) try: transp._open(fileno) transp._init_protocol() await waiter except: transp.close() raise return transp, proto async def connect_write_pipe(self, proto_factory, pipe): """Register write pipe in event loop. protocol_factory should instantiate object with BaseProtocol interface. Pipe is file-like object already switched to nonblocking. Return pair (transport, protocol), where transport support WriteTransport interface.""" cdef: WriteUnixTransport transp # See a comment on os_dup in create_connection int fileno = os_dup(pipe.fileno()) waiter = self._new_future() proto = proto_factory() transp = WriteUnixTransport.new(self, proto, None, waiter) transp._add_extra_info('pipe', pipe) transp._attach_fileobj(pipe) try: transp._open(fileno) transp._init_protocol() await waiter except: transp.close() raise return transp, proto def add_signal_handler(self, sig, callback, *args): """Add a handler for a signal. UNIX only. Raise ValueError if the signal number is invalid or uncatchable. Raise RuntimeError if there is a problem setting up the handler. """ cdef: Handle h if self._signal_handlers is None: self._setup_signals() if self._signal_handlers is None: raise ValueError('set_wakeup_fd only works in main thread') if (aio_iscoroutine(callback) or aio_iscoroutinefunction(callback)): raise TypeError("coroutines cannot be used " "with add_signal_handler()") self._check_signal(sig) self._check_closed() try: # set_wakeup_fd() raises ValueError if this is not the # main thread. By calling it early we ensure that an # event loop running in another thread cannot add a signal # handler. signal_set_wakeup_fd(self._csock.fileno()) except (ValueError, OSError) as exc: raise RuntimeError(str(exc)) h = new_Handle(self, callback, args or None) self._signal_handlers[sig] = h try: signal_signal(sig, _sighandler_noop) except OSError as exc: del self._signal_handlers[sig] if exc.errno == errno_EINVAL: raise RuntimeError('sig {} cannot be caught'.format(sig)) else: raise def remove_signal_handler(self, sig): """Remove a handler for a signal. UNIX only. Return True if a signal handler was removed, False if not. """ self._check_signal(sig) if self._signal_handlers is None: return False try: del self._signal_handlers[sig] except KeyError: return False if sig == uv.SIGINT: handler = signal_default_int_handler else: handler = signal_SIG_DFL try: signal_signal(sig, handler) except OSError as exc: if exc.errno == errno_EINVAL: raise RuntimeError('sig {} cannot be caught'.format(sig)) else: raise return True async def create_datagram_endpoint(self, protocol_factory, local_addr=None, remote_addr=None, *, family=0, proto=0, flags=0, reuse_address=None, reuse_port=None, allow_broadcast=None, sock=None): """A coroutine which creates a datagram endpoint. This method will try to establish the endpoint in the background. When successful, the coroutine returns a (transport, protocol) pair. protocol_factory must be a callable returning a protocol instance. socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_DGRAM. reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to expire. If not specified it will automatically be set to True on UNIX. reuse_port tells the kernel to allow this endpoint to be bound to the same port as other existing endpoints are bound to, so long as they all set this flag when being created. This option is not supported on Windows and some UNIX's. If the :py:data:`~socket.SO_REUSEPORT` constant is not defined then this capability is unsupported. allow_broadcast tells the kernel to allow this endpoint to send messages to the broadcast address. sock can optionally be specified in order to use a preexisting socket object. """ cdef: UDPTransport udp = None system.addrinfo * lai system.addrinfo * rai if sock is not None: if not _is_sock_dgram(sock.type): raise ValueError( 'A UDP Socket was expected, got {!r}'.format(sock)) if (local_addr or remote_addr or family or proto or flags or reuse_address or reuse_port or allow_broadcast): # show the problematic kwargs in exception msg opts = dict(local_addr=local_addr, remote_addr=remote_addr, family=family, proto=proto, flags=flags, reuse_address=reuse_address, reuse_port=reuse_port, allow_broadcast=allow_broadcast) problems = ', '.join( '{}={}'.format(k, v) for k, v in opts.items() if v) raise ValueError( 'socket modifier keyword arguments can not be used ' 'when sock is specified. ({})'.format(problems)) sock.setblocking(False) udp = UDPTransport.__new__(UDPTransport) udp._init(self, uv.AF_UNSPEC) udp.open(sock.family, os_dup(sock.fileno())) udp._attach_fileobj(sock) else: reuse_address = bool(reuse_address) reuse_port = bool(reuse_port) if reuse_port and not has_SO_REUSEPORT: raise ValueError( 'reuse_port not supported by socket module') lads = None if local_addr is not None: if (not isinstance(local_addr, (tuple, list)) or len(local_addr) != 2): raise TypeError( 'local_addr must be a tuple of (host, port)') lads = await self._getaddrinfo( local_addr[0], local_addr[1], family, uv.SOCK_DGRAM, proto, flags, 0) rads = None if remote_addr is not None: if (not isinstance(remote_addr, (tuple, list)) or len(remote_addr) != 2): raise TypeError( 'remote_addr must be a tuple of (host, port)') rads = await self._getaddrinfo( remote_addr[0], remote_addr[1], family, uv.SOCK_DGRAM, proto, flags, 0) excs = [] if lads is None: if rads is not None: udp = UDPTransport.__new__(UDPTransport) rai = (rads).data udp._init(self, rai.ai_family) udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) else: if family not in (uv.AF_INET, uv.AF_INET6): raise ValueError('unexpected address family') udp = UDPTransport.__new__(UDPTransport) udp._init(self, family) if reuse_port: self._sock_set_reuseport(udp._fileno()) socket = udp._get_socket() if family == uv.AF_INET6: socket.bind(('::', 0)) else: socket.bind(('0.0.0.0', 0)) else: lai = (lads).data while lai is not NULL: try: udp = UDPTransport.__new__(UDPTransport) udp._init(self, lai.ai_family) if reuse_port: self._sock_set_reuseport(udp._fileno()) udp._bind(lai.ai_addr, reuse_address) except Exception as ex: lai = lai.ai_next excs.append(ex) continue else: break else: ctx = None if len(excs): ctx = excs[0] raise OSError('could not bind to local_addr {}'.format( local_addr)) from ctx if rads is not None: rai = (rads).data sock = udp._get_socket() while rai is not NULL: if rai.ai_family != lai.ai_family: rai = rai.ai_next continue if rai.ai_protocol != lai.ai_protocol: rai = rai.ai_next continue udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) break else: raise OSError( 'could not bind to remote_addr {}'.format( remote_addr)) udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) if allow_broadcast: udp._set_broadcast(1) protocol = protocol_factory() waiter = self._new_future() assert udp is not None udp._set_protocol(protocol) udp._set_waiter(waiter) udp._init_protocol() await waiter return udp, protocol def _asyncgen_finalizer_hook(self, agen): self._asyncgens.discard(agen) if not self.is_closed(): self.create_task(agen.aclose()) # Wake up the loop if the finalizer was called from # a different thread. self.handler_async.send() def _asyncgen_firstiter_hook(self, agen): if self._asyncgens_shutdown_called: warnings_warn( "asynchronous generator {!r} was scheduled after " "loop.shutdown_asyncgens() call".format(agen), ResourceWarning, source=self) self._asyncgens.add(agen) async def shutdown_asyncgens(self): """Shutdown all active asynchronous generators.""" self._asyncgens_shutdown_called = True if self._asyncgens is None or not len(self._asyncgens): # If Python version is <3.6 or we don't have any asynchronous # generators alive. return closing_agens = list(self._asyncgens) self._asyncgens.clear() shutdown_coro = aio_gather( *[ag.aclose() for ag in closing_agens], return_exceptions=True, loop=self) results = await shutdown_coro for result, agen in zip(results, closing_agens): if isinstance(result, Exception): self.call_exception_handler({ 'message': 'an error occurred during closing of ' 'asynchronous generator {!r}'.format(agen), 'exception': result, 'asyncgen': agen }) cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle, size_t suggested_size, uv.uv_buf_t* buf) with gil: cdef: Loop loop = (uvhandle.data)._loop if loop._recv_buffer_in_use == 1: buf.len = 0 exc = RuntimeError('concurrent allocations') loop._handle_exception(exc) return loop._recv_buffer_in_use = 1 buf.base = loop._recv_buffer buf.len = sizeof(loop._recv_buffer) cdef inline void __loop_free_buffer(Loop loop): loop._recv_buffer_in_use = 0 include "cbhandles.pyx" include "handles/handle.pyx" include "handles/async_.pyx" include "handles/idle.pyx" include "handles/check.pyx" include "handles/timer.pyx" include "handles/poll.pyx" include "handles/basetransport.pyx" include "handles/stream.pyx" include "handles/streamserver.pyx" include "handles/tcp.pyx" include "handles/pipe.pyx" include "handles/process.pyx" include "request.pyx" include "dns.pyx" include "handles/udp.pyx" include "server.pyx" include "future.pyx" include "chain_futs.pyx" # Used in UVProcess cdef vint __atfork_installed = 0 cdef vint __forking = 0 cdef Loop __forking_loop = None cdef void __atfork_child() nogil: # See CPython/posixmodule.c for details global __forking with gil: if (__forking and __forking_loop is not None and __forking_loop.active_process_handler is not None): __forking_loop.active_process_handler._after_fork() cdef __install_atfork(): global __atfork_installed if __atfork_installed: return __atfork_installed = 1 cdef int err err = system.pthread_atfork(NULL, NULL, &__atfork_child) if err: __atfork_installed = 0 raise convert_error(-err) # Install PyMem* memory allocators cdef vint __mem_installed = 0 cdef __install_pymem(): global __mem_installed if __mem_installed: return __mem_installed = 1 cdef int err err = uv.uv_replace_allocator(PyMem_RawMalloc, PyMem_RawRealloc, PyMem_RawCalloc, PyMem_RawFree) if err < 0: __mem_installed = 0 raise convert_error(err) def _sighandler_noop(signum, frame): """Dummy signal handler.""" pass ########### Stuff for tests: async def _test_coroutine_1(): return 42 uvloop-0.8.1/uvloop/request.pxd0000664000372000037200000000021713156036740017444 0ustar travistravis00000000000000cdef class UVRequest: cdef: uv.uv_req_t *request bint done Loop loop cdef on_done(self) cdef cancel(self) uvloop-0.8.1/uvloop/_patch.py0000664000372000037200000000376513156036740017062 0ustar travistravis00000000000000import asyncio import sys def _format_coroutine(coro): if asyncio.iscoroutine(coro) \ and not hasattr(coro, 'cr_code') \ and not hasattr(coro, 'gi_code'): # Most likely a Cython coroutine coro_name = '{}()'.format(coro.__qualname__ or coro.__name__) running = False try: running = coro.cr_running except AttributeError: try: running = coro.gi_running except AttributeError: pass if running: return '{} running'.format(coro_name) else: return coro_name return _old_format_coroutine(coro) async def _wait_for_data(self, func_name): """Wait until feed_data() or feed_eof() is called. If stream was paused, automatically resume it. """ if self._waiter is not None: raise RuntimeError('%s() called while another coroutine is ' 'already waiting for incoming data' % func_name) assert not self._eof, '_wait_for_data after EOF' # Waiting for data while paused will make deadlock, so prevent it. if self._paused: self._paused = False self._transport.resume_reading() try: create_future = self._loop.create_future except AttributeError: self._waiter = asyncio.Future(loop=self._loop) else: self._waiter = create_future() try: await self._waiter finally: self._waiter = None if sys.version_info < (3, 5, 3): # This is needed to support Cython 'async def' coroutines. from asyncio import coroutines _old_format_coroutine = coroutines._format_coroutine coroutines._format_coroutine = _format_coroutine if sys.version_info < (3, 5, 2): # Fix a possible deadlock, improve performance. from asyncio import streams _old_wait_for_data = streams.StreamReader._wait_for_data _wait_for_data.__module__ = _old_wait_for_data.__module__ streams.StreamReader._wait_for_data = _wait_for_data uvloop-0.8.1/uvloop/cbhandles.pxd0000664000372000037200000000106513156036740017701 0ustar travistravis00000000000000cdef class Handle: cdef: Loop loop bint cancelled str meth_name int cb_type void *callback object arg1, arg2, arg3, arg4 object __weakref__ readonly _source_traceback cdef inline _set_loop(self, Loop loop) cdef inline _run(self) cdef _cancel(self) cdef class TimerHandle: cdef: object callback, args bint closed UVTimer timer Loop loop object __weakref__ readonly _source_traceback cdef _run(self) cdef _cancel(self) uvloop-0.8.1/uvloop/handles/0000775000372000037200000000000013156037661016660 5ustar travistravis00000000000000uvloop-0.8.1/uvloop/handles/stream.pyx0000664000372000037200000006500013156036740020713 0ustar travistravis00000000000000DEF __PREALLOCED_BUFS = 4 @cython.no_gc_clear @cython.freelist(DEFAULT_FREELIST_SIZE) cdef class _StreamWriteContext: # used to hold additional write request information for uv_write cdef: uv.uv_write_t req list buffers uv.uv_buf_t uv_bufs_sml[__PREALLOCED_BUFS] Py_buffer py_bufs_sml[__PREALLOCED_BUFS] bint py_bufs_sml_inuse uv.uv_buf_t* uv_bufs Py_buffer* py_bufs size_t py_bufs_len uv.uv_buf_t* uv_bufs_start size_t uv_bufs_len UVStream stream bint closed cdef free_bufs(self): cdef size_t i if self.uv_bufs is not NULL: PyMem_RawFree(self.uv_bufs) self.uv_bufs = NULL if UVLOOP_DEBUG: if self.py_bufs_sml_inuse: raise RuntimeError( '_StreamWriteContext.close: uv_bufs != NULL and ' 'py_bufs_sml_inuse is True') if self.py_bufs is not NULL: for i from 0 <= i < self.py_bufs_len: PyBuffer_Release(&self.py_bufs[i]) PyMem_RawFree(self.py_bufs) self.py_bufs = NULL if UVLOOP_DEBUG: if self.py_bufs_sml_inuse: raise RuntimeError( '_StreamWriteContext.close: py_bufs != NULL and ' 'py_bufs_sml_inuse is True') if self.py_bufs_sml_inuse: for i from 0 <= i < self.py_bufs_len: PyBuffer_Release(&self.py_bufs_sml[i]) self.py_bufs_sml_inuse = 0 self.py_bufs_len = 0 self.buffers = None cdef close(self): if self.closed: return self.closed = 1 self.free_bufs() Py_DECREF(self) cdef advance_uv_buf(self, size_t sent): # Advance the pointer to first uv_buf and the # pointer to first byte in that buffer. # # We do this after a "uv_try_write" call, which # sometimes sends only a portion of data. # We then call "advance_uv_buf" on the write # context, and reuse it in a "uv_write" call. cdef: uv.uv_buf_t* buf size_t idx for idx from 0 <= idx < self.uv_bufs_len: buf = &self.uv_bufs_start[idx] if buf.len > sent: buf.len -= sent buf.base = buf.base + sent self.uv_bufs_start = buf self.uv_bufs_len -= idx return else: sent -= self.uv_bufs_start[idx].len if UVLOOP_DEBUG: if sent < 0: raise RuntimeError('fatal: sent < 0 in advance_uv_buf') raise RuntimeError('fatal: Could not advance _StreamWriteContext') @staticmethod cdef _StreamWriteContext new(UVStream stream, list buffers): cdef: _StreamWriteContext ctx int uv_bufs_idx = 0 size_t py_bufs_len = 0 int i Py_buffer* p_pybufs uv.uv_buf_t* p_uvbufs ctx = _StreamWriteContext.__new__(_StreamWriteContext) ctx.stream = None ctx.closed = 1 ctx.py_bufs_len = 0 ctx.py_bufs_sml_inuse = 0 ctx.uv_bufs = NULL ctx.py_bufs = NULL ctx.buffers = buffers ctx.stream = stream if len(buffers) <= __PREALLOCED_BUFS: # We've got a small number of buffers to write, don't # need to use malloc. ctx.py_bufs_sml_inuse = 1 p_pybufs = &ctx.py_bufs_sml p_uvbufs = &ctx.uv_bufs_sml else: for buf in buffers: if UVLOOP_DEBUG: if not isinstance(buf, (bytes, bytearray, memoryview)): raise RuntimeError( 'invalid data in writebuf: an instance of ' 'bytes, bytearray or memoryview was expected, ' 'got {}'.format(type(buf))) if not PyBytes_CheckExact(buf): py_bufs_len += 1 if py_bufs_len > 0: ctx.py_bufs = PyMem_RawMalloc( py_bufs_len * sizeof(Py_buffer)) if ctx.py_bufs is NULL: raise MemoryError() ctx.uv_bufs = PyMem_RawMalloc( len(buffers) * sizeof(uv.uv_buf_t)) if ctx.uv_bufs is NULL: raise MemoryError() p_pybufs = ctx.py_bufs p_uvbufs = ctx.uv_bufs py_bufs_len = 0 for buf in buffers: if PyBytes_CheckExact(buf): # We can only use this hack for bytes since it's # immutable. For everything else it is only safe to # use buffer protocol. p_uvbufs[uv_bufs_idx].base = PyBytes_AS_STRING(buf) p_uvbufs[uv_bufs_idx].len = Py_SIZE(buf) else: try: PyObject_GetBuffer( buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) except: # This shouldn't ever happen, as `UVStream._write` # casts non-bytes objects to `memoryviews`. ctx.py_bufs_len = py_bufs_len ctx.free_bufs() raise p_uvbufs[uv_bufs_idx].base = p_pybufs[py_bufs_len].buf p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len py_bufs_len += 1 uv_bufs_idx += 1 ctx.uv_bufs_start = p_uvbufs ctx.uv_bufs_len = uv_bufs_idx ctx.py_bufs_len = py_bufs_len ctx.req.data = ctx if UVLOOP_DEBUG: stream._loop._debug_stream_write_ctx_total += 1 stream._loop._debug_stream_write_ctx_cnt += 1 # Do incref after everything else is done. # Under no circumstances we want `ctx` to be GCed while # libuv is still working with `ctx.uv_bufs`. Py_INCREF(ctx) ctx.closed = 0 return ctx def __dealloc__(self): if not self.closed: # Because we do an INCREF in _StreamWriteContext.new, # __dealloc__ shouldn't ever happen with `self.closed == 1` raise RuntimeError( 'open _StreamWriteContext is being deallocated') if UVLOOP_DEBUG: if self.stream is not None: self.stream._loop._debug_stream_write_ctx_cnt -= 1 self.stream = None @cython.no_gc_clear cdef class UVStream(UVBaseTransport): def __cinit__(self): self.__shutting_down = 0 self.__reading = 0 self.__read_error_close = 0 self._eof = 0 self._buffer = [] self._buffer_size = 0 cdef inline _shutdown(self): cdef int err if self.__shutting_down: return self.__shutting_down = 1 self._ensure_alive() self._shutdown_req.data = self err = uv.uv_shutdown(&self._shutdown_req, self._handle, __uv_stream_on_shutdown) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef inline _accept(self, UVStream server): cdef int err self._ensure_alive() err = uv.uv_accept(server._handle, self._handle) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return self._on_accept() cdef inline _close_on_read_error(self): self.__read_error_close = 1 cdef bint _is_reading(self): return self.__reading cdef _start_reading(self): cdef int err self._ensure_alive() if self.__reading: return err = uv.uv_read_start(self._handle, __loop_alloc_buffer, __uv_stream_on_read) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return else: # UVStream must live until the read callback is called self.__reading_started() cdef inline __reading_started(self): if self.__reading: return self.__reading = 1 Py_INCREF(self) cdef inline __reading_stopped(self): if not self.__reading: return self.__reading = 0 Py_DECREF(self) cdef _stop_reading(self): cdef int err if not self.__reading: return self._ensure_alive() # From libuv docs: # This function is idempotent and may be safely # called on a stopped stream. err = uv.uv_read_stop(self._handle) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return else: self.__reading_stopped() cdef inline _try_write(self, object data): cdef: ssize_t written bint used_buf = 0 Py_buffer py_buf void* buf size_t blen int saved_errno int fd if (self._handle).write_queue_size != 0: raise RuntimeError( 'UVStream._try_write called with data in uv buffers') if PyBytes_CheckExact(data): # We can only use this hack for bytes since it's # immutable. For everything else it is only safe to # use buffer protocol. buf = PyBytes_AS_STRING(data) blen = Py_SIZE(data) else: PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) used_buf = 1 buf = py_buf.buf blen = py_buf.len if blen == 0: # Empty data, do nothing. return 0 fd = self._fileno() # Use `unistd.h/write` directly, it's faster than # uv_try_write -- less layers of code. The error # checking logic is copied from libuv. written = system.write(fd, buf, blen) while written == -1 and (errno.errno == errno.EINTR or (system.PLATFORM_IS_APPLE and errno.errno == errno.EPROTOTYPE)): # From libuv code (unix/stream.c): # Due to a possible kernel bug at least in OS X 10.10 "Yosemite", # EPROTOTYPE can be returned while trying to write to a socket # that is shutting down. If we retry the write, we should get # the expected EPIPE instead. written = system.write(fd, buf, blen) saved_errno = errno.errno if used_buf: PyBuffer_Release(&py_buf) if written < 0: if saved_errno == errno.EAGAIN or \ saved_errno == system.EWOULDBLOCK: return -1 else: exc = convert_error(-saved_errno) self._fatal_error(exc, True) return if UVLOOP_DEBUG: self._loop._debug_stream_write_tries += 1 if written == blen: return 0 return written cdef inline _write(self, object data): cdef int dlen if not PyBytes_CheckExact(data): data = memoryview(data).cast('b') dlen = len(data) if not dlen: return self._buffer_size += dlen self._buffer.append(data) if (not self._protocol_paused and (self._handle).write_queue_size == 0 and self._buffer_size > self._high_water): # Fast-path. If: # - the protocol isn't yet paused, # - there is no data in libuv buffers for this stream, # - the protocol will be paused if we continue to buffer data # # Then: # - Try to write all buffered data right now. all_sent = self._exec_write() if UVLOOP_DEBUG: if self._buffer_size != 0 or self._buffer != []: raise RuntimeError( '_buffer_size is not 0 after a successful _exec_write') # There is no need to call `_queue_write` anymore, # as `uv_write` should be called already. if not all_sent: # If not all of the data was sent successfully, # we might need to pause the protocol. self._maybe_pause_protocol() return self._maybe_pause_protocol() self._loop._queue_write(self) cdef inline _exec_write(self): cdef: int err int buf_len _StreamWriteContext ctx = None if self._closed: # If the handle is closed, just return, it's too # late to do anything. return buf_len = len(self._buffer) if not buf_len: return if (self._handle).write_queue_size == 0: # libuv internal write buffers for this stream are empty. if buf_len == 1: # If we only have one piece of data to send, let's # use our fast implementation of try_write. data = self._buffer[0] sent = self._try_write(data) if sent is None: # A `self._fatal_error` was called. # It might not raise an exception under some # conditions. self._buffer_size = 0 self._buffer.clear() if not self._closing: # This should never happen. raise RuntimeError( 'stream is open after UVStream._try_write ' 'returned None') return if sent == 0: # All data was successfully written. self._buffer_size = 0 self._buffer.clear() # on_write will call "maybe_resume_protocol". self._on_write() return True if sent > 0: if UVLOOP_DEBUG: if sent == len(data): raise RuntimeError( '_try_write sent all data and returned ' 'non-zero') if PyBytes_CheckExact(data): # Cast bytes to memoryview to avoid copying # data that wasn't sent. data = memoryview(data) data = data[sent:] self._buffer_size -= sent self._buffer[0] = data # At this point it's either data was sent partially, # or an EAGAIN has happened. else: ctx = _StreamWriteContext.new(self, self._buffer) err = uv.uv_try_write(self._handle, ctx.uv_bufs_start, ctx.uv_bufs_len) if err > 0: # Some data was successfully sent. if err == self._buffer_size: # Everything was sent. ctx.close() self._buffer.clear() self._buffer_size = 0 # on_write will call "maybe_resume_protocol". self._on_write() return True try: # Advance pointers to uv_bufs in `ctx`, # we will reuse it soon for a uv_write # call. ctx.advance_uv_buf(err) except Exception as ex: # This should never happen. # Let's try to close the `ctx` anyways. ctx.close() self._fatal_error(ex, True) self._buffer.clear() self._buffer_size = 0 return elif err != uv.UV_EAGAIN: ctx.close() exc = convert_error(err) self._fatal_error(exc, True) self._buffer.clear() self._buffer_size = 0 return # fall through if ctx is None: ctx = _StreamWriteContext.new(self, self._buffer) err = uv.uv_write(&ctx.req, self._handle, ctx.uv_bufs_start, ctx.uv_bufs_len, __uv_stream_on_write) self._buffer_size = 0 # Can't use `_buffer.clear()` here: `ctx` holds a reference to # the `_buffer`. self._buffer = [] if err < 0: # close write context ctx.close() exc = convert_error(err) self._fatal_error(exc, True) return self._maybe_resume_protocol() cdef size_t _get_write_buffer_size(self): if self._handle is NULL: return 0 return ((self._handle).write_queue_size + self._buffer_size) cdef _close(self): try: self._stop_reading() finally: UVSocketHandle._close(self) cdef inline _on_accept(self): # Ultimately called by __uv_stream_on_listen. self._init_protocol() cdef inline _on_read(self, bytes buf): # Any exception raised here will be caught in # __uv_stream_on_read. self._protocol_data_received(buf) cdef inline _on_eof(self): # Any exception raised here will be caught in # __uv_stream_on_read. try: meth = self._protocol.eof_received except AttributeError: keep_open = False else: keep_open = meth() if keep_open: # We're keeping the connection open so the # protocol can write more, but we still can't # receive more, so remove the reader callback. self._stop_reading() else: self.close() cdef inline _on_write(self): self._maybe_resume_protocol() if not self._get_write_buffer_size(): if self._closing: self._schedule_call_connection_lost(None) elif self._eof: self._shutdown() cdef inline _init(self, Loop loop, object protocol, Server server, object waiter): self._start_init(loop) if protocol is None: raise TypeError('protocol is required') self._set_protocol(protocol) if server is not None: self._set_server(server) if waiter is not None: self._set_waiter(waiter) cdef inline _on_connect(self, object exc): # Called from __tcp_connect_callback (tcp.pyx) and # __pipe_connect_callback (pipe.pyx). if exc is None: self._init_protocol() else: if self._waiter is None: self._fatal_error(exc, False, "connect failed") elif self._waiter.cancelled(): # Connect call was cancelled; just close the transport # silently. self._close() elif self._waiter.done(): self._fatal_error(exc, False, "connect failed") else: self._waiter.set_exception(exc) self._close() # === Public API === def __repr__(self): return '<{} closed={} reading={} {:#x}>'.format( self.__class__.__name__, self._closed, self.__reading, id(self)) def write(self, object buf): self._ensure_alive() if self._eof: raise RuntimeError('Cannot call write() after write_eof()') if not buf: return if self._conn_lost: self._conn_lost += 1 return self._write(buf) def writelines(self, bufs): self._ensure_alive() if self._eof: raise RuntimeError('Cannot call writelines() after write_eof()') if self._conn_lost: self._conn_lost += 1 return for buf in bufs: self._write(buf) def write_eof(self): self._ensure_alive() if self._eof: return self._eof = 1 if not self._get_write_buffer_size(): self._shutdown() def can_write_eof(self): return True def pause_reading(self): self._ensure_alive() if self._closing: raise RuntimeError('Cannot pause_reading() when closing') if not self._is_reading(): raise RuntimeError('Already paused') self._stop_reading() def resume_reading(self): self._ensure_alive() if self._is_reading(): raise RuntimeError('Not paused') if self._closing: return self._start_reading() cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req, int status) with gil: # callback for uv_shutdown if req.data is NULL: aio_logger.error( 'UVStream.shutdown callback called with NULL req.data, status=%r', status) return cdef UVStream stream = req.data if status < 0 and status != uv.UV_ECANCELED: # From libuv source code: # The ECANCELED error code is a lie, the shutdown(2) syscall is a # fait accompli at this point. Maybe we should revisit this in # v0.11. A possible reason for leaving it unchanged is that it # informs the callee that the handle has been destroyed. if UVLOOP_DEBUG: stream._loop._debug_stream_shutdown_errors_total += 1 exc = convert_error(status) stream._fatal_error(exc, False, "error status in uv_stream_t.shutdown callback") return cdef inline void __uv_stream_on_read_impl(uv.uv_stream_t* stream, ssize_t nread, const uv.uv_buf_t* buf): cdef: UVStream sc = stream.data Loop loop = sc._loop # It's OK to free the buffer early, since nothing will # be able to touch it until this method is done. __loop_free_buffer(loop) if sc._closed: # The stream was closed, there is no reason to # do any work now. sc.__reading_stopped() # Just in case. return if nread == uv.UV_EOF: # From libuv docs: # The callee is responsible for stopping closing the stream # when an error happens by calling uv_read_stop() or uv_close(). # Trying to read from the stream again is undefined. try: if UVLOOP_DEBUG: loop._debug_stream_read_eof_total += 1 sc._stop_reading() sc._on_eof() except BaseException as ex: if UVLOOP_DEBUG: loop._debug_stream_read_eof_cb_errors_total += 1 sc._error(ex, False) finally: return if nread == 0: # From libuv docs: # nread might be 0, which does not indicate an error or EOF. # This is equivalent to EAGAIN or EWOULDBLOCK under read(2). return if nread < 0: # From libuv docs: # The callee is responsible for stopping closing the stream # when an error happens by calling uv_read_stop() or uv_close(). # Trying to read from the stream again is undefined. # # Therefore, we're closing the stream. Since "UVHandle._close()" # doesn't raise exceptions unless uvloop is built with DEBUG=1, # we don't need try...finally here. if UVLOOP_DEBUG: loop._debug_stream_read_errors_total += 1 if sc.__read_error_close: # Used for getting notified when a pipe is closed. # See WriteUnixTransport for the explanation. sc._on_eof() return exc = convert_error(nread) sc._fatal_error(exc, False, "error status in uv_stream_t.read callback") return try: if UVLOOP_DEBUG: loop._debug_stream_read_cb_total += 1 sc._on_read(loop._recv_buffer[:nread]) except BaseException as exc: if UVLOOP_DEBUG: loop._debug_stream_read_cb_errors_total += 1 sc._error(exc, False) cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): cdef: _StreamWriteContext ctx = <_StreamWriteContext> req.data UVStream stream = ctx.stream ctx.close() if stream._closed: # The stream was closed, there is nothing to do. # Even if there is an error, like EPIPE, there # is no reason to report it. return if status < 0: if UVLOOP_DEBUG: stream._loop._debug_stream_write_errors_total += 1 exc = convert_error(status) stream._fatal_error(exc, False, "error status in uv_stream_t.write callback") return try: stream._on_write() except BaseException as exc: if UVLOOP_DEBUG: stream._loop._debug_stream_write_cb_errors_total += 1 stream._error(exc, False) cdef void __uv_stream_on_read(uv.uv_stream_t* stream, ssize_t nread, const uv.uv_buf_t* buf) with gil: if __ensure_handle_data(stream, "UVStream read callback") == 0: return cdef: Loop loop = stream.loop.data # Don't need try-finally, __uv_stream_on_read_impl is void __uv_stream_on_read_impl(stream, nread, buf) cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: if UVLOOP_DEBUG: if req.data is NULL: aio_logger.error( 'UVStream.write callback called with NULL req.data, status=%r', status) return cdef: Loop loop = (<_StreamWriteContext> req.data).stream._loop # Don't need try-finally, __uv_stream_on_write_impl is void __uv_stream_on_write_impl(req, status) uvloop-0.8.1/uvloop/handles/pipe.pxd0000664000372000037200000000140213156036740020324 0ustar travistravis00000000000000cdef class UnixServer(UVStreamServer): cdef bind(self, str path) @staticmethod cdef UnixServer new(Loop loop, object protocol_factory, Server server, object ssl) cdef class UnixTransport(UVStream): @staticmethod cdef UnixTransport new(Loop loop, object protocol, Server server, object waiter) cdef connect(self, char* addr) cdef class ReadUnixTransport(UVStream): @staticmethod cdef ReadUnixTransport new(Loop loop, object protocol, Server server, object waiter) cdef class WriteUnixTransport(UVStream): @staticmethod cdef WriteUnixTransport new(Loop loop, object protocol, Server server, object waiter) uvloop-0.8.1/uvloop/handles/handle.pxd0000664000372000037200000000203013156036740020620 0ustar travistravis00000000000000cdef class UVHandle: cdef: uv.uv_handle_t *_handle bint _closed bint _inited Loop _loop readonly _source_traceback # All "inline" methods are final cdef inline _start_init(self, Loop loop) cdef inline _abort_init(self) cdef inline _finish_init(self) cdef inline bint _is_alive(self) cdef inline _ensure_alive(self) cdef _error(self, exc, throw) cdef _fatal_error(self, exc, throw, reason=?) cdef _warn_unclosed(self) cdef inline _free(self) cdef _close(self) cdef class UVSocketHandle(UVHandle): cdef: # Points to a Python file-object that should be closed # when the transport is closing. Used by pipes. This # should probably be refactored somehow. object _fileobj object __cached_socket # All "inline" methods are final cdef inline _fileno(self) cdef _new_socket(self) cdef inline _get_socket(self) cdef inline _attach_fileobj(self, object file) cdef _open(self, int sockfd) uvloop-0.8.1/uvloop/handles/check.pxd0000664000372000037200000000042413156036740020447 0ustar travistravis00000000000000cdef class UVCheck(UVHandle): cdef: Handle h bint running # All "inline" methods are final cdef _init(self, Loop loop, Handle h) cdef inline stop(self) cdef inline start(self) @staticmethod cdef UVCheck new(Loop loop, Handle h) uvloop-0.8.1/uvloop/handles/streamserver.pyx0000664000372000037200000000732013156036740022143 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVStreamServer(UVSocketHandle): def __cinit__(self): self.opened = 0 self._server = None self.ssl = None self.protocol_factory = None cdef inline _init(self, Loop loop, object protocol_factory, Server server, object ssl): if ssl is not None and not isinstance(ssl, ssl_SSLContext): raise TypeError( 'ssl is expected to be None or an instance of ' 'ssl.SSLContext, got {!r}'.format(ssl)) self.ssl = ssl self._start_init(loop) self.protocol_factory = protocol_factory self._server = server cdef inline listen(self, backlog): cdef int err self._ensure_alive() if not isinstance(backlog, int): # Don't allow floats raise TypeError('integer argument expected, got {}'.format( type(backlog).__name__)) if self.protocol_factory is None: raise RuntimeError('unable to listen(); no protocol_factory') if self.opened != 1: raise RuntimeError('unopened TCPServer') err = uv.uv_listen( self._handle, backlog, __uv_streamserver_on_listen) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef inline _on_listen(self): cdef UVStream slient protocol = self.protocol_factory() if self.ssl is None: client = self._make_new_transport(protocol, None) else: waiter = self._loop._new_future() ssl_protocol = aio_SSLProtocol( self._loop, protocol, self.ssl, waiter, True, # server_side None) # server_hostname client = self._make_new_transport(ssl_protocol, None) waiter.add_done_callback( ft_partial(self.__on_ssl_connected, client)) client._accept(self) cdef _fatal_error(self, exc, throw, reason=None): # Overload UVHandle._fatal_error self._close() if not isinstance(exc, (BrokenPipeError, ConnectionResetError, ConnectionAbortedError)): if throw or self._loop is None: raise exc msg = 'Fatal error on server {}'.format( self.__class__.__name__) if reason is not None: msg = '{} ({})'.format(msg, reason) self._loop.call_exception_handler({ 'message': msg, 'exception': exc, }) cdef inline _mark_as_open(self): self.opened = 1 cdef UVStream _make_new_transport(self, object protocol, object waiter): raise NotImplementedError def __on_ssl_connected(self, transport, fut): exc = fut.exception() if exc is not None: transport._force_close(exc) cdef void __uv_streamserver_on_listen(uv.uv_stream_t* handle, int status) with gil: # callback for uv_listen if __ensure_handle_data(handle, "UVStream listen callback") == 0: return cdef: UVStreamServer stream = handle.data if status < 0: if UVLOOP_DEBUG: stream._loop._debug_stream_listen_errors_total += 1 exc = convert_error(status) stream._fatal_error(exc, False, "error status in uv_stream_t.listen callback") return try: stream._on_listen() except BaseException as exc: stream._error(exc, False) uvloop-0.8.1/uvloop/handles/timer.pyx0000664000372000037200000000431213156036740020537 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVTimer(UVHandle): cdef _init(self, Loop loop, method_t callback, object ctx, uint64_t timeout): cdef int err self._start_init(loop) self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_timer_init(self._loop.uvloop, self._handle) if err < 0: self._abort_init() raise convert_error(err) self._finish_init() self.callback = callback self.ctx = ctx self.running = 0 self.timeout = timeout cdef stop(self): cdef int err if not self._is_alive(): self.running = 0 return if self.running == 1: err = uv.uv_timer_stop(self._handle) self.running = 0 if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef start(self): cdef int err self._ensure_alive() if self.running == 0: # Update libuv internal time. uv.uv_update_time(self._loop.uvloop) # void err = uv.uv_timer_start(self._handle, __uvtimer_callback, self.timeout, 0) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return self.running = 1 @staticmethod cdef UVTimer new(Loop loop, method_t callback, object ctx, uint64_t timeout): cdef UVTimer handle handle = UVTimer.__new__(UVTimer) handle._init(loop, callback, ctx, timeout) return handle cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: if __ensure_handle_data(handle, "UVTimer callback") == 0: return cdef: UVTimer timer = handle.data method_t cb = timer.callback timer.running = 0 try: cb(timer.ctx) except BaseException as ex: timer._error(ex, False) uvloop-0.8.1/uvloop/handles/pipe.pyx0000664000372000037200000001407413156036740020362 0ustar travistravis00000000000000cdef __pipe_init_uv_handle(UVStream handle, Loop loop): cdef int err handle._handle = \ PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) if handle._handle is NULL: handle._abort_init() raise MemoryError() # Initialize pipe handle with ipc=0. # ipc=1 means that libuv will use recvmsg/sendmsg # instead of recv/send. err = uv.uv_pipe_init(handle._loop.uvloop, handle._handle, 0) if err < 0: handle._abort_init() raise convert_error(err) handle._finish_init() cdef __pipe_open(UVStream handle, int fd): cdef int err err = uv.uv_pipe_open(handle._handle, fd) if err < 0: exc = convert_error(err) raise exc cdef __pipe_get_socket(UVSocketHandle handle): fileno = handle._fileno() return socket_socket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) @cython.no_gc_clear cdef class UnixServer(UVStreamServer): @staticmethod cdef UnixServer new(Loop loop, object protocol_factory, Server server, object ssl): cdef UnixServer handle handle = UnixServer.__new__(UnixServer) handle._init(loop, protocol_factory, server, ssl) __pipe_init_uv_handle(handle, loop) return handle cdef _new_socket(self): return __pipe_get_socket(self) cdef _open(self, int sockfd): self._ensure_alive() __pipe_open(self, sockfd) self._mark_as_open() cdef bind(self, str path): cdef int err self._ensure_alive() err = uv.uv_pipe_bind(self._handle, path.encode()) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return self._mark_as_open() cdef UVStream _make_new_transport(self, object protocol, object waiter): cdef UnixTransport tr tr = UnixTransport.new(self._loop, protocol, self._server, waiter) return tr @cython.no_gc_clear cdef class UnixTransport(UVStream): @staticmethod cdef UnixTransport new(Loop loop, object protocol, Server server, object waiter): cdef UnixTransport handle handle = UnixTransport.__new__(UnixTransport) handle._init(loop, protocol, server, waiter) __pipe_init_uv_handle(handle, loop) return handle cdef _new_socket(self): return __pipe_get_socket(self) cdef _open(self, int sockfd): __pipe_open(self, sockfd) cdef connect(self, char* addr): cdef _PipeConnectRequest req req = _PipeConnectRequest(self._loop, self) req.connect(addr) @cython.no_gc_clear cdef class ReadUnixTransport(UVStream): @staticmethod cdef ReadUnixTransport new(Loop loop, object protocol, Server server, object waiter): cdef ReadUnixTransport handle handle = ReadUnixTransport.__new__(ReadUnixTransport) handle._init(loop, protocol, server, waiter) __pipe_init_uv_handle(handle, loop) return handle cdef _new_socket(self): return __pipe_get_socket(self) cdef _open(self, int sockfd): __pipe_open(self, sockfd) def get_write_buffer_limits(self): raise NotImplementedError def set_write_buffer_limits(self, high=None, low=None): raise NotImplementedError def get_write_buffer_size(self): raise NotImplementedError def write(self, data): raise NotImplementedError def writelines(self, list_of_data): raise NotImplementedError def write_eof(self): raise NotImplementedError def can_write_eof(self): raise NotImplementedError def abort(self): raise NotImplementedError @cython.no_gc_clear cdef class WriteUnixTransport(UVStream): @staticmethod cdef WriteUnixTransport new(Loop loop, object protocol, Server server, object waiter): cdef WriteUnixTransport handle handle = WriteUnixTransport.__new__(WriteUnixTransport) # We listen for read events on write-end of the pipe. When # the read-end is close, the uv_stream_t.read callback will # receive an error -- we want to silence that error, and just # close the transport. handle._close_on_read_error() handle._init(loop, protocol, server, waiter) __pipe_init_uv_handle(handle, loop) return handle cdef _new_socket(self): return __pipe_get_socket(self) cdef _open(self, int sockfd): __pipe_open(self, sockfd) def pause_reading(self): raise NotImplementedError def resume_reading(self): raise NotImplementedError cdef class _PipeConnectRequest(UVRequest): cdef: UnixTransport transport def __cinit__(self, loop, transport): self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) if self.request is NULL: self.on_done() raise MemoryError() self.request.data = self self.transport = transport cdef connect(self, char* addr): # uv_pipe_connect returns void uv.uv_pipe_connect(self.request, self.transport._handle, addr, __pipe_connect_callback) cdef void __pipe_connect_callback(uv.uv_connect_t* req, int status) with gil: cdef: _PipeConnectRequest wrapper UnixTransport transport wrapper = <_PipeConnectRequest> req.data transport = wrapper.transport if status < 0: exc = convert_error(status) else: exc = None try: transport._on_connect(exc) except BaseException as ex: wrapper.transport._error(ex, False) finally: wrapper.on_done() uvloop-0.8.1/uvloop/handles/basetransport.pxd0000664000372000037200000000252713156036740022267 0ustar travistravis00000000000000cdef class UVBaseTransport(UVSocketHandle): cdef: readonly bint _closing bint _protocol_connected bint _protocol_paused object _protocol_data_received size_t _high_water size_t _low_water object _protocol Server _server object _waiter dict _extra_info uint32_t _conn_lost object __weakref__ # All "inline" methods are final cdef inline _set_write_buffer_limits(self, int high=*, int low=*) cdef inline _maybe_pause_protocol(self) cdef inline _maybe_resume_protocol(self) cdef inline _schedule_call_connection_made(self) cdef inline _schedule_call_connection_lost(self, exc) cdef _wakeup_waiter(self) cdef _call_connection_made(self) cdef _call_connection_lost(self, exc) # Overloads of UVHandle methods: cdef _fatal_error(self, exc, throw, reason=?) cdef _close(self) cdef inline _set_server(self, Server server) cdef inline _set_waiter(self, object waiter) cdef inline _set_protocol(self, object protocol) cdef inline _init_protocol(self) cdef inline _add_extra_info(self, str name, object obj) # === overloads === cdef _new_socket(self) cdef size_t _get_write_buffer_size(self) cdef bint _is_reading(self) cdef _start_reading(self) cdef _stop_reading(self) uvloop-0.8.1/uvloop/handles/poll.pxd0000664000372000037200000000100113156036740020330 0ustar travistravis00000000000000cdef class UVPoll(UVHandle): cdef: int fd Handle reading_handle Handle writing_handle cdef _init(self, Loop loop, int fd) cdef _close(self) cdef inline _poll_start(self, int flags) cdef inline _poll_stop(self) cdef int is_active(self) cdef start_reading(self, Handle callback) cdef start_writing(self, Handle callback) cdef stop_reading(self) cdef stop_writing(self) cdef stop(self) @staticmethod cdef UVPoll new(Loop loop, int fd) uvloop-0.8.1/uvloop/handles/udp.pyx0000664000372000037200000002441513156036740020215 0ustar travistravis00000000000000@cython.no_gc_clear @cython.freelist(DEFAULT_FREELIST_SIZE) cdef class _UDPSendContext: # used to hold additional write request information for uv_write cdef: uv.uv_udp_send_t req uv.uv_buf_t uv_buf Py_buffer py_buf UDPTransport udp bint closed system.sockaddr_storage addr cdef close(self): if self.closed: return self.closed = 1 PyBuffer_Release(&self.py_buf) # void self.req.data = NULL Py_DECREF(self) self.udp = None @staticmethod cdef _UDPSendContext new(UDPTransport udp, object data): cdef _UDPSendContext ctx ctx = _UDPSendContext.__new__(_UDPSendContext) ctx.udp = None ctx.closed = 1 ctx.req.data = ctx Py_INCREF(ctx) PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) ctx.uv_buf = uv.uv_buf_init(ctx.py_buf.buf, ctx.py_buf.len) ctx.udp = udp ctx.closed = 0 return ctx def __dealloc__(self): if UVLOOP_DEBUG: if not self.closed: raise RuntimeError( 'open _UDPSendContext is being deallocated') self.udp = None @cython.no_gc_clear cdef class UDPTransport(UVBaseTransport): def __cinit__(self): self._family = uv.AF_UNSPEC self._address_set = 0 self.__receiving = 0 self._cached_py_address = None cdef _init(self, Loop loop, unsigned int family): cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_udp_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_udp_init_ex(loop.uvloop, self._handle, family) if err < 0: self._abort_init() raise convert_error(err) if family in (uv.AF_INET, uv.AF_INET6): self._family = family self._finish_init() cdef _set_remote_address(self, system.sockaddr* addr, size_t addr_len): memcpy(&self._address, addr, addr_len) self._address_set = 1 cdef open(self, int family, int sockfd): if family in (uv.AF_INET, uv.AF_INET6): self._family = family else: raise ValueError( 'cannot open a UDP handle, invalid family {}'.format(family)) cdef int err err = uv.uv_udp_open(self._handle, sockfd) if err < 0: exc = convert_error(err) raise exc cdef _bind(self, system.sockaddr* addr, bint reuse_addr): cdef: int err int flags = 0 self._ensure_alive() if reuse_addr: flags |= uv.UV_UDP_REUSEADDR err = uv.uv_udp_bind(self._handle, addr, flags) if err < 0: exc = convert_error(err) raise exc cdef _set_broadcast(self, bint on): cdef int err self._ensure_alive() err = uv.uv_udp_set_broadcast(self._handle, on) if err < 0: exc = convert_error(err) raise exc cdef size_t _get_write_buffer_size(self): if self._handle is NULL: return 0 return (self._handle).send_queue_size cdef bint _is_reading(self): return self.__receiving cdef _start_reading(self): cdef int err if self.__receiving: return self._ensure_alive() err = uv.uv_udp_recv_start(self._handle, __loop_alloc_buffer, __uv_udp_on_receive) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return else: # UDPTransport must live until the read callback is called self.__receiving_started() cdef _stop_reading(self): cdef int err if not self.__receiving: return self._ensure_alive() err = uv.uv_udp_recv_stop(self._handle) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return else: self.__receiving_stopped() cdef inline __receiving_started(self): if self.__receiving: return self.__receiving = 1 Py_INCREF(self) cdef inline __receiving_stopped(self): if not self.__receiving: return self.__receiving = 0 Py_DECREF(self) cdef _new_socket(self): if self._family not in (uv.AF_INET, uv.AF_INET6): raise RuntimeError( 'UDPTransport.family is undefined; cannot create python socket') fileno = self._fileno() return socket_socket(self._family, uv.SOCK_STREAM, 0, fileno) cdef _send(self, object data, object addr): cdef: _UDPSendContext ctx if self._family not in (uv.AF_INET, uv.AF_INET6): raise RuntimeError('UDPTransport.family is undefined; cannot send') if self._address_set and addr is not None: if self._cached_py_address is None: self._cached_py_address = __convert_sockaddr_to_pyaddr( &self._address) if self._cached_py_address != addr: raise ValueError('Invalid address: must be None or %s' % (self._cached_py_address,)) addr = None ctx = _UDPSendContext.new(self, data) try: if addr is None: if self._address_set: ctx.addr = self._address else: raise RuntimeError( 'unable to perform send operation: no address') else: __convert_pyaddr_to_sockaddr(self._family, addr, &ctx.addr) except: ctx.close() raise err = uv.uv_udp_send(&ctx.req, self._handle, &ctx.uv_buf, 1, &ctx.addr, __uv_udp_on_send) if err < 0: ctx.close() exc = convert_error(err) self._fatal_error(exc, True) cdef _on_receive(self, bytes data, object exc, object addr): if exc is None: self._protocol.datagram_received(data, addr) else: self._protocol.error_received(exc) cdef _on_sent(self, object exc): if exc is not None: if isinstance(exc, OSError): self._protocol.error_received(exc) else: self._fatal_error( exc, False, 'Fatal write error on datagram transport') self._maybe_resume_protocol() if not self._get_write_buffer_size(): if self._closing: self._schedule_call_connection_lost(None) # === Public API === def sendto(self, data, addr=None): if not data: return if self._conn_lost: # TODO add warning self._conn_lost += 1 return self._send(data, addr) self._maybe_pause_protocol() cdef void __uv_udp_on_receive(uv.uv_udp_t* handle, ssize_t nread, const uv.uv_buf_t* buf, const system.sockaddr* addr, unsigned flags) with gil: if __ensure_handle_data(handle, "UDPTransport receive callback") == 0: return cdef: UDPTransport udp = handle.data Loop loop = udp._loop bytes data object pyaddr # It's OK to free the buffer early, since nothing will # be able to touch it until this method is done. __loop_free_buffer(loop) if udp._closed: # The handle was closed, there is no reason to # do any work now. udp.__receiving_stopped() # Just in case. return if addr is NULL and nread == 0: # From libuv docs: # addr: struct sockaddr* containing the address # of the sender. Can be NULL. Valid for the duration # of the callback only. # [...] # The receive callback will be called with # nread == 0 and addr == NULL when there is # nothing to read, and with nread == 0 and # addr != NULL when an empty UDP packet is # received. return if addr is NULL: pyaddr = None else: try: pyaddr = __convert_sockaddr_to_pyaddr(addr) except BaseException as exc: udp._error(exc, False) return if nread < 0: exc = convert_error(nread) udp._on_receive(None, exc, pyaddr) return if pyaddr is None: udp._fatal_error( RuntimeError( 'uv_udp.receive callback: addr is NULL and nread >= 0'), False) return if nread == 0: data = b'' else: data = loop._recv_buffer[:nread] try: udp._on_receive(data, None, pyaddr) except BaseException as exc: udp._error(exc, False) cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: if req.data is NULL: # Shouldn't happen as: # - _UDPSendContext does an extra INCREF in its 'init()' # - _UDPSendContext holds a ref to the relevant UDPTransport aio_logger.error( 'UVStream.write callback called with NULL req.data, status=%r', status) return cdef: _UDPSendContext ctx = <_UDPSendContext> req.data UDPTransport udp = ctx.udp ctx.close() if status < 0: exc = convert_error(status) print(exc) else: exc = None try: udp._on_sent(exc) except BaseException as exc: udp._error(exc, False) uvloop-0.8.1/uvloop/handles/stream.pxd0000664000372000037200000000163113156036740020666 0ustar travistravis00000000000000cdef class UVStream(UVBaseTransport): cdef: uv.uv_shutdown_t _shutdown_req bint __shutting_down bint __reading bint __read_error_close bint _eof list _buffer size_t _buffer_size # All "inline" methods are final cdef inline _init(self, Loop loop, object protocol, Server server, object waiter) cdef inline _exec_write(self) cdef inline _shutdown(self) cdef inline _accept(self, UVStream server) cdef inline _close_on_read_error(self) cdef inline __reading_started(self) cdef inline __reading_stopped(self) cdef inline _write(self, object data) cdef inline _try_write(self, object data) cdef _close(self) cdef inline _on_accept(self) cdef inline _on_read(self, bytes buf) cdef inline _on_eof(self) cdef inline _on_write(self) cdef inline _on_connect(self, object exc) uvloop-0.8.1/uvloop/handles/tcp.pxd0000664000372000037200000000125113156036740020157 0ustar travistravis00000000000000cdef class TCPServer(UVStreamServer): cdef bind(self, system.sockaddr* addr, unsigned int flags=*) @staticmethod cdef TCPServer new(Loop loop, object protocol_factory, Server server, object ssl, unsigned int flags) cdef class TCPTransport(UVStream): cdef: bint __peername_set bint __sockname_set system.sockaddr_storage __peername system.sockaddr_storage __sockname cdef bind(self, system.sockaddr* addr, unsigned int flags=*) cdef connect(self, system.sockaddr* addr) @staticmethod cdef TCPTransport new(Loop loop, object protocol, Server server, object waiter) uvloop-0.8.1/uvloop/handles/async_.pxd0000664000372000037200000000037413156036740020652 0ustar travistravis00000000000000cdef class UVAsync(UVHandle): cdef: method_t callback object ctx cdef _init(self, Loop loop, method_t callback, object ctx) cdef send(self) @staticmethod cdef UVAsync new(Loop loop, method_t callback, object ctx) uvloop-0.8.1/uvloop/handles/idle.pyx0000664000372000037200000000352213156036740020336 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVIdle(UVHandle): cdef _init(self, Loop loop, Handle h): cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_idle_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_idle_init(self._loop.uvloop, self._handle) if err < 0: self._abort_init() raise convert_error(err) self._finish_init() self.h = h self.running = 0 cdef inline stop(self): cdef int err if not self._is_alive(): self.running = 0 return if self.running == 1: err = uv.uv_idle_stop(self._handle) self.running = 0 if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef inline start(self): cdef int err self._ensure_alive() if self.running == 0: err = uv.uv_idle_start(self._handle, cb_idle_callback) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return self.running = 1 @staticmethod cdef UVIdle new(Loop loop, Handle h): cdef UVIdle handle handle = UVIdle.__new__(UVIdle) handle._init(loop, h) return handle cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: if __ensure_handle_data(handle, "UVIdle callback") == 0: return cdef: UVIdle idle = handle.data Handle h = idle.h try: h._run() except BaseException as ex: idle._error(ex, False) uvloop-0.8.1/uvloop/handles/process.pxd0000664000372000037200000000432213156036740021051 0ustar travistravis00000000000000cdef class UVProcess(UVHandle): cdef: object _returncode object _pid object _errpipe_read object _errpipe_write object _preexec_fn bint _restore_signals set _fds_to_close # Attributes used to compose uv_process_options_t: uv.uv_process_options_t options uv.uv_stdio_container_t[3] iocnt list __env char **uv_opt_env list __args char **uv_opt_args char *uv_opt_file bytes __cwd cdef _init(self, Loop loop, list args, dict env, cwd, start_new_session, _stdin, _stdout, _stderr, pass_fds, debug_flags, preexec_fn, restore_signals) cdef _after_fork(self) cdef char** __to_cstring_array(self, list arr) cdef _init_args(self, list args) cdef _init_env(self, dict env) cdef _init_files(self, _stdin, _stdout, _stderr) cdef _init_options(self, list args, dict env, cwd, start_new_session, _stdin, _stdout, _stderr) cdef _close_after_spawn(self, int fd) cdef _on_exit(self, int64_t exit_status, int term_signal) cdef _kill(self, int signum) cdef class UVProcessTransport(UVProcess): cdef: list _exit_waiters list _init_futs bint _stdio_ready list _pending_calls object _protocol bint _finished WriteUnixTransport _stdin ReadUnixTransport _stdout ReadUnixTransport _stderr object stdin_proto object stdout_proto object stderr_proto cdef _file_redirect_stdio(self, int fd) cdef _file_devnull(self) cdef _file_inpipe(self) cdef _file_outpipe(self) cdef _check_proc(self) cdef _pipe_connection_lost(self, int fd, exc) cdef _pipe_data_received(self, int fd, data) cdef _call_connection_made(self, waiter) cdef _try_finish(self) @staticmethod cdef UVProcessTransport new(Loop loop, protocol, args, env, cwd, start_new_session, _stdin, _stdout, _stderr, pass_fds, waiter, debug_flags, preexec_fn, restore_signals) uvloop-0.8.1/uvloop/handles/async_.pyx0000664000372000037200000000277313156036740020704 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVAsync(UVHandle): cdef _init(self, Loop loop, method_t callback, object ctx): cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_async_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_async_init(self._loop.uvloop, self._handle, __uvasync_callback) if err < 0: self._abort_init() raise convert_error(err) self._finish_init() self.callback = callback self.ctx = ctx cdef send(self): cdef int err self._ensure_alive() err = uv.uv_async_send(self._handle) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return @staticmethod cdef UVAsync new(Loop loop, method_t callback, object ctx): cdef UVAsync handle handle = UVAsync.__new__(UVAsync) handle._init(loop, callback, ctx) return handle cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: if __ensure_handle_data(handle, "UVAsync callback") == 0: return cdef: UVAsync async_ = handle.data method_t cb = async_.callback try: cb(async_.ctx) except BaseException as ex: async_._error(ex, False) uvloop-0.8.1/uvloop/handles/streamserver.pxd0000664000372000037200000000074513156036740022122 0ustar travistravis00000000000000cdef class UVStreamServer(UVSocketHandle): cdef: object ssl object protocol_factory bint opened Server _server # All "inline" methods are final cdef inline _init(self, Loop loop, object protocol_factory, Server server, object ssl) cdef inline _mark_as_open(self) cdef inline listen(self, backlog) cdef inline _on_listen(self) cdef UVStream _make_new_transport(self, object protocol, object waiter) uvloop-0.8.1/uvloop/handles/poll.pyx0000664000372000037200000001431113156036740020365 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVPoll(UVHandle): cdef _init(self, Loop loop, int fd): cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_poll_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_poll_init(self._loop.uvloop, self._handle, fd) if err < 0: self._abort_init() raise convert_error(err) self._finish_init() self.fd = fd self.reading_handle = None self.writing_handle = None @staticmethod cdef UVPoll new(Loop loop, int fd): cdef UVPoll handle handle = UVPoll.__new__(UVPoll) handle._init(loop, fd) return handle cdef int is_active(self): return (self.reading_handle is not None or self.writing_handle is not None) cdef inline _poll_start(self, int flags): cdef int err self._ensure_alive() err = uv.uv_poll_start( self._handle, flags, __on_uvpoll_event) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef inline _poll_stop(self): cdef int err if not self._is_alive(): return err = uv.uv_poll_stop(self._handle) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef: int backend_id system.epoll_event dummy_event if system.PLATFORM_IS_LINUX: # libuv doesn't remove the FD from epoll immediately # after uv_poll_stop or uv_poll_close, causing hard # to debug issue with dup-ed file descriptors causing # CPU burn in epoll/epoll_ctl: # https://github.com/MagicStack/uvloop/issues/61 # # It's safe though to manually call epoll_ctl here, # after calling uv_poll_stop. backend_id = uv.uv_backend_fd(self._loop.uvloop) if backend_id != -1: memset(&dummy_event, 0, sizeof(dummy_event)) system.epoll_ctl( backend_id, system.EPOLL_CTL_DEL, self.fd, &dummy_event) # ignore errors cdef start_reading(self, Handle callback): cdef: int mask = 0 if self.reading_handle is None: # not reading right now, setup the handle mask = uv.UV_READABLE if self.writing_handle is not None: # are we writing right now? mask |= uv.UV_WRITABLE self._poll_start(mask) else: self.reading_handle._cancel() self.reading_handle = callback cdef start_writing(self, Handle callback): cdef: int mask = 0 if self.writing_handle is None: # not writing right now, setup the handle mask = uv.UV_WRITABLE if self.reading_handle is not None: # are we reading right now? mask |= uv.UV_READABLE self._poll_start(mask) else: self.writing_handle._cancel() self.writing_handle = callback cdef stop_reading(self): if self.reading_handle is None: return False self.reading_handle._cancel() self.reading_handle = None if self.writing_handle is None: self.stop() else: self._poll_start(uv.UV_WRITABLE) return True cdef stop_writing(self): if self.writing_handle is None: return False self.writing_handle._cancel() self.writing_handle = None if self.reading_handle is None: self.stop() else: self._poll_start(uv.UV_READABLE) return True cdef stop(self): if self.reading_handle is not None: self.reading_handle._cancel() self.reading_handle = None if self.writing_handle is not None: self.writing_handle._cancel() self.writing_handle = None self._poll_stop() cdef _close(self): if self.is_active(): self.stop() UVHandle._close(self) cdef _fatal_error(self, exc, throw, reason=None): try: if self.reading_handle is not None: try: self.reading_handle._run() except BaseException as ex: self._loop._handle_exception(ex) self.reading_handle = None if self.writing_handle is not None: try: self.writing_handle._run() except BaseException as ex: self._loop._handle_exception(ex) self.writing_handle = None finally: self._close() cdef void __on_uvpoll_event(uv.uv_poll_t* handle, int status, int events) with gil: if __ensure_handle_data(handle, "UVPoll callback") == 0: return cdef: UVPoll poll = handle.data if status < 0: exc = convert_error(status) poll._fatal_error(exc, False) return if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and poll.reading_handle is not None): try: if UVLOOP_DEBUG: poll._loop._poll_read_events_total += 1 poll.reading_handle._run() except BaseException as ex: if UVLOOP_DEBUG: poll._loop._poll_read_cb_errors_total += 1 poll._error(ex, False) # continue code execution if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and poll.writing_handle is not None): try: if UVLOOP_DEBUG: poll._loop._poll_write_events_total += 1 poll.writing_handle._run() except BaseException as ex: if UVLOOP_DEBUG: poll._loop._poll_write_cb_errors_total += 1 poll._error(ex, False) uvloop-0.8.1/uvloop/handles/udp.pxd0000664000372000037200000000134113156036740020161 0ustar travistravis00000000000000cdef class UDPTransport(UVBaseTransport): cdef: bint __receiving int _family bint _address_set system.sockaddr_storage _address object _cached_py_address cdef _init(self, Loop loop, unsigned int family) cdef _set_remote_address(self, system.sockaddr* addr, size_t addr_len) cdef _bind(self, system.sockaddr* addr, bint reuse_addr) cdef open(self, int family, int sockfd) cdef _set_broadcast(self, bint on) cdef inline __receiving_started(self) cdef inline __receiving_stopped(self) cdef _send(self, object data, object addr) cdef _on_receive(self, bytes data, object exc, object addr) cdef _on_sent(self, object exc) uvloop-0.8.1/uvloop/handles/idle.pxd0000664000372000037200000000042213156036740020305 0ustar travistravis00000000000000cdef class UVIdle(UVHandle): cdef: Handle h bint running # All "inline" methods are final cdef _init(self, Loop loop, Handle h) cdef inline stop(self) cdef inline start(self) @staticmethod cdef UVIdle new(Loop loop, Handle h) uvloop-0.8.1/uvloop/handles/basetransport.pyx0000664000372000037200000002322013156036740022305 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVBaseTransport(UVSocketHandle): def __cinit__(self): # Flow control self._high_water = FLOW_CONTROL_HIGH_WATER self._low_water = FLOW_CONTROL_LOW_WATER self._protocol = None self._protocol_connected = 0 self._protocol_paused = 0 self._protocol_data_received = None self._server = None self._waiter = None self._extra_info = None self._conn_lost = 0 self._closing = 0 cdef size_t _get_write_buffer_size(self): return 0 cdef inline _schedule_call_connection_made(self): self._loop._call_soon_handle( new_MethodHandle(self._loop, "UVTransport._call_connection_made", self._call_connection_made, self)) cdef inline _schedule_call_connection_lost(self, exc): self._loop._call_soon_handle( new_MethodHandle1(self._loop, "UVTransport._call_connection_lost", self._call_connection_lost, self, exc)) cdef _fatal_error(self, exc, throw, reason=None): # Overload UVHandle._fatal_error self._force_close(exc) if not isinstance(exc, (BrokenPipeError, ConnectionResetError, ConnectionAbortedError)): if throw or self._loop is None: raise exc msg = 'Fatal error on transport {}'.format( self.__class__.__name__) if reason is not None: msg = '{} ({})'.format(msg, reason) self._loop.call_exception_handler({ 'message': msg, 'exception': exc, 'transport': self, 'protocol': self._protocol, }) cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): if high == -1: if low == -1: high = FLOW_CONTROL_HIGH_WATER else: high = FLOW_CONTROL_LOW_WATER if low == -1: low = high // 4 if not high >= low >= 0: raise ValueError('high (%r) must be >= low (%r) must be >= 0' % (high, low)) self._high_water = high self._low_water = low self._maybe_pause_protocol() cdef inline _maybe_pause_protocol(self): cdef: size_t size = self._get_write_buffer_size() if size <= self._high_water: return if not self._protocol_paused: self._protocol_paused = 1 try: self._protocol.pause_writing() except Exception as exc: self._loop.call_exception_handler({ 'message': 'protocol.pause_writing() failed', 'exception': exc, 'transport': self, 'protocol': self._protocol, }) cdef inline _maybe_resume_protocol(self): cdef: size_t size = self._get_write_buffer_size() if self._protocol_paused and size <= self._low_water: self._protocol_paused = 0 try: self._protocol.resume_writing() except Exception as exc: self._loop.call_exception_handler({ 'message': 'protocol.resume_writing() failed', 'exception': exc, 'transport': self, 'protocol': self._protocol, }) cdef _wakeup_waiter(self): if self._waiter is not None: if not self._waiter.cancelled(): self._waiter.set_result(True) self._waiter = None cdef _call_connection_made(self): cdef Py_ssize_t _loop_ready_len if self._protocol is None: raise RuntimeError( 'protocol is not set, cannot call connection_made()') _loop_ready_len = self._loop._ready_len # Set _protocol_connected to 1 before calling "connection_made": # if transport is aborted or closed, "connection_lost" will # still be scheduled. self._protocol_connected = 1 try: self._protocol.connection_made(self) except: self._wakeup_waiter() raise if self._closing: # This might happen when "transport.abort()" is called # from "Protocol.connection_made". self._wakeup_waiter() return if _loop_ready_len == self._loop._ready_len: # No new calls were scheduled by 'protocol.connection_made', # so it's safe to start reading right now. self._start_reading() else: # In asyncio we'd just call start_reading() right after we # call protocol.connection_made(). However, that breaks # SSLProtocol in uvloop, which does some initialization # with loop.call_soon in its connection_made. It appears, # that uvloop can call protocol.data_received() *before* it # calls the handlers that connection_made set up. # That's why we're using another call_soon here. self._loop._call_soon_handle( new_MethodHandle(self._loop, "UVTransport._start_reading", self._start_reading, self)) self._wakeup_waiter() cdef _call_connection_lost(self, exc): if self._waiter is not None: # This shouldn't ever happen! self._loop.call_exception_handler({ 'message': 'waiter is not None in {}._call_connection_lost'. format(self.__class__.__name__) }) if not self._waiter.done(): self._waiter.set_exception(exc) self._waiter = None if self._closed: # The handle is closed -- likely, _call_connection_lost # was already called before. return try: if self._protocol_connected: self._protocol.connection_lost(exc) finally: self._protocol = None self._protocol_data_received = None self._close() server = self._server if server is not None: (server)._detach() self._server = None cdef inline _set_server(self, Server server): self._server = server (server)._attach() cdef inline _set_waiter(self, object waiter): if waiter is not None and not isfuture(waiter): raise TypeError( 'invalid waiter object {!r}, expected asyncio.Future'. format(waiter)) self._waiter = waiter cdef inline _set_protocol(self, object protocol): self._protocol = protocol # Store a reference to the bound method directly try: self._protocol_data_received = protocol.data_received except AttributeError: pass cdef inline _init_protocol(self): self._loop._track_transport(self) if self._protocol is None: raise RuntimeError('invalid _init_protocol call') self._schedule_call_connection_made() cdef inline _add_extra_info(self, str name, object obj): if self._extra_info is None: self._extra_info = {} self._extra_info[name] = obj cdef bint _is_reading(self): raise NotImplementedError cdef _start_reading(self): raise NotImplementedError cdef _stop_reading(self): raise NotImplementedError # === Public API === property _paused: # Used by SSLProto. Might be removed in the future. def __get__(self): return bool(not self._is_reading()) def get_protocol(self): return self._protocol def set_protocol(self, protocol): self._set_protocol(protocol) def _force_close(self, exc): # Used by SSLProto. Might be removed in the future. if self._conn_lost or self._closed: return if not self._closing: self._closing = 1 self._stop_reading() self._conn_lost += 1 self._schedule_call_connection_lost(exc) def abort(self): self._force_close(None) def close(self): if self._closing or self._closed: return self._closing = 1 self._stop_reading() if not self._get_write_buffer_size(): # The write buffer is empty self._conn_lost += 1 self._schedule_call_connection_lost(None) def is_closing(self): return self._closing def get_write_buffer_size(self): return self._get_write_buffer_size() def set_write_buffer_limits(self, high=None, low=None): self._ensure_alive() if high is None: high = -1 if low is None: low = -1 self._set_write_buffer_limits(high, low) def get_write_buffer_limits(self): return (self._low_water, self._high_water) def get_extra_info(self, name, default=None): if self._extra_info is not None and name in self._extra_info: return self._extra_info[name] if name == 'socket': return self._get_socket() if name == 'sockname': return self._get_socket().getsockname() if name == 'peername': try: return self._get_socket().getpeername() except socket_error: return default return default uvloop-0.8.1/uvloop/handles/handle.pyx0000664000372000037200000002653413156036740020664 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVHandle: """A base class for all libuv handles. Automatically manages memory deallocation and closing. Important: 1. call "_ensure_alive()" before calling any libuv functions on your handles. 2. call "__ensure_handle_data" in *all* libuv handle callbacks. """ def __cinit__(self): self._closed = 0 self._inited = 0 self._handle = NULL self._loop = None self._source_traceback = None def __init__(self): raise TypeError( '{} is not supposed to be instantiated from Python'.format( self.__class__.__name__)) def __dealloc__(self): if UVLOOP_DEBUG: if self._loop is not None: self._loop._debug_handles_current.subtract([ self.__class__.__name__]) else: # No "@cython.no_gc_clear" decorator on this UVHandle raise RuntimeError( '{} without @no_gc_clear; loop was set to None by GC' .format(self.__class__.__name__)) if self._handle is NULL: return # -> When we're at this point, something is wrong <- if self._handle.loop is NULL: # The handle wasn't initialized with "uv_{handle}_init" self._closed = 1 self._free() raise RuntimeError( '{} is open in __dealloc__ with loop set to NULL' .format(self.__class__.__name__)) if self._closed == 1: # So _handle is not NULL and self._closed == 1? raise RuntimeError( '{}.__dealloc__: _handle is NULL, _closed == 1'.format( self.__class__.__name__)) # The handle is dealloced while open. Let's try to close it. # Situations when this is possible include unhandled exceptions, # errors during Handle.__cinit__/__init__ etc. if self._inited: self._handle.data = NULL uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors self._handle = NULL self._warn_unclosed() else: # The handle was allocated, but not initialized self._closed = 1 self._free() cdef inline _free(self): if self._handle == NULL: return if UVLOOP_DEBUG: self._loop._debug_uv_handles_freed += 1 PyMem_RawFree(self._handle) self._handle = NULL cdef _warn_unclosed(self): if self._source_traceback is not None: tb = ''.join(tb_format_list(self._source_traceback)) tb = 'object created at (most recent call last):\n{}'.format( tb.rstrip()) msg = 'unclosed resource {!r}; {}'.format(self, tb) else: msg = 'unclosed resource {!r}'.format(self) warnings_warn(msg, ResourceWarning) cdef inline _abort_init(self): if self._handle is not NULL: self._free() if UVLOOP_DEBUG: name = self.__class__.__name__ if self._inited: raise RuntimeError( '_abort_init: {}._inited is set'.format(name)) if self._closed: raise RuntimeError( '_abort_init: {}._closed is set'.format(name)) self._closed = 1 cdef inline _finish_init(self): self._inited = 1 self._handle.data = self if self._loop._debug: self._source_traceback = tb_extract_stack(sys_getframe(0)) if UVLOOP_DEBUG: self._loop._debug_uv_handles_total += 1 cdef inline _start_init(self, Loop loop): if UVLOOP_DEBUG: if self._loop is not None: raise RuntimeError( '{}._start_init can only be called once'.format( self.__class__.__name__)) cls_name = self.__class__.__name__ loop._debug_handles_total.update([cls_name]) loop._debug_handles_current.update([cls_name]) self._loop = loop cdef inline bint _is_alive(self): cdef bint res res = self._closed != 1 and self._inited == 1 if UVLOOP_DEBUG: if res: name = self.__class__.__name__ if self._handle is NULL: raise RuntimeError( '{} is alive, but _handle is NULL'.format(name)) if self._loop is None: raise RuntimeError( '{} is alive, but _loop is None'.format(name)) if self._handle.loop is not self._loop.uvloop: raise RuntimeError( '{} is alive, but _handle.loop is not ' 'initialized'.format(name)) if self._handle.data is not self: raise RuntimeError( '{} is alive, but _handle.data is not ' 'initialized'.format(name)) return res cdef inline _ensure_alive(self): if not self._is_alive(): raise RuntimeError( 'unable to perform operation on {!r}; ' 'the handler is closed'.format(self)) cdef _fatal_error(self, exc, throw, reason=None): # Fatal error means an error that was returned by the # underlying libuv handle function. We usually can't # recover from that, hence we just close the handle. self._close() if throw or self._loop is None: raise exc else: self._loop._handle_exception(exc) cdef _error(self, exc, throw): # A non-fatal error is usually an error that was caught # by the handler, but was originated in the client code # (not in libuv). In this case we either want to simply # raise or log it. if throw or self._loop is None: raise exc else: self._loop._handle_exception(exc) cdef _close(self): if self._closed == 1: return self._closed = 1 if self._handle is NULL: return if UVLOOP_DEBUG: if self._handle.data is NULL: raise RuntimeError( '{}._close: _handle.data is NULL'.format( self.__class__.__name__)) if self._handle.data is not self: raise RuntimeError( '{}._close: _handle.data is not UVHandle/self'.format( self.__class__.__name__)) if uv.uv_is_closing(self._handle): raise RuntimeError( '{}._close: uv_is_closing() is true'.format( self.__class__.__name__)) # We want the handle wrapper (UVHandle) to stay alive until # the closing callback fires. Py_INCREF(self) uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors def __repr__(self): return '<{} closed={} {:#x}>'.format( self.__class__.__name__, self._closed, id(self)) @cython.no_gc_clear cdef class UVSocketHandle(UVHandle): def __cinit__(self): self._fileobj = None self.__cached_socket = None cdef inline _fileno(self): cdef: int fd int err self._ensure_alive() err = uv.uv_fileno(self._handle, &fd) if err < 0: raise convert_error(err) return fd cdef _new_socket(self): raise NotImplementedError cdef inline _get_socket(self): if self.__cached_socket is not None: return self.__cached_socket if not self._is_alive(): return None self.__cached_socket = self._new_socket() if UVLOOP_DEBUG: # We don't "dup" for the "__cached_socket". assert self.__cached_socket.fileno() == self._fileno() return self.__cached_socket cdef inline _attach_fileobj(self, object file): # When we create a TCP/PIPE/etc connection/server based on # a Python file object, we need to close the file object when # the uv handle is closed. self._fileobj = file cdef _close(self): try: if self.__cached_socket is not None: self.__cached_socket.detach() self.__cached_socket = None if self._fileobj is not None: try: self._fileobj.close() except Exception as exc: self._loop.call_exception_handler({ 'exception': exc, 'transport': self, 'message': 'could not close attached file object {!r}'. format(self._fileobj) }) finally: self._fileobj = None finally: UVHandle._close(self) cdef _open(self, int sockfd): raise NotImplementedError cdef inline bint __ensure_handle_data(uv.uv_handle_t* handle, const char* handle_ctx): cdef Loop loop if UVLOOP_DEBUG: if handle.loop is NULL: raise RuntimeError( 'handle.loop is NULL in __ensure_handle_data') if handle.loop.data is NULL: raise RuntimeError( 'handle.loop.data is NULL in __ensure_handle_data') if handle.data is NULL: loop = handle.loop.data loop.call_exception_handler({ 'message': '{} called with handle.data == NULL'.format( handle_ctx.decode('latin-1')) }) return 0 if handle.data is NULL: # The underlying UVHandle object was GCed with an open uv_handle_t. loop = handle.loop.data loop.call_exception_handler({ 'message': '{} called after destroying the UVHandle'.format( handle_ctx.decode('latin-1')) }) return 0 return 1 cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) with gil: cdef UVHandle h if handle.data is NULL: # The original UVHandle is long dead. Just free the mem of # the uv_handle_t* handler. if UVLOOP_DEBUG: if handle.loop == NULL or handle.loop.data == NULL: raise RuntimeError( '__uv_close_handle_cb: handle.loop is invalid') (handle.loop.data)._debug_uv_handles_freed += 1 PyMem_RawFree(handle) else: h = handle.data if UVLOOP_DEBUG: h._loop._debug_handles_closed.update([ h.__class__.__name__]) h._free() Py_DECREF(h) # Was INCREFed in UVHandle._close cdef void __close_all_handles(Loop loop): uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void cdef void __uv_walk_close_all_handles_cb(uv.uv_handle_t* handle, void* arg) with gil: cdef: Loop loop = arg UVHandle h if uv.uv_is_closing(handle): # The handle is closed or is closing. return if handle.data is NULL: # This shouldn't happen. Ever. loop.call_exception_handler({ 'message': 'handle.data is NULL in __close_all_handles_cb' }) return h = handle.data if not h._closed: h._warn_unclosed() h._close() uvloop-0.8.1/uvloop/handles/timer.pxd0000664000372000037200000000060713156036740020515 0ustar travistravis00000000000000cdef class UVTimer(UVHandle): cdef: method_t callback object ctx bint running uint64_t timeout cdef _init(self, Loop loop, method_t callback, object ctx, uint64_t timeout) cdef stop(self) cdef start(self) @staticmethod cdef UVTimer new(Loop loop, method_t callback, object ctx, uint64_t timeout) uvloop-0.8.1/uvloop/handles/check.pyx0000664000372000037200000000355013156036740020477 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVCheck(UVHandle): cdef _init(self, Loop loop, Handle h): cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_check_t)) if self._handle is NULL: self._abort_init() raise MemoryError() err = uv.uv_check_init(self._loop.uvloop, self._handle) if err < 0: self._abort_init() raise convert_error(err) self._finish_init() self.h = h self.running = 0 cdef inline stop(self): cdef int err if not self._is_alive(): self.running = 0 return if self.running == 1: err = uv.uv_check_stop(self._handle) self.running = 0 if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return cdef inline start(self): cdef int err self._ensure_alive() if self.running == 0: err = uv.uv_check_start(self._handle, cb_check_callback) if err < 0: exc = convert_error(err) self._fatal_error(exc, True) return self.running = 1 @staticmethod cdef UVCheck new(Loop loop, Handle h): cdef UVCheck handle handle = UVCheck.__new__(UVCheck) handle._init(loop, h) return handle cdef void cb_check_callback(uv.uv_check_t* handle) with gil: if __ensure_handle_data(handle, "UVCheck callback") == 0: return cdef: UVCheck check = handle.data Handle h = check.h try: h._run() except BaseException as ex: check._error(ex, False) uvloop-0.8.1/uvloop/handles/tcp.pyx0000664000372000037200000001520613156036740020211 0ustar travistravis00000000000000cdef __tcp_init_uv_handle(UVStream handle, Loop loop, unsigned int flags): cdef int err handle._handle = \ PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) if handle._handle is NULL: handle._abort_init() raise MemoryError() err = uv.uv_tcp_init_ex(handle._loop.uvloop, handle._handle, flags) if err < 0: handle._abort_init() raise convert_error(err) handle._finish_init() cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): cdef int err err = uv.uv_tcp_bind(handle._handle, addr, flags) if err < 0: exc = convert_error(err) raise exc cdef __tcp_open(UVStream handle, int sockfd): cdef int err err = uv.uv_tcp_open(handle._handle, sockfd) if err < 0: exc = convert_error(err) raise exc cdef __tcp_get_socket(UVSocketHandle handle): cdef: int buf_len = sizeof(system.sockaddr_storage) int fileno int err system.sockaddr_storage buf fileno = handle._fileno() err = uv.uv_tcp_getsockname(handle._handle, &buf, &buf_len) if err < 0: raise convert_error(err) return socket_socket(buf.ss_family, uv.SOCK_STREAM, 0, fileno) @cython.no_gc_clear cdef class TCPServer(UVStreamServer): @staticmethod cdef TCPServer new(Loop loop, object protocol_factory, Server server, object ssl, unsigned int flags): cdef TCPServer handle handle = TCPServer.__new__(TCPServer) handle._init(loop, protocol_factory, server, ssl) __tcp_init_uv_handle(handle, loop, flags) return handle cdef _new_socket(self): return __tcp_get_socket(self) cdef _open(self, int sockfd): self._ensure_alive() try: __tcp_open(self, sockfd) except Exception as exc: self._fatal_error(exc, True) else: self._mark_as_open() cdef bind(self, system.sockaddr* addr, unsigned int flags=0): self._ensure_alive() try: __tcp_bind(self, addr, flags) except Exception as exc: self._fatal_error(exc, True) else: self._mark_as_open() cdef UVStream _make_new_transport(self, object protocol, object waiter): cdef TCPTransport tr tr = TCPTransport.new(self._loop, protocol, self._server, waiter) return tr @cython.no_gc_clear cdef class TCPTransport(UVStream): @staticmethod cdef TCPTransport new(Loop loop, object protocol, Server server, object waiter): cdef TCPTransport handle handle = TCPTransport.__new__(TCPTransport) handle._init(loop, protocol, server, waiter) __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) handle.__peername_set = 0 handle.__sockname_set = 0 return handle cdef _call_connection_made(self): # asyncio saves peername & sockname when transports are instantiated, # so that they're accessible even after the transport is closed. # We are doing the same thing here, except that we create Python # objects lazily, on request in get_extra_info() cdef: int err int buf_len buf_len = sizeof(system.sockaddr_storage) err = uv.uv_tcp_getsockname(self._handle, &self.__sockname, &buf_len) if err >= 0: # Ignore errors, this is an optional thing. # If something serious is going on, the transport # will crash later (in roughly the same way how # an asyncio transport would.) self.__sockname_set = 1 buf_len = sizeof(system.sockaddr_storage) err = uv.uv_tcp_getpeername(self._handle, &self.__peername, &buf_len) if err >= 0: # Same as few lines above -- we don't really care # about error case here. self.__peername_set = 1 UVBaseTransport._call_connection_made(self) def get_extra_info(self, name, default=None): if name == 'sockname': if self.__sockname_set: return __convert_sockaddr_to_pyaddr( &self.__sockname) elif name == 'peername': if self.__peername_set: return __convert_sockaddr_to_pyaddr( &self.__peername) return super().get_extra_info(name, default) cdef _new_socket(self): return __tcp_get_socket(self) cdef bind(self, system.sockaddr* addr, unsigned int flags=0): self._ensure_alive() __tcp_bind(self, addr, flags) cdef _open(self, int sockfd): self._ensure_alive() __tcp_open(self, sockfd) cdef connect(self, system.sockaddr* addr): cdef _TCPConnectRequest req req = _TCPConnectRequest(self._loop, self) req.connect(addr) cdef class _TCPConnectRequest(UVRequest): cdef: TCPTransport transport def __cinit__(self, loop, transport): self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) if self.request is NULL: self.on_done() raise MemoryError() self.request.data = self self.transport = transport cdef connect(self, system.sockaddr* addr): cdef int err err = uv.uv_tcp_connect(self.request, self.transport._handle, addr, __tcp_connect_callback) if err < 0: exc = convert_error(err) self.on_done() raise exc cdef void __tcp_connect_callback(uv.uv_connect_t* req, int status) with gil: cdef: _TCPConnectRequest wrapper TCPTransport transport wrapper = <_TCPConnectRequest> req.data transport = wrapper.transport if status < 0: exc = convert_error(status) else: exc = None try: transport._on_connect(exc) except BaseException as ex: wrapper.transport._error(ex, False) finally: wrapper.on_done() uvloop-0.8.1/uvloop/handles/process.pyx0000664000372000037200000005606413156036740021110 0ustar travistravis00000000000000@cython.no_gc_clear cdef class UVProcess(UVHandle): """Abstract class; wrapper over uv_process_t handle.""" def __cinit__(self): self.uv_opt_env = NULL self.uv_opt_args = NULL self._returncode = None self._pid = None self._fds_to_close = set() self._preexec_fn = None self._restore_signals = True cdef _init(self, Loop loop, list args, dict env, cwd, start_new_session, _stdin, _stdout, _stderr, # std* can be defined as macros in C pass_fds, debug_flags, preexec_fn, restore_signals): global __forking global __forking_loop cdef int err self._start_init(loop) self._handle = \ PyMem_RawMalloc(sizeof(uv.uv_process_t)) if self._handle is NULL: self._abort_init() raise MemoryError() # Too early to call _finish_init, but still a lot of work to do. # Let's set handle.data to NULL, so in case something goes wrong, # callbacks have a chance to avoid casting *something* into UVHandle. self._handle.data = NULL try: self._init_options(args, env, cwd, start_new_session, _stdin, _stdout, _stderr) restore_inheritable = set() if pass_fds: for fd in pass_fds: if not os_get_inheritable(fd): restore_inheritable.add(fd) os_set_inheritable(fd, True) except: self._abort_init() raise if __forking or loop.active_process_handler is not None: # Our pthread_atfork handlers won't work correctly when # another loop is forking in another thread (even though # GIL should help us to avoid that.) self._abort_init() raise RuntimeError( 'Racing with another loop to spawn a process.') self._errpipe_read, self._errpipe_write = os_pipe() try: os_set_inheritable(self._errpipe_write, True) self._preexec_fn = preexec_fn self._restore_signals = restore_signals loop.active_process_handler = self __forking = 1 __forking_loop = loop _PyImport_AcquireLock() err = uv.uv_spawn(loop.uvloop, self._handle, &self.options) __forking = 0 __forking_loop = None loop.active_process_handler = None if _PyImport_ReleaseLock() < 0: # See CPython/posixmodule.c for details self._abort_init() raise RuntimeError('not holding the import lock') if err < 0: self._abort_init() raise convert_error(err) self._finish_init() os_close(self._errpipe_write) if preexec_fn is not None: errpipe_data = bytearray() while True: # XXX: This is a blocking code that has to be # rewritten (using loop.connect_read_pipe() or # otherwise.) part = os_read(self._errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: os_close(self._errpipe_read) try: os_close(self._errpipe_write) except OSError: # Might be already closed pass # asyncio caches the PID in BaseSubprocessTransport, # so that the transport knows what the PID was even # after the process is finished. self._pid = (self._handle).pid for fd in restore_inheritable: os_set_inheritable(fd, False) fds_to_close = self._fds_to_close self._fds_to_close = None for fd in fds_to_close: os_close(fd) if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: time_sleep(1) if preexec_fn is not None and errpipe_data: # preexec_fn has raised an exception. The child # process must be dead now. try: exc_name, exc_msg = errpipe_data.split(b':', 1) exc_name = exc_name.decode() exc_msg = exc_msg.decode() except: self._close() raise subprocess_SubprocessError( 'Bad exception data from child: {!r}'.format( errpipe_data)) exc_cls = getattr(__builtins__, exc_name, subprocess_SubprocessError) exc = subprocess_SubprocessError( 'Exception occurred in preexec_fn.') exc.__cause__ = exc_cls(exc_msg) self._close() raise exc cdef _after_fork(self): # See CPython/_posixsubprocess.c for details if self._restore_signals: _Py_RestoreSignals() if self._preexec_fn is not None: PyOS_AfterFork() try: gc_disable() self._preexec_fn() except BaseException as ex: try: with open(self._errpipe_write, 'wb') as f: f.write(str(ex.__class__.__name__).encode()) f.write(b':') f.write(str(ex.args[0]).encode()) finally: system._exit(255) else: os_close(self._errpipe_write) else: os_close(self._errpipe_write) cdef _close_after_spawn(self, int fd): if self._fds_to_close is None: raise RuntimeError( 'UVProcess._close_after_spawn called after uv_spawn') self._fds_to_close.add(fd) def __dealloc__(self): if self.uv_opt_env is not NULL: PyMem_RawFree(self.uv_opt_env) self.uv_opt_env = NULL if self.uv_opt_args is not NULL: PyMem_RawFree(self.uv_opt_args) self.uv_opt_args = NULL cdef char** __to_cstring_array(self, list arr): cdef: int i int arr_len = len(arr) bytes el char **ret if UVLOOP_DEBUG: assert arr_len > 0 ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) if ret is NULL: raise MemoryError() for i in range(arr_len): el = arr[i] # NB: PyBytes_AsSptring doesn't copy the data; # we have to be careful when the "arr" is GCed, # and it shouldn't be ever mutated. ret[i] = PyBytes_AsString(el) ret[arr_len] = NULL return ret cdef _init_options(self, list args, dict env, cwd, start_new_session, _stdin, _stdout, _stderr): memset(&self.options, 0, sizeof(uv.uv_process_options_t)) self._init_env(env) self.options.env = self.uv_opt_env self._init_args(args) self.options.file = self.uv_opt_file self.options.args = self.uv_opt_args if start_new_session: self.options.flags |= uv.UV_PROCESS_DETACHED if cwd is not None: if isinstance(cwd, str): cwd = PyUnicode_EncodeFSDefault(cwd) if not isinstance(cwd, bytes): raise ValueError('cwd must be a str or bytes object') self.__cwd = cwd self.options.cwd = PyBytes_AsString(self.__cwd) self.options.exit_cb = &__uvprocess_on_exit_callback self._init_files(_stdin, _stdout, _stderr) cdef _init_args(self, list args): cdef: bytes path int an = len(args) if an < 1: raise ValueError('cannot spawn a process: args are empty') self.__args = args.copy() for i in range(an): arg = args[i] if isinstance(arg, str): self.__args[i] = PyUnicode_EncodeFSDefault(arg) elif not isinstance(arg, bytes): raise TypeError('all args must be str or bytes') path = self.__args[0] self.uv_opt_file = PyBytes_AsString(path) self.uv_opt_args = self.__to_cstring_array(self.__args) cdef _init_env(self, dict env): if env is not None and len(env): self.__env = list() for key in env: val = env[key] if isinstance(key, str): key = PyUnicode_EncodeFSDefault(key) elif not isinstance(key, bytes): raise TypeError( 'all environment vars must be bytes or str') if isinstance(val, str): val = PyUnicode_EncodeFSDefault(val) elif not isinstance(val, bytes): raise TypeError( 'all environment values must be bytes or str') self.__env.append(key + b'=' + val) self.uv_opt_env = self.__to_cstring_array(self.__env) else: self.__env = None cdef _init_files(self, _stdin, _stdout, _stderr): self.options.stdio_count = 0 cdef _kill(self, int signum): cdef int err self._ensure_alive() err = uv.uv_process_kill(self._handle, signum) if err < 0: raise convert_error(err) cdef _on_exit(self, int64_t exit_status, int term_signal): if term_signal: # From Python docs: # A negative value -N indicates that the child was # terminated by signal N (POSIX only). self._returncode = -term_signal else: self._returncode = exit_status self._close() DEF _CALL_PIPE_DATA_RECEIVED = 0 DEF _CALL_PIPE_CONNECTION_LOST = 1 DEF _CALL_PROCESS_EXITED = 2 DEF _CALL_CONNECTION_LOST = 3 @cython.no_gc_clear cdef class UVProcessTransport(UVProcess): def __cinit__(self): self._exit_waiters = [] self._protocol = None self._init_futs = [] self._pending_calls = [] self._stdio_ready = 0 self._stdin = self._stdout = self._stderr = None self.stdin_proto = self.stdout_proto = self.stderr_proto = None self._finished = 0 cdef _on_exit(self, int64_t exit_status, int term_signal): UVProcess._on_exit(self, exit_status, term_signal) if self._stdio_ready: self._loop.call_soon(self._protocol.process_exited) else: self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) self._try_finish() for waiter in self._exit_waiters: if not waiter.cancelled(): waiter.set_result(self._returncode) self._exit_waiters.clear() cdef _check_proc(self): if not self._is_alive() or self._returncode is not None: raise ProcessLookupError() cdef _pipe_connection_lost(self, int fd, exc): if self._stdio_ready: self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) self._try_finish() else: self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) cdef _pipe_data_received(self, int fd, data): if self._stdio_ready: self._loop.call_soon(self._protocol.pipe_data_received, fd, data) else: self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) cdef _file_redirect_stdio(self, int fd): fd = os_dup(fd) os_set_inheritable(fd, True) self._close_after_spawn(fd) return fd cdef _file_devnull(self): dn = os_open(os_devnull, os_O_RDWR) os_set_inheritable(dn, True) self._close_after_spawn(dn) return dn cdef _file_outpipe(self): r, w = __socketpair() os_set_inheritable(w, True) self._close_after_spawn(w) return r, w cdef _file_inpipe(self): r, w = __socketpair() os_set_inheritable(r, True) self._close_after_spawn(r) return r, w cdef _init_files(self, _stdin, _stdout, _stderr): cdef uv.uv_stdio_container_t *iocnt UVProcess._init_files(self, _stdin, _stdout, _stderr) io = [None, None, None] self.options.stdio_count = 3 self.options.stdio = self.iocnt if _stdin is not None: if _stdin == subprocess_PIPE: r, w = self._file_inpipe() io[0] = r self.stdin_proto = WriteSubprocessPipeProto(self, 0) waiter = self._loop._new_future() self._stdin = WriteUnixTransport.new( self._loop, self.stdin_proto, None, waiter) self._init_futs.append(waiter) self._stdin._open(w) self._stdin._init_protocol() elif _stdin == subprocess_DEVNULL: io[0] = self._file_devnull() elif _stdout == subprocess_STDOUT: raise ValueError( 'subprocess.STDOUT is supported only by stderr parameter') else: raise ValueError( 'invalid stdin argument value {!r}'.format(_stdin)) else: io[0] = self._file_redirect_stdio(sys.stdin.fileno()) if _stdout is not None: if _stdout == subprocess_PIPE: # We can't use UV_CREATE_PIPE here, since 'stderr' might be # set to 'subprocess.STDOUT', and there is no way to # emulate that functionality with libuv high-level # streams API. Therefore, we create pipes for stdout and # stderr manually. r, w = self._file_outpipe() io[1] = w self.stdout_proto = ReadSubprocessPipeProto(self, 1) waiter = self._loop._new_future() self._stdout = ReadUnixTransport.new( self._loop, self.stdout_proto, None, waiter) self._init_futs.append(waiter) self._stdout._open(r) self._stdout._init_protocol() elif _stdout == subprocess_DEVNULL: io[1] = self._file_devnull() elif _stdout == subprocess_STDOUT: raise ValueError( 'subprocess.STDOUT is supported only by stderr parameter') else: raise ValueError( 'invalid stdout argument value {!r}'.format(_stdout)) else: io[1] = self._file_redirect_stdio(sys.stdout.fileno()) if _stderr is not None: if _stderr == subprocess_PIPE: r, w = self._file_outpipe() io[2] = w self.stderr_proto = ReadSubprocessPipeProto(self, 2) waiter = self._loop._new_future() self._stderr = ReadUnixTransport.new( self._loop, self.stderr_proto, None, waiter) self._init_futs.append(waiter) self._stderr._open(r) self._stderr._init_protocol() elif _stderr == subprocess_STDOUT: if io[1] is None: # shouldn't ever happen raise RuntimeError('cannot apply subprocess.STDOUT') newfd = os_dup(io[1]) os_set_inheritable(newfd, True) self._close_after_spawn(newfd) io[2] = newfd elif _stderr == subprocess_DEVNULL: io[2] = self._file_devnull() else: raise ValueError( 'invalid stderr argument value {!r}'.format(_stderr)) else: io[2] = self._file_redirect_stdio(sys.stderr.fileno()) assert len(io) == 3 for idx in range(3): if io[idx] is not None: iocnt = &self.iocnt[idx] iocnt.flags = uv.UV_INHERIT_FD iocnt.data.fd = io[idx] cdef _call_connection_made(self, waiter): try: self._protocol.connection_made(self) except Exception as ex: if waiter is not None and not waiter.cancelled(): waiter.set_exception(ex) else: raise else: if waiter is not None and not waiter.cancelled(): waiter.set_result(True) self._stdio_ready = 1 if self._pending_calls: pending_calls = self._pending_calls.copy() self._pending_calls.clear() for (type, fd, arg) in pending_calls: if type == _CALL_PIPE_CONNECTION_LOST: self._pipe_connection_lost(fd, arg) elif type == _CALL_PIPE_DATA_RECEIVED: self._pipe_data_received(fd, arg) elif type == _CALL_PROCESS_EXITED: self._loop.call_soon(self._protocol.process_exited) elif type == _CALL_CONNECTION_LOST: self._loop.call_soon(self._protocol.connection_lost, None) cdef _try_finish(self): if self._returncode is None or self._finished: return if ((self.stdin_proto is None or self.stdin_proto.disconnected) and (self.stdout_proto is None or self.stdout_proto.disconnected) and (self.stderr_proto is None or self.stderr_proto.disconnected)): self._finished = 1 if self._stdio_ready: self._loop.call_soon(self._protocol.connection_lost, None) else: self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) def __stdio_inited(self, waiter, stdio_fut): exc = stdio_fut.exception() if exc is not None: if waiter is None: raise exc else: waiter.set_exception(exc) else: self._loop._call_soon_handle( new_MethodHandle1(self._loop, "UVProcessTransport._call_connection_made", self._call_connection_made, self, waiter)) @staticmethod cdef UVProcessTransport new(Loop loop, protocol, args, env, cwd, start_new_session, _stdin, _stdout, _stderr, pass_fds, waiter, debug_flags, preexec_fn, restore_signals): cdef UVProcessTransport handle handle = UVProcessTransport.__new__(UVProcessTransport) handle._protocol = protocol handle._init(loop, args, env, cwd, start_new_session, __process_convert_fileno(_stdin), __process_convert_fileno(_stdout), __process_convert_fileno(_stderr), pass_fds, debug_flags, preexec_fn, restore_signals) if handle._init_futs: handle._stdio_ready = 0 init_fut = aio_gather(*handle._init_futs, loop=loop) init_fut.add_done_callback( ft_partial(handle.__stdio_inited, waiter)) else: handle._stdio_ready = 1 loop._call_soon_handle( new_MethodHandle1(loop, "UVProcessTransport._call_connection_made", handle._call_connection_made, handle, waiter)) return handle def get_protocol(self): return self._protocol def set_protocol(self, protocol): self._protocol = protocol def get_pid(self): return self._pid def get_returncode(self): return self._returncode def get_pipe_transport(self, fd): if fd == 0: return self._stdin elif fd == 1: return self._stdout elif fd == 2: return self._stderr def terminate(self): self._check_proc() self._kill(uv.SIGTERM) def kill(self): self._check_proc() self._kill(uv.SIGKILL) def send_signal(self, int signal): self._check_proc() self._kill(signal) def is_closing(self): return self._closed def close(self): if self._returncode is None: self._kill(uv.SIGKILL) if self._stdin is not None: self._stdin.close() if self._stdout is not None: self._stdout.close() if self._stderr is not None: self._stderr.close() self._close() def get_extra_info(self, name, default=None): return default def _wait(self): fut = self._loop._new_future() if self._returncode is not None: fut.set_result(self._returncode) return fut self._exit_waiters.append(fut) return fut class WriteSubprocessPipeProto(aio_BaseProtocol): def __init__(self, proc, fd): if UVLOOP_DEBUG: if type(proc) is not UVProcessTransport: raise TypeError if not isinstance(fd, int): raise TypeError self.proc = proc self.fd = fd self.pipe = None self.disconnected = False def connection_made(self, transport): self.pipe = transport def __repr__(self): return ('<%s fd=%s pipe=%r>' % (self.__class__.__name__, self.fd, self.pipe)) def connection_lost(self, exc): self.disconnected = True (self.proc)._pipe_connection_lost(self.fd, exc) self.proc = None def pause_writing(self): (self.proc)._protocol.pause_writing() def resume_writing(self): (self.proc)._protocol.resume_writing() class ReadSubprocessPipeProto(WriteSubprocessPipeProto, aio_Protocol): def data_received(self, data): (self.proc)._pipe_data_received(self.fd, data) cdef __process_convert_fileno(object obj): if obj is None or isinstance(obj, int): return obj fileno = obj.fileno() if not isinstance(fileno, int): raise TypeError( '{!r}.fileno() returned non-integer'.format(obj)) return fileno cdef void __uvprocess_on_exit_callback(uv.uv_process_t *handle, int64_t exit_status, int term_signal) with gil: if __ensure_handle_data(handle, "UVProcess exit callback") == 0: return cdef UVProcess proc = handle.data try: proc._on_exit(exit_status, term_signal) except BaseException as ex: proc._error(ex, False) cdef __socketpair(): cdef: int fds[2] int err err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) if err: exc = convert_error(-err) raise exc os_set_inheritable(fds[0], False) os_set_inheritable(fds[1], False) return fds[0], fds[1] uvloop-0.8.1/uvloop/includes/0000775000372000037200000000000013156037661017050 5ustar travistravis00000000000000uvloop-0.8.1/uvloop/includes/stdlib.pxi0000664000372000037200000001117113156036740021051 0ustar travistravis00000000000000import asyncio, asyncio.log, asyncio.base_events, \ asyncio.sslproto, asyncio.coroutines, \ asyncio.futures import collections import concurrent.futures import errno import functools import gc import inspect import itertools import os import signal as std_signal import socket import subprocess import ssl import sys import threading import traceback import time import warnings import weakref cdef aio_get_event_loop = asyncio.get_event_loop cdef aio_CancelledError = asyncio.CancelledError cdef aio_InvalidStateError = asyncio.InvalidStateError cdef aio_TimeoutError = asyncio.TimeoutError cdef aio_Future = asyncio.Future cdef aio_Task = asyncio.Task cdef aio_ensure_future = asyncio.ensure_future cdef aio_gather = asyncio.gather cdef aio_wait = asyncio.wait cdef aio_logger = asyncio.log.logger cdef aio_iscoroutine = asyncio.iscoroutine cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction cdef aio_BaseProtocol = asyncio.BaseProtocol cdef aio_Protocol = asyncio.Protocol cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper cdef aio_isfuture = getattr(asyncio, 'isfuture', None) cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) cdef col_deque = collections.deque cdef col_Iterable = collections.Iterable cdef col_Counter = collections.Counter cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor cdef cc_Future = concurrent.futures.Future cdef errno_EINVAL = errno.EINVAL cdef ft_partial = functools.partial cdef gc_disable = gc.disable cdef iter_chain = itertools.chain cdef inspect_isgenerator = inspect.isgenerator cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT') cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0) cdef socket_gaierror = socket.gaierror cdef socket_error = socket.error cdef socket_timeout = socket.timeout cdef socket_socket = socket.socket cdef socket_socketpair = socket.socketpair cdef socket_getservbyname = socket.getservbyname cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1) cdef str os_name = os.name cdef os_environ = os.environ cdef os_dup = os.dup cdef os_set_inheritable = os.set_inheritable cdef os_get_inheritable = os.get_inheritable cdef os_close = os.close cdef os_open = os.open cdef os_devnull = os.devnull cdef os_O_RDWR = os.O_RDWR cdef os_pipe = os.pipe cdef os_read = os.read cdef sys_ignore_environment = sys.flags.ignore_environment cdef sys_exc_info = sys.exc_info cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper cdef sys_getframe = sys._getframe cdef ssl_SSLContext = ssl.SSLContext cdef long MAIN_THREAD_ID = threading.main_thread().ident cdef int subprocess_PIPE = subprocess.PIPE cdef int subprocess_STDOUT = subprocess.STDOUT cdef int subprocess_DEVNULL = subprocess.DEVNULL cdef subprocess_SubprocessError = subprocess.SubprocessError cdef int signal_NSIG = std_signal.NSIG cdef signal_signal = std_signal.signal cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd cdef signal_default_int_handler = std_signal.default_int_handler cdef signal_SIG_DFL = std_signal.SIG_DFL cdef time_sleep = time.sleep cdef time_monotonic = time.monotonic cdef tb_extract_stack = traceback.extract_stack cdef tb_format_list = traceback.format_list cdef warnings_warn = warnings.warn cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary cdef weakref_WeakSet = weakref.WeakSet # Cython doesn't clean-up imported objects properly in Py3 mode, # so we delete refs to all modules manually (except sys) del asyncio, concurrent, collections, errno del functools, inspect, itertools, socket, os, threading del std_signal, subprocess, ssl del time, traceback, warnings, weakref uvloop-0.8.1/uvloop/includes/debug.pxd0000664000372000037200000000007513156036740020652 0ustar travistravis00000000000000cdef extern from "includes/debug.h": cdef int UVLOOP_DEBUG uvloop-0.8.1/uvloop/includes/uv.pxd0000664000372000037200000003450513156036740020223 0ustar travistravis00000000000000from libc.stdint cimport uint16_t, uint32_t, uint64_t, int64_t from posix.types cimport gid_t, uid_t from . cimport system cdef extern from "includes/compat.h": # Member of uv_poll_event, in compat.h for compatibility # with libuv < v1.9.0 cdef int UV_DISCONNECT cdef extern from "uv.h" nogil: cdef int UV_TCP_IPV6ONLY cdef int UV_EACCES cdef int UV_EAGAIN cdef int UV_EALREADY cdef int UV_EBUSY cdef int UV_ECONNABORTED cdef int UV_ECONNREFUSED cdef int UV_ECONNRESET cdef int UV_ECANCELED cdef int UV_EEXIST cdef int UV_EINTR cdef int UV_EINVAL cdef int UV_EISDIR cdef int UV_ENOENT cdef int UV_EOF cdef int UV_EPERM cdef int UV_EPIPE cdef int UV_ESHUTDOWN cdef int UV_ESRCH cdef int UV_ETIMEDOUT cdef int UV_EBADF cdef int UV_EAI_ADDRFAMILY cdef int UV_EAI_AGAIN cdef int UV_EAI_BADFLAGS cdef int UV_EAI_BADHINTS cdef int UV_EAI_CANCELED cdef int UV_EAI_FAIL cdef int UV_EAI_FAMILY cdef int UV_EAI_MEMORY cdef int UV_EAI_NODATA cdef int UV_EAI_NONAME cdef int UV_EAI_OVERFLOW cdef int UV_EAI_PROTOCOL cdef int UV_EAI_SERVICE cdef int UV_EAI_SOCKTYPE cdef int SOL_SOCKET cdef int SO_ERROR cdef int SO_REUSEADDR cdef int SO_REUSEPORT cdef int AF_INET cdef int AF_INET6 cdef int AF_UNIX cdef int AF_UNSPEC cdef int AI_PASSIVE cdef int AI_NUMERICHOST cdef int INET6_ADDRSTRLEN cdef int IPPROTO_IPV6 cdef int SOCK_STREAM cdef int SOCK_DGRAM cdef int IPPROTO_TCP cdef int IPPROTO_UDP cdef int SIGINT cdef int SIGHUP cdef int SIGKILL cdef int SIGTERM ctypedef int uv_os_sock_t ctypedef int uv_file ctypedef int uv_os_fd_t ctypedef struct uv_buf_t: char* base size_t len ctypedef struct uv_loop_t: void* data # ... ctypedef struct uv_handle_t: void* data uv_loop_t* loop # ... ctypedef struct uv_idle_t: void* data uv_loop_t* loop # ... ctypedef struct uv_check_t: void* data uv_loop_t* loop # ... ctypedef struct uv_signal_t: void* data uv_loop_t* loop # ... ctypedef struct uv_async_t: void* data uv_loop_t* loop # ... ctypedef struct uv_timer_t: void* data uv_loop_t* loop # ... ctypedef struct uv_stream_t: void* data size_t write_queue_size uv_loop_t* loop # ... ctypedef struct uv_tcp_t: void* data uv_loop_t* loop # ... ctypedef struct uv_pipe_t: void* data uv_loop_t* loop # ... ctypedef struct uv_udp_t: void* data uv_loop_t* loop size_t send_queue_size size_t send_queue_count # ... ctypedef struct uv_udp_send_t: void* data uv_udp_t* handle ctypedef struct uv_poll_t: void* data uv_loop_t* loop # ... ctypedef struct uv_req_t: # Only cancellation of uv_fs_t, uv_getaddrinfo_t, # uv_getnameinfo_t and uv_work_t requests is # currently supported. void* data uv_req_type type # ... ctypedef struct uv_connect_t: void* data ctypedef struct uv_getaddrinfo_t: void* data # ... ctypedef struct uv_getnameinfo_t: void* data # ... ctypedef struct uv_write_t: void* data # ... ctypedef struct uv_shutdown_t: void* data # ... ctypedef struct uv_process_t: void* data int pid # ... ctypedef enum uv_req_type: UV_UNKNOWN_REQ = 0, UV_REQ, UV_CONNECT, UV_WRITE, UV_SHUTDOWN, UV_UDP_SEND, UV_FS, UV_WORK, UV_GETADDRINFO, UV_GETNAMEINFO, UV_REQ_TYPE_PRIVATE, UV_REQ_TYPE_MAX ctypedef enum uv_run_mode: UV_RUN_DEFAULT = 0, UV_RUN_ONCE, UV_RUN_NOWAIT ctypedef enum uv_poll_event: UV_READABLE = 1, UV_WRITABLE = 2 # UV_DISCONNECT = 4 ; see compat.h for details ctypedef enum uv_udp_flags: UV_UDP_IPV6ONLY = 1, UV_UDP_PARTIAL = 2, UV_UDP_REUSEADDR = 4 ctypedef enum uv_membership: UV_LEAVE_GROUP = 0, UV_JOIN_GROUP const char* uv_strerror(int err) const char* uv_err_name(int err) ctypedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg) with gil ctypedef void (*uv_close_cb)(uv_handle_t* handle) with gil ctypedef void (*uv_idle_cb)(uv_idle_t* handle) with gil ctypedef void (*uv_check_cb)(uv_check_t* handle) with gil ctypedef void (*uv_signal_cb)(uv_signal_t* handle, int signum) with gil ctypedef void (*uv_async_cb)(uv_async_t* handle) with gil ctypedef void (*uv_timer_cb)(uv_timer_t* handle) with gil ctypedef void (*uv_connection_cb)(uv_stream_t* server, int status) with gil ctypedef void (*uv_alloc_cb)(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) with gil ctypedef void (*uv_read_cb)(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) with gil ctypedef void (*uv_write_cb)(uv_write_t* req, int status) with gil ctypedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, int status, system.addrinfo* res) with gil ctypedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, int status, const char* hostname, const char* service) with gil ctypedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status) with gil ctypedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events) with gil ctypedef void (*uv_connect_cb)(uv_connect_t* req, int status) with gil ctypedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status) with gil ctypedef void (*uv_udp_recv_cb)(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf, const system.sockaddr* addr, unsigned flags) with gil # Buffers uv_buf_t uv_buf_init(char* base, unsigned int len) # Generic request functions int uv_cancel(uv_req_t* req) # Generic handler functions void uv_close(uv_handle_t* handle, uv_close_cb close_cb) int uv_is_closing(const uv_handle_t* handle) int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) # Loop functions int uv_loop_init(uv_loop_t* loop) int uv_loop_close(uv_loop_t* loop) int uv_loop_alive(uv_loop_t* loop) int uv_backend_fd(uv_loop_t* loop) void uv_update_time(uv_loop_t* loop) uint64_t uv_now(const uv_loop_t*) int uv_run(uv_loop_t*, uv_run_mode mode) nogil void uv_stop(uv_loop_t*) # Idle handler int uv_idle_init(uv_loop_t*, uv_idle_t* idle) int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb) int uv_idle_stop(uv_idle_t* idle) # Check handler int uv_check_init(uv_loop_t*, uv_check_t* idle) int uv_check_start(uv_check_t* check, uv_check_cb cb) int uv_check_stop(uv_check_t* check) # Signal handler int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) int uv_signal_stop(uv_signal_t* handle) # Async handler int uv_async_init(uv_loop_t*, uv_async_t* async, uv_async_cb async_cb) int uv_async_send(uv_async_t* async) # Timer handler int uv_timer_init(uv_loop_t*, uv_timer_t* handle) int uv_timer_start(uv_timer_t* handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat) int uv_timer_stop(uv_timer_t* handle) # DNS int uv_getaddrinfo(uv_loop_t* loop, uv_getaddrinfo_t* req, uv_getaddrinfo_cb getaddrinfo_cb, const char* node, const char* service, const system.addrinfo* hints) void uv_freeaddrinfo(system.addrinfo* ai) int uv_getnameinfo(uv_loop_t* loop, uv_getnameinfo_t* req, uv_getnameinfo_cb getnameinfo_cb, const system.sockaddr* addr, int flags) int uv_ip4_name(const system.sockaddr_in* src, char* dst, size_t size) int uv_ip6_name(const system.sockaddr_in6* src, char* dst, size_t size) # Streams int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) int uv_accept(uv_stream_t* server, uv_stream_t* client) int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb) int uv_read_stop(uv_stream_t*) int uv_write(uv_write_t* req, uv_stream_t* handle, uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb) int uv_try_write(uv_stream_t* handle, uv_buf_t bufs[], unsigned int nbufs) int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle, uv_shutdown_cb cb) int uv_is_readable(const uv_stream_t* handle) int uv_is_writable(const uv_stream_t* handle) # TCP int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags) int uv_tcp_nodelay(uv_tcp_t* handle, int enable) int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay) int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) int uv_tcp_bind(uv_tcp_t* handle, system.sockaddr* addr, unsigned int flags) int uv_tcp_getsockname(const uv_tcp_t* handle, system.sockaddr* name, int* namelen) int uv_tcp_getpeername(const uv_tcp_t* handle, system.sockaddr* name, int* namelen) int uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle, const system.sockaddr* addr, uv_connect_cb cb) # Pipes int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) int uv_pipe_open(uv_pipe_t* handle, uv_file file) int uv_pipe_bind(uv_pipe_t* handle, const char* name) void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, const char* name, uv_connect_cb cb) # UDP int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) int uv_udp_bind(uv_udp_t* handle, const system.sockaddr* addr, unsigned int flags) int uv_udp_send(uv_udp_send_t* req, uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const system.sockaddr* addr, uv_udp_send_cb send_cb) int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb) int uv_udp_recv_stop(uv_udp_t* handle) int uv_udp_set_broadcast(uv_udp_t* handle, int on) # Polling int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, uv_os_sock_t socket) int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) int uv_poll_stop(uv_poll_t* poll) # Misc ctypedef struct uv_timeval_t: long tv_sec long tv_usec ctypedef struct uv_rusage_t: uv_timeval_t ru_utime # user CPU time used uv_timeval_t ru_stime # system CPU time used uint64_t ru_maxrss # maximum resident set size uint64_t ru_ixrss # integral shared memory size uint64_t ru_idrss # integral unshared data size uint64_t ru_isrss # integral unshared stack size uint64_t ru_minflt # page reclaims (soft page faults) uint64_t ru_majflt # page faults (hard page faults) uint64_t ru_nswap # swaps uint64_t ru_inblock # block input operations uint64_t ru_oublock # block output operations uint64_t ru_msgsnd # IPC messages sent uint64_t ru_msgrcv # IPC messages received uint64_t ru_nsignals # signals received uint64_t ru_nvcsw # voluntary context switches uint64_t ru_nivcsw # involuntary context switches int uv_getrusage(uv_rusage_t* rusage) int uv_ip4_addr(const char* ip, int port, system.sockaddr_in* addr) int uv_ip6_addr(const char* ip, int port, system.sockaddr_in6* addr) # Memory Allocation ctypedef void* (*uv_malloc_func)(size_t size) ctypedef void* (*uv_realloc_func)(void* ptr, size_t size) ctypedef void* (*uv_calloc_func)(size_t count, size_t size) ctypedef void (*uv_free_func)(void* ptr) int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func) # Process ctypedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal) with gil ctypedef enum uv_process_flags: UV_PROCESS_SETUID = 1, UV_PROCESS_SETGID = 2, UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = 4, UV_PROCESS_DETACHED = 8, UV_PROCESS_WINDOWS_HIDE = 16 ctypedef enum uv_stdio_flags: UV_IGNORE = 0x00, UV_CREATE_PIPE = 0x01, UV_INHERIT_FD = 0x02, UV_INHERIT_STREAM = 0x04, UV_READABLE_PIPE = 0x10, UV_WRITABLE_PIPE = 0x20 ctypedef union uv_stdio_container_data_u: uv_stream_t* stream int fd ctypedef struct uv_stdio_container_t: uv_stdio_flags flags uv_stdio_container_data_u data ctypedef struct uv_process_options_t: uv_exit_cb exit_cb char* file char** args char** env char* cwd unsigned int flags int stdio_count uv_stdio_container_t* stdio uid_t uid gid_t gid int uv_spawn(uv_loop_t* loop, uv_process_t* handle, const uv_process_options_t* options) int uv_process_kill(uv_process_t* handle, int signum) uvloop-0.8.1/uvloop/includes/consts.pxi0000664000372000037200000000032513156036740021100 0ustar travistravis00000000000000DEF UV_STREAM_RECV_BUF_SIZE = 256000 # 250kb DEF FLOW_CONTROL_HIGH_WATER = 65536 DEF FLOW_CONTROL_LOW_WATER = 16384 DEF DEFAULT_FREELIST_SIZE = 250 DEF MAX_SIG = 64 DEF __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1 uvloop-0.8.1/uvloop/includes/compat.h0000664000372000037200000000103313156036740020476 0ustar travistravis00000000000000#include #include "uv.h" // uv_poll_event.UV_DISCONNECT is available since libuv v1.9.0 #if UV_VERSION_HEX < 0x10900 #define UV_DISCONNECT 0 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK EAGAIN #endif #ifdef __APPLE__ #define PLATFORM_IS_APPLE 1 #else #define PLATFORM_IS_APPLE 0 #endif #ifdef __linux__ # define PLATFORM_IS_LINUX 1 # include #else # define PLATFORM_IS_LINUX 0 # define EPOLL_CTL_DEL 2 struct epoll_event {}; int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) {}; #endif uvloop-0.8.1/uvloop/includes/__init__.py0000664000372000037200000000051513156036740021157 0ustar travistravis00000000000000# These have to be synced with the stdlib.pxi import asyncio import collections import concurrent.futures import errno import functools import gc import inspect import itertools import os import signal import socket import subprocess import ssl import sys import threading import traceback import time import warnings import weakref uvloop-0.8.1/uvloop/includes/system.pxd0000664000372000037200000000324113156036740021106 0ustar travistravis00000000000000cdef extern from "arpa/inet.h" nogil: int ntohl(int) int htonl(int) int ntohs(int) cdef extern from "sys/socket.h" nogil: struct sockaddr: unsigned short sa_family char sa_data[14] struct addrinfo: int ai_flags int ai_family int ai_socktype int ai_protocol size_t ai_addrlen sockaddr* ai_addr char* ai_canonname addrinfo* ai_next struct sockaddr_in: unsigned short sin_family unsigned short sin_port # ... struct sockaddr_in6: unsigned short sin6_family unsigned short sin6_port unsigned long sin6_flowinfo # ... unsigned long sin6_scope_id struct sockaddr_storage: unsigned short ss_family # ... const char *gai_strerror(int errcode) int socketpair(int domain, int type, int protocol, int socket_vector[2]) int setsockopt(int socket, int level, int option_name, const void *option_value, int option_len) cdef extern from "unistd.h" nogil: ssize_t write(int fd, const void *buf, size_t count) void _exit(int status) cdef extern from "pthread.h" nogil: int pthread_atfork( void (*prepare)() nogil, void (*parent)() nogil, void (*child)() nogil) cdef extern from "includes/compat.h" nogil: cdef int EWOULDBLOCK cdef int PLATFORM_IS_APPLE cdef int PLATFORM_IS_LINUX struct epoll_event: # We don't use the fields pass int EPOLL_CTL_DEL int epoll_ctl(int epfd, int op, int fd, epoll_event *event) uvloop-0.8.1/uvloop/includes/debug.h0000664000372000037200000000006313156036740020303 0ustar travistravis00000000000000#ifndef UVLOOP_DEBUG #define UVLOOP_DEBUG 0 #endif uvloop-0.8.1/uvloop/includes/python.pxd0000664000372000037200000000064413156036740021107 0ustar travistravis00000000000000cdef extern from "Python.h": void* PyMem_RawMalloc(size_t n) void* PyMem_RawRealloc(void *p, size_t n) void* PyMem_RawCalloc(size_t nelem, size_t elsize) # Python >= 3.5! void PyMem_RawFree(void *p) object PyUnicode_EncodeFSDefault(object) void PyErr_SetInterrupt() nogil void PyOS_AfterFork() void _PyImport_AcquireLock() int _PyImport_ReleaseLock() void _Py_RestoreSignals() uvloop-0.8.1/uvloop/errors.pyx0000664000372000037200000000532613156036740017323 0ustar travistravis00000000000000cdef str __strerr(int errno): return strerror(errno).decode() cdef __convert_python_error(int uverr): # XXX Won't work for Windows: # From libuv docs: # Implementation detail: on Unix error codes are the # negated errno (or -errno), while on Windows they # are defined by libuv to arbitrary negative numbers. cdef int oserr = -uverr exc = OSError if uverr in (uv.UV_EACCES, uv.UV_EPERM): exc = PermissionError elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): exc = BlockingIOError elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): exc = BrokenPipeError elif uverr == uv.UV_ECONNABORTED: exc = ConnectionAbortedError elif uverr == uv.UV_ECONNREFUSED: exc = ConnectionRefusedError elif uverr == uv.UV_ECONNRESET: exc = ConnectionResetError elif uverr == uv.UV_EEXIST: exc = FileExistsError elif uverr == uv.UV_ENOENT: exc = FileNotFoundError elif uverr == uv.UV_EINTR: exc = InterruptedError elif uverr == uv.UV_EISDIR: exc = IsADirectoryError elif uverr == uv.UV_ESRCH: exc = ProcessLookupError elif uverr == uv.UV_ETIMEDOUT: exc = TimeoutError return exc(oserr, __strerr(oserr)) cdef int __convert_socket_error(int uverr): cdef int sock_err = 0 if uverr == uv.UV_EAI_ADDRFAMILY: sock_err = socket_EAI_ADDRFAMILY elif uverr == uv.UV_EAI_AGAIN: sock_err = socket_EAI_AGAIN elif uverr == uv.UV_EAI_BADFLAGS: sock_err = socket_EAI_BADFLAGS elif uverr == uv.UV_EAI_BADHINTS: sock_err = socket_EAI_BADHINTS elif uverr == uv.UV_EAI_CANCELED: sock_err = socket_EAI_CANCELED elif uverr == uv.UV_EAI_FAIL: sock_err = socket_EAI_FAIL elif uverr == uv.UV_EAI_FAMILY: sock_err = socket_EAI_FAMILY elif uverr == uv.UV_EAI_MEMORY: sock_err = socket_EAI_MEMORY elif uverr == uv.UV_EAI_NODATA: sock_err = socket_EAI_NODATA elif uverr == uv.UV_EAI_NONAME: sock_err = socket_EAI_NONAME elif uverr == uv.UV_EAI_OVERFLOW: sock_err = socket_EAI_OVERFLOW elif uverr == uv.UV_EAI_PROTOCOL: sock_err = socket_EAI_PROTOCOL elif uverr == uv.UV_EAI_SERVICE: sock_err = socket_EAI_SERVICE elif uverr == uv.UV_EAI_SOCKTYPE: sock_err = socket_EAI_SOCKTYPE return sock_err cdef convert_error(int uverr): cdef int sock_err if uverr == uv.UV_ECANCELED: return aio_CancelledError() sock_err = __convert_socket_error(uverr) if sock_err: msg = system.gai_strerror(sock_err).decode('utf-8') return socket_gaierror(sock_err, msg) return __convert_python_error(uverr) uvloop-0.8.1/uvloop/server.pxd0000664000372000037200000000035413156036740017264 0ustar travistravis00000000000000cdef class Server: cdef: list _servers list _waiters int _active_count Loop _loop cdef _add_server(self, UVStreamServer srv) cdef _wakeup(self) cdef _attach(self) cdef _detach(self) uvloop-0.8.1/uvloop/future.pyx0000664000372000037200000003521313156036740017317 0ustar travistravis00000000000000# LICENSE: PSF. DEF _FUT_PENDING = 1 DEF _FUT_CANCELLED = 2 DEF _FUT_FINISHED = 3 cdef inline _future_get_blocking(fut): try: return fut._asyncio_future_blocking except AttributeError: return fut._blocking cdef inline _future_set_blocking(fut, val): try: fut._asyncio_future_blocking except AttributeError: fut._blocking = val else: fut._asyncio_future_blocking = val cdef class BaseFuture: cdef: int _state readonly Loop _loop readonly list _callbacks readonly object _exception readonly object _result public bint _blocking readonly object _source_traceback readonly bint _log_traceback def __init__(self, Loop loop): if loop is None: loop = aio_get_event_loop() if not isinstance(loop, Loop): raise TypeError('uvloop.Future supports only uvloop.Loop') self._state = _FUT_PENDING self._loop = loop self._callbacks = [] self._result = None self._exception = None self._blocking = False self._log_traceback = False if loop._debug: self._source_traceback = tb_extract_stack(sys_getframe(0)) else: self._source_traceback = None property _asyncio_future_blocking: def __get__(self): return self._blocking def __set__(self, value): self._blocking = value cdef _schedule_callbacks(self): cdef: list callbacks size_t cb_len = len(self._callbacks) size_t i if cb_len == 0: return callbacks = self._callbacks self._callbacks = [] for i from 0 <= i < cb_len: self._loop.call_soon(callbacks[i], self) cdef _add_done_callback(self, fn): if self._state != _FUT_PENDING: self._loop.call_soon(fn, self) else: self._callbacks.append(fn) cdef _done(self): return self._state != _FUT_PENDING cdef _cancel(self): if self._done(): return False self._state = _FUT_CANCELLED self._schedule_callbacks() return True # _result would shadow the "_result" property cdef _result_impl(self): if self._state == _FUT_CANCELLED: raise aio_CancelledError if self._state != _FUT_FINISHED: raise aio_InvalidStateError('Result is not ready.') self._log_traceback = False if self._exception is not None: raise self._exception return self._result cdef _str_state(self): if self._state == _FUT_PENDING: return 'PENDING' elif self._state == _FUT_CANCELLED: return 'CANCELLED' elif self._state == _FUT_FINISHED: return 'FINISHED' else: raise RuntimeError('unknown Future state') property _state: def __get__(self): return self._str_state() def cancel(self): """Cancel the future and schedule callbacks. If the future is already done or cancelled, return False. Otherwise, change the future's state to cancelled, schedule the callbacks and return True. """ return self._cancel() def cancelled(self): """Return True if the future was cancelled.""" return self._state == _FUT_CANCELLED def done(self): """Return True if the future is done. Done means either that a result / exception are available, or that the future was cancelled. """ return self._state != _FUT_PENDING def result(self): """Return the result this future represents. If the future has been cancelled, raises CancelledError. If the future's result isn't yet available, raises InvalidStateError. If the future is done and has an exception set, this exception is raised. """ return self._result_impl() def exception(self): """Return the exception that was set on this future. The exception (or None if no exception was set) is returned only if the future is done. If the future has been cancelled, raises CancelledError. If the future isn't done yet, raises InvalidStateError. """ if self._state == _FUT_CANCELLED: raise aio_CancelledError if self._state != _FUT_FINISHED: raise aio_InvalidStateError('Exception is not set.') self._log_traceback = False return self._exception def add_done_callback(self, fn): """Add a callback to be run when the future becomes done. The callback is called with a single argument - the future object. If the future is already done when this is called, the callback is scheduled with call_soon. """ self._add_done_callback(fn) def remove_done_callback(self, fn): """Remove all instances of a callback from the "call when done" list. Returns the number of callbacks removed. """ cdef: size_t clen = len(self._callbacks) size_t i size_t ni = 0 object cb for i from 0 <= i < clen: cb = self._callbacks[i] if cb != fn: self._callbacks[ni] = cb ni += 1 if ni != clen: del self._callbacks[ni:] return clen - ni cpdef set_result(self, result): """Mark the future done and set its result. If the future is already done when this method is called, raises InvalidStateError. """ if self._state != _FUT_PENDING: raise aio_InvalidStateError('{}: {!r}'.format( self._str_state(), self)) self._result = result self._state = _FUT_FINISHED self._schedule_callbacks() cpdef set_exception(self, exception): """Mark the future done and set an exception. If the future is already done when this method is called, raises InvalidStateError. """ if self._state != _FUT_PENDING: raise aio_InvalidStateError('{}: {!r}'.format( self._str_state(), self)) if isinstance(exception, type): exception = exception() if type(exception) is StopIteration: raise TypeError("StopIteration interacts badly with generators " "and cannot be raised into a Future") self._exception = exception self._state = _FUT_FINISHED self._schedule_callbacks() self._log_traceback = True # Copy of __await__ def __iter__(self): if self._state == _FUT_PENDING: self._blocking = True yield self # This tells Task to wait for completion. if self._state == _FUT_PENDING: raise AssertionError("yield from wasn't used with future") return self._result_impl() # May raise too. # Copy of __iter__ def __await__(self): if self._state == _FUT_PENDING: self._blocking = True yield self # This tells Task to wait for completion. if self._state == _FUT_PENDING: raise AssertionError("yield from wasn't used with future") return self._result_impl() # May raise too. cdef class BaseTask(BaseFuture): cdef: readonly object _coro readonly object _fut_waiter readonly bint _must_cancel public bint _log_destroy_pending def __init__(self, coro not None, Loop loop): BaseFuture.__init__(self, loop) self._coro = coro self._fut_waiter = None self._must_cancel = False self._log_destroy_pending = True self.__class__._all_tasks.add(self) self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, None)) def cancel(self): if self.done(): return False if self._fut_waiter is not None: if self._fut_waiter.cancel(): # Leave self._fut_waiter; it may be a Task that # catches and ignores the cancellation so we may have # to cancel it again later. return True # It must be the case that self._step is already scheduled. self._must_cancel = True return True cdef _raise_wrong_loop(self, fut): ex = RuntimeError( 'Task {!r} got Future {!r} attached to a ' 'different loop'.format(self, fut)) self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, ex)) cdef _raise_yield(self, fut): ex = RuntimeError( 'yield was used instead of yield from ' 'in task {!r} with {!r}'.format(self, fut)) self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, ex)) cdef _raise_generator(self, val): ex = RuntimeError( 'yield was used instead of yield from for ' 'generator in task {!r} with {}'.format(self, val)) self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, ex)) cdef _raise_else(self, val): ex = RuntimeError('Task got bad yield: {!r}'.format(val)) self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, ex)) cdef _skip_oneloop(self): self._loop._call_soon_handle( new_MethodHandle1( self._loop, "Task._step", self._fast_step, self, None)) cdef _fast_step(self, exc): cdef: BaseFuture nfut object meth object _current_tasks = self.__class__._current_tasks if self._state != _FUT_PENDING: raise AssertionError( '_step(): already done: {!r}, {!r}'.format(self, exc)) if self._must_cancel: if not isinstance(exc, aio_CancelledError): exc = aio_CancelledError() self._must_cancel = False self._fut_waiter = None # Let it fail early with an AttributeError if self._coro # is not a coroutine/generator. if exc is None: meth = self._coro.send else: meth = self._coro.throw _current_tasks[self._loop] = self # Call either coro.throw(exc) or coro.send(None). try: if exc is None: # We use the `send` method directly, because coroutines # don't have `__iter__` and `__next__` methods. result = meth(None) else: result = meth(exc) except StopIteration as exc: self.set_result(exc.value) except aio_CancelledError as exc: BaseFuture._cancel(self) # I.e., Future.cancel(self). except Exception as exc: self.set_exception(exc) except BaseException as exc: self.set_exception(exc) raise else: result_type = type(result) if result_type is uvloop_Future: # Yielded Future must come from Future.__iter__(). nfut = result if nfut._loop is not self._loop: self._raise_wrong_loop(result) elif nfut._blocking: nfut._blocking = False nfut._add_done_callback(self._wakeup) self._fut_waiter = result if self._must_cancel: if self._fut_waiter.cancel(): self._must_cancel = False else: self._raise_yield(result) elif result_type is aio_Future or isfuture(result): # Yielded Future must come from Future.__iter__(). if result._loop is not self._loop: self._raise_wrong_loop(result) elif _future_get_blocking(result): _future_set_blocking(result, False) result.add_done_callback(self._wakeup) self._fut_waiter = result if self._must_cancel: if self._fut_waiter.cancel(): self._must_cancel = False else: self._raise_yield(result) elif result is None: # Bare yield relinquishes control for one event loop iteration. self._skip_oneloop() elif inspect_isgenerator(result): # Yielding a generator is just wrong. self._raise_generator(result) else: # Yielding something else is an error. self._raise_else(result) finally: _current_tasks.pop(self._loop) cdef _fast_wakeup(self, future): try: if type(future) is uvloop_Future: (future)._result_impl() else: future.result() except Exception as exc: # This may also be a cancellation. self._fast_step(exc) else: # Don't pass the value of `future.result()` explicitly, # as `Future.__iter__` and `Future.__await__` don't need it. self._fast_step(None) def _step(self, exc=None): self._fast_step(exc) self = None def _wakeup(self, future): self._fast_wakeup(future) self = None cdef uvloop_Future = None cdef future_factory cdef task_factory if sys.version_info >= (3, 6): # In Python 3.6 Task and Future are implemented in C and # are already fast. future_factory = aio_Future task_factory = aio_Task Future = aio_Future else: class Future(BaseFuture, aio_Future): # Inherit asyncio.Future.__del__ and __repr__ pass class Task(BaseTask, aio_Task): # Inherit asyncio.Task.__del__ and __repr__ and a bunch # of class methods. pass uvloop_Future = Future future_factory = Future task_factory = Task cdef _is_uvloop_future(fut): return uvloop_Future is not None and type(fut) == uvloop_Future uvloop-0.8.1/uvloop/_testbase.py0000664000372000037200000003002413156036740017561 0ustar travistravis00000000000000"""Test utilities. Don't use outside of the uvloop project.""" import asyncio import asyncio.events import collections import contextlib import gc import inspect import logging import os import re import socket import ssl import tempfile import threading import unittest import uvloop class MockPattern(str): def __eq__(self, other): return bool(re.search(str(self), other, re.S)) class TestCaseDict(collections.UserDict): def __init__(self, name): super().__init__() self.name = name def __setitem__(self, key, value): if key in self.data: raise RuntimeError('duplicate test {}.{}'.format( self.name, key)) super().__setitem__(key, value) class BaseTestCaseMeta(type): @classmethod def __prepare__(mcls, name, bases): return TestCaseDict(name) def __new__(mcls, name, bases, dct): for test_name in dct: if not test_name.startswith('test_'): continue for base in bases: if hasattr(base, test_name): raise RuntimeError( 'duplicate test {}.{} (also defined in {} ' 'parent class)'.format( name, test_name, base.__name__)) return super().__new__(mcls, name, bases, dict(dct)) class BaseTestCase(unittest.TestCase, metaclass=BaseTestCaseMeta): def new_loop(self): raise NotImplementedError def mock_pattern(self, str): return MockPattern(str) def is_asyncio_loop(self): return type(self.loop).__module__.startswith('asyncio.') def setUp(self): self.loop = self.new_loop() asyncio.set_event_loop(None) self._check_unclosed_resources_in_debug = True if hasattr(asyncio, '_get_running_loop'): # Disable `_get_running_loop`. self._get_running_loop = asyncio.events._get_running_loop asyncio.events._get_running_loop = lambda: None def tearDown(self): self.loop.close() if hasattr(asyncio, '_get_running_loop'): asyncio.events._get_running_loop = self._get_running_loop if not self._check_unclosed_resources_in_debug: return # GC to show any resource warnings as the test completes gc.collect() gc.collect() gc.collect() if getattr(self.loop, '_debug_cc', False): gc.collect() gc.collect() gc.collect() self.assertEqual( self.loop._debug_uv_handles_total, self.loop._debug_uv_handles_freed, 'not all uv_handle_t handles were freed') self.assertEqual( self.loop._debug_cb_handles_count, 0, 'not all callbacks (call_soon) are GCed') self.assertEqual( self.loop._debug_cb_timer_handles_count, 0, 'not all timer callbacks (call_later) are GCed') self.assertEqual( self.loop._debug_stream_write_ctx_cnt, 0, 'not all stream write contexts are GCed') for h_name, h_cnt in self.loop._debug_handles_current.items(): with self.subTest('Alive handle after test', handle_name=h_name): self.assertEqual( h_cnt, 0, 'alive {} after test'.format(h_name)) for h_name, h_cnt in self.loop._debug_handles_total.items(): with self.subTest('Total/closed handles', handle_name=h_name): self.assertEqual( h_cnt, self.loop._debug_handles_closed[h_name], 'total != closed for {}'.format(h_name)) asyncio.set_event_loop(None) self.loop = None def skip_unclosed_handles_check(self): self._check_unclosed_resources_in_debug = False def _cert_fullname(test_file_name, cert_file_name): fullname = os.path.abspath(os.path.join( os.path.dirname(test_file_name), 'certs', cert_file_name)) assert os.path.isfile(fullname) return fullname @contextlib.contextmanager def silence_long_exec_warning(): class Filter(logging.Filter): def filter(self, record): return not (record.msg.startswith('Executing') and record.msg.endswith('seconds')) logger = logging.getLogger('asyncio') filter = Filter() logger.addFilter(filter) try: yield finally: logger.removeFilter(filter) def find_free_port(start_from=50000): for port in range(start_from, start_from + 500): sock = socket.socket() with sock: try: sock.bind(('', port)) except socket.error: continue else: return port raise RuntimeError('could not find a free port') class SSLTestCase: def _create_server_ssl_context(self, certfile, keyfile=None): sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23) sslcontext.options |= ssl.OP_NO_SSLv2 sslcontext.load_cert_chain(certfile, keyfile) return sslcontext def _create_client_ssl_context(self): sslcontext = ssl.create_default_context() sslcontext.check_hostname = False sslcontext.verify_mode = ssl.CERT_NONE return sslcontext @contextlib.contextmanager def _silence_eof_received_warning(self): # TODO This warning has to be fixed in asyncio. logger = logging.getLogger('asyncio') filter = logging.Filter('has no effect when using ssl') logger.addFilter(filter) try: yield finally: logger.removeFilter(filter) class UVTestCase(BaseTestCase): def new_loop(self): return uvloop.new_event_loop() class AIOTestCase(BaseTestCase): def setUp(self): super().setUp() watcher = asyncio.SafeChildWatcher() watcher.attach_loop(self.loop) asyncio.set_child_watcher(watcher) def tearDown(self): asyncio.set_child_watcher(None) super().tearDown() def new_loop(self): return asyncio.new_event_loop() ############################################################################### # Socket Testing Utilities ############################################################################### def tcp_server(server_prog, *, family=socket.AF_INET, addr=None, timeout=5, backlog=1, max_clients=10): if addr is None: if family == socket.AF_UNIX: with tempfile.NamedTemporaryFile() as tmp: addr = tmp.name else: addr = ('127.0.0.1', 0) if not inspect.isgeneratorfunction(server_prog): raise TypeError('server_prog: a generator function was expected') sock = socket.socket(family, socket.SOCK_STREAM) if timeout is None: raise RuntimeError('timeout is required') if timeout <= 0: raise RuntimeError('only blocking sockets are supported') sock.settimeout(timeout) try: sock.bind(addr) sock.listen(backlog) except OSError as ex: sock.close() raise ex srv = Server(sock, server_prog, timeout, max_clients) return srv def tcp_client(client_prog, family=socket.AF_INET, timeout=10): if not inspect.isgeneratorfunction(client_prog): raise TypeError('client_prog: a generator function was expected') sock = socket.socket(family, socket.SOCK_STREAM) if timeout is None: raise RuntimeError('timeout is required') if timeout <= 0: raise RuntimeError('only blocking sockets are supported') sock.settimeout(timeout) srv = Client(sock, client_prog, timeout) return srv class _Runner: def _iterate(self, prog, sock): last_val = None while self._active: try: command = prog.send(last_val) except StopIteration: return if not isinstance(command, _Command): raise TypeError( 'client_prog yielded invalid command {!r}'.format(command)) command_res = command._run(sock) assert isinstance(command_res, tuple) and len(command_res) == 2 last_val = command_res[1] sock = command_res[0] def stop(self): self._active = False self.join() def __enter__(self): self.start() return self def __exit__(self, *exc): self.stop() class Client(_Runner, threading.Thread): def __init__(self, sock, prog, timeout): threading.Thread.__init__(self, None, None, 'test-client') self.daemon = True self._timeout = timeout self._sock = sock self._active = True self._prog = prog def run(self): prog = self._prog() sock = self._sock self._iterate(prog, sock) class Server(_Runner, threading.Thread): def __init__(self, sock, prog, timeout, max_clients): threading.Thread.__init__(self, None, None, 'test-server') self.daemon = True self._clients = 0 self._finished_clients = 0 self._max_clients = max_clients self._timeout = timeout self._sock = sock self._active = True self._prog = prog def run(self): with self._sock: while self._active: if self._clients >= self._max_clients: return try: conn, addr = self._sock.accept() except socket.timeout: if not self._active: return else: raise self._clients += 1 conn.settimeout(self._timeout) try: with conn: self._handle_client(conn) except Exception: self._active = False raise def _handle_client(self, sock): prog = self._prog() self._iterate(prog, sock) @property def addr(self): return self._sock.getsockname() class _Command: def _run(self, sock): raise NotImplementedError class write(_Command): def __init__(self, data:bytes): self._data = data def _run(self, sock): sock.sendall(self._data) return sock, None class connect(_Command): def __init__(self, addr): self._addr = addr def _run(self, sock): sock.connect(self._addr) return sock, None class close(_Command): def _run(self, sock): sock.close() return sock, None class read(_Command): def __init__(self, nbytes): self._nbytes = nbytes self._nbytes_recv = 0 self._data = [] def _run(self, sock): while self._nbytes_recv != self._nbytes: try: data = sock.recv(self._nbytes) except InterruptedError: # for Python < 3.5 continue if data == b'': raise ConnectionAbortedError self._nbytes_recv += len(data) self._data.append(data) data = b''.join(self._data) return sock, data class starttls(_Command): def __init__(self, ssl_context, *, server_side=False, server_hostname=None, do_handshake_on_connect=True): assert isinstance(ssl_context, ssl.SSLContext) self._ctx = ssl_context self._server_side = server_side self._server_hostname = server_hostname self._do_handshake_on_connect = do_handshake_on_connect def _run(self, sock): ssl_sock = self._ctx.wrap_socket( sock, server_side=self._server_side, server_hostname=self._server_hostname, do_handshake_on_connect=self._do_handshake_on_connect) if self._server_side: ssl_sock.do_handshake() return ssl_sock, None uvloop-0.8.1/uvloop/_noop.py0000664000372000037200000000011613156036740016721 0ustar travistravis00000000000000def noop(): """Empty function to invoke CPython ceval loop.""" return uvloop-0.8.1/uvloop/request.pyx0000664000372000037200000000501113156036740017466 0ustar travistravis00000000000000cdef class UVRequest: """A base class for all libuv requests (uv_getaddrinfo_t, etc). Important: it's a responsibility of the subclass to call the "on_done" method in the request's callback. If "on_done" isn't called, the request object will never die. """ def __cinit__(self, Loop loop, *_): self.request = NULL self.loop = loop self.done = 0 Py_INCREF(self) def __dealloc__(self): if self.request is not NULL: if self.done == 0: raise RuntimeError( 'Unable to deallocate request for {!r} (not done)' .format(self)) PyMem_RawFree(self.request) self.request = NULL cdef on_done(self): self.done = 1 Py_DECREF(self) cdef cancel(self): # Most requests are implemented using a threadpool. It's only # possible to cancel a request when it's still in a threadpool's # queue. Once it's started to execute, we have to wait until # it finishes and calls its callback (and callback *must* call # UVRequest.on_done). cdef int err if self.done == 1: return if UVLOOP_DEBUG: if self.request is NULL: raise RuntimeError( '{}.cancel: .request is NULL'.format( self.__class__.__name__)) if self.request.data is NULL: raise RuntimeError( '{}.cancel: .request.data is NULL'.format( self.__class__.__name__)) if self.request.data is not self: raise RuntimeError( '{}.cancel: .request.data is not UVRequest'.format( self.__class__.__name__)) # We only can cancel pending requests. Let's try. err = uv.uv_cancel(self.request) if err < 0: if err == uv.UV_EBUSY: # Can't close the request -- it's executing (see the first # comment). Loop will have to wait until the callback # fires. pass elif err == uv.UV_EINVAL: # From libuv docs: # # Only cancellation of uv_fs_t, uv_getaddrinfo_t, # uv_getnameinfo_t and uv_work_t requests is currently # supported. return else: ex = convert_error(err) self.loop._handle_exception(ex) uvloop-0.8.1/uvloop/loop.c0000664000372000037200002514023013156037661016366 0ustar travistravis00000000000000/* Generated by Cython 0.25.2 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-O2" ] }, "module_name": "uvloop.loop" } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_25_2" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000) #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { \ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ } #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__uvloop__loop #define __PYX_HAVE_API__uvloop__loop #include #include #include "arpa/inet.h" #include "sys/socket.h" #include "unistd.h" #include "pthread.h" #include "includes/compat.h" #include "uv.h" #include "includes/debug.h" #include #include #include #include "pythread.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "uvloop/errors.pyx", "uvloop/loop.pyx", "uvloop/handles/handle.pyx", "uvloop/handles/basetransport.pyx", "uvloop/handles/tcp.pyx", "uvloop/handles/process.pyx", "uvloop/future.pyx", "uvloop/loop.pxd", "uvloop/cbhandles.pyx", "uvloop/handles/async_.pyx", "uvloop/handles/idle.pyx", "uvloop/handles/check.pyx", "uvloop/handles/timer.pyx", "uvloop/handles/poll.pyx", "uvloop/handles/basetransport.pxd", "uvloop/handles/stream.pyx", "uvloop/handles/streamserver.pyx", "uvloop/handles/pipe.pyx", "uvloop/request.pyx", "uvloop/dns.pyx", "uvloop/handles/udp.pyx", "uvloop/server.pyx", "uvloop/chain_futs.pyx", "type.pxd", "bool.pxd", "complex.pxd", "uvloop/includes/stdlib.pxi", }; /*--- Type declarations ---*/ struct __pyx_obj_6uvloop_4loop_Loop; struct __pyx_obj_6uvloop_4loop_Handle; struct __pyx_obj_6uvloop_4loop_TimerHandle; struct __pyx_obj_6uvloop_4loop_UVHandle; struct __pyx_obj_6uvloop_4loop_UVSocketHandle; struct __pyx_obj_6uvloop_4loop_UVAsync; struct __pyx_obj_6uvloop_4loop_UVIdle; struct __pyx_obj_6uvloop_4loop_UVCheck; struct __pyx_obj_6uvloop_4loop_UVTimer; struct __pyx_obj_6uvloop_4loop_UVPoll; struct __pyx_obj_6uvloop_4loop_UVBaseTransport; struct __pyx_obj_6uvloop_4loop_UVStream; struct __pyx_obj_6uvloop_4loop_UVStreamServer; struct __pyx_obj_6uvloop_4loop_TCPServer; struct __pyx_obj_6uvloop_4loop_TCPTransport; struct __pyx_obj_6uvloop_4loop_UnixServer; struct __pyx_obj_6uvloop_4loop_UnixTransport; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport; struct __pyx_obj_6uvloop_4loop_WriteUnixTransport; struct __pyx_obj_6uvloop_4loop_UVProcess; struct __pyx_obj_6uvloop_4loop_UVProcessTransport; struct __pyx_obj_6uvloop_4loop_UVRequest; struct __pyx_obj_6uvloop_4loop_UDPTransport; struct __pyx_obj_6uvloop_4loop_Server; struct __pyx_obj_6uvloop_4loop__StreamWriteContext; struct __pyx_obj_6uvloop_4loop__TCPConnectRequest; struct __pyx_obj_6uvloop_4loop__PipeConnectRequest; struct __pyx_obj_6uvloop_4loop_AddrInfo; struct __pyx_obj_6uvloop_4loop_AddrInfoRequest; struct __pyx_obj_6uvloop_4loop_NameInfoRequest; struct __pyx_obj_6uvloop_4loop__UDPSendContext; struct __pyx_obj_6uvloop_4loop_BaseFuture; struct __pyx_obj_6uvloop_4loop_BaseTask; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error; struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits; struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error; struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind; struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind; struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error; struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error; /* "uvloop/loop.pxd":26 * cdef class UVBaseTransport(UVSocketHandle) * * ctypedef object (*method_t)(object) # <<<<<<<<<<<<<< * ctypedef object (*method1_t)(object, object) * ctypedef object (*method2_t)(object, object, object) */ typedef PyObject *(*__pyx_t_6uvloop_4loop_method_t)(PyObject *); /* "uvloop/loop.pxd":27 * * ctypedef object (*method_t)(object) * ctypedef object (*method1_t)(object, object) # <<<<<<<<<<<<<< * ctypedef object (*method2_t)(object, object, object) * ctypedef object (*method3_t)(object, object, object, object) */ typedef PyObject *(*__pyx_t_6uvloop_4loop_method1_t)(PyObject *, PyObject *); /* "uvloop/loop.pxd":28 * ctypedef object (*method_t)(object) * ctypedef object (*method1_t)(object, object) * ctypedef object (*method2_t)(object, object, object) # <<<<<<<<<<<<<< * ctypedef object (*method3_t)(object, object, object, object) * */ typedef PyObject *(*__pyx_t_6uvloop_4loop_method2_t)(PyObject *, PyObject *, PyObject *); /* "uvloop/loop.pxd":29 * ctypedef object (*method1_t)(object, object) * ctypedef object (*method2_t)(object, object, object) * ctypedef object (*method3_t)(object, object, object, object) # <<<<<<<<<<<<<< * * */ typedef PyObject *(*__pyx_t_6uvloop_4loop_method3_t)(PyObject *, PyObject *, PyObject *, PyObject *); /* "uvloop/handles/handle.pxd":19 * * cdef _error(self, exc, throw) * cdef _fatal_error(self, exc, throw, reason=?) # <<<<<<<<<<<<<< * * cdef _warn_unclosed(self) */ struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error { int __pyx_n; PyObject *reason; }; /* "uvloop/handles/basetransport.pxd":24 * # All "inline" methods are final * * cdef inline _set_write_buffer_limits(self, int high=*, int low=*) # <<<<<<<<<<<<<< * cdef inline _maybe_pause_protocol(self) * cdef inline _maybe_resume_protocol(self) */ struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits { int __pyx_n; int high; int low; }; /* "uvloop/handles/basetransport.pxd":36 * * # Overloads of UVHandle methods: * cdef _fatal_error(self, exc, throw, reason=?) # <<<<<<<<<<<<<< * cdef _close(self) * */ struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error { int __pyx_n; PyObject *reason; }; /* "uvloop/handles/tcp.pxd":2 * cdef class TCPServer(UVStreamServer): * cdef bind(self, system.sockaddr* addr, unsigned int flags=*) # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind { int __pyx_n; unsigned int flags; }; /* "uvloop/handles/tcp.pxd":16 * system.sockaddr_storage __sockname * * cdef bind(self, system.sockaddr* addr, unsigned int flags=*) # <<<<<<<<<<<<<< * cdef connect(self, system.sockaddr* addr) * */ struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind { int __pyx_n; unsigned int flags; }; /* "uvloop/handles/poll.pyx":168 * UVHandle._close(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * try: * if self.reading_handle is not None: */ struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error { int __pyx_n; PyObject *reason; }; /* "uvloop/handles/streamserver.pyx":70 * client._accept(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Overload UVHandle._fatal_error * */ struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error { int __pyx_n; PyObject *reason; }; /* "uvloop/loop.pxd":32 * * * cdef class Loop: # <<<<<<<<<<<<<< * cdef: * uv.uv_loop_t *uvloop */ struct __pyx_obj_6uvloop_4loop_Loop { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_Loop *__pyx_vtab; uv_loop_t *uvloop; int _coroutine_wrapper_set; PyObject *slow_callback_duration; int _closed; int _debug; int _running; int _stopping; long _thread_id; int _thread_is_main; PyObject *_task_factory; PyObject *_exception_handler; PyObject *_default_executor; PyObject *_ready; PyObject *_queued_streams; Py_ssize_t _ready_len; PyObject *_transports; PyObject *_signal_handlers; PyObject *_ssock; PyObject *_csock; PyObject *_timers; PyObject *_polls; struct __pyx_obj_6uvloop_4loop_UVProcess *active_process_handler; struct __pyx_obj_6uvloop_4loop_UVAsync *handler_async; struct __pyx_obj_6uvloop_4loop_UVIdle *handler_idle; struct __pyx_obj_6uvloop_4loop_UVCheck *handler_check__exec_writes; PyObject *_last_error; PyObject *__weakref__; PyObject *_asyncgens; int _asyncgens_shutdown_called; char _recv_buffer[0x3E800]; int _recv_buffer_in_use; int _debug_cc; PyObject *_debug_handles_total; PyObject *_debug_handles_closed; PyObject *_debug_handles_current; uint64_t _debug_uv_handles_total; uint64_t _debug_uv_handles_freed; uint64_t _debug_cb_handles_total; uint64_t _debug_cb_handles_count; uint64_t _debug_cb_timer_handles_total; uint64_t _debug_cb_timer_handles_count; uint64_t _debug_stream_shutdown_errors_total; uint64_t _debug_stream_listen_errors_total; uint64_t _debug_stream_read_cb_total; uint64_t _debug_stream_read_cb_errors_total; uint64_t _debug_stream_read_eof_total; uint64_t _debug_stream_read_eof_cb_errors_total; uint64_t _debug_stream_read_errors_total; uint64_t _debug_stream_write_tries; uint64_t _debug_stream_write_errors_total; uint64_t _debug_stream_write_ctx_total; uint64_t _debug_stream_write_ctx_cnt; uint64_t _debug_stream_write_cb_errors_total; uint64_t _poll_read_events_total; uint64_t _poll_read_cb_errors_total; uint64_t _poll_write_events_total; uint64_t _poll_write_cb_errors_total; uint64_t _sock_try_write_total; uint64_t _debug_exception_handler_cnt; }; /* "uvloop/cbhandles.pxd":1 * cdef class Handle: # <<<<<<<<<<<<<< * cdef: * Loop loop */ struct __pyx_obj_6uvloop_4loop_Handle { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_Handle *__pyx_vtab; struct __pyx_obj_6uvloop_4loop_Loop *loop; int cancelled; PyObject *meth_name; int cb_type; void *callback; PyObject *arg1; PyObject *arg2; PyObject *arg3; PyObject *arg4; PyObject *__weakref__; PyObject *_source_traceback; }; /* "uvloop/cbhandles.pxd":20 * * * cdef class TimerHandle: # <<<<<<<<<<<<<< * cdef: * object callback, args */ struct __pyx_obj_6uvloop_4loop_TimerHandle { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *__pyx_vtab; PyObject *callback; PyObject *args; int closed; struct __pyx_obj_6uvloop_4loop_UVTimer *timer; struct __pyx_obj_6uvloop_4loop_Loop *loop; PyObject *__weakref__; PyObject *_source_traceback; }; /* "uvloop/loop.pxd":17 * * * cdef class UVHandle # <<<<<<<<<<<<<< * cdef class UVSocketHandle(UVHandle) * */ struct __pyx_obj_6uvloop_4loop_UVHandle { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *__pyx_vtab; uv_handle_t *_handle; int _closed; int _inited; struct __pyx_obj_6uvloop_4loop_Loop *_loop; PyObject *_source_traceback; }; /* "uvloop/loop.pxd":18 * * cdef class UVHandle * cdef class UVSocketHandle(UVHandle) # <<<<<<<<<<<<<< * * cdef class UVAsync(UVHandle) */ struct __pyx_obj_6uvloop_4loop_UVSocketHandle { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; PyObject *_fileobj; PyObject *__pyx___cached_socket; }; /* "uvloop/loop.pxd":20 * cdef class UVSocketHandle(UVHandle) * * cdef class UVAsync(UVHandle) # <<<<<<<<<<<<<< * cdef class UVTimer(UVHandle) * cdef class UVIdle(UVHandle) */ struct __pyx_obj_6uvloop_4loop_UVAsync { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; __pyx_t_6uvloop_4loop_method_t callback; PyObject *ctx; }; /* "uvloop/loop.pxd":22 * cdef class UVAsync(UVHandle) * cdef class UVTimer(UVHandle) * cdef class UVIdle(UVHandle) # <<<<<<<<<<<<<< * * cdef class UVBaseTransport(UVSocketHandle) */ struct __pyx_obj_6uvloop_4loop_UVIdle { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; struct __pyx_obj_6uvloop_4loop_Handle *h; int running; }; /* "uvloop/handles/check.pxd":1 * cdef class UVCheck(UVHandle): # <<<<<<<<<<<<<< * cdef: * Handle h */ struct __pyx_obj_6uvloop_4loop_UVCheck { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; struct __pyx_obj_6uvloop_4loop_Handle *h; int running; }; /* "uvloop/loop.pxd":21 * * cdef class UVAsync(UVHandle) * cdef class UVTimer(UVHandle) # <<<<<<<<<<<<<< * cdef class UVIdle(UVHandle) * */ struct __pyx_obj_6uvloop_4loop_UVTimer { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; __pyx_t_6uvloop_4loop_method_t callback; PyObject *ctx; int running; uint64_t timeout; }; /* "uvloop/handles/poll.pxd":1 * cdef class UVPoll(UVHandle): # <<<<<<<<<<<<<< * cdef: * int fd */ struct __pyx_obj_6uvloop_4loop_UVPoll { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; int fd; struct __pyx_obj_6uvloop_4loop_Handle *reading_handle; struct __pyx_obj_6uvloop_4loop_Handle *writing_handle; }; /* "uvloop/loop.pxd":24 * cdef class UVIdle(UVHandle) * * cdef class UVBaseTransport(UVSocketHandle) # <<<<<<<<<<<<<< * * ctypedef object (*method_t)(object) */ struct __pyx_obj_6uvloop_4loop_UVBaseTransport { struct __pyx_obj_6uvloop_4loop_UVSocketHandle __pyx_base; int _closing; int _protocol_connected; int _protocol_paused; PyObject *_protocol_data_received; size_t _high_water; size_t _low_water; PyObject *_protocol; struct __pyx_obj_6uvloop_4loop_Server *_server; PyObject *_waiter; PyObject *_extra_info; uint32_t _conn_lost; PyObject *__weakref__; }; /* "uvloop/handles/stream.pxd":1 * cdef class UVStream(UVBaseTransport): # <<<<<<<<<<<<<< * cdef: * uv.uv_shutdown_t _shutdown_req */ struct __pyx_obj_6uvloop_4loop_UVStream { struct __pyx_obj_6uvloop_4loop_UVBaseTransport __pyx_base; uv_shutdown_t _shutdown_req; int __pyx___shutting_down; int __pyx___reading; int __pyx___read_error_close; int _eof; PyObject *_buffer; size_t _buffer_size; }; /* "uvloop/handles/streamserver.pxd":1 * cdef class UVStreamServer(UVSocketHandle): # <<<<<<<<<<<<<< * cdef: * object ssl */ struct __pyx_obj_6uvloop_4loop_UVStreamServer { struct __pyx_obj_6uvloop_4loop_UVSocketHandle __pyx_base; PyObject *ssl; PyObject *protocol_factory; int opened; struct __pyx_obj_6uvloop_4loop_Server *_server; }; /* "uvloop/handles/tcp.pxd":1 * cdef class TCPServer(UVStreamServer): # <<<<<<<<<<<<<< * cdef bind(self, system.sockaddr* addr, unsigned int flags=*) * */ struct __pyx_obj_6uvloop_4loop_TCPServer { struct __pyx_obj_6uvloop_4loop_UVStreamServer __pyx_base; }; /* "uvloop/handles/tcp.pxd":9 * * * cdef class TCPTransport(UVStream): # <<<<<<<<<<<<<< * cdef: * bint __peername_set */ struct __pyx_obj_6uvloop_4loop_TCPTransport { struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base; int __pyx___peername_set; int __pyx___sockname_set; struct sockaddr_storage __pyx___peername; struct sockaddr_storage __pyx___sockname; }; /* "uvloop/handles/pipe.pxd":1 * cdef class UnixServer(UVStreamServer): # <<<<<<<<<<<<<< * * cdef bind(self, str path) */ struct __pyx_obj_6uvloop_4loop_UnixServer { struct __pyx_obj_6uvloop_4loop_UVStreamServer __pyx_base; }; /* "uvloop/handles/pipe.pxd":10 * * * cdef class UnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_obj_6uvloop_4loop_UnixTransport { struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base; }; /* "uvloop/handles/pipe.pxd":19 * * * cdef class ReadUnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_obj_6uvloop_4loop_ReadUnixTransport { struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base; }; /* "uvloop/handles/pipe.pxd":26 * * * cdef class WriteUnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_obj_6uvloop_4loop_WriteUnixTransport { struct __pyx_obj_6uvloop_4loop_UVStream __pyx_base; }; /* "uvloop/handles/process.pxd":1 * cdef class UVProcess(UVHandle): # <<<<<<<<<<<<<< * cdef: * object _returncode */ struct __pyx_obj_6uvloop_4loop_UVProcess { struct __pyx_obj_6uvloop_4loop_UVHandle __pyx_base; PyObject *_returncode; PyObject *_pid; PyObject *_errpipe_read; PyObject *_errpipe_write; PyObject *_preexec_fn; int _restore_signals; PyObject *_fds_to_close; uv_process_options_t options; uv_stdio_container_t iocnt[3]; PyObject *__pyx___env; char **uv_opt_env; PyObject *__pyx___args; char **uv_opt_args; char *uv_opt_file; PyObject *__pyx___cwd; }; /* "uvloop/handles/process.pxd":43 * * * cdef class UVProcessTransport(UVProcess): # <<<<<<<<<<<<<< * cdef: * list _exit_waiters */ struct __pyx_obj_6uvloop_4loop_UVProcessTransport { struct __pyx_obj_6uvloop_4loop_UVProcess __pyx_base; PyObject *_exit_waiters; PyObject *_init_futs; int _stdio_ready; PyObject *_pending_calls; PyObject *_protocol; int _finished; struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *_stdin; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *_stdout; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *_stderr; PyObject *stdin_proto; PyObject *stdout_proto; PyObject *stderr_proto; }; /* "uvloop/request.pxd":1 * cdef class UVRequest: # <<<<<<<<<<<<<< * cdef: * uv.uv_req_t *request */ struct __pyx_obj_6uvloop_4loop_UVRequest { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_UVRequest *__pyx_vtab; uv_req_t *request; int done; struct __pyx_obj_6uvloop_4loop_Loop *loop; }; /* "uvloop/handles/udp.pxd":1 * cdef class UDPTransport(UVBaseTransport): # <<<<<<<<<<<<<< * cdef: * bint __receiving */ struct __pyx_obj_6uvloop_4loop_UDPTransport { struct __pyx_obj_6uvloop_4loop_UVBaseTransport __pyx_base; int __pyx___receiving; int _family; int _address_set; struct sockaddr_storage _address; PyObject *_cached_py_address; }; /* "uvloop/server.pxd":1 * cdef class Server: # <<<<<<<<<<<<<< * cdef: * list _servers */ struct __pyx_obj_6uvloop_4loop_Server { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_Server *__pyx_vtab; PyObject *_servers; PyObject *_waiters; int _active_count; struct __pyx_obj_6uvloop_4loop_Loop *_loop; }; /* "uvloop/handles/stream.pyx":5 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class _StreamWriteContext: # <<<<<<<<<<<<<< * # used to hold additional write request information for uv_write * */ struct __pyx_obj_6uvloop_4loop__StreamWriteContext { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *__pyx_vtab; uv_write_t req; PyObject *buffers; uv_buf_t uv_bufs_sml[4]; Py_buffer py_bufs_sml[4]; int py_bufs_sml_inuse; uv_buf_t *uv_bufs; Py_buffer *py_bufs; size_t py_bufs_len; uv_buf_t *uv_bufs_start; size_t uv_bufs_len; struct __pyx_obj_6uvloop_4loop_UVStream *stream; int closed; }; /* "uvloop/handles/tcp.pyx":171 * * * cdef class _TCPConnectRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * TCPTransport transport */ struct __pyx_obj_6uvloop_4loop__TCPConnectRequest { struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base; struct __pyx_obj_6uvloop_4loop_TCPTransport *transport; }; /* "uvloop/handles/pipe.pyx":176 * * * cdef class _PipeConnectRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * UnixTransport transport */ struct __pyx_obj_6uvloop_4loop__PipeConnectRequest { struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base; struct __pyx_obj_6uvloop_4loop_UnixTransport *transport; }; /* "uvloop/dns.pyx":185 * * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class AddrInfo: # <<<<<<<<<<<<<< * cdef: * system.addrinfo *data */ struct __pyx_obj_6uvloop_4loop_AddrInfo { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *__pyx_vtab; struct addrinfo *data; }; /* "uvloop/dns.pyx":229 * * * cdef class AddrInfoRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * system.addrinfo hints */ struct __pyx_obj_6uvloop_4loop_AddrInfoRequest { struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base; struct addrinfo hints; PyObject *callback; }; /* "uvloop/dns.pyx":288 * * * cdef class NameInfoRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * object callback */ struct __pyx_obj_6uvloop_4loop_NameInfoRequest { struct __pyx_obj_6uvloop_4loop_UVRequest __pyx_base; PyObject *callback; }; /* "uvloop/handles/udp.pyx":3 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class _UDPSendContext: # <<<<<<<<<<<<<< * # used to hold additional write request information for uv_write * */ struct __pyx_obj_6uvloop_4loop__UDPSendContext { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *__pyx_vtab; uv_udp_send_t req; uv_buf_t uv_buf; Py_buffer py_buf; struct __pyx_obj_6uvloop_4loop_UDPTransport *udp; int closed; struct sockaddr_storage addr; }; /* "uvloop/future.pyx":24 * * * cdef class BaseFuture: # <<<<<<<<<<<<<< * cdef: * int _state */ struct __pyx_obj_6uvloop_4loop_BaseFuture { PyObject_HEAD struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *__pyx_vtab; int _state; struct __pyx_obj_6uvloop_4loop_Loop *_loop; PyObject *_callbacks; PyObject *_exception; PyObject *_result; int _blocking; PyObject *_source_traceback; int _log_traceback; }; /* "uvloop/future.pyx":249 * * * cdef class BaseTask(BaseFuture): # <<<<<<<<<<<<<< * cdef: * readonly object _coro */ struct __pyx_obj_6uvloop_4loop_BaseTask { struct __pyx_obj_6uvloop_4loop_BaseFuture __pyx_base; PyObject *_coro; PyObject *_fut_waiter; int _must_cancel; int _log_destroy_pending; }; /* "uvloop/loop.pyx":625 * return result * * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, int flags, */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo { PyObject_HEAD PyObject *__pyx_v_fut; int __pyx_v_unpack; }; /* "uvloop/loop.pyx":665 * return fut * * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<< * cdef NameInfoRequest nr * fut = self._new_future() */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo { PyObject_HEAD PyObject *__pyx_v_fut; }; /* "uvloop/loop.pyx":766 * self._remove_reader(fd) * * cdef _sock_connect(self, fut, sock, address): # <<<<<<<<<<<<<< * cdef: * Handle handle */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect { PyObject_HEAD PyObject *__pyx_v_fd; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; }; /* "uvloop/loop.pyx":1167 * return self._task_factory * * def run_until_complete(self, future): # <<<<<<<<<<<<<< * """Run until the Future is done. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete { PyObject_HEAD struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; }; /* "uvloop/loop.pyx":1217 * return self._getaddrinfo(host, port, family, type, proto, flags, 1) * * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<< * cdef: * AddrInfo ai_cnt */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo { PyObject_HEAD struct addrinfo *__pyx_v_ai; struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_cnt; int __pyx_v_flags; PyObject *__pyx_v_flowinfo; PyObject *__pyx_v_scope_id; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; struct sockaddr_in6 *__pyx_v_sin6; Py_ssize_t __pyx_v_sl; PyObject *__pyx_v_sockaddr; }; /* "uvloop/loop.pyx":1271 * return await self._getnameinfo(ai.ai_addr, flags) * * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<< * *, * int family=uv.AF_UNSPEC, */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server { PyObject_HEAD struct addrinfo *__pyx_v_addrinfo; PyObject *__pyx_v_backlog; int __pyx_v_completed; int __pyx_v_family; PyObject *__pyx_v_fileno; int __pyx_v_flags; PyObject *__pyx_v_fs; PyObject *__pyx_v_host; PyObject *__pyx_v_hosts; PyObject *__pyx_v_info; PyObject *__pyx_v_infos; PyObject *__pyx_v_port; PyObject *__pyx_v_protocol_factory; PyObject *__pyx_v_reuse_address; PyObject *__pyx_v_reuse_port; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server; PyObject *__pyx_v_sock; PyObject *__pyx_v_ssl; struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_tcp; }; /* "uvloop/loop.pyx":1399 * return server * * async def create_connection(self, protocol_factory, host=None, port=None, *, # <<<<<<<<<<<<<< * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection { PyObject_HEAD struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_local; struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai_remote; PyObject *__pyx_v_app_protocol; PyObject *__pyx_v_exc; PyObject *__pyx_v_exceptions; PyObject *__pyx_v_f1; PyObject *__pyx_v_f2; PyObject *__pyx_v_family; PyObject *__pyx_v_fileno; PyObject *__pyx_v_flags; PyObject *__pyx_v_fs; PyObject *__pyx_v_genexpr; PyObject *__pyx_v_host; struct addrinfo *__pyx_v_lai; struct sockaddr_storage __pyx_v_lai_addr_static; struct addrinfo *__pyx_v_lai_iter; struct addrinfo __pyx_v_lai_static; PyObject *__pyx_v_local_addr; PyObject *__pyx_v_model; PyObject *__pyx_v_port; PyObject *__pyx_v_proto; PyObject *__pyx_v_protocol; PyObject *__pyx_v_protocol_factory; struct addrinfo *__pyx_v_rai; struct sockaddr_storage __pyx_v_rai_addr_static; struct addrinfo *__pyx_v_rai_iter; struct addrinfo __pyx_v_rai_static; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_server_hostname; PyObject *__pyx_v_sock; PyObject *__pyx_v_ssl; PyObject *__pyx_v_ssl_waiter; PyObject *__pyx_v_sslcontext; struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_tr; PyObject *__pyx_v_waiter; PyObject *__pyx_t_0; PyObject *__pyx_t_1; PyObject *__pyx_t_2; }; /* "uvloop/loop.pyx":1567 * # If they all have the same str(), raise one. * model = str(exceptions[0]) * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<< * raise exceptions[0] * # Raise a combined exception so the user can see all */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr { PyObject_HEAD struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *__pyx_outer_scope; PyObject *__pyx_v_exc; }; /* "uvloop/loop.pyx":1572 * # the various error messages. * raise OSError('Multiple exceptions: {}'.format( * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<< * else: * if sock is None: */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr { PyObject_HEAD struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *__pyx_outer_scope; PyObject *__pyx_v_exc; }; /* "uvloop/loop.pyx":1627 * return tr, protocol * * async def create_unix_server(self, protocol_factory, str path=None, # <<<<<<<<<<<<<< * *, backlog=100, sock=None, ssl=None): * """A coroutine which creates a UNIX Domain Socket server. */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server { PyObject_HEAD PyObject *__pyx_v_backlog; PyObject *__pyx_v_exc; PyObject *__pyx_v_fileno; PyObject *__pyx_v_msg; PyObject *__pyx_v_path; struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_pipe; PyObject *__pyx_v_protocol_factory; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server; PyObject *__pyx_v_sock; PyObject *__pyx_v_ssl; }; /* "uvloop/loop.pyx":1712 * return server * * async def create_unix_connection(self, protocol_factory, path, *, # <<<<<<<<<<<<<< * ssl=None, sock=None, * server_hostname=None): */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection { PyObject_HEAD PyObject *__pyx_v_app_protocol; PyObject *__pyx_v_fileno; PyObject *__pyx_v_path; PyObject *__pyx_v_protocol; PyObject *__pyx_v_protocol_factory; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_server_hostname; PyObject *__pyx_v_sock; PyObject *__pyx_v_ssl; PyObject *__pyx_v_ssl_waiter; PyObject *__pyx_v_sslcontext; struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_tr; PyObject *__pyx_v_waiter; PyObject *__pyx_t_0; PyObject *__pyx_t_1; PyObject *__pyx_t_2; }; /* "uvloop/loop.pyx":1949 * return fut * * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<< * """Send data to the socket. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall { PyObject_HEAD PyObject *__pyx_v_data; int __pyx_v_fd; PyObject *__pyx_v_fut; struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle; int __pyx_v_n; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_sock; }; /* "uvloop/loop.pyx":2028 * return fut * * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<< * """Connect to a remote socket at address. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect { PyObject_HEAD PyObject *__pyx_v__; PyObject *__pyx_v_address; PyObject *__pyx_v_fut; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_sock; }; /* "uvloop/loop.pyx":2046 * await fut * * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<< * ssl=None): * """Handle an accepted connection. */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket { PyObject_HEAD PyObject *__pyx_v_app_protocol; PyObject *__pyx_v_fileno; PyObject *__pyx_v_protocol; PyObject *__pyx_v_protocol_factory; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_sock; PyObject *__pyx_v_ssl; struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_transport; PyObject *__pyx_v_transport_waiter; PyObject *__pyx_v_waiter; }; /* "uvloop/loop.pyx":2119 * self._default_executor = executor * * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<< * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run { PyObject_HEAD PyObject *__pyx_v___uvloop_sleep_after_fork; PyObject *__pyx_v_args; PyObject *__pyx_v_bufsize; PyObject *__pyx_v_close_fds; PyObject *__pyx_v_creationflags; PyObject *__pyx_v_cwd; int __pyx_v_debug_flags; PyObject *__pyx_v_env; PyObject *__pyx_v_executable; PyObject *__pyx_v_pass_fds; PyObject *__pyx_v_preexec_fn; struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_proc; PyObject *__pyx_v_protocol; PyObject *__pyx_v_protocol_factory; PyObject *__pyx_v_restore_signals; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_shell; PyObject *__pyx_v_start_new_session; PyObject *__pyx_v_startupinfo; PyObject *__pyx_v_stderr; PyObject *__pyx_v_stdin; PyObject *__pyx_v_stdout; PyObject *__pyx_v_universal_newlines; PyObject *__pyx_v_waiter; PyObject *__pyx_t_0; PyObject *__pyx_t_1; PyObject *__pyx_t_2; }; /* "uvloop/loop.pyx":2205 * **kwargs) * * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register read pipe in event loop. Set the pipe to non-blocking mode. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe { PyObject_HEAD int __pyx_v_fileno; PyObject *__pyx_v_pipe; PyObject *__pyx_v_proto; PyObject *__pyx_v_proto_factory; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_transp; PyObject *__pyx_v_waiter; PyObject *__pyx_t_0; PyObject *__pyx_t_1; PyObject *__pyx_t_2; }; /* "uvloop/loop.pyx":2231 * return transp, proto * * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register write pipe in event loop. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe { PyObject_HEAD int __pyx_v_fileno; PyObject *__pyx_v_pipe; PyObject *__pyx_v_proto; PyObject *__pyx_v_proto_factory; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_transp; PyObject *__pyx_v_waiter; PyObject *__pyx_t_0; PyObject *__pyx_t_1; PyObject *__pyx_t_2; }; /* "uvloop/loop.pyx":2330 * return True * * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<< * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint { PyObject_HEAD PyObject *__pyx_v_allow_broadcast; PyObject *__pyx_v_ctx; PyObject *__pyx_v_ex; PyObject *__pyx_v_excs; PyObject *__pyx_v_family; PyObject *__pyx_v_flags; PyObject *__pyx_v_genexpr; PyObject *__pyx_v_lads; struct addrinfo *__pyx_v_lai; PyObject *__pyx_v_local_addr; PyObject *__pyx_v_opts; PyObject *__pyx_v_problems; PyObject *__pyx_v_proto; PyObject *__pyx_v_protocol; PyObject *__pyx_v_protocol_factory; PyObject *__pyx_v_rads; struct addrinfo *__pyx_v_rai; PyObject *__pyx_v_remote_addr; PyObject *__pyx_v_reuse_address; PyObject *__pyx_v_reuse_port; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_sock; PyObject *__pyx_v_socket; struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp; PyObject *__pyx_v_waiter; }; /* "uvloop/loop.pyx":2381 * allow_broadcast=allow_broadcast) * problems = ', '.join( * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<< * raise ValueError( * 'socket modifier keyword arguments can not be used ' */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr { PyObject_HEAD struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *__pyx_outer_scope; PyObject *__pyx_v_k; PyObject *__pyx_v_v; }; /* "uvloop/loop.pyx":2511 * self._asyncgens.add(agen) * * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<< * """Shutdown all active asynchronous generators.""" * self._asyncgens_shutdown_called = True */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens { PyObject_HEAD PyObject *__pyx_v_agen; PyObject *__pyx_v_closing_agens; PyObject *__pyx_v_result; PyObject *__pyx_v_results; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self; PyObject *__pyx_v_shutdown_coro; }; /* "uvloop/server.pyx":35 * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) * * async def wait_closed(self): # <<<<<<<<<<<<<< * if self._servers is None or self._waiters is None: * return */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed { PyObject_HEAD struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self; PyObject *__pyx_v_waiter; }; /* "uvloop/future.pyx":227 * * # Copy of __await__ * def __iter__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ { PyObject_HEAD struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self; }; /* "uvloop/future.pyx":238 * * # Copy of __iter__ * def __await__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ { PyObject_HEAD struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self; }; /* "uvloop/chain_futs.pyx":41 * * * cdef _chain_future(source, destination): # <<<<<<<<<<<<<< * """Chain two futures so that when one completes, so does the other. * */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future { PyObject_HEAD PyObject *__pyx_v__set_state; PyObject *__pyx_v_dest_loop; PyObject *__pyx_v_destination; PyObject *__pyx_v_source; PyObject *__pyx_v_source_loop; }; /* "uvloop/loop.pyx":2643 * ########### Stuff for tests: * * async def _test_coroutine_1(): # <<<<<<<<<<<<<< * return 42 */ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 { PyObject_HEAD }; /* "uvloop/handles/handle.pyx":2 * @cython.no_gc_clear * cdef class UVHandle: # <<<<<<<<<<<<<< * """A base class for all libuv handles. * */ struct __pyx_vtabstruct_6uvloop_4loop_UVHandle { PyObject *(*_start_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_abort_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *); PyObject *(*_finish_init)(struct __pyx_obj_6uvloop_4loop_UVHandle *); int (*_is_alive)(struct __pyx_obj_6uvloop_4loop_UVHandle *); PyObject *(*_ensure_alive)(struct __pyx_obj_6uvloop_4loop_UVHandle *); PyObject *(*_error)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *); PyObject *(*_fatal_error)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args); PyObject *(*_warn_unclosed)(struct __pyx_obj_6uvloop_4loop_UVHandle *); PyObject *(*_free)(struct __pyx_obj_6uvloop_4loop_UVHandle *); PyObject *(*_close)(struct __pyx_obj_6uvloop_4loop_UVHandle *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *__pyx_vtabptr_6uvloop_4loop_UVHandle; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *); static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__free(struct __pyx_obj_6uvloop_4loop_UVHandle *); /* "uvloop/handles/handle.pyx":213 * * @cython.no_gc_clear * cdef class UVSocketHandle(UVHandle): # <<<<<<<<<<<<<< * * def __cinit__(self): */ struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_fileno)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); PyObject *(*_new_socket)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); PyObject *(*_get_socket)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); PyObject *(*_attach_fileobj)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *); PyObject *(*_open)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *); /* "uvloop/handles/async_.pyx":2 * @cython.no_gc_clear * cdef class UVAsync(UVHandle): # <<<<<<<<<<<<<< * cdef _init(self, Loop loop, method_t callback, object ctx): * cdef int err */ struct __pyx_vtabstruct_6uvloop_4loop_UVAsync { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVAsync *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *); PyObject *(*send)(struct __pyx_obj_6uvloop_4loop_UVAsync *); struct __pyx_obj_6uvloop_4loop_UVAsync *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *__pyx_vtabptr_6uvloop_4loop_UVAsync; /* "uvloop/handles/timer.pyx":2 * @cython.no_gc_clear * cdef class UVTimer(UVHandle): # <<<<<<<<<<<<<< * cdef _init(self, Loop loop, method_t callback, object ctx, * uint64_t timeout): */ struct __pyx_vtabstruct_6uvloop_4loop_UVTimer { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVTimer *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t); PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVTimer *); PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVTimer *); struct __pyx_obj_6uvloop_4loop_UVTimer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *__pyx_vtabptr_6uvloop_4loop_UVTimer; /* "uvloop/handles/idle.pyx":2 * @cython.no_gc_clear * cdef class UVIdle(UVHandle): # <<<<<<<<<<<<<< * cdef _init(self, Loop loop, Handle h): * cdef int err */ struct __pyx_vtabstruct_6uvloop_4loop_UVIdle { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVIdle *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVIdle *); PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVIdle *); struct __pyx_obj_6uvloop_4loop_UVIdle *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *__pyx_vtabptr_6uvloop_4loop_UVIdle; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *); /* "uvloop/handles/basetransport.pyx":2 * @cython.no_gc_clear * cdef class UVBaseTransport(UVSocketHandle): # <<<<<<<<<<<<<< * * def __cinit__(self): */ struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_base; PyObject *(*_set_write_buffer_limits)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits *__pyx_optional_args); PyObject *(*_maybe_pause_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_maybe_resume_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_schedule_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_schedule_call_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); PyObject *(*_wakeup_waiter)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_call_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); PyObject *(*_set_server)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *); PyObject *(*_set_waiter)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); PyObject *(*_set_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); PyObject *(*_init_protocol)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_add_extra_info)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *); size_t (*_get_write_buffer_size)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); int (*_is_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_start_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_stop_reading)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits *__pyx_optional_args); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *); /* "uvloop/loop.pyx":63 * * @cython.no_gc_clear * cdef class Loop: # <<<<<<<<<<<<<< * def __cinit__(self): * cdef int err */ struct __pyx_vtabstruct_6uvloop_4loop_Loop { PyObject *(*_init_debug_fields)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_on_wake)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_on_idle)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*__pyx___run)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode); PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode); PyObject *(*_close)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_stop)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); uint64_t (*_time)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_queue_write)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_exec_queued_writes)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_call_soon)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *); PyObject *(*_call_soon_handle)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*_call_later)(struct __pyx_obj_6uvloop_4loop_Loop *, uint64_t, PyObject *, PyObject *); void (*_handle_exception)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_new_future)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_check_signal)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_check_closed)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_check_thread)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_getaddrinfo)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, int, int, int, int, int); PyObject *(*_getnameinfo)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, int); PyObject *(*_create_server)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, int, PyObject *); PyObject *(*_track_transport)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *); PyObject *(*_ensure_fd_no_transport)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_add_reader)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*_remove_reader)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_add_writer)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*_remove_writer)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_sock_recv)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *); PyObject *(*_sock_sendall)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *); PyObject *(*_sock_accept)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *); PyObject *(*_sock_connect)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *); PyObject *(*_sock_connect_cb)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *); PyObject *(*_sock_set_reuseport)(struct __pyx_obj_6uvloop_4loop_Loop *, int); PyObject *(*_setup_signals)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_shutdown_signals)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_handle_signal)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_read_from_self)(struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_process_self_data)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); PyObject *(*_set_coroutine_wrapper)(struct __pyx_obj_6uvloop_4loop_Loop *, int); }; static struct __pyx_vtabstruct_6uvloop_4loop_Loop *__pyx_vtabptr_6uvloop_4loop_Loop; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *); static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_reader(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *); static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_writer(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *); static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *); /* "uvloop/cbhandles.pyx":3 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class Handle: # <<<<<<<<<<<<<< * def __cinit__(self): * self.cancelled = 0 */ struct __pyx_vtabstruct_6uvloop_4loop_Handle { PyObject *(*_set_loop)(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *); PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*_cancel)(struct __pyx_obj_6uvloop_4loop_Handle *); }; static struct __pyx_vtabstruct_6uvloop_4loop_Handle *__pyx_vtabptr_6uvloop_4loop_Handle; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *); /* "uvloop/cbhandles.pyx":126 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class TimerHandle: # <<<<<<<<<<<<<< * def __cinit__(self, Loop loop, object callback, object args, * uint64_t delay): */ struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle { PyObject *(*_run)(struct __pyx_obj_6uvloop_4loop_TimerHandle *); PyObject *(*_cancel)(struct __pyx_obj_6uvloop_4loop_TimerHandle *); }; static struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *__pyx_vtabptr_6uvloop_4loop_TimerHandle; /* "uvloop/handles/check.pyx":2 * @cython.no_gc_clear * cdef class UVCheck(UVHandle): # <<<<<<<<<<<<<< * cdef _init(self, Loop loop, Handle h): * cdef int err */ struct __pyx_vtabstruct_6uvloop_4loop_UVCheck { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVCheck *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVCheck *); PyObject *(*start)(struct __pyx_obj_6uvloop_4loop_UVCheck *); struct __pyx_obj_6uvloop_4loop_UVCheck *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *__pyx_vtabptr_6uvloop_4loop_UVCheck; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *); /* "uvloop/handles/poll.pyx":2 * @cython.no_gc_clear * cdef class UVPoll(UVHandle): # <<<<<<<<<<<<<< * cdef _init(self, Loop loop, int fd): * cdef int err */ struct __pyx_vtabstruct_6uvloop_4loop_UVPoll { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Loop *, int); PyObject *(*_poll_start)(struct __pyx_obj_6uvloop_4loop_UVPoll *, int); PyObject *(*_poll_stop)(struct __pyx_obj_6uvloop_4loop_UVPoll *); int (*is_active)(struct __pyx_obj_6uvloop_4loop_UVPoll *); PyObject *(*start_reading)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*start_writing)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *); PyObject *(*stop_reading)(struct __pyx_obj_6uvloop_4loop_UVPoll *); PyObject *(*stop_writing)(struct __pyx_obj_6uvloop_4loop_UVPoll *); PyObject *(*stop)(struct __pyx_obj_6uvloop_4loop_UVPoll *); struct __pyx_obj_6uvloop_4loop_UVPoll *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, int); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *__pyx_vtabptr_6uvloop_4loop_UVPoll; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *, int); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *); /* "uvloop/handles/stream.pyx":208 * * @cython.no_gc_clear * cdef class UVStream(UVBaseTransport): # <<<<<<<<<<<<<< * * def __cinit__(self): */ struct __pyx_vtabstruct_6uvloop_4loop_UVStream { struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); PyObject *(*_exec_write)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_shutdown)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_accept)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_close_on_read_error)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*__pyx___reading_started)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*__pyx___reading_stopped)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_write)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); PyObject *(*_try_write)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); PyObject *(*_on_accept)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_on_read)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); PyObject *(*_on_eof)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_on_write)(struct __pyx_obj_6uvloop_4loop_UVStream *); PyObject *(*_on_connect)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVStream *__pyx_vtabptr_6uvloop_4loop_UVStream; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_read(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); /* "uvloop/handles/streamserver.pyx":2 * @cython.no_gc_clear * cdef class UVStreamServer(UVSocketHandle): # <<<<<<<<<<<<<< * * def __cinit__(self): */ struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer { struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); PyObject *(*_mark_as_open)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *); PyObject *(*listen)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *); PyObject *(*_on_listen)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *); struct __pyx_obj_6uvloop_4loop_UVStream *(*_make_new_transport)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *__pyx_vtabptr_6uvloop_4loop_UVStreamServer; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *); /* "uvloop/handles/tcp.pyx":57 * * @cython.no_gc_clear * cdef class TCPServer(UVStreamServer): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_TCPServer { struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_base; PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_TCPServer *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args); struct __pyx_obj_6uvloop_4loop_TCPServer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, unsigned int); }; static struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *__pyx_vtabptr_6uvloop_4loop_TCPServer; /* "uvloop/handles/tcp.pyx":97 * * @cython.no_gc_clear * cdef class TCPTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base; PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args); PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *); struct __pyx_obj_6uvloop_4loop_TCPTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *__pyx_vtabptr_6uvloop_4loop_TCPTransport; /* "uvloop/handles/pipe.pyx":38 * * @cython.no_gc_clear * cdef class UnixServer(UVStreamServer): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_UnixServer { struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_base; PyObject *(*bind)(struct __pyx_obj_6uvloop_4loop_UnixServer *, PyObject *); struct __pyx_obj_6uvloop_4loop_UnixServer *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *__pyx_vtabptr_6uvloop_4loop_UnixServer; /* "uvloop/handles/pipe.pyx":77 * * @cython.no_gc_clear * cdef class UnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base; struct __pyx_obj_6uvloop_4loop_UnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop_UnixTransport *, char *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *__pyx_vtabptr_6uvloop_4loop_UnixTransport; /* "uvloop/handles/pipe.pyx":102 * * @cython.no_gc_clear * cdef class ReadUnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *__pyx_vtabptr_6uvloop_4loop_ReadUnixTransport; /* "uvloop/handles/pipe.pyx":145 * * @cython.no_gc_clear * cdef class WriteUnixTransport(UVStream): # <<<<<<<<<<<<<< * * @staticmethod */ struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_base; struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *__pyx_vtabptr_6uvloop_4loop_WriteUnixTransport; /* "uvloop/handles/process.pyx":2 * @cython.no_gc_clear * cdef class UVProcess(UVHandle): # <<<<<<<<<<<<<< * """Abstract class; wrapper over uv_process_t handle.""" * */ struct __pyx_vtabstruct_6uvloop_4loop_UVProcess { struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UVProcess *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); PyObject *(*_after_fork)(struct __pyx_obj_6uvloop_4loop_UVProcess *); char **(*__pyx___to_cstring_array)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *); PyObject *(*_init_args)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *); PyObject *(*_init_env)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *); PyObject *(*_init_files)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *); PyObject *(*_init_options)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); PyObject *(*_close_after_spawn)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int); PyObject *(*_on_exit)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int); PyObject *(*_kill)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *__pyx_vtabptr_6uvloop_4loop_UVProcess; /* "uvloop/handles/process.pyx":314 * * @cython.no_gc_clear * cdef class UVProcessTransport(UVProcess): # <<<<<<<<<<<<<< * def __cinit__(self): * self._exit_waiters = [] */ struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVProcess __pyx_base; PyObject *(*_file_redirect_stdio)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int); PyObject *(*_file_devnull)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *); PyObject *(*_file_inpipe)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *); PyObject *(*_file_outpipe)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *); PyObject *(*_check_proc)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *); PyObject *(*_pipe_connection_lost)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *); PyObject *(*_pipe_data_received)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *); PyObject *(*_call_connection_made)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, PyObject *); PyObject *(*_try_finish)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *); struct __pyx_obj_6uvloop_4loop_UVProcessTransport *(*new)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *__pyx_vtabptr_6uvloop_4loop_UVProcessTransport; /* "uvloop/request.pyx":1 * cdef class UVRequest: # <<<<<<<<<<<<<< * """A base class for all libuv requests (uv_getaddrinfo_t, etc). * */ struct __pyx_vtabstruct_6uvloop_4loop_UVRequest { PyObject *(*on_done)(struct __pyx_obj_6uvloop_4loop_UVRequest *); PyObject *(*cancel)(struct __pyx_obj_6uvloop_4loop_UVRequest *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UVRequest *__pyx_vtabptr_6uvloop_4loop_UVRequest; /* "uvloop/handles/udp.pyx":54 * * @cython.no_gc_clear * cdef class UDPTransport(UVBaseTransport): # <<<<<<<<<<<<<< * def __cinit__(self): * self._family = uv.AF_UNSPEC */ struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport { struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_base; PyObject *(*_init)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int); PyObject *(*_set_remote_address)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, size_t); PyObject *(*_bind)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, int); PyObject *(*open)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int, int); PyObject *(*_set_broadcast)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int); PyObject *(*__pyx___receiving_started)(struct __pyx_obj_6uvloop_4loop_UDPTransport *); PyObject *(*__pyx___receiving_stopped)(struct __pyx_obj_6uvloop_4loop_UDPTransport *); PyObject *(*_send)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *); PyObject *(*_on_receive)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *, PyObject *); PyObject *(*_on_sent)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *__pyx_vtabptr_6uvloop_4loop_UDPTransport; static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *); static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *); /* "uvloop/server.pyx":1 * cdef class Server: # <<<<<<<<<<<<<< * def __cinit__(self, Loop loop): * self._loop = loop */ struct __pyx_vtabstruct_6uvloop_4loop_Server { PyObject *(*_add_server)(struct __pyx_obj_6uvloop_4loop_Server *, struct __pyx_obj_6uvloop_4loop_UVStreamServer *); PyObject *(*_wakeup)(struct __pyx_obj_6uvloop_4loop_Server *); PyObject *(*_attach)(struct __pyx_obj_6uvloop_4loop_Server *); PyObject *(*_detach)(struct __pyx_obj_6uvloop_4loop_Server *); }; static struct __pyx_vtabstruct_6uvloop_4loop_Server *__pyx_vtabptr_6uvloop_4loop_Server; /* "uvloop/handles/stream.pyx":5 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class _StreamWriteContext: # <<<<<<<<<<<<<< * # used to hold additional write request information for uv_write * */ struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext { PyObject *(*free_bufs)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *); PyObject *(*close)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *); PyObject *(*advance_uv_buf)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *, size_t); struct __pyx_obj_6uvloop_4loop__StreamWriteContext *(*new)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *__pyx_vtabptr_6uvloop_4loop__StreamWriteContext; /* "uvloop/handles/tcp.pyx":171 * * * cdef class _TCPConnectRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * TCPTransport transport */ struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest { struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base; PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *, struct sockaddr *); }; static struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *__pyx_vtabptr_6uvloop_4loop__TCPConnectRequest; /* "uvloop/handles/pipe.pyx":176 * * * cdef class _PipeConnectRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * UnixTransport transport */ struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest { struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base; PyObject *(*connect)(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *, char *); }; static struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *__pyx_vtabptr_6uvloop_4loop__PipeConnectRequest; /* "uvloop/dns.pyx":185 * * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class AddrInfo: # <<<<<<<<<<<<<< * cdef: * system.addrinfo *data */ struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo { void (*set_data)(struct __pyx_obj_6uvloop_4loop_AddrInfo *, struct addrinfo *); PyObject *(*unpack)(struct __pyx_obj_6uvloop_4loop_AddrInfo *); int (*isinstance)(PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *__pyx_vtabptr_6uvloop_4loop_AddrInfo; /* "uvloop/dns.pyx":229 * * * cdef class AddrInfoRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * system.addrinfo hints */ struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest { struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base; }; static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *__pyx_vtabptr_6uvloop_4loop_AddrInfoRequest; /* "uvloop/dns.pyx":288 * * * cdef class NameInfoRequest(UVRequest): # <<<<<<<<<<<<<< * cdef: * object callback */ struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest { struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_base; PyObject *(*query)(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *, struct sockaddr *, int); }; static struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *__pyx_vtabptr_6uvloop_4loop_NameInfoRequest; /* "uvloop/handles/udp.pyx":3 * @cython.no_gc_clear * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class _UDPSendContext: # <<<<<<<<<<<<<< * # used to hold additional write request information for uv_write * */ struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext { PyObject *(*close)(struct __pyx_obj_6uvloop_4loop__UDPSendContext *); struct __pyx_obj_6uvloop_4loop__UDPSendContext *(*new)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *__pyx_vtabptr_6uvloop_4loop__UDPSendContext; /* "uvloop/future.pyx":24 * * * cdef class BaseFuture: # <<<<<<<<<<<<<< * cdef: * int _state */ struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture { PyObject *(*_schedule_callbacks)(struct __pyx_obj_6uvloop_4loop_BaseFuture *); PyObject *(*_add_done_callback)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *); PyObject *(*_done)(struct __pyx_obj_6uvloop_4loop_BaseFuture *); PyObject *(*_cancel)(struct __pyx_obj_6uvloop_4loop_BaseFuture *); PyObject *(*_result_impl)(struct __pyx_obj_6uvloop_4loop_BaseFuture *); PyObject *(*_str_state)(struct __pyx_obj_6uvloop_4loop_BaseFuture *); PyObject *(*set_result)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *, int __pyx_skip_dispatch); PyObject *(*set_exception)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *__pyx_vtabptr_6uvloop_4loop_BaseFuture; /* "uvloop/future.pyx":249 * * * cdef class BaseTask(BaseFuture): # <<<<<<<<<<<<<< * cdef: * readonly object _coro */ struct __pyx_vtabstruct_6uvloop_4loop_BaseTask { struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture __pyx_base; PyObject *(*_raise_wrong_loop)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); PyObject *(*_raise_yield)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); PyObject *(*_raise_generator)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); PyObject *(*_raise_else)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); PyObject *(*_skip_oneloop)(struct __pyx_obj_6uvloop_4loop_BaseTask *); PyObject *(*_fast_step)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); PyObject *(*_fast_wakeup)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *); }; static struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *__pyx_vtabptr_6uvloop_4loop_BaseTask; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* IncludeStringH.proto */ #include /* decode_c_string.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #endif /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* KeywordStringCheck.proto */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET(); #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* GetModuleGlobalName.proto */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) PyErr_SetObject(PyExc_KeyError, args); Py_XDECREF(args); } return NULL; } Py_INCREF(value); return value; } #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #endif /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* py_dict_clear.proto */ #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* None.proto */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* CythonFunction.proto */ #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* None.proto */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); /* CallableCheck.proto */ #if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3 #define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL) #else #define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) #endif /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* CoroutineBase.proto */ typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; PyObject *gi_modulename; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static int __Pyx_Coroutine_clear(PyObject *self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif /* PatchModuleWithCoroutine.proto */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); /* PatchGeneratorABC.proto */ static int __Pyx_patch_abc(void); /* Coroutine.proto */ #define __Pyx_Coroutine_USED static PyTypeObject *__pyx_CoroutineType = 0; static PyTypeObject *__pyx_CoroutineAwaitType = 0; #define __Pyx_Coroutine_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineType) #define __Pyx_Coroutine_New(body, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_CoroutineType, body, closure, name, qualname, module_name) static int __pyx_Coroutine_init(void); static PyObject *__Pyx__Coroutine_await(PyObject *coroutine); /* GetAwaitIter.proto */ static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o); static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *o); /* CoroutineYieldFrom.proto */ #define __Pyx_Coroutine_Yield_From(gen, source) __Pyx__Coroutine_Yield_From(gen, source, 0) static CYTHON_INLINE PyObject* __Pyx__Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source, int warn); /* ReturnWithStopIteration.proto */ #define __Pyx_ReturnWithStopIteration(value)\ if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value) static void __Pyx__ReturnWithStopIteration(PyObject* value); /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* ArgTypeTest.proto */ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /* SetItemInt.proto */ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); /* MergeKeywords.proto */ static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* None.proto */ static CYTHON_INLINE long __Pyx_div_long(long, long); /* PyDictContains.proto */ static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ PyObject_RichCompare(op1, op2, Py_EQ) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2)) #endif /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* PyObjectLookupSpecial.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return __Pyx_PyObject_GetAttrStr(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #else #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* decode_c_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); /* decode_bytes.proto */ static CYTHON_INLINE PyObject* __Pyx_decode_bytes( PyObject* string, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { return __Pyx_decode_c_bytes( PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), start, stop, encoding, errors, decode_func); } /* SliceObject.proto */ #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* PatchInspect.proto */ static PyObject* __Pyx_patch_inspect(PyObject* module); /* PatchAsyncIO.proto */ static PyObject* __Pyx_patch_asyncio(PyObject* module); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_volatile__int(volatile int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); /* Generator.proto */ #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* PyIdentifierFromString.proto */ #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif /* ModuleImport.proto */ static PyObject *__Pyx_ImportModule(const char *name); /* TypeImport.proto */ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static PyObject *__pyx_f_6uvloop_4loop_4Loop__init_debug_fields(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__setup_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__shutdown_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__read_from_self(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__process_self_data(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__handle_signal(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_wake(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_idle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop___run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static uint64_t __pyx_f_6uvloop_4loop_4Loop__time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uint64_t __pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto*/ static void __pyx_f_6uvloop_4loop_4Loop__handle_exception(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_ex); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_transport); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, int __pyx_v_unpack); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_n); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_data); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_fd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__set_coroutine_wrapper(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_4Loop__create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl, int __pyx_v_reuse_port, PyObject *__pyx_v_backlog); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6Handle__cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__run(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__free(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto*/ static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__fatal_error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__close(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, PyObject *__pyx_v_file); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__close(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__open(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVAsync__init(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVAsync_send(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_f_6uvloop_4loop_7UVAsync_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVIdle__init(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_f_6uvloop_4loop_6UVIdle_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVCheck__init(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_f_6uvloop_4loop_7UVCheck_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer__init(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_stop(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_start(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_f_6uvloop_4loop_7UVTimer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__init(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_f_6uvloop_4loop_6UVPoll_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd); /* proto*/ static int __pyx_f_6uvloop_4loop_6UVPoll_is_active(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, int __pyx_v_flags); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__close(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__fatal_error(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error *__pyx_optional_args); /* proto*/ static size_t __pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error *__pyx_optional_args); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits *__pyx_optional_args); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_waiter); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_obj); /* proto*/ static int __pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_close(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, size_t __pyx_v_sent); /* proto*/ static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream, PyObject *__pyx_v_buffers); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_server); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static int __pyx_f_6uvloop_4loop_8UVStream__is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__start_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__stop_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static size_t __pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__close(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_read(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_backlog); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error *__pyx_optional_args); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol, CYTHON_UNUSED PyObject *__pyx_v_waiter); /* proto*/ static struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_f_6uvloop_4loop_9TCPServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl, unsigned int __pyx_v_flags); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__new_socket(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__open(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer_bind(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter); /* proto*/ static struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_f_6uvloop_4loop_12TCPTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_bind(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__open(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_connect(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_f_6uvloop_4loop_10UnixServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__new_socket(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__open(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer_bind(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_path); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_f_6uvloop_4loop_13UnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__open(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport_connect(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, char *__pyx_v_addr); /* proto*/ static struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__open(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__open(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, char *__pyx_v_addr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__after_fork(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_fd); /* proto*/ static char **__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_arr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_options(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_args(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_env(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_env); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_files(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__stdin, CYTHON_UNUSED PyObject *__pyx_v__stdout, CYTHON_UNUSED PyObject *__pyx_v__stderr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__kill(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_signum); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_exc); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_data); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_f_6uvloop_4loop_18UVProcessTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_waiter, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_on_done(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_cancel(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto*/ static void __pyx_f_6uvloop_4loop_8AddrInfo_set_data(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, struct addrinfo *__pyx_v_data); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8AddrInfo_unpack(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto*/ static int __pyx_f_6uvloop_4loop_8AddrInfo_isinstance(PyObject *__pyx_v_other); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15NameInfoRequest_query(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_15_UDPSendContext_close(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self); /* proto*/ static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_f_6uvloop_4loop_15_UDPSendContext_new(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp, PyObject *__pyx_v_data); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__init(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_family); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_remote_address(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, size_t __pyx_v_addr_len); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport_open(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_family, int __pyx_v_sockfd); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__bind(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_reuse_addr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_on); /* proto*/ static size_t __pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static int __pyx_f_6uvloop_4loop_12UDPTransport__is_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__start_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__send(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_receive(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_exc, PyObject *__pyx_v_addr); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_sent(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6Server__add_server(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_srv); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6Server__wakeup(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6Server__attach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_6Server__detach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__schedule_callbacks(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__add_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__done(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__cancel(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__result_impl(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__str_state(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture_set_result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_result, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture_set_exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_exception, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_wrong_loop(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_fut); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_yield(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_fut); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_generator(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_val); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_else(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_val); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__skip_oneloop(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__fast_step(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_exc); /* proto*/ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__fast_wakeup(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_future); /* proto*/ /* Module declarations from 'uvloop.includes' */ /* Module declarations from 'libc.stdint' */ /* Module declarations from 'posix.types' */ /* Module declarations from 'uvloop.includes.system' */ /* Module declarations from 'uvloop.includes.uv' */ /* Module declarations from 'cython' */ /* Module declarations from 'uvloop.includes.debug' */ /* Module declarations from 'uvloop.includes.python' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc' */ /* Module declarations from 'libc.errno' */ /* Module declarations from 'cpython.version' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.exc' */ /* Module declarations from 'cpython.module' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cpython.tuple' */ /* Module declarations from 'cpython.list' */ /* Module declarations from 'cpython.sequence' */ /* Module declarations from 'cpython.mapping' */ /* Module declarations from 'cpython.iterator' */ /* Module declarations from 'cpython.number' */ /* Module declarations from 'cpython.int' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.bool' */ static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; /* Module declarations from 'cpython.long' */ /* Module declarations from 'cpython.float' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.complex' */ static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; /* Module declarations from 'cpython.string' */ /* Module declarations from 'cpython.unicode' */ /* Module declarations from 'cpython.dict' */ /* Module declarations from 'cpython.instance' */ /* Module declarations from 'cpython.function' */ /* Module declarations from 'cpython.method' */ /* Module declarations from 'cpython.weakref' */ /* Module declarations from 'cpython.getargs' */ /* Module declarations from 'cpython.pythread' */ /* Module declarations from 'cpython.pystate' */ /* Module declarations from 'cpython.cobject' */ /* Module declarations from 'cpython.oldbuffer' */ /* Module declarations from 'cpython.set' */ /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'cpython.bytes' */ /* Module declarations from 'cpython.pycapsule' */ /* Module declarations from 'cpython' */ /* Module declarations from 'uvloop.loop' */ static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVHandle = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVSocketHandle = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVAsync = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVTimer = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVIdle = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVBaseTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_Loop = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_Handle = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_TimerHandle = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVCheck = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVPoll = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVStream = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVStreamServer = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_TCPServer = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_TCPTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UnixServer = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UnixTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_ReadUnixTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_WriteUnixTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVProcess = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVProcessTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UVRequest = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_UDPTransport = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_Server = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop__StreamWriteContext = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop__TCPConnectRequest = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop__PipeConnectRequest = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_AddrInfo = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_AddrInfoRequest = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_NameInfoRequest = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop__UDPSendContext = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_BaseFuture = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop_BaseTask = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_3_run_until_complete = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_getnameinfo = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_create_server = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_create_connection = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_genexpr = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_genexpr = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_unix_server = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_sock_sendall = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_sock_connect = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_14___subprocess_run = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_genexpr = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_20_wait_closed = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_21___iter__ = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_22___await__ = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future = 0; static PyTypeObject *__pyx_ptype_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_get_event_loop = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_CancelledError = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_InvalidStateError = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_TimeoutError = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_Future = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_Task = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_ensure_future = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_gather = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_wait = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_logger = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_iscoroutine = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_iscoroutinefunction = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_BaseProtocol = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_Protocol = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_SSLProtocol = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_debug_wrapper = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_isfuture = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_get_running_loop = 0; static PyObject *__pyx_v_6uvloop_4loop_aio_set_running_loop = 0; static PyObject *__pyx_v_6uvloop_4loop_col_deque = 0; static PyObject *__pyx_v_6uvloop_4loop_col_Iterable = 0; static PyObject *__pyx_v_6uvloop_4loop_col_Counter = 0; static PyObject *__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor = 0; static PyObject *__pyx_v_6uvloop_4loop_cc_Future = 0; static PyObject *__pyx_v_6uvloop_4loop_errno_EINVAL = 0; static PyObject *__pyx_v_6uvloop_4loop_ft_partial = 0; static PyObject *__pyx_v_6uvloop_4loop_gc_disable = 0; static PyObject *__pyx_v_6uvloop_4loop_iter_chain = 0; static PyObject *__pyx_v_6uvloop_4loop_inspect_isgenerator = 0; static int __pyx_v_6uvloop_4loop_has_SO_REUSEPORT; static int __pyx_v_6uvloop_4loop_SO_REUSEPORT; static PyObject *__pyx_v_6uvloop_4loop_socket_gaierror = 0; static PyObject *__pyx_v_6uvloop_4loop_socket_error = 0; static PyObject *__pyx_v_6uvloop_4loop_socket_timeout = 0; static PyObject *__pyx_v_6uvloop_4loop_socket_socket = 0; static PyObject *__pyx_v_6uvloop_4loop_socket_socketpair = 0; static PyObject *__pyx_v_6uvloop_4loop_socket_getservbyname = 0; static int __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY; static int __pyx_v_6uvloop_4loop_socket_EAI_AGAIN; static int __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS; static int __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS; static int __pyx_v_6uvloop_4loop_socket_EAI_CANCELED; static int __pyx_v_6uvloop_4loop_socket_EAI_FAIL; static int __pyx_v_6uvloop_4loop_socket_EAI_FAMILY; static int __pyx_v_6uvloop_4loop_socket_EAI_MEMORY; static int __pyx_v_6uvloop_4loop_socket_EAI_NODATA; static int __pyx_v_6uvloop_4loop_socket_EAI_NONAME; static int __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW; static int __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL; static int __pyx_v_6uvloop_4loop_socket_EAI_SERVICE; static int __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE; static PyObject *__pyx_v_6uvloop_4loop_os_name = 0; static PyObject *__pyx_v_6uvloop_4loop_os_environ = 0; static PyObject *__pyx_v_6uvloop_4loop_os_dup = 0; static PyObject *__pyx_v_6uvloop_4loop_os_set_inheritable = 0; static PyObject *__pyx_v_6uvloop_4loop_os_get_inheritable = 0; static PyObject *__pyx_v_6uvloop_4loop_os_close = 0; static PyObject *__pyx_v_6uvloop_4loop_os_open = 0; static PyObject *__pyx_v_6uvloop_4loop_os_devnull = 0; static PyObject *__pyx_v_6uvloop_4loop_os_O_RDWR = 0; static PyObject *__pyx_v_6uvloop_4loop_os_pipe = 0; static PyObject *__pyx_v_6uvloop_4loop_os_read = 0; static PyObject *__pyx_v_6uvloop_4loop_sys_ignore_environment = 0; static PyObject *__pyx_v_6uvloop_4loop_sys_exc_info = 0; static PyObject *__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper = 0; static PyObject *__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper = 0; static PyObject *__pyx_v_6uvloop_4loop_sys_getframe = 0; static PyObject *__pyx_v_6uvloop_4loop_ssl_SSLContext = 0; static long __pyx_v_6uvloop_4loop_MAIN_THREAD_ID; static int __pyx_v_6uvloop_4loop_subprocess_PIPE; static int __pyx_v_6uvloop_4loop_subprocess_STDOUT; static int __pyx_v_6uvloop_4loop_subprocess_DEVNULL; static PyObject *__pyx_v_6uvloop_4loop_subprocess_SubprocessError = 0; static int __pyx_v_6uvloop_4loop_signal_NSIG; static PyObject *__pyx_v_6uvloop_4loop_signal_signal = 0; static PyObject *__pyx_v_6uvloop_4loop_signal_set_wakeup_fd = 0; static PyObject *__pyx_v_6uvloop_4loop_signal_default_int_handler = 0; static PyObject *__pyx_v_6uvloop_4loop_signal_SIG_DFL = 0; static PyObject *__pyx_v_6uvloop_4loop_time_sleep = 0; static PyObject *__pyx_v_6uvloop_4loop_time_monotonic = 0; static PyObject *__pyx_v_6uvloop_4loop_tb_extract_stack = 0; static PyObject *__pyx_v_6uvloop_4loop_tb_format_list = 0; static PyObject *__pyx_v_6uvloop_4loop_warnings_warn = 0; static PyObject *__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary = 0; static PyObject *__pyx_v_6uvloop_4loop_weakref_WeakSet = 0; static PyObject *__pyx_v_6uvloop_4loop_uvloop_Future = 0; static PyObject *__pyx_v_6uvloop_4loop_future_factory = 0; static PyObject *__pyx_v_6uvloop_4loop_task_factory = 0; static volatile int __pyx_v_6uvloop_4loop___atfork_installed; static volatile int __pyx_v_6uvloop_4loop___forking; static struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_6uvloop_4loop___forking_loop = 0; static volatile int __pyx_v_6uvloop_4loop___mem_installed; static PyObject *__pyx_f_6uvloop_4loop___strerr(int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___convert_python_error(int); /*proto*/ static int __pyx_f_6uvloop_4loop___convert_socket_error(int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_convert_error(int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__is_sock_stream(PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__is_sock_dgram(PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_isfuture(PyObject *); /*proto*/ static void __pyx_f_6uvloop_4loop___loop_alloc_buffer(uv_handle_t *, size_t, uv_buf_t *); /*proto*/ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___loop_free_buffer(struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_new_Handle(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method_t, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle1(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method1_t, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle2(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method2_t, PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle3(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, __pyx_t_6uvloop_4loop_method3_t, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6uvloop_4loop___ensure_handle_data(uv_handle_t *, char const *); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_close_handle_cb(uv_handle_t *); /*proto*/ static void __pyx_f_6uvloop_4loop___close_all_handles(struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb(uv_handle_t *, void *); /*proto*/ static void __pyx_f_6uvloop_4loop___uvasync_callback(uv_async_t *); /*proto*/ static void __pyx_f_6uvloop_4loop_cb_idle_callback(uv_idle_t *); /*proto*/ static void __pyx_f_6uvloop_4loop_cb_check_callback(uv_check_t *); /*proto*/ static void __pyx_f_6uvloop_4loop___uvtimer_callback(uv_timer_t *); /*proto*/ static void __pyx_f_6uvloop_4loop___on_uvpoll_event(uv_poll_t *, int, int); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_stream_on_shutdown(uv_shutdown_t *, int); /*proto*/ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(uv_stream_t *, Py_ssize_t, uv_buf_t const *); /*proto*/ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(uv_write_t *, int); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_stream_on_read(uv_stream_t *, Py_ssize_t, uv_buf_t const *); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_stream_on_write(uv_write_t *, int); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_streamserver_on_listen(uv_stream_t *, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___tcp_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___tcp_bind(struct __pyx_obj_6uvloop_4loop_UVStream *, struct sockaddr *, unsigned int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___tcp_open(struct __pyx_obj_6uvloop_4loop_UVStream *, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___tcp_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); /*proto*/ static void __pyx_f_6uvloop_4loop___tcp_connect_callback(uv_connect_t *, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___pipe_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___pipe_open(struct __pyx_obj_6uvloop_4loop_UVStream *, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___pipe_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *); /*proto*/ static void __pyx_f_6uvloop_4loop___pipe_connect_callback(uv_connect_t *, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___process_convert_fileno(PyObject *); /*proto*/ static void __pyx_f_6uvloop_4loop___uvprocess_on_exit_callback(uv_process_t *, int64_t, int); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___socketpair(void); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___port_to_int(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(struct sockaddr const *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(int, PyObject *, struct sockaddr *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo(PyObject *, PyObject *, int, int, int, struct sockaddr *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(PyObject *, PyObject *, int, int, int, int); /*proto*/ static void __pyx_f_6uvloop_4loop___on_addrinfo_resolved(uv_getaddrinfo_t *, int, struct addrinfo *); /*proto*/ static void __pyx_f_6uvloop_4loop___on_nameinfo_resolved(uv_getnameinfo_t *, int, char const *, char const *); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_udp_on_receive(uv_udp_t *, Py_ssize_t, uv_buf_t const *, struct sockaddr const *, unsigned int); /*proto*/ static void __pyx_f_6uvloop_4loop___uv_udp_on_send(uv_udp_send_t *, int); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop__future_get_blocking(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop__future_set_blocking(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__is_uvloop_future(PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__set_concurrent_future_state(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__copy_future_state(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop__chain_future(PyObject *, PyObject *); /*proto*/ static void __pyx_f_6uvloop_4loop___atfork_child(void); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___install_atfork(void); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop___install_pymem(void); /*proto*/ #define __Pyx_MODULE_NAME "uvloop.loop" int __pyx_module_is_main_uvloop__loop = 0; /* Implementation of 'uvloop.loop' */ static PyObject *__pyx_builtin_OSError; static PyObject *__pyx_builtin_PermissionError; static PyObject *__pyx_builtin_BlockingIOError; static PyObject *__pyx_builtin_BrokenPipeError; static PyObject *__pyx_builtin_ConnectionAbortedError; static PyObject *__pyx_builtin_ConnectionRefusedError; static PyObject *__pyx_builtin_ConnectionResetError; static PyObject *__pyx_builtin_FileExistsError; static PyObject *__pyx_builtin_FileNotFoundError; static PyObject *__pyx_builtin_InterruptedError; static PyObject *__pyx_builtin_IsADirectoryError; static PyObject *__pyx_builtin_ProcessLookupError; static PyObject *__pyx_builtin_TimeoutError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_BaseException; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_memoryview; static PyObject *__pyx_builtin_RuntimeWarning; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_print; static PyObject *__pyx_builtin_OverflowError; static PyObject *__pyx_builtin_LookupError; static PyObject *__pyx_builtin_ResourceWarning; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_open; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_StopIteration; static PyObject *__pyx_builtin_AssertionError; static const char __pyx_k_b[] = "b"; static const char __pyx_k_c[] = "-c"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_r[] = "{}: {!r}"; static const char __pyx_k_ex[] = "ex"; static const char __pyx_k_fd[] = "fd"; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_id[] = "id"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_wb[] = "wb"; static const char __pyx_k__30[] = ""; static const char __pyx_k__36[] = "-------------------------------+---------+---------"; static const char __pyx_k__64[] = ", "; static const char __pyx_k__75[] = "{}: {}"; static const char __pyx_k__76[] = "\n"; static const char __pyx_k__97[] = "{}={}"; static const char __pyx_k_add[] = "add"; static const char __pyx_k_cmd[] = "cmd"; static const char __pyx_k_cwd[] = "cwd"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_dup[] = "dup"; static const char __pyx_k_env[] = "env"; static const char __pyx_k_exc[] = "exc"; static const char __pyx_k_fut[] = "fut"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_log[] = "log"; static const char __pyx_k_low[] = "low"; static const char __pyx_k_pop[] = "pop"; static const char __pyx_k_sig[] = "sig"; static const char __pyx_k_ssl[] = "ssl"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_tcp[] = "tcp"; static const char __pyx_k_udp[] = "udp"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_NSIG[] = "NSIG"; static const char __pyx_k_PIPE[] = "PIPE"; static const char __pyx_k_Task[] = "Task"; static const char __pyx_k__103[] = "::"; static const char __pyx_k__111[] = "<"; static const char __pyx_k__112[] = " "; static const char __pyx_k__113[] = ">"; static const char __pyx_k__120[] = "{} ({})"; static const char __pyx_k__146[] = ":"; static const char __pyx_k__157[] = "="; static const char __pyx_k_addr[] = "addr"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_bind[] = "bind"; static const char __pyx_k_cast[] = "cast"; static const char __pyx_k_copy[] = "copy"; static const char __pyx_k_coro[] = "coro"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_done[] = "done"; static const char __pyx_k_exit[] = "__exit__"; static const char __pyx_k_func[] = "func"; static const char __pyx_k_high[] = "high"; static const char __pyx_k_host[] = "host"; static const char __pyx_k_idna[] = "idna"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_iter[] = "__iter__"; static const char __pyx_k_loop[] = "loop"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_noop[] = "_noop"; static const char __pyx_k_open[] = "open"; static const char __pyx_k_path[] = "path"; static const char __pyx_k_pipe[] = "pipe"; static const char __pyx_k_port[] = "port"; static const char __pyx_k_proc[] = "proc"; static const char __pyx_k_read[] = "read"; static const char __pyx_k_recv[] = "recv"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_sock[] = "sock"; static const char __pyx_k_stop[] = "stop"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_time[] = "time"; static const char __pyx_k_type[] = "type"; static const char __pyx_k_wait[] = "wait"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_when[] = "when"; static const char __pyx_k_await[] = "__await__"; static const char __pyx_k_cause[] = "__cause__"; static const char __pyx_k_chain[] = "chain"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_delay[] = "delay"; static const char __pyx_k_deque[] = "deque"; static const char __pyx_k_enter[] = "__enter__"; static const char __pyx_k_errno[] = "errno"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_flush[] = "flush"; static const char __pyx_k_frame[] = "frame"; static const char __pyx_k_ident[] = "ident"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_lower[] = "lower"; static const char __pyx_k_other[] = "other"; static const char __pyx_k_print[] = "print"; static const char __pyx_k_proto[] = "proto"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_shell[] = "shell"; static const char __pyx_k_sleep[] = "sleep"; static const char __pyx_k_split[] = "split"; static const char __pyx_k_stdin[] = "stdin"; static const char __pyx_k_super[] = "super"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_write[] = "write"; static const char __pyx_k_Future[] = "Future"; static const char __pyx_k_O_RDWR[] = "O_RDWR"; static const char __pyx_k_STDOUT[] = "STDOUT"; static const char __pyx_k_accept[] = "accept"; static const char __pyx_k_aclose[] = "aclose"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_bin_sh[] = "/bin/sh"; static const char __pyx_k_cancel[] = "cancel"; static const char __pyx_k_decode[] = "decode"; static const char __pyx_k_detach[] = "detach"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_family[] = "family"; static const char __pyx_k_fileno[] = "fileno"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_future[] = "future"; static const char __pyx_k_gather[] = "gather"; static const char __pyx_k_handle[] = "handle"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_logger[] = "logger"; static const char __pyx_k_loop_2[] = "_loop"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_noop_2[] = "noop"; static const char __pyx_k_remove[] = "remove"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_rstrip[] = "rstrip"; static const char __pyx_k_signal[] = "signal"; static const char __pyx_k_signum[] = "signum"; static const char __pyx_k_socket[] = "socket"; static const char __pyx_k_source[] = "source"; static const char __pyx_k_stderr[] = "stderr"; static const char __pyx_k_stdout[] = "stdout"; static const char __pyx_k_submit[] = "submit"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_waiter[] = "waiter"; static const char __pyx_k_wakeup[] = "_wakeup"; static const char __pyx_k_0_0_0_0[] = "0.0.0.0"; static const char __pyx_k_Counter[] = "Counter"; static const char __pyx_k_DEVNULL[] = "DEVNULL"; static const char __pyx_k_OSError[] = "OSError"; static const char __pyx_k_PENDING[] = "PENDING"; static const char __pyx_k_SIG_DFL[] = "SIG_DFL"; static const char __pyx_k_WeakSet[] = "WeakSet"; static const char __pyx_k_address[] = "address"; static const char __pyx_k_asyncio[] = "asyncio"; static const char __pyx_k_backlog[] = "backlog"; static const char __pyx_k_bufsize[] = "bufsize"; static const char __pyx_k_connect[] = "connect"; static const char __pyx_k_context[] = "context"; static const char __pyx_k_default[] = "default"; static const char __pyx_k_devnull[] = "devnull"; static const char __pyx_k_disable[] = "disable"; static const char __pyx_k_discard[] = "discard"; static const char __pyx_k_environ[] = "environ"; static const char __pyx_k_futures[] = "futures"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_inspect[] = "inspect"; static const char __pyx_k_message[] = "message"; static const char __pyx_k_partial[] = "partial"; static const char __pyx_k_popleft[] = "popleft"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_program[] = "program"; static const char __pyx_k_sockets[] = "sockets"; static const char __pyx_k_timeout[] = "timeout"; static const char __pyx_k_warning[] = "warning"; static const char __pyx_k_weakref[] = "weakref"; static const char __pyx_k_18_7_7_7[] = " {: <18} {: >7} | {: >7} | {: >7}"; static const char __pyx_k_EAI_FAIL[] = "EAI_FAIL"; static const char __pyx_k_FINISHED[] = "FINISHED"; static const char __pyx_k_Iterable[] = "Iterable"; static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_Protocol[] = "Protocol"; static const char __pyx_k_asyncgen[] = "asyncgen"; static const char __pyx_k_blocking[] = "_blocking"; static const char __pyx_k_builtins[] = "__builtins__"; static const char __pyx_k_callback[] = "callback"; static const char __pyx_k_closed_x[] = "<{} closed={} {:#x}>"; static const char __pyx_k_exc_info[] = "exc_info"; static const char __pyx_k_executor[] = "executor"; static const char __pyx_k_gaierror[] = "gaierror"; static const char __pyx_k_getframe[] = "_getframe"; static const char __pyx_k_isfuture[] = "isfuture"; static const char __pyx_k_pass_fds[] = "pass_fds"; static const char __pyx_k_peername[] = "peername"; static const char __pyx_k_protocol[] = "protocol"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_shutdown[] = "shutdown"; static const char __pyx_k_sockaddr[] = "sockaddr"; static const char __pyx_k_sockname[] = "sockname"; static const char __pyx_k_sslproto[] = "sslproto"; static const char __pyx_k_strerror[] = "strerror"; static const char __pyx_k_subtract[] = "subtract"; static const char __pyx_k_warnings[] = "warnings"; static const char __pyx_k_CANCELLED[] = "CANCELLED"; static const char __pyx_k_EAI_AGAIN[] = "EAI_AGAIN"; static const char __pyx_k_Loop_time[] = "Loop time: {}"; static const char __pyx_k_Read_EOFs[] = "Read EOFs: {}"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_all_tasks[] = "_all_tasks"; static const char __pyx_k_call_soon[] = "call_soon"; static const char __pyx_k_cancelled[] = "cancelled"; static const char __pyx_k_close_fds[] = "close_fds"; static const char __pyx_k_exception[] = "exception"; static const char __pyx_k_finalizer[] = "finalizer"; static const char __pyx_k_firstiter[] = "firstiter"; static const char __pyx_k_functools[] = "functools"; static const char __pyx_k_get_debug[] = "get_debug"; static const char __pyx_k_is_closed[] = "is_closed"; static const char __pyx_k_itertools[] = "itertools"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_monotonic[] = "monotonic"; static const char __pyx_k_set_debug[] = "set_debug"; static const char __pyx_k_set_state[] = "_set_state"; static const char __pyx_k_stdio_fut[] = "stdio_fut"; static const char __pyx_k_threading[] = "threading"; static const char __pyx_k_traceback[] = "__traceback__"; static const char __pyx_k_transport[] = "transport"; static const char __pyx_k_EAI_FAMILY[] = "EAI_FAMILY"; static const char __pyx_k_EAI_MEMORY[] = "EAI_MEMORY"; static const char __pyx_k_EAI_NODATA[] = "EAI_NODATA"; static const char __pyx_k_EAI_NONAME[] = "EAI_NONAME"; static const char __pyx_k_Loop__stop[] = "Loop._stop"; static const char __pyx_k_Not_paused[] = "Not paused"; static const char __pyx_k_SSLContext[] = "SSLContext"; static const char __pyx_k_Task__step[] = "Task._step"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_call_later[] = "call_later"; static const char __pyx_k_concurrent[] = "concurrent"; static const char __pyx_k_coroutines[] = "coroutines"; static const char __pyx_k_created_at[] = "created at {}:{}"; static const char __pyx_k_executable[] = "executable"; static const char __pyx_k_getsockopt[] = "getsockopt"; static const char __pyx_k_gettimeout[] = "gettimeout"; static const char __pyx_k_is_running[] = "is_running"; static const char __pyx_k_local_addr[] = "local_addr"; static const char __pyx_k_memoryview[] = "memoryview"; static const char __pyx_k_new_future[] = "new_future"; static const char __pyx_k_preexec_fn[] = "preexec_fn"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_reuse_port[] = "reuse_port"; static const char __pyx_k_set_result[] = "set_result"; static const char __pyx_k_socketpair[] = "socketpair"; static const char __pyx_k_std_signal[] = "std_signal"; static const char __pyx_k_subprocess[] = "subprocess"; static const char __pyx_k_EAI_SERVICE[] = "EAI_SERVICE"; static const char __pyx_k_LookupError[] = "LookupError"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_Read_errors[] = "Read errors: {}"; static const char __pyx_k_Read_events[] = "Read events: {}"; static const char __pyx_k_SSLProtocol[] = "SSLProtocol"; static const char __pyx_k_asyncio_log[] = "asyncio.log"; static const char __pyx_k_collections[] = "collections"; static const char __pyx_k_create_task[] = "create_task"; static const char __pyx_k_destination[] = "destination"; static const char __pyx_k_force_close[] = "_force_close"; static const char __pyx_k_format_list[] = "format_list"; static const char __pyx_k_getaddrinfo[] = "getaddrinfo"; static const char __pyx_k_getnameinfo[] = "getnameinfo"; static const char __pyx_k_getpeername[] = "getpeername"; static const char __pyx_k_getsockname[] = "getsockname"; static const char __pyx_k_iscoroutine[] = "iscoroutine"; static const char __pyx_k_isgenerator[] = "isgenerator"; static const char __pyx_k_main_thread[] = "main_thread"; static const char __pyx_k_remote_addr[] = "remote_addr"; static const char __pyx_k_run_forever[] = "run_forever"; static const char __pyx_k_s_sockets_r[] = "<%s sockets=%r>"; static const char __pyx_k_setblocking[] = "setblocking"; static const char __pyx_k_startupinfo[] = "startupinfo"; static const char __pyx_k_traceback_2[] = "traceback"; static const char __pyx_k_uvloop_loop[] = "uvloop.loop"; static const char __pyx_k_wait_closed[] = "wait_closed"; static const char __pyx_k_wrap_future[] = "_wrap_future"; static const char __pyx_k_BaseProtocol[] = "BaseProtocol"; static const char __pyx_k_EAI_BADFLAGS[] = "EAI_BADFLAGS"; static const char __pyx_k_EAI_BADHINTS[] = "EAI_BADHINTS"; static const char __pyx_k_EAI_CANCELED[] = "EAI_CANCELED"; static const char __pyx_k_EAI_OVERFLOW[] = "EAI_OVERFLOW"; static const char __pyx_k_EAI_PROTOCOL[] = "EAI_PROTOCOL"; static const char __pyx_k_EAI_SOCKTYPE[] = "EAI_SOCKTYPE"; static const char __pyx_k_Process_info[] = "---- Process info: -----"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_SO_REUSEPORT[] = "SO_REUSEPORT"; static const char __pyx_k_TimeoutError[] = "TimeoutError"; static const char __pyx_k_Write_errors[] = "Write errors: {}"; static const char __pyx_k_Write_events[] = "Write events: {}"; static const char __pyx_k_alive_closed[] = " alive | closed |"; static const char __pyx_k_disconnected[] = "disconnected"; static const char __pyx_k_eof_received[] = "eof_received"; static const char __pyx_k_objs_handles[] = " objs | handles |"; static const char __pyx_k_sock_connect[] = "sock_connect"; static const char __pyx_k_sock_sendall[] = "sock_sendall"; static const char __pyx_k_stdio_inited[] = "__stdio_inited"; static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_BaseException[] = "BaseException"; static const char __pyx_k_Errors_logged[] = "Errors logged: {}"; static const char __pyx_k_Listen_errors[] = "Listen errors: {}"; static const char __pyx_k_OverflowError[] = "OverflowError"; static const char __pyx_k_StopIteration[] = "StopIteration"; static const char __pyx_k_app_transport[] = "_app_transport"; static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks"; static const char __pyx_k_create_future[] = "create_future"; static const char __pyx_k_create_server[] = "create_server"; static const char __pyx_k_creationflags[] = "creationflags"; static const char __pyx_k_current_tasks[] = "_current_tasks"; static const char __pyx_k_data_received[] = "data_received"; static const char __pyx_k_debug_wrapper[] = "debug_wrapper"; static const char __pyx_k_ensure_future[] = "ensure_future"; static const char __pyx_k_extract_stack[] = "extract_stack"; static const char __pyx_k_getservbyname[] = "getservbyname"; static const char __pyx_k_loop__on_idle[] = "loop._on_idle"; static const char __pyx_k_pause_writing[] = "pause_writing"; static const char __pyx_k_proto_factory[] = "proto_factory"; static const char __pyx_k_reuse_address[] = "reuse_address"; static const char __pyx_k_s_fd_s_pipe_r[] = "<%s fd=%s pipe=%r>"; static const char __pyx_k_set_exception[] = "set_exception"; static const char __pyx_k_set_wakeup_fd[] = "set_wakeup_fd"; static const char __pyx_k_Already_paused[] = "Already paused"; static const char __pyx_k_AssertionError[] = "AssertionError"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_CancelledError[] = "CancelledError"; static const char __pyx_k_EAI_ADDRFAMILY[] = "EAI_ADDRFAMILY"; static const char __pyx_k_Process_memory[] = "Process memory: {}"; static const char __pyx_k_Read_callbacks[] = "Read callbacks: {}"; static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning"; static const char __pyx_k_call_set_state[] = "_call_set_state"; static const char __pyx_k_connect_failed[] = "connect failed"; static const char __pyx_k_error_received[] = "error_received"; static const char __pyx_k_get_event_loop[] = "get_event_loop"; static const char __pyx_k_get_extra_info[] = "get_extra_info"; static const char __pyx_k_process_exited[] = "process_exited"; static const char __pyx_k_resume_writing[] = "resume_writing"; static const char __pyx_k_subprocess_run[] = "__subprocess_run"; static const char __pyx_k_BlockingIOError[] = "BlockingIOError"; static const char __pyx_k_BrokenPipeError[] = "BrokenPipeError"; static const char __pyx_k_FileExistsError[] = "FileExistsError"; static const char __pyx_k_Loop__sock_recv[] = "Loop._sock_recv"; static const char __pyx_k_Loop_debug_info[] = "--- Loop debug info: ---"; static const char __pyx_k_PermissionError[] = "PermissionError"; static const char __pyx_k_ResourceWarning[] = "ResourceWarning"; static const char __pyx_k_Shutdown_errors[] = "Shutdown errors {}"; static const char __pyx_k_SubprocessError[] = "SubprocessError"; static const char __pyx_k_Timer_handles_8[] = "Timer handles: {: <8} | {}"; static const char __pyx_k_allow_broadcast[] = "allow_broadcast"; static const char __pyx_k_asyncio_futures[] = "asyncio.futures"; static const char __pyx_k_connection_lost[] = "connection_lost"; static const char __pyx_k_connection_made[] = "connection_made"; static const char __pyx_k_get_inheritable[] = "get_inheritable"; static const char __pyx_k_restore_signals[] = "restore_signals"; static const char __pyx_k_server_hostname[] = "server_hostname"; static const char __pyx_k_set_inheritable[] = "set_inheritable"; static const char __pyx_k_sighandler_noop[] = "_sighandler_noop"; static const char __pyx_k_InterruptedError[] = "InterruptedError"; static const char __pyx_k_Loop_getnameinfo[] = "Loop.getnameinfo"; static const char __pyx_k_Polls_debug_info[] = "--- Polls debug info: ---"; static const char __pyx_k_Write_contexts_8[] = "Write contexts: {: <8} | {}"; static const char __pyx_k_asyncio_sslproto[] = "asyncio.sslproto"; static const char __pyx_k_closed_reading_x[] = "<{} closed={} reading={} {:#x}>"; static const char __pyx_k_get_running_loop[] = "_get_running_loop"; static const char __pyx_k_on_ssl_connected[] = "__on_ssl_connected"; static const char __pyx_k_protocol_factory[] = "protocol_factory"; static const char __pyx_k_set_running_loop[] = "_set_running_loop"; static const char __pyx_k_source_traceback[] = "source_traceback"; static const char __pyx_k_test_coroutine_1[] = "_test_coroutine_1"; static const char __pyx_k_BaseFuture___iter[] = "BaseFuture.__iter__"; static const char __pyx_k_FileNotFoundError[] = "FileNotFoundError"; static const char __pyx_k_InvalidStateError[] = "InvalidStateError"; static const char __pyx_k_IsADirectoryError[] = "IsADirectoryError"; static const char __pyx_k_Loop__sock_accept[] = "Loop._sock_accept"; static const char __pyx_k_Loop_sock_connect[] = "Loop.sock_connect"; static const char __pyx_k_Loop_sock_sendall[] = "Loop.sock_sendall"; static const char __pyx_k_Number_of_signals[] = "Number of signals: {}"; static const char __pyx_k_Socket_try_writes[] = "Socket try-writes: {}"; static const char __pyx_k_add_done_callback[] = "add_done_callback"; static const char __pyx_k_bufsize_must_be_0[] = "bufsize must be 0"; static const char __pyx_k_call_check_cancel[] = "_call_check_cancel"; static const char __pyx_k_connect_read_pipe[] = "connect_read_pipe"; static const char __pyx_k_create_connection[] = "create_connection"; static const char __pyx_k_datagram_received[] = "datagram_received"; static const char __pyx_k_return_exceptions[] = "return_exceptions"; static const char __pyx_k_start_new_session[] = "start_new_session"; static const char __pyx_k_BaseFuture___await[] = "BaseFuture.__await__"; static const char __pyx_k_Callback_handles_8[] = "Callback handles: {: <8} | {}"; static const char __pyx_k_Loop__sock_connect[] = "Loop._sock_connect"; static const char __pyx_k_Loop__sock_sendall[] = "Loop._sock_sendall"; static const char __pyx_k_Loop_create_server[] = "Loop.create_server"; static const char __pyx_k_PYTHONASYNCIODEBUG[] = "PYTHONASYNCIODEBUG"; static const char __pyx_k_ProcessLookupError[] = "ProcessLookupError"; static const char __pyx_k_Server_wait_closed[] = "Server.wait_closed"; static const char __pyx_k_Streams_debug_info[] = "--- Streams debug info: ---"; static const char __pyx_k_ThreadPoolExecutor[] = "ThreadPoolExecutor"; static const char __pyx_k_Write_without_poll[] = "Write without poll: {}"; static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; static const char __pyx_k_concurrent_futures[] = "concurrent.futures"; static const char __pyx_k_connect_write_pipe[] = "connect_write_pipe"; static const char __pyx_k_create_unix_server[] = "create_unix_server"; static const char __pyx_k_get_asyncgen_hooks[] = "get_asyncgen_hooks"; static const char __pyx_k_ignore_environment[] = "ignore_environment"; static const char __pyx_k_pipe_data_received[] = "pipe_data_received"; static const char __pyx_k_set_asyncgen_hooks[] = "set_asyncgen_hooks"; static const char __pyx_k_shell_must_be_True[] = "shell must be True"; static const char __pyx_k_shutdown_asyncgens[] = "shutdown_asyncgens"; static const char __pyx_k_sig_out_of_range_1[] = "sig {} out of range(1, {})"; static const char __pyx_k_universal_newlines[] = "universal_newlines"; static const char __pyx_k_unopened_TCPServer[] = "unopened TCPServer"; static const char __pyx_k_Multiple_exceptions[] = "Multiple exceptions: {}"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_Result_is_not_ready[] = "Result is not ready."; static const char __pyx_k_WeakValueDictionary[] = "WeakValueDictionary"; static const char __pyx_k_asyncio_base_events[] = "asyncio.base_events"; static const char __pyx_k_default_int_handler[] = "default_int_handler"; static const char __pyx_k_iscoroutinefunction[] = "iscoroutinefunction"; static const char __pyx_k_log_destroy_pending[] = "_log_destroy_pending"; static const char __pyx_k_shell_must_be_False[] = "shell must be False"; static const char __pyx_k_unclosed_resource_r[] = "unclosed resource {!r}; {}"; static const char __pyx_k_ConnectionResetError[] = "ConnectionResetError"; static const char __pyx_k_Event_loop_is_closed[] = "Event loop is closed"; static const char __pyx_k_Exception_is_not_set[] = "Exception is not set."; static const char __pyx_k_Loop__read_from_self[] = "Loop._read_from_self"; static const char __pyx_k_Task_got_bad_yield_r[] = "Task got bad yield: {!r}"; static const char __pyx_k_call_soon_threadsafe[] = "call_soon_threadsafe"; static const char __pyx_k_pipe_connection_lost[] = "pipe_connection_lost"; static const char __pyx_k_protocol_is_required[] = "protocol is required"; static const char __pyx_k_remove_done_callback[] = "remove_done_callback"; static const char __pyx_k_running_closed_debug[] = "<{}.{} running={} closed={} debug={}>"; static const char __pyx_k_sig_cannot_be_caught[] = "sig {} cannot be caught"; static const char __pyx_k_unknown_Future_state[] = "unknown Future state"; static const char __pyx_k_AddrInfo_data_is_NULL[] = "AddrInfo.data is NULL"; static const char __pyx_k_Connect_call_failed_s[] = "Connect call failed %s"; static const char __pyx_k_Exception_in_callback[] = "Exception in callback {}"; static const char __pyx_k_Fatal_error_on_server[] = "Fatal error on server {}"; static const char __pyx_k_Loop___subprocess_run[] = "Loop.__subprocess_run"; static const char __pyx_k_Read_callbacks_failed[] = "Read callbacks failed: {}"; static const char __pyx_k_Read_failed_callbacks[] = "Read failed callbacks: {}"; static const char __pyx_k_get_coroutine_wrapper[] = "get_coroutine_wrapper"; static const char __pyx_k_remove_signal_handler[] = "remove_signal_handler"; static const char __pyx_k_set_coroutine_wrapper[] = "set_coroutine_wrapper"; static const char __pyx_k_step_already_done_r_r[] = "_step(): already done: {!r}, {!r}"; static const char __pyx_k_unclosed_resource_r_2[] = "unclosed resource {!r}"; static const char __pyx_k_ConnectionAbortedError[] = "ConnectionAbortedError"; static const char __pyx_k_ConnectionRefusedError[] = "ConnectionRefusedError"; static const char __pyx_k_Loop_connect_read_pipe[] = "Loop.connect_read_pipe"; static const char __pyx_k_Loop_create_connection[] = "Loop.create_connection"; static const char __pyx_k_Write_callbacks_failed[] = "Write callbacks failed: {}"; static const char __pyx_k_Write_failed_callbacks[] = "Write failed callbacks: {}"; static const char __pyx_k_call_exception_handler[] = "call_exception_handler"; static const char __pyx_k_cancel_request_is_NULL[] = "{}.cancel: .request is NULL"; static const char __pyx_k_concurrent_allocations[] = "concurrent allocations"; static const char __pyx_k_create_unix_connection[] = "create_unix_connection"; static const char __pyx_k_invalid_Handle_cb_type[] = "invalid Handle.cb_type: {}"; static const char __pyx_k_Loop_connect_write_pipe[] = "Loop.connect_write_pipe"; static const char __pyx_k_Loop_create_unix_server[] = "Loop.create_unix_server"; static const char __pyx_k_Loop_shutdown_asyncgens[] = "Loop.shutdown_asyncgens"; static const char __pyx_k_ReadSubprocessPipeProto[] = "ReadSubprocessPipeProto"; static const char __pyx_k_asyncgen_finalizer_hook[] = "_asyncgen_finalizer_hook"; static const char __pyx_k_asyncgen_firstiter_hook[] = "_asyncgen_firstiter_hook"; static const char __pyx_k_asyncio_future_blocking[] = "_asyncio_future_blocking"; static const char __pyx_k_connect_accepted_socket[] = "connect_accepted_socket"; static const char __pyx_k_service_proto_not_found[] = "service/proto not found"; static const char __pyx_k_uvloop_sleep_after_fork[] = "__uvloop_sleep_after_fork"; static const char __pyx_k_AF_UNSPEC_in_DNS_results[] = "AF_UNSPEC in DNS results"; static const char __pyx_k_Fatal_error_on_transport[] = "Fatal error on transport {}"; static const char __pyx_k_WriteSubprocessPipeProto[] = "WriteSubprocessPipeProto"; static const char __pyx_k_create_datagram_endpoint[] = "create_datagram_endpoint"; static const char __pyx_k_loop__exec_queued_writes[] = "loop._exec_queued_writes"; static const char __pyx_k_sig_must_be_an_int_not_r[] = "sig must be an int, not {!r}"; static const char __pyx_k_Read_EOF_failed_callbacks[] = "Read EOF failed callbacks: {}"; static const char __pyx_k_abort_init__closed_is_set[] = "_abort_init: {}._closed is set"; static const char __pyx_k_abort_init__inited_is_set[] = "_abort_init: {}._inited is set"; static const char __pyx_k_default_exception_handler[] = "default_exception_handler"; static const char __pyx_k_unexpected_address_family[] = "unexpected address family"; static const char __pyx_k_UVTransport__start_reading[] = "UVTransport._start_reading"; static const char __pyx_k_close__handle_data_is_NULL[] = "{}._close: _handle.data is NULL"; static const char __pyx_k_is_alive_but__loop_is_None[] = "{} is alive, but _loop is None"; static const char __pyx_k_Address_r_is_already_in_use[] = "Address {!r} is already in use"; static const char __pyx_k_Executing_r_took_3f_seconds[] = "Executing %r took %.3f seconds"; static const char __pyx_k_Loop_create_unix_connection[] = "Loop.create_unix_connection"; static const char __pyx_k_cancel_request_data_is_NULL[] = "{}.cancel: .request.data is NULL"; static const char __pyx_k_close_uv_is_closing_is_true[] = "{}._close: uv_is_closing() is true"; static const char __pyx_k_host_must_be_a_str_or_bytes[] = "host must be a str or bytes"; static const char __pyx_k_invalid__init_protocol_call[] = "invalid _init_protocol call"; static const char __pyx_k_not_holding_the_import_lock[] = "not holding the import lock"; static const char __pyx_k_Loop_connect_accepted_socket[] = "Loop.connect_accepted_socket"; static const char __pyx_k_UVHandles_python_libuv_total[] = "UVHandles python | libuv | total"; static const char __pyx_k_called_with_handle_data_NULL[] = "{} called with handle.data == NULL"; static const char __pyx_k_could_not_bind_to_local_addr[] = "could not bind to local_addr {}"; static const char __pyx_k_is_alive_but__handle_is_NULL[] = "{} is alive, but _handle is NULL"; static const char __pyx_k_set_running_or_notify_cancel[] = "set_running_or_notify_cancel"; static const char __pyx_k_startupinfo_is_not_supported[] = "startupinfo is not supported"; static const char __pyx_k_AF_INET_address_must_be_tuple[] = "AF_INET address must be tuple"; static const char __pyx_k_Handle_loop_is_None_in_Handle[] = "Handle.loop is None in Handle.__dealloc__"; static const char __pyx_k_IPv4_sockaddr_must_be_2_tuple[] = "IPv4 sockaddr must be 2 tuple"; static const char __pyx_k_Loop_create_datagram_endpoint[] = "Loop.create_datagram_endpoint"; static const char __pyx_k_all_args_must_be_str_or_bytes[] = "all args must be str or bytes"; static const char __pyx_k_could_not_bind_to_remote_addr[] = "could not bind to remote_addr {}"; static const char __pyx_k_dealloc____handle_is_NULL__cl[] = "{}.__dealloc__: _handle is NULL, _closed == 1"; static const char __pyx_k_integer_argument_expected_got[] = "integer argument expected, got {}"; static const char __pyx_k_protocol_pause_writing_failed[] = "protocol.pause_writing() failed"; static const char __pyx_k_r_fileno_returned_non_integer[] = "{!r}.fileno() returned non-integer"; static const char __pyx_k_start_init_can_only_be_called[] = "{}._start_init can only be called once"; static const char __pyx_k_AF_INET6_address_must_be_tuple[] = "AF_INET6 address must be tuple"; static const char __pyx_k_cannot_apply_subprocess_STDOUT[] = "cannot apply subprocess.STDOUT"; static const char __pyx_k_chain_future_locals__set_state[] = "_chain_future.._set_state"; static const char __pyx_k_close__handle_data_is_not_UVHa[] = "{}._close: _handle.data is not UVHandle/self"; static const char __pyx_k_creationflags_is_not_supported[] = "creationflags is not supported"; static const char __pyx_k_fatal_sent_0_in_advance_uv_buf[] = "fatal: sent < 0 in advance_uv_buf"; static const char __pyx_k_high_r_must_be_low_r_must_be_0[] = "high (%r) must be >= low (%r) must be >= 0"; static const char __pyx_k_invalid_stdin_argument_value_r[] = "invalid stdin argument value {!r}"; static const char __pyx_k_protocol_resume_writing_failed[] = "protocol.resume_writing() failed"; static const char __pyx_k_uv_close_handle_cb_handle_loop[] = "__uv_close_handle_cb: handle.loop is invalid"; static const char __pyx_k_AF_INET6_must_be_a_tuple_of_2_4[] = "AF_INET6 must be a tuple of 2-4 parameters: (host, port, flowinfo?, scope_id?)"; static const char __pyx_k_A_UDP_Socket_was_expected_got_r[] = "A UDP Socket was expected, got {!r}"; static const char __pyx_k_A_UNIX_Domain_Stream_Socket_was[] = "A UNIX Domain Stream Socket was expected, got {!r}"; static const char __pyx_k_A_future_is_required_for_source[] = "A future is required for source argument"; static const char __pyx_k_AddrInfoRequest_callback_called[] = "AddrInfoRequest callback called with NULL resolver.data"; static const char __pyx_k_Bad_exception_data_from_child_r[] = "Bad exception data from child: {!r}"; static const char __pyx_k_Cannot_run_the_event_loop_while[] = "Cannot run the event loop while another loop is running"; static const char __pyx_k_Invalid_address_must_be_None_or[] = "Invalid address: must be None or %s"; static const char __pyx_k_Neither_host_port_nor_sock_were[] = "Neither host/port nor sock were specified"; static const char __pyx_k_Sock_ops_successfull_on_1st_try[] = "--- Sock ops successfull on 1st try: ---"; static const char __pyx_k_StreamWriteContext_close_py_buf[] = "_StreamWriteContext.close: py_bufs != NULL and py_bufs_sml_inuse is True"; static const char __pyx_k_StreamWriteContext_close_uv_buf[] = "_StreamWriteContext.close: uv_bufs != NULL and py_bufs_sml_inuse is True"; static const char __pyx_k_Task_r_got_Future_r_attached_to[] = "Task {!r} got Future {!r} attached to a different loop"; static const char __pyx_k_UVStream__try_write_called_with[] = "UVStream._try_write called with data in uv buffers"; static const char __pyx_k_WriteSubprocessPipeProto___init[] = "WriteSubprocessPipeProto.__init__"; static const char __pyx_k_WriteSubprocessPipeProto___repr[] = "WriteSubprocessPipeProto.__repr__"; static const char __pyx_k_WriteSubprocessPipeProto_resume[] = "WriteSubprocessPipeProto.resume_writing"; static const char __pyx_k_buffer_size_is_not_0_after_a_su[] = "_buffer_size is not 0 after a successful _exec_write"; static const char __pyx_k_called_after_destroying_the_UVH[] = "{} called after destroying the UVHandle"; static const char __pyx_k_cancel_request_data_is_not_UVRe[] = "{}.cancel: .request.data is not UVRequest"; static const char __pyx_k_cannot_spawn_a_process_args_are[] = "cannot spawn a process: args are empty"; static const char __pyx_k_chain_future_locals__call_check[] = "_chain_future.._call_check_cancel"; static const char __pyx_k_chain_future_locals__call_set_s[] = "_chain_future.._call_set_state"; static const char __pyx_k_create_datagram_endpoint_locals[] = "create_datagram_endpoint..genexpr"; static const char __pyx_k_deallocating_an_open_event_loop[] = "deallocating an open event loop"; static const char __pyx_k_getaddrinfo_returned_empty_list[] = "getaddrinfo() returned empty list"; static const char __pyx_k_getsockaddrarg_flowinfo_must_be[] = "getsockaddrarg: flowinfo must be 0-1048575."; static const char __pyx_k_getsockaddrarg_scope_id_must_be[] = "getsockaddrarg: scope_id must be unsigned 32 bit integer"; static const char __pyx_k_handle_loop_is_NULL_in___ensure[] = "handle.loop is NULL in __ensure_handle_data"; static const char __pyx_k_home_travis_build_MagicStack_uv[] = "/home/travis/build/MagicStack/uvloop/uvloop/loop.pyx"; static const char __pyx_k_host_and_port_was_not_specified[] = "host and port was not specified and no sock specified"; static const char __pyx_k_invalid_stderr_argument_value_r[] = "invalid stderr argument value {!r}"; static const char __pyx_k_invalid_stdout_argument_value_r[] = "invalid stdout argument value {!r}"; static const char __pyx_k_is_alive_but__handle_data_is_no[] = "{} is alive, but _handle.data is not initialized"; static const char __pyx_k_is_alive_but__handle_loop_is_no[] = "{} is alive, but _handle.loop is not initialized"; static const char __pyx_k_is_not_supposed_to_be_instantia[] = "{} is not supposed to be instantiated from Python"; static const char __pyx_k_is_open_in___dealloc___with_loo[] = "{} is open in __dealloc__ with loop set to NULL"; static const char __pyx_k_no_path_and_sock_were_specified[] = "no path and sock were specified"; static const char __pyx_k_port_must_be_a_str_bytes_or_int[] = "port must be a str, bytes or int"; static const char __pyx_k_protocol_is_not_set_cannot_call[] = "protocol is not set, cannot call connection_made()"; static const char __pyx_k_sockaddr_must_be_a_tuple_of_2_3[] = "sockaddr must be a tuple of 2, 3 or 4 values"; static const char __pyx_k_task_factory_must_be_a_callable[] = "task factory must be a callable or None"; static const char __pyx_k_the_socket_must_be_non_blocking[] = "the socket must be non-blocking"; static const char __pyx_k_try_write_sent_all_data_and_ret[] = "_try_write sent all data and returned non-zero"; static const char __pyx_k_unable_to_start_the_loop_it_was[] = "unable to start the loop; it was closed"; static const char __pyx_k_uv_handle_t_current_freed_total[] = "uv_handle_t (current: {}; freed: {}; total: {})"; static const char __pyx_k_uv_udp_receive_callback_addr_is[] = "uv_udp.receive callback: addr is NULL and nread >= 0"; static const char __pyx_k_without_no_gc_clear_loop_was_se[] = "{} without @no_gc_clear; loop was set to None by GC"; static const char __pyx_k_yield_was_used_instead_of_yield[] = "yield was used instead of yield from in task {!r} with {!r}"; static const char __pyx_k_AF_INET_address_must_be_tuple_of[] = "AF_INET address must be tuple of (host, port)"; static const char __pyx_k_A_Stream_Socket_was_expected_got[] = "A Stream Socket was expected, got {!r}"; static const char __pyx_k_A_callable_object_or_None_is_exp[] = "A callable object or None is expected, got {!r}"; static const char __pyx_k_A_future_is_required_for_destina[] = "A future is required for destination argument"; static const char __pyx_k_Cannot_call_write_after_write_eo[] = "Cannot call write() after write_eof()"; static const char __pyx_k_Cannot_call_writelines_after_wri[] = "Cannot call writelines() after write_eof()"; static const char __pyx_k_Cannot_close_a_running_event_loo[] = "Cannot close a running event loop"; static const char __pyx_k_Cannot_pause_reading_when_closin[] = "Cannot pause_reading() when closing"; static const char __pyx_k_Event_loop_stopped_before_Future[] = "Event loop stopped before Future completed."; static const char __pyx_k_Exception_in___repr___r_value_ty[] = "Exception in __repr__ {!r}; value type: {!r}"; static const char __pyx_k_Exception_in_default_exception_h[] = "Exception in default exception handler"; static const char __pyx_k_Exception_occurred_in_preexec_fn[] = "Exception occurred in preexec_fn."; static const char __pyx_k_Fatal_write_error_on_datagram_tr[] = "Fatal write error on datagram transport"; static const char __pyx_k_File_descriptor_r_is_used_by_tra[] = "File descriptor {!r} is used by transport {!r}"; static const char __pyx_k_Loop__getaddrinfo_locals_callbac[] = "Loop._getaddrinfo..callback"; static const char __pyx_k_Loop__getnameinfo_locals_callbac[] = "Loop._getnameinfo..callback"; static const char __pyx_k_Loop__sock_connect_locals_lambda[] = "Loop._sock_connect.."; static const char __pyx_k_Non_thread_safe_operation_invoke[] = "Non-thread-safe operation invoked on an event loop other than the current one"; static const char __pyx_k_Object_created_at_most_recent_ca[] = "Object created at (most recent call last):\n"; static const char __pyx_k_Racing_with_another_loop_to_spaw[] = "Racing with another loop to spawn a process."; static const char __pyx_k_ReadSubprocessPipeProto_data_rec[] = "ReadSubprocessPipeProto.data_received"; static const char __pyx_k_StopIteration_interacts_badly_wi[] = "StopIteration interacts badly with generators and cannot be raised into a Future"; static const char __pyx_k_UDPTransport_family_is_undefined[] = "UDPTransport.family is undefined; cannot create python socket"; static const char __pyx_k_UVProcessTransport__call_connect[] = "UVProcessTransport._call_connection_made"; static const char __pyx_k_UVProcess__close_after_spawn_cal[] = "UVProcess._close_after_spawn called after uv_spawn"; static const char __pyx_k_UVStream_shutdown_callback_calle[] = "UVStream.shutdown callback called with NULL req.data, status=%r"; static const char __pyx_k_UVStream_write_callback_called_w[] = "UVStream.write callback called with NULL req.data, status=%r"; static const char __pyx_k_UVTransport__call_connection_los[] = "UVTransport._call_connection_lost"; static const char __pyx_k_UVTransport__call_connection_mad[] = "UVTransport._call_connection_made"; static const char __pyx_k_Unable_to_deallocate_request_for[] = "Unable to deallocate request for {!r} (not done)"; static const char __pyx_k_Unhandled_error_in_exception_han[] = "Unhandled error in exception handler"; static const char __pyx_k_Unhandled_exception_in_event_loo[] = "Unhandled exception in event loop"; static const char __pyx_k_WriteSubprocessPipeProto_connect[] = "WriteSubprocessPipeProto.connection_made"; static const char __pyx_k_WriteSubprocessPipeProto_pause_w[] = "WriteSubprocessPipeProto.pause_writing"; static const char __pyx_k_You_must_set_server_hostname_whe[] = "You must set server_hostname when using ssl without a host"; static const char __pyx_k_active_TimerHandle_is_deallacati[] = "active TimerHandle is deallacating"; static const char __pyx_k_all_environment_values_must_be_b[] = "all environment values must be bytes or str"; static const char __pyx_k_all_environment_vars_must_be_byt[] = "all environment vars must be bytes or str"; static const char __pyx_k_an_error_occurred_during_closing[] = "an error occurred during closing of asynchronous generator {!r}"; static const char __pyx_k_asynchronous_generator_r_was_sch[] = "asynchronous generator {!r} was scheduled after loop.shutdown_asyncgens() call"; static const char __pyx_k_cannot_convert_sockaddr_into_Pyt[] = "cannot convert sockaddr into Python object"; static const char __pyx_k_cannot_open_a_UDP_handle_invalid[] = "cannot open a UDP handle, invalid family {}"; static const char __pyx_k_concurrent_futures_Future_is_exp[] = "concurrent.futures.Future is expected, got {!r}"; static const char __pyx_k_coroutines_cannot_be_used_with_a[] = "coroutines cannot be used with add_signal_handler()"; static const char __pyx_k_coroutines_cannot_be_used_with_r[] = "coroutines cannot be used with run_in_executor()"; static const char __pyx_k_could_not_close_attached_file_ob[] = "could not close attached file object {!r}"; static const char __pyx_k_create_connection_locals_genexpr[] = "create_connection..genexpr"; static const char __pyx_k_cwd_must_be_a_str_or_bytes_objec[] = "cwd must be a str or bytes object"; static const char __pyx_k_deallocating_a_running_event_loo[] = "deallocating a running event loop!"; static const char __pyx_k_epected_AF_INET_or_AF_INET6_fami[] = "epected AF_INET or AF_INET6 family, got {}"; static const char __pyx_k_error_status_in_uv_stream_t_list[] = "error status in uv_stream_t.listen callback"; static const char __pyx_k_error_status_in_uv_stream_t_read[] = "error status in uv_stream_t.read callback"; static const char __pyx_k_error_status_in_uv_stream_t_shut[] = "error status in uv_stream_t.shutdown callback"; static const char __pyx_k_error_status_in_uv_stream_t_writ[] = "error status in uv_stream_t.write callback"; static const char __pyx_k_error_while_attempting_to_bind_o[] = "error while attempting to bind on address %r: %s"; static const char __pyx_k_fatal_Could_not_advance__StreamW[] = "fatal: Could not advance _StreamWriteContext"; static const char __pyx_k_getnameinfo_argument_1_must_be_a[] = "getnameinfo() argument 1 must be a tuple"; static const char __pyx_k_handle_data_is_NULL_in___close_a[] = "handle.data is NULL in __close_all_handles_cb"; static const char __pyx_k_handle_loop_data_is_NULL_in___en[] = "handle.loop.data is NULL in __ensure_handle_data"; static const char __pyx_k_host_must_be_a_string_or_bytes_o[] = "host must be a string or bytes object"; static const char __pyx_k_host_port_and_sock_can_not_be_sp[] = "host/port and sock can not be specified at the same time"; static const char __pyx_k_invalid_data_in_writebuf_an_inst[] = "invalid data in writebuf: an instance of bytes, bytearray or memoryview was expected, got {}"; static const char __pyx_k_invalid_socket_family_expected_A[] = "invalid socket family, expected AF_UNIX, AF_INET or AF_INET6"; static const char __pyx_k_invalid_waiter_object_r_expected[] = "invalid waiter object {!r}, expected asyncio.Future"; static const char __pyx_k_local_addr_must_be_a_tuple_of_ho[] = "local_addr must be a tuple of host and port"; static const char __pyx_k_loop__queued_streams_are_not_emp[] = "loop._queued_streams are not empty after _exec_queued_writes"; static const char __pyx_k_loop_set_debug_False_cannot_unse[] = "loop.set_debug(False): cannot unset debug coroutine wrapper; another wrapper was set %r"; static const char __pyx_k_loop_set_debug_True_cannot_set_d[] = "loop.set_debug(True): cannot set debug coroutine wrapper; another wrapper is already set %r"; static const char __pyx_k_new_callbacks_were_queued_during[] = "new callbacks were queued during loop closing: {}"; static const char __pyx_k_new_poll_handles_were_queued_dur[] = "new poll handles were queued during loop closing: {}"; static const char __pyx_k_new_timers_were_queued_during_lo[] = "new timers were queued during loop closing: {}"; static const char __pyx_k_object_created_at_most_recent_ca[] = "object created at (most recent call last):\n{}"; static const char __pyx_k_open__StreamWriteContext_is_bein[] = "open _StreamWriteContext is being deallocated"; static const char __pyx_k_open__UDPSendContext_is_being_de[] = "open _UDPSendContext is being deallocated"; static const char __pyx_k_path_and_sock_can_not_be_specifi[] = "path and sock can not be specified at the same time"; static const char __pyx_k_path_was_not_specified_and_no_so[] = "path was not specified, and no sock specified"; static const char __pyx_k_remote_addr_must_be_a_tuple_of_h[] = "remote_addr must be a tuple of (host, port)"; static const char __pyx_k_reuse_port_not_supported_by_sock[] = "reuse_port not supported by socket module"; static const char __pyx_k_run_until_complete_locals_lambda[] = "run_until_complete.."; static const char __pyx_k_server_hostname_is_only_meaningf[] = "server_hostname is only meaningful with ssl"; static const char __pyx_k_set_wakeup_fd_only_works_in_main[] = "set_wakeup_fd only works in main thread"; static const char __pyx_k_sockaddr_resolved_to_multiple_ad[] = "sockaddr resolved to multiple addresses"; static const char __pyx_k_socket_modifier_keyword_argument[] = "socket modifier keyword arguments can not be used when sock is specified. ({})"; static const char __pyx_k_ssl_argument_must_be_an_SSLConte[] = "ssl argument must be an SSLContext or None"; static const char __pyx_k_ssl_is_expected_to_be_None_or_an[] = "ssl is expected to be None or an instance of ssl.SSLContext, got {!r}"; static const char __pyx_k_stream_is_open_after_UVStream__t[] = "stream is open after UVStream._try_write returned None"; static const char __pyx_k_subprocess_STDOUT_is_supported_o[] = "subprocess.STDOUT is supported only by stderr parameter"; static const char __pyx_k_this_event_loop_is_already_runni[] = "this event loop is already running."; static const char __pyx_k_unable_to_listen_no_protocol_fac[] = "unable to listen(); no protocol_factory"; static const char __pyx_k_unable_to_perform_operation_on_r[] = "unable to perform operation on {!r}; the handler is closed"; static const char __pyx_k_unable_to_perform_send_operation[] = "unable to perform send operation: no address"; static const char __pyx_k_universal_newlines_must_be_False[] = "universal_newlines must be False"; static const char __pyx_k_uvloop_Future_supports_only_uvlo[] = "uvloop.Future supports only uvloop.Loop"; static const char __pyx_k_waiter_is_not_None_in__call_conn[] = "waiter is not None in {}._call_connection_lost"; static const char __pyx_k_yield_from_wasn_t_used_with_futu[] = "yield from wasn't used with future"; static const char __pyx_k_getaddrinfo_returned_empty_list_2[] = "getaddrinfo() returned empty list for local_addr"; static const char __pyx_k_home_travis_build_MagicStack_uv_2[] = "/home/travis/build/MagicStack/uvloop/uvloop/chain_futs.pyx"; static const char __pyx_k_home_travis_build_MagicStack_uv_3[] = "/home/travis/build/MagicStack/uvloop/uvloop/handles/process.pyx"; static const char __pyx_k_yield_was_used_instead_of_yield_2[] = "yield was used instead of yield from for generator in task {!r} with {}"; static const char __pyx_k_Exception_in_default_exception_h_2[] = "Exception in default exception handler while handling an unexpected error in custom exception handler"; static const char __pyx_k_UDPTransport_family_is_undefined_2[] = "UDPTransport.family is undefined; cannot send"; static const char __pyx_k_WriteSubprocessPipeProto_connect_2[] = "WriteSubprocessPipeProto.connection_lost"; static const char __pyx_k_local_addr_must_be_a_tuple_of_ho_2[] = "local_addr must be a tuple of (host, port)"; static PyObject *__pyx_kp_u_0_0_0_0; static PyObject *__pyx_kp_u_18_7_7_7; static PyObject *__pyx_kp_u_AF_INET6_address_must_be_tuple; static PyObject *__pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4; static PyObject *__pyx_kp_u_AF_INET_address_must_be_tuple; static PyObject *__pyx_kp_u_AF_INET_address_must_be_tuple_of; static PyObject *__pyx_kp_u_AF_UNSPEC_in_DNS_results; static PyObject *__pyx_kp_u_A_Stream_Socket_was_expected_got; static PyObject *__pyx_kp_u_A_UDP_Socket_was_expected_got_r; static PyObject *__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was; static PyObject *__pyx_kp_u_A_callable_object_or_None_is_exp; static PyObject *__pyx_kp_u_A_future_is_required_for_destina; static PyObject *__pyx_kp_u_A_future_is_required_for_source; static PyObject *__pyx_kp_u_AddrInfoRequest_callback_called; static PyObject *__pyx_kp_u_AddrInfo_data_is_NULL; static PyObject *__pyx_kp_u_Address_r_is_already_in_use; static PyObject *__pyx_kp_u_Already_paused; static PyObject *__pyx_n_s_AssertionError; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_kp_u_Bad_exception_data_from_child_r; static PyObject *__pyx_n_s_BaseException; static PyObject *__pyx_n_s_BaseFuture___await; static PyObject *__pyx_n_s_BaseFuture___iter; static PyObject *__pyx_n_s_BaseProtocol; static PyObject *__pyx_n_s_BlockingIOError; static PyObject *__pyx_n_s_BrokenPipeError; static PyObject *__pyx_n_u_CANCELLED; static PyObject *__pyx_kp_u_Callback_handles_8; static PyObject *__pyx_n_s_CancelledError; static PyObject *__pyx_kp_u_Cannot_call_write_after_write_eo; static PyObject *__pyx_kp_u_Cannot_call_writelines_after_wri; static PyObject *__pyx_kp_u_Cannot_close_a_running_event_loo; static PyObject *__pyx_kp_u_Cannot_pause_reading_when_closin; static PyObject *__pyx_kp_u_Cannot_run_the_event_loop_while; static PyObject *__pyx_kp_u_Connect_call_failed_s; static PyObject *__pyx_n_s_ConnectionAbortedError; static PyObject *__pyx_n_s_ConnectionRefusedError; static PyObject *__pyx_n_s_ConnectionResetError; static PyObject *__pyx_n_s_Counter; static PyObject *__pyx_n_s_DEVNULL; static PyObject *__pyx_n_u_EAI_ADDRFAMILY; static PyObject *__pyx_n_u_EAI_AGAIN; static PyObject *__pyx_n_u_EAI_BADFLAGS; static PyObject *__pyx_n_u_EAI_BADHINTS; static PyObject *__pyx_n_u_EAI_CANCELED; static PyObject *__pyx_n_u_EAI_FAIL; static PyObject *__pyx_n_u_EAI_FAMILY; static PyObject *__pyx_n_u_EAI_MEMORY; static PyObject *__pyx_n_u_EAI_NODATA; static PyObject *__pyx_n_u_EAI_NONAME; static PyObject *__pyx_n_u_EAI_OVERFLOW; static PyObject *__pyx_n_u_EAI_PROTOCOL; static PyObject *__pyx_n_u_EAI_SERVICE; static PyObject *__pyx_n_u_EAI_SOCKTYPE; static PyObject *__pyx_kp_u_Errors_logged; static PyObject *__pyx_kp_u_Event_loop_is_closed; static PyObject *__pyx_kp_u_Event_loop_stopped_before_Future; static PyObject *__pyx_kp_u_Exception_in___repr___r_value_ty; static PyObject *__pyx_kp_u_Exception_in_callback; static PyObject *__pyx_kp_u_Exception_in_default_exception_h; static PyObject *__pyx_kp_u_Exception_in_default_exception_h_2; static PyObject *__pyx_kp_u_Exception_is_not_set; static PyObject *__pyx_kp_u_Exception_occurred_in_preexec_fn; static PyObject *__pyx_kp_u_Executing_r_took_3f_seconds; static PyObject *__pyx_n_u_FINISHED; static PyObject *__pyx_kp_u_Fatal_error_on_server; static PyObject *__pyx_kp_u_Fatal_error_on_transport; static PyObject *__pyx_kp_u_Fatal_write_error_on_datagram_tr; static PyObject *__pyx_n_s_FileExistsError; static PyObject *__pyx_n_s_FileNotFoundError; static PyObject *__pyx_kp_u_File_descriptor_r_is_used_by_tra; static PyObject *__pyx_n_s_Future; static PyObject *__pyx_kp_u_Handle_loop_is_None_in_Handle; static PyObject *__pyx_kp_u_IPv4_sockaddr_must_be_2_tuple; static PyObject *__pyx_n_s_InterruptedError; static PyObject *__pyx_n_s_InvalidStateError; static PyObject *__pyx_kp_u_Invalid_address_must_be_None_or; static PyObject *__pyx_n_s_IsADirectoryError; static PyObject *__pyx_n_s_Iterable; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_kp_u_Listen_errors; static PyObject *__pyx_n_s_LookupError; static PyObject *__pyx_n_s_Loop___subprocess_run; static PyObject *__pyx_n_s_Loop__getaddrinfo_locals_callbac; static PyObject *__pyx_n_s_Loop__getnameinfo_locals_callbac; static PyObject *__pyx_kp_u_Loop__read_from_self; static PyObject *__pyx_kp_u_Loop__sock_accept; static PyObject *__pyx_kp_u_Loop__sock_connect; static PyObject *__pyx_n_s_Loop__sock_connect_locals_lambda; static PyObject *__pyx_kp_u_Loop__sock_recv; static PyObject *__pyx_kp_u_Loop__sock_sendall; static PyObject *__pyx_kp_u_Loop__stop; static PyObject *__pyx_n_s_Loop_connect_accepted_socket; static PyObject *__pyx_n_s_Loop_connect_read_pipe; static PyObject *__pyx_n_s_Loop_connect_write_pipe; static PyObject *__pyx_n_s_Loop_create_connection; static PyObject *__pyx_n_s_Loop_create_datagram_endpoint; static PyObject *__pyx_n_s_Loop_create_server; static PyObject *__pyx_n_s_Loop_create_unix_connection; static PyObject *__pyx_n_s_Loop_create_unix_server; static PyObject *__pyx_kp_u_Loop_debug_info; static PyObject *__pyx_n_s_Loop_getnameinfo; static PyObject *__pyx_n_s_Loop_shutdown_asyncgens; static PyObject *__pyx_n_s_Loop_sock_connect; static PyObject *__pyx_n_s_Loop_sock_sendall; static PyObject *__pyx_kp_u_Loop_time; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_kp_u_Multiple_exceptions; static PyObject *__pyx_n_s_NSIG; static PyObject *__pyx_kp_u_Neither_host_port_nor_sock_were; static PyObject *__pyx_kp_u_Non_thread_safe_operation_invoke; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_kp_u_Not_paused; static PyObject *__pyx_kp_u_Number_of_signals; static PyObject *__pyx_n_s_OSError; static PyObject *__pyx_n_s_O_RDWR; static PyObject *__pyx_kp_u_Object_created_at_most_recent_ca; static PyObject *__pyx_n_s_OverflowError; static PyObject *__pyx_n_u_PENDING; static PyObject *__pyx_n_s_PIPE; static PyObject *__pyx_n_u_PYTHONASYNCIODEBUG; static PyObject *__pyx_n_s_PermissionError; static PyObject *__pyx_kp_u_Polls_debug_info; static PyObject *__pyx_n_s_ProcessLookupError; static PyObject *__pyx_kp_u_Process_info; static PyObject *__pyx_kp_u_Process_memory; static PyObject *__pyx_n_s_Protocol; static PyObject *__pyx_kp_u_Racing_with_another_loop_to_spaw; static PyObject *__pyx_n_s_ReadSubprocessPipeProto; static PyObject *__pyx_n_s_ReadSubprocessPipeProto_data_rec; static PyObject *__pyx_kp_u_Read_EOF_failed_callbacks; static PyObject *__pyx_kp_u_Read_EOFs; static PyObject *__pyx_kp_u_Read_callbacks; static PyObject *__pyx_kp_u_Read_callbacks_failed; static PyObject *__pyx_kp_u_Read_errors; static PyObject *__pyx_kp_u_Read_events; static PyObject *__pyx_kp_u_Read_failed_callbacks; static PyObject *__pyx_n_s_ResourceWarning; static PyObject *__pyx_kp_u_Result_is_not_ready; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_RuntimeWarning; static PyObject *__pyx_n_s_SIG_DFL; static PyObject *__pyx_n_u_SO_REUSEPORT; static PyObject *__pyx_n_s_SSLContext; static PyObject *__pyx_n_s_SSLProtocol; static PyObject *__pyx_n_s_STDOUT; static PyObject *__pyx_n_s_Server_wait_closed; static PyObject *__pyx_kp_u_Shutdown_errors; static PyObject *__pyx_kp_u_Sock_ops_successfull_on_1st_try; static PyObject *__pyx_kp_u_Socket_try_writes; static PyObject *__pyx_n_s_StopIteration; static PyObject *__pyx_kp_u_StopIteration_interacts_badly_wi; static PyObject *__pyx_kp_u_StreamWriteContext_close_py_buf; static PyObject *__pyx_kp_u_StreamWriteContext_close_uv_buf; static PyObject *__pyx_kp_u_Streams_debug_info; static PyObject *__pyx_n_s_SubprocessError; static PyObject *__pyx_n_s_Task; static PyObject *__pyx_kp_u_Task__step; static PyObject *__pyx_kp_u_Task_got_bad_yield_r; static PyObject *__pyx_kp_u_Task_r_got_Future_r_attached_to; static PyObject *__pyx_n_s_ThreadPoolExecutor; static PyObject *__pyx_n_s_TimeoutError; static PyObject *__pyx_kp_u_Timer_handles_8; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_u_UDPTransport_family_is_undefined; static PyObject *__pyx_kp_u_UDPTransport_family_is_undefined_2; static PyObject *__pyx_kp_u_UVHandles_python_libuv_total; static PyObject *__pyx_kp_u_UVProcessTransport__call_connect; static PyObject *__pyx_kp_u_UVProcess__close_after_spawn_cal; static PyObject *__pyx_kp_u_UVStream__try_write_called_with; static PyObject *__pyx_kp_u_UVStream_shutdown_callback_calle; static PyObject *__pyx_kp_u_UVStream_write_callback_called_w; static PyObject *__pyx_kp_u_UVTransport__call_connection_los; static PyObject *__pyx_kp_u_UVTransport__call_connection_mad; static PyObject *__pyx_kp_u_UVTransport__start_reading; static PyObject *__pyx_kp_u_Unable_to_deallocate_request_for; static PyObject *__pyx_kp_u_Unhandled_error_in_exception_han; static PyObject *__pyx_kp_u_Unhandled_exception_in_event_loo; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_WeakSet; static PyObject *__pyx_n_s_WeakValueDictionary; static PyObject *__pyx_n_s_WriteSubprocessPipeProto; static PyObject *__pyx_n_s_WriteSubprocessPipeProto___init; static PyObject *__pyx_n_s_WriteSubprocessPipeProto___repr; static PyObject *__pyx_n_s_WriteSubprocessPipeProto_connect; static PyObject *__pyx_n_s_WriteSubprocessPipeProto_connect_2; static PyObject *__pyx_n_s_WriteSubprocessPipeProto_pause_w; static PyObject *__pyx_n_s_WriteSubprocessPipeProto_resume; static PyObject *__pyx_kp_u_Write_callbacks_failed; static PyObject *__pyx_kp_u_Write_contexts_8; static PyObject *__pyx_kp_u_Write_errors; static PyObject *__pyx_kp_u_Write_events; static PyObject *__pyx_kp_u_Write_failed_callbacks; static PyObject *__pyx_kp_u_Write_without_poll; static PyObject *__pyx_kp_u_You_must_set_server_hostname_whe; static PyObject *__pyx_kp_u__103; static PyObject *__pyx_kp_u__111; static PyObject *__pyx_kp_u__112; static PyObject *__pyx_kp_u__113; static PyObject *__pyx_kp_u__120; static PyObject *__pyx_kp_b__146; static PyObject *__pyx_kp_b__157; static PyObject *__pyx_n_s__30; static PyObject *__pyx_kp_b__30; static PyObject *__pyx_kp_u__30; static PyObject *__pyx_kp_u__36; static PyObject *__pyx_kp_u__64; static PyObject *__pyx_kp_u__75; static PyObject *__pyx_kp_u__76; static PyObject *__pyx_kp_u__97; static PyObject *__pyx_kp_u_abort_init__closed_is_set; static PyObject *__pyx_kp_u_abort_init__inited_is_set; static PyObject *__pyx_n_s_accept; static PyObject *__pyx_n_s_aclose; static PyObject *__pyx_kp_u_active_TimerHandle_is_deallacati; static PyObject *__pyx_n_s_add; static PyObject *__pyx_n_s_add_done_callback; static PyObject *__pyx_n_s_addr; static PyObject *__pyx_n_s_address; static PyObject *__pyx_kp_u_alive_closed; static PyObject *__pyx_kp_u_all_args_must_be_str_or_bytes; static PyObject *__pyx_kp_u_all_environment_values_must_be_b; static PyObject *__pyx_kp_u_all_environment_vars_must_be_byt; static PyObject *__pyx_n_s_all_tasks; static PyObject *__pyx_n_s_allow_broadcast; static PyObject *__pyx_kp_u_an_error_occurred_during_closing; static PyObject *__pyx_n_s_app_transport; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_u_asyncgen; static PyObject *__pyx_n_s_asyncgen_finalizer_hook; static PyObject *__pyx_n_s_asyncgen_firstiter_hook; static PyObject *__pyx_kp_u_asynchronous_generator_r_was_sch; static PyObject *__pyx_n_s_asyncio; static PyObject *__pyx_n_s_asyncio_base_events; static PyObject *__pyx_n_s_asyncio_coroutines; static PyObject *__pyx_n_s_asyncio_future_blocking; static PyObject *__pyx_n_s_asyncio_futures; static PyObject *__pyx_n_s_asyncio_log; static PyObject *__pyx_n_s_asyncio_sslproto; static PyObject *__pyx_n_s_asyncio_tasks; static PyObject *__pyx_n_s_await; static PyObject *__pyx_n_u_b; static PyObject *__pyx_n_s_backlog; static PyObject *__pyx_kp_b_bin_sh; static PyObject *__pyx_n_s_bind; static PyObject *__pyx_n_s_blocking; static PyObject *__pyx_kp_u_buffer_size_is_not_0_after_a_su; static PyObject *__pyx_n_s_bufsize; static PyObject *__pyx_kp_u_bufsize_must_be_0; static PyObject *__pyx_n_s_builtins; static PyObject *__pyx_kp_b_c; static PyObject *__pyx_n_s_call_check_cancel; static PyObject *__pyx_n_s_call_exception_handler; static PyObject *__pyx_n_s_call_later; static PyObject *__pyx_n_s_call_set_state; static PyObject *__pyx_n_s_call_soon; static PyObject *__pyx_n_s_call_soon_threadsafe; static PyObject *__pyx_n_s_callback; static PyObject *__pyx_kp_u_called_after_destroying_the_UVH; static PyObject *__pyx_kp_u_called_with_handle_data_NULL; static PyObject *__pyx_n_s_cancel; static PyObject *__pyx_kp_u_cancel_request_data_is_NULL; static PyObject *__pyx_kp_u_cancel_request_data_is_not_UVRe; static PyObject *__pyx_kp_u_cancel_request_is_NULL; static PyObject *__pyx_n_s_cancelled; static PyObject *__pyx_n_u_cancelled; static PyObject *__pyx_kp_u_cannot_apply_subprocess_STDOUT; static PyObject *__pyx_kp_u_cannot_convert_sockaddr_into_Pyt; static PyObject *__pyx_kp_u_cannot_open_a_UDP_handle_invalid; static PyObject *__pyx_kp_u_cannot_spawn_a_process_args_are; static PyObject *__pyx_n_s_cast; static PyObject *__pyx_n_s_cause; static PyObject *__pyx_n_s_chain; static PyObject *__pyx_n_s_chain_future_locals__call_check; static PyObject *__pyx_n_s_chain_future_locals__call_set_s; static PyObject *__pyx_n_s_chain_future_locals__set_state; static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_clear; static PyObject *__pyx_n_s_close; static PyObject *__pyx_kp_u_close__handle_data_is_NULL; static PyObject *__pyx_kp_u_close__handle_data_is_not_UVHa; static PyObject *__pyx_n_s_close_fds; static PyObject *__pyx_kp_u_close_uv_is_closing_is_true; static PyObject *__pyx_kp_u_closed_reading_x; static PyObject *__pyx_kp_u_closed_x; static PyObject *__pyx_n_s_cmd; static PyObject *__pyx_n_s_collections; static PyObject *__pyx_n_s_concurrent; static PyObject *__pyx_kp_u_concurrent_allocations; static PyObject *__pyx_n_s_concurrent_futures; static PyObject *__pyx_kp_u_concurrent_futures_Future_is_exp; static PyObject *__pyx_n_s_connect; static PyObject *__pyx_n_s_connect_accepted_socket; static PyObject *__pyx_kp_u_connect_failed; static PyObject *__pyx_n_s_connect_read_pipe; static PyObject *__pyx_n_s_connect_write_pipe; static PyObject *__pyx_n_s_connection_lost; static PyObject *__pyx_n_s_connection_made; static PyObject *__pyx_n_u_context; static PyObject *__pyx_n_s_copy; static PyObject *__pyx_n_s_coro; static PyObject *__pyx_n_s_coroutines; static PyObject *__pyx_kp_u_coroutines_cannot_be_used_with_a; static PyObject *__pyx_kp_u_coroutines_cannot_be_used_with_r; static PyObject *__pyx_kp_u_could_not_bind_to_local_addr; static PyObject *__pyx_kp_u_could_not_bind_to_remote_addr; static PyObject *__pyx_kp_u_could_not_close_attached_file_ob; static PyObject *__pyx_n_s_create_connection; static PyObject *__pyx_n_s_create_connection_locals_genexpr; static PyObject *__pyx_n_s_create_datagram_endpoint; static PyObject *__pyx_n_s_create_datagram_endpoint_locals; static PyObject *__pyx_n_s_create_future; static PyObject *__pyx_n_s_create_server; static PyObject *__pyx_n_s_create_task; static PyObject *__pyx_n_s_create_unix_connection; static PyObject *__pyx_n_s_create_unix_server; static PyObject *__pyx_kp_u_created_at; static PyObject *__pyx_n_s_creationflags; static PyObject *__pyx_kp_u_creationflags_is_not_supported; static PyObject *__pyx_n_s_current_tasks; static PyObject *__pyx_n_s_cwd; static PyObject *__pyx_kp_u_cwd_must_be_a_str_or_bytes_objec; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_data_received; static PyObject *__pyx_n_s_datagram_received; static PyObject *__pyx_kp_u_dealloc____handle_is_NULL__cl; static PyObject *__pyx_kp_u_deallocating_a_running_event_loo; static PyObject *__pyx_kp_u_deallocating_an_open_event_loop; static PyObject *__pyx_n_s_debug_wrapper; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_default; static PyObject *__pyx_n_s_default_exception_handler; static PyObject *__pyx_n_s_default_int_handler; static PyObject *__pyx_n_s_delay; static PyObject *__pyx_n_s_deque; static PyObject *__pyx_n_s_destination; static PyObject *__pyx_n_s_detach; static PyObject *__pyx_n_s_devnull; static PyObject *__pyx_n_s_disable; static PyObject *__pyx_n_s_discard; static PyObject *__pyx_n_s_disconnected; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_done; static PyObject *__pyx_n_s_dup; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_ensure_future; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_env; static PyObject *__pyx_n_s_environ; static PyObject *__pyx_n_s_eof_received; static PyObject *__pyx_kp_u_epected_AF_INET_or_AF_INET6_fami; static PyObject *__pyx_n_s_errno; static PyObject *__pyx_n_s_error; static PyObject *__pyx_n_s_error_received; static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_list; static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_read; static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_shut; static PyObject *__pyx_kp_u_error_status_in_uv_stream_t_writ; static PyObject *__pyx_kp_u_error_while_attempting_to_bind_o; static PyObject *__pyx_n_s_ex; static PyObject *__pyx_n_s_exc; static PyObject *__pyx_n_s_exc_info; static PyObject *__pyx_n_s_exception; static PyObject *__pyx_n_u_exception; static PyObject *__pyx_n_s_executable; static PyObject *__pyx_n_s_executor; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_extract_stack; static PyObject *__pyx_n_s_family; static PyObject *__pyx_kp_u_fatal_Could_not_advance__StreamW; static PyObject *__pyx_kp_u_fatal_sent_0_in_advance_uv_buf; static PyObject *__pyx_n_s_fd; static PyObject *__pyx_n_s_fileno; static PyObject *__pyx_n_s_finalizer; static PyObject *__pyx_n_s_firstiter; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_flush; static PyObject *__pyx_n_s_force_close; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_format_list; static PyObject *__pyx_n_s_frame; static PyObject *__pyx_n_s_func; static PyObject *__pyx_n_s_functools; static PyObject *__pyx_n_s_fut; static PyObject *__pyx_n_s_future; static PyObject *__pyx_n_s_futures; static PyObject *__pyx_n_s_gaierror; static PyObject *__pyx_n_s_gather; static PyObject *__pyx_n_s_gc; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_asyncgen_hooks; static PyObject *__pyx_n_u_get_asyncgen_hooks; static PyObject *__pyx_n_s_get_coroutine_wrapper; static PyObject *__pyx_n_s_get_debug; static PyObject *__pyx_n_s_get_event_loop; static PyObject *__pyx_n_s_get_extra_info; static PyObject *__pyx_n_s_get_inheritable; static PyObject *__pyx_n_u_get_running_loop; static PyObject *__pyx_n_s_getaddrinfo; static PyObject *__pyx_kp_u_getaddrinfo_returned_empty_list; static PyObject *__pyx_kp_u_getaddrinfo_returned_empty_list_2; static PyObject *__pyx_n_s_getframe; static PyObject *__pyx_n_s_getnameinfo; static PyObject *__pyx_kp_u_getnameinfo_argument_1_must_be_a; static PyObject *__pyx_n_s_getpeername; static PyObject *__pyx_n_s_getservbyname; static PyObject *__pyx_kp_u_getsockaddrarg_flowinfo_must_be; static PyObject *__pyx_kp_u_getsockaddrarg_scope_id_must_be; static PyObject *__pyx_n_s_getsockname; static PyObject *__pyx_n_s_getsockopt; static PyObject *__pyx_n_s_gettimeout; static PyObject *__pyx_n_u_handle; static PyObject *__pyx_kp_u_handle_data_is_NULL_in___close_a; static PyObject *__pyx_kp_u_handle_loop_data_is_NULL_in___en; static PyObject *__pyx_kp_u_handle_loop_is_NULL_in___ensure; static PyObject *__pyx_n_s_high; static PyObject *__pyx_kp_u_high_r_must_be_low_r_must_be_0; static PyObject *__pyx_kp_s_home_travis_build_MagicStack_uv; static PyObject *__pyx_kp_s_home_travis_build_MagicStack_uv_2; static PyObject *__pyx_kp_s_home_travis_build_MagicStack_uv_3; static PyObject *__pyx_n_s_host; static PyObject *__pyx_kp_u_host_and_port_was_not_specified; static PyObject *__pyx_kp_u_host_must_be_a_str_or_bytes; static PyObject *__pyx_kp_u_host_must_be_a_string_or_bytes_o; static PyObject *__pyx_kp_u_host_port_and_sock_can_not_be_sp; static PyObject *__pyx_n_s_id; static PyObject *__pyx_n_s_ident; static PyObject *__pyx_n_u_idna; static PyObject *__pyx_n_s_ignore_environment; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_inspect; static PyObject *__pyx_kp_u_integer_argument_expected_got; static PyObject *__pyx_kp_u_invalid_Handle_cb_type; static PyObject *__pyx_kp_u_invalid__init_protocol_call; static PyObject *__pyx_kp_u_invalid_data_in_writebuf_an_inst; static PyObject *__pyx_kp_u_invalid_socket_family_expected_A; static PyObject *__pyx_kp_u_invalid_stderr_argument_value_r; static PyObject *__pyx_kp_u_invalid_stdin_argument_value_r; static PyObject *__pyx_kp_u_invalid_stdout_argument_value_r; static PyObject *__pyx_kp_u_invalid_waiter_object_r_expected; static PyObject *__pyx_kp_u_is_alive_but__handle_data_is_no; static PyObject *__pyx_kp_u_is_alive_but__handle_is_NULL; static PyObject *__pyx_kp_u_is_alive_but__handle_loop_is_no; static PyObject *__pyx_kp_u_is_alive_but__loop_is_None; static PyObject *__pyx_n_s_is_closed; static PyObject *__pyx_kp_u_is_not_supposed_to_be_instantia; static PyObject *__pyx_kp_u_is_open_in___dealloc___with_loo; static PyObject *__pyx_n_s_is_running; static PyObject *__pyx_n_s_iscoroutine; static PyObject *__pyx_n_s_iscoroutinefunction; static PyObject *__pyx_n_u_isfuture; static PyObject *__pyx_n_s_isgenerator; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_iter; static PyObject *__pyx_n_s_itertools; static PyObject *__pyx_n_s_local_addr; static PyObject *__pyx_kp_u_local_addr_must_be_a_tuple_of_ho; static PyObject *__pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2; static PyObject *__pyx_n_s_log; static PyObject *__pyx_n_s_log_destroy_pending; static PyObject *__pyx_n_s_logger; static PyObject *__pyx_n_s_loop; static PyObject *__pyx_n_s_loop_2; static PyObject *__pyx_kp_u_loop__exec_queued_writes; static PyObject *__pyx_kp_u_loop__on_idle; static PyObject *__pyx_kp_u_loop__queued_streams_are_not_emp; static PyObject *__pyx_kp_u_loop_set_debug_False_cannot_unse; static PyObject *__pyx_kp_u_loop_set_debug_True_cannot_set_d; static PyObject *__pyx_n_s_low; static PyObject *__pyx_n_s_lower; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_main_thread; static PyObject *__pyx_n_s_memoryview; static PyObject *__pyx_n_u_message; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_monotonic; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_u_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_kp_u_new_callbacks_were_queued_during; static PyObject *__pyx_n_s_new_future; static PyObject *__pyx_kp_u_new_poll_handles_were_queued_dur; static PyObject *__pyx_kp_u_new_timers_were_queued_during_lo; static PyObject *__pyx_kp_u_no_path_and_sock_were_specified; static PyObject *__pyx_n_s_noop; static PyObject *__pyx_n_s_noop_2; static PyObject *__pyx_kp_u_not_holding_the_import_lock; static PyObject *__pyx_kp_u_object_created_at_most_recent_ca; static PyObject *__pyx_kp_u_objs_handles; static PyObject *__pyx_n_s_on_ssl_connected; static PyObject *__pyx_n_s_open; static PyObject *__pyx_kp_u_open__StreamWriteContext_is_bein; static PyObject *__pyx_kp_u_open__UDPSendContext_is_being_de; static PyObject *__pyx_n_s_os; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_partial; static PyObject *__pyx_n_s_pass_fds; static PyObject *__pyx_n_s_path; static PyObject *__pyx_kp_u_path_and_sock_can_not_be_specifi; static PyObject *__pyx_kp_u_path_was_not_specified_and_no_so; static PyObject *__pyx_n_s_pause_writing; static PyObject *__pyx_n_u_peername; static PyObject *__pyx_n_s_pipe; static PyObject *__pyx_n_u_pipe; static PyObject *__pyx_n_s_pipe_connection_lost; static PyObject *__pyx_n_s_pipe_data_received; static PyObject *__pyx_n_s_pop; static PyObject *__pyx_n_s_popleft; static PyObject *__pyx_n_s_port; static PyObject *__pyx_kp_u_port_must_be_a_str_bytes_or_int; static PyObject *__pyx_n_s_preexec_fn; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_proc; static PyObject *__pyx_n_s_process_exited; static PyObject *__pyx_n_s_program; static PyObject *__pyx_n_s_proto; static PyObject *__pyx_n_s_proto_factory; static PyObject *__pyx_n_u_protocol; static PyObject *__pyx_n_s_protocol_factory; static PyObject *__pyx_kp_u_protocol_is_not_set_cannot_call; static PyObject *__pyx_kp_u_protocol_is_required; static PyObject *__pyx_kp_u_protocol_pause_writing_failed; static PyObject *__pyx_kp_u_protocol_resume_writing_failed; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_u_qualname; static PyObject *__pyx_kp_u_r; static PyObject *__pyx_kp_u_r_fileno_returned_non_integer; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_read; static PyObject *__pyx_n_s_recv; static PyObject *__pyx_n_s_remote_addr; static PyObject *__pyx_kp_u_remote_addr_must_be_a_tuple_of_h; static PyObject *__pyx_n_s_remove; static PyObject *__pyx_n_s_remove_done_callback; static PyObject *__pyx_n_s_remove_signal_handler; static PyObject *__pyx_n_s_repr; static PyObject *__pyx_n_s_restore_signals; static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_resume_writing; static PyObject *__pyx_n_s_return_exceptions; static PyObject *__pyx_n_s_reuse_address; static PyObject *__pyx_n_s_reuse_port; static PyObject *__pyx_kp_u_reuse_port_not_supported_by_sock; static PyObject *__pyx_n_s_rstrip; static PyObject *__pyx_n_s_run_forever; static PyObject *__pyx_n_s_run_until_complete_locals_lambda; static PyObject *__pyx_kp_u_running_closed_debug; static PyObject *__pyx_kp_u_s_fd_s_pipe_r; static PyObject *__pyx_kp_u_s_sockets_r; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_server_hostname; static PyObject *__pyx_kp_u_server_hostname_is_only_meaningf; static PyObject *__pyx_kp_u_service_proto_not_found; static PyObject *__pyx_n_s_set_asyncgen_hooks; static PyObject *__pyx_n_s_set_coroutine_wrapper; static PyObject *__pyx_n_s_set_debug; static PyObject *__pyx_n_s_set_exception; static PyObject *__pyx_n_s_set_inheritable; static PyObject *__pyx_n_s_set_result; static PyObject *__pyx_n_u_set_running_loop; static PyObject *__pyx_n_s_set_running_or_notify_cancel; static PyObject *__pyx_n_s_set_state; static PyObject *__pyx_n_s_set_wakeup_fd; static PyObject *__pyx_kp_u_set_wakeup_fd_only_works_in_main; static PyObject *__pyx_n_s_setblocking; static PyObject *__pyx_n_s_shell; static PyObject *__pyx_kp_u_shell_must_be_False; static PyObject *__pyx_kp_u_shell_must_be_True; static PyObject *__pyx_n_s_shutdown; static PyObject *__pyx_n_s_shutdown_asyncgens; static PyObject *__pyx_n_s_sig; static PyObject *__pyx_kp_u_sig_cannot_be_caught; static PyObject *__pyx_kp_u_sig_must_be_an_int_not_r; static PyObject *__pyx_kp_u_sig_out_of_range_1; static PyObject *__pyx_n_s_sighandler_noop; static PyObject *__pyx_n_s_signal; static PyObject *__pyx_n_s_signum; static PyObject *__pyx_n_s_sleep; static PyObject *__pyx_n_s_sock; static PyObject *__pyx_n_s_sock_connect; static PyObject *__pyx_n_s_sock_sendall; static PyObject *__pyx_n_s_sockaddr; static PyObject *__pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3; static PyObject *__pyx_kp_u_sockaddr_resolved_to_multiple_ad; static PyObject *__pyx_n_s_socket; static PyObject *__pyx_n_u_socket; static PyObject *__pyx_kp_u_socket_modifier_keyword_argument; static PyObject *__pyx_n_s_socketpair; static PyObject *__pyx_n_s_sockets; static PyObject *__pyx_n_u_sockname; static PyObject *__pyx_n_s_source; static PyObject *__pyx_n_u_source_traceback; static PyObject *__pyx_n_s_split; static PyObject *__pyx_n_s_ssl; static PyObject *__pyx_kp_u_ssl_argument_must_be_an_SSLConte; static PyObject *__pyx_kp_u_ssl_is_expected_to_be_None_or_an; static PyObject *__pyx_n_s_sslproto; static PyObject *__pyx_kp_u_start_init_can_only_be_called; static PyObject *__pyx_n_s_start_new_session; static PyObject *__pyx_n_s_startupinfo; static PyObject *__pyx_kp_u_startupinfo_is_not_supported; static PyObject *__pyx_n_s_std_signal; static PyObject *__pyx_n_s_stderr; static PyObject *__pyx_n_s_stdin; static PyObject *__pyx_n_s_stdio_fut; static PyObject *__pyx_n_s_stdio_inited; static PyObject *__pyx_n_s_stdout; static PyObject *__pyx_kp_u_step_already_done_r_r; static PyObject *__pyx_n_s_stop; static PyObject *__pyx_kp_u_stream_is_open_after_UVStream__t; static PyObject *__pyx_n_s_strerror; static PyObject *__pyx_n_s_submit; static PyObject *__pyx_n_s_subprocess; static PyObject *__pyx_kp_u_subprocess_STDOUT_is_supported_o; static PyObject *__pyx_n_s_subprocess_run; static PyObject *__pyx_n_s_subtract; static PyObject *__pyx_n_s_super; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_kp_u_task_factory_must_be_a_callable; static PyObject *__pyx_n_u_tcp; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_test_coroutine_1; static PyObject *__pyx_kp_u_the_socket_must_be_non_blocking; static PyObject *__pyx_kp_u_this_event_loop_is_already_runni; static PyObject *__pyx_n_s_threading; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_time; static PyObject *__pyx_n_s_timeout; static PyObject *__pyx_n_s_traceback; static PyObject *__pyx_n_s_traceback_2; static PyObject *__pyx_n_s_transport; static PyObject *__pyx_n_u_transport; static PyObject *__pyx_kp_u_try_write_sent_all_data_and_ret; static PyObject *__pyx_n_s_type; static PyObject *__pyx_n_u_udp; static PyObject *__pyx_kp_u_unable_to_listen_no_protocol_fac; static PyObject *__pyx_kp_u_unable_to_perform_operation_on_r; static PyObject *__pyx_kp_u_unable_to_perform_send_operation; static PyObject *__pyx_kp_u_unable_to_start_the_loop_it_was; static PyObject *__pyx_kp_u_unclosed_resource_r; static PyObject *__pyx_kp_u_unclosed_resource_r_2; static PyObject *__pyx_kp_u_unexpected_address_family; static PyObject *__pyx_n_s_universal_newlines; static PyObject *__pyx_kp_u_universal_newlines_must_be_False; static PyObject *__pyx_kp_u_unknown_Future_state; static PyObject *__pyx_kp_u_unopened_TCPServer; static PyObject *__pyx_n_s_update; static PyObject *__pyx_kp_u_uv_close_handle_cb_handle_loop; static PyObject *__pyx_kp_u_uv_handle_t_current_freed_total; static PyObject *__pyx_kp_u_uv_udp_receive_callback_addr_is; static PyObject *__pyx_kp_u_uvloop_Future_supports_only_uvlo; static PyObject *__pyx_n_s_uvloop_loop; static PyObject *__pyx_n_s_uvloop_sleep_after_fork; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_n_s_wait; static PyObject *__pyx_n_s_wait_closed; static PyObject *__pyx_n_s_waiter; static PyObject *__pyx_kp_u_waiter_is_not_None_in__call_conn; static PyObject *__pyx_n_s_wakeup; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_warning; static PyObject *__pyx_n_s_warnings; static PyObject *__pyx_n_u_wb; static PyObject *__pyx_n_s_weakref; static PyObject *__pyx_n_s_when; static PyObject *__pyx_kp_u_without_no_gc_clear_loop_was_se; static PyObject *__pyx_n_s_wrap_future; static PyObject *__pyx_n_s_write; static PyObject *__pyx_kp_u_yield_from_wasn_t_used_with_futu; static PyObject *__pyx_kp_u_yield_was_used_instead_of_yield; static PyObject *__pyx_kp_u_yield_was_used_instead_of_yield_2; static PyObject *__pyx_n_s_zip; static int __pyx_pf_6uvloop_4loop_4Loop___cinit__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_4Loop_2__init__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_6_get_backend_id(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_8print_debug_info(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_10__repr__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_18call_at(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24run_forever(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28get_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_30set_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32is_running(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34is_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_36create_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38create_task(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_coro); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_factory); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_48getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sockaddr, int __pyx_v_flags); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_51create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, CYTHON_UNUSED PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_54create_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_ssl, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_server_hostname); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_57create_unix_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_backlog, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_60create_unix_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_ssl, PyObject *__pyx_v_sock, PyObject *__pyx_v_server_hostname); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_63default_exception_handler(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_65get_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_67set_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_handler); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_69call_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_71add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_73remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_75add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_77remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_79sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_n); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_81sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_84sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_86sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_89connect_accepted_socket(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_92run_in_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_94set_default_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_96__subprocess_run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_args, PyObject *__pyx_v_stdin, PyObject *__pyx_v_stdout, PyObject *__pyx_v_stderr, PyObject *__pyx_v_universal_newlines, CYTHON_UNUSED PyObject *__pyx_v_shell, PyObject *__pyx_v_bufsize, PyObject *__pyx_v_preexec_fn, CYTHON_UNUSED PyObject *__pyx_v_close_fds, PyObject *__pyx_v_cwd, PyObject *__pyx_v_env, PyObject *__pyx_v_startupinfo, PyObject *__pyx_v_creationflags, PyObject *__pyx_v_restore_signals, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v_executable, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v___uvloop_sleep_after_fork); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_99subprocess_shell(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_cmd, PyObject *__pyx_v_shell, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_101subprocess_exec(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_program, PyObject *__pyx_v_shell, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_103connect_read_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_106connect_write_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_109add_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_111remove_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_113create_datagram_endpoint(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_remote_addr, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_allow_broadcast, PyObject *__pyx_v_sock); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_116_asyncgen_finalizer_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_118_asyncgen_firstiter_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_120shutdown_asyncgens(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_6Handle___cinit__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_6Handle_4__init__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Handle_6__repr__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Handle_8cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, uint64_t __pyx_v_delay); /* proto */ static void __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_6cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8UVStream___cinit__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_2__repr__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_4write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_6writelines(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_bufs); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_8write_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_12pause_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_14resume_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_fut); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */ static int __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_high, CYTHON_UNUSED PyObject *__pyx_v_low); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_list_of_data); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_pause_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_2resume_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport); /* proto */ static int __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter, PyObject *__pyx_v_stdio_fut); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_fd); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_signal); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proc, PyObject *__pyx_v_fd); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transport); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static int __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */ static void __pyx_pf_6uvloop_4loop_9UVRequest_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto */ static void __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, PyObject *__pyx_v_callback); /* proto */ static int __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback); /* proto */ static void __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr); /* proto */ static int __pyx_pf_6uvloop_4loop_6Server___cinit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Server_2__repr__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Server_4wait_closed(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Server_7close(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_6Server_7sockets___get__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_10BaseFuture___init__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_2__set__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_6_state___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_2cancel(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_4cancelled(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_6done(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_8result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_12add_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_14remove_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_16set_result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_result); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_18set_exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_exception); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_20__iter__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_23__await__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_5_loop___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10_callbacks___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10_exception___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_7_result___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking_2__set__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_14_log_traceback___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8BaseTask___init__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_coro, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_2cancel(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_4_step(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_exc); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_6_wakeup(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_5_coro___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_11_fut_waiter___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_12_must_cancel___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self); /* proto */ static int __pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending_2__set__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future__set_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future_2_call_check_cancel(PyObject *__pyx_self, PyObject *__pyx_v_destination); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future_4_call_set_state(PyObject *__pyx_self, PyObject *__pyx_v_source); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop__wrap_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_loop); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_2_sighandler_noop(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_signum, CYTHON_UNUSED PyObject *__pyx_v_frame); /* proto */ static PyObject *__pyx_pf_6uvloop_4loop_4_test_coroutine_1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_tp_new_6uvloop_4loop_UVHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVSocketHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVAsync(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVTimer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVIdle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVBaseTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_Loop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_Handle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_TimerHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVCheck(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVPoll(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVStreamServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_TCPServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_TCPTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UnixServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_ReadUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_WriteUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcess(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcessTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UVRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_UDPTransport(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_Server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop__StreamWriteContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop__TCPConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop__PipeConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_NameInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop__UDPSendContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_BaseFuture(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop_BaseTask(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_create_server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_create_connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_sock_connect(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20_wait_closed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22___await__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_float_0_1; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_6; static PyObject *__pyx_int_42; static PyObject *__pyx_int_100; static PyObject *__pyx_int_1000; static PyObject *__pyx_int_4096; static PyObject *__pyx_int_50000; static PyObject *__pyx_int_1048575; static PyObject *__pyx_int_4294967296; static PyObject *__pyx_int_neg_1; static int __pyx_k__49; static int __pyx_k__50; static PyObject *__pyx_k__86; static PyObject *__pyx_k__87; static PyObject *__pyx_k__88; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__33; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__58; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__60; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__62; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__66; static PyObject *__pyx_tuple__67; static PyObject *__pyx_tuple__68; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__70; static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__72; static PyObject *__pyx_tuple__73; static PyObject *__pyx_tuple__74; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__78; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__80; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__82; static PyObject *__pyx_tuple__83; static PyObject *__pyx_tuple__84; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__89; static PyObject *__pyx_tuple__90; static PyObject *__pyx_tuple__91; static PyObject *__pyx_tuple__92; static PyObject *__pyx_tuple__93; static PyObject *__pyx_tuple__94; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__96; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__102; static PyObject *__pyx_tuple__104; static PyObject *__pyx_tuple__105; static PyObject *__pyx_tuple__106; static PyObject *__pyx_tuple__107; static PyObject *__pyx_tuple__108; static PyObject *__pyx_tuple__109; static PyObject *__pyx_tuple__110; static PyObject *__pyx_tuple__114; static PyObject *__pyx_tuple__115; static PyObject *__pyx_tuple__116; static PyObject *__pyx_tuple__117; static PyObject *__pyx_tuple__118; static PyObject *__pyx_tuple__119; static PyObject *__pyx_tuple__121; static PyObject *__pyx_tuple__122; static PyObject *__pyx_tuple__123; static PyObject *__pyx_tuple__124; static PyObject *__pyx_tuple__125; static PyObject *__pyx_tuple__126; static PyObject *__pyx_tuple__127; static PyObject *__pyx_tuple__128; static PyObject *__pyx_tuple__129; static PyObject *__pyx_tuple__130; static PyObject *__pyx_tuple__131; static PyObject *__pyx_tuple__132; static PyObject *__pyx_tuple__133; static PyObject *__pyx_tuple__134; static PyObject *__pyx_tuple__135; static PyObject *__pyx_tuple__136; static PyObject *__pyx_tuple__137; static PyObject *__pyx_tuple__138; static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__140; static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__142; static PyObject *__pyx_tuple__143; static PyObject *__pyx_tuple__144; static PyObject *__pyx_tuple__145; static PyObject *__pyx_tuple__147; static PyObject *__pyx_tuple__148; static PyObject *__pyx_tuple__149; static PyObject *__pyx_tuple__150; static PyObject *__pyx_tuple__151; static PyObject *__pyx_tuple__152; static PyObject *__pyx_tuple__153; static PyObject *__pyx_tuple__154; static PyObject *__pyx_tuple__155; static PyObject *__pyx_tuple__156; static PyObject *__pyx_tuple__158; static PyObject *__pyx_tuple__159; static PyObject *__pyx_tuple__160; static PyObject *__pyx_tuple__161; static PyObject *__pyx_tuple__162; static PyObject *__pyx_tuple__163; static PyObject *__pyx_tuple__164; static PyObject *__pyx_tuple__165; static PyObject *__pyx_tuple__166; static PyObject *__pyx_tuple__167; static PyObject *__pyx_tuple__168; static PyObject *__pyx_tuple__169; static PyObject *__pyx_tuple__170; static PyObject *__pyx_tuple__171; static PyObject *__pyx_tuple__172; static PyObject *__pyx_tuple__173; static PyObject *__pyx_tuple__174; static PyObject *__pyx_tuple__175; static PyObject *__pyx_tuple__176; static PyObject *__pyx_tuple__177; static PyObject *__pyx_tuple__178; static PyObject *__pyx_tuple__179; static PyObject *__pyx_tuple__180; static PyObject *__pyx_tuple__181; static PyObject *__pyx_tuple__182; static PyObject *__pyx_tuple__183; static PyObject *__pyx_tuple__184; static PyObject *__pyx_tuple__185; static PyObject *__pyx_tuple__186; static PyObject *__pyx_tuple__187; static PyObject *__pyx_tuple__188; static PyObject *__pyx_tuple__189; static PyObject *__pyx_tuple__190; static PyObject *__pyx_tuple__191; static PyObject *__pyx_tuple__193; static PyObject *__pyx_tuple__195; static PyObject *__pyx_tuple__197; static PyObject *__pyx_tuple__199; static PyObject *__pyx_tuple__201; static PyObject *__pyx_tuple__203; static PyObject *__pyx_tuple__205; static PyObject *__pyx_tuple__207; static PyObject *__pyx_tuple__209; static PyObject *__pyx_tuple__211; static PyObject *__pyx_tuple__212; static PyObject *__pyx_tuple__214; static PyObject *__pyx_codeobj__21; static PyObject *__pyx_codeobj__23; static PyObject *__pyx_codeobj__192; static PyObject *__pyx_codeobj__194; static PyObject *__pyx_codeobj__196; static PyObject *__pyx_codeobj__198; static PyObject *__pyx_codeobj__200; static PyObject *__pyx_codeobj__202; static PyObject *__pyx_codeobj__204; static PyObject *__pyx_codeobj__206; static PyObject *__pyx_codeobj__208; static PyObject *__pyx_codeobj__210; static PyObject *__pyx_codeobj__213; static PyObject *__pyx_codeobj__215; static PyObject *__pyx_codeobj__216; /* "uvloop/errors.pyx":1 * cdef str __strerr(int errno): # <<<<<<<<<<<<<< * return strerror(errno).decode() * */ static PyObject *__pyx_f_6uvloop_4loop___strerr(int __pyx_v_errno) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__strerr", 0); /* "uvloop/errors.pyx":2 * cdef str __strerr(int errno): * return strerror(errno).decode() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = strerror(__pyx_v_errno); __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2, __pyx_L1_error) __Pyx_INCREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/errors.pyx":1 * cdef str __strerr(int errno): # <<<<<<<<<<<<<< * return strerror(errno).decode() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__strerr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/errors.pyx":5 * * * cdef __convert_python_error(int uverr): # <<<<<<<<<<<<<< * # XXX Won't work for Windows: * # From libuv docs: */ static PyObject *__pyx_f_6uvloop_4loop___convert_python_error(int __pyx_v_uverr) { int __pyx_v_oserr; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__convert_python_error", 0); /* "uvloop/errors.pyx":11 * # negated errno (or -errno), while on Windows they * # are defined by libuv to arbitrary negative numbers. * cdef int oserr = -uverr # <<<<<<<<<<<<<< * * exc = OSError */ __pyx_v_oserr = (-__pyx_v_uverr); /* "uvloop/errors.pyx":13 * cdef int oserr = -uverr * * exc = OSError # <<<<<<<<<<<<<< * * if uverr in (uv.UV_EACCES, uv.UV_EPERM): */ __Pyx_INCREF(__pyx_builtin_OSError); __pyx_v_exc = __pyx_builtin_OSError; /* "uvloop/errors.pyx":15 * exc = OSError * * if uverr in (uv.UV_EACCES, uv.UV_EPERM): # <<<<<<<<<<<<<< * exc = PermissionError * */ __pyx_t_1 = __pyx_v_uverr; __pyx_t_3 = ((__pyx_t_1 == UV_EACCES) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 == UV_EPERM) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":16 * * if uverr in (uv.UV_EACCES, uv.UV_EPERM): * exc = PermissionError # <<<<<<<<<<<<<< * * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): */ __Pyx_INCREF(__pyx_builtin_PermissionError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_PermissionError); /* "uvloop/errors.pyx":15 * exc = OSError * * if uverr in (uv.UV_EACCES, uv.UV_EPERM): # <<<<<<<<<<<<<< * exc = PermissionError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":18 * exc = PermissionError * * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): # <<<<<<<<<<<<<< * exc = BlockingIOError * */ __pyx_t_1 = __pyx_v_uverr; __pyx_t_2 = ((__pyx_t_1 == UV_EAGAIN) != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = ((__pyx_t_1 == UV_EALREADY) != 0); __pyx_t_3 = __pyx_t_2; __pyx_L6_bool_binop_done:; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "uvloop/errors.pyx":19 * * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): * exc = BlockingIOError # <<<<<<<<<<<<<< * * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): */ __Pyx_INCREF(__pyx_builtin_BlockingIOError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_BlockingIOError); /* "uvloop/errors.pyx":18 * exc = PermissionError * * elif uverr in (uv.UV_EAGAIN, uv.UV_EALREADY): # <<<<<<<<<<<<<< * exc = BlockingIOError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":21 * exc = BlockingIOError * * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): # <<<<<<<<<<<<<< * exc = BrokenPipeError * */ __pyx_t_1 = __pyx_v_uverr; __pyx_t_3 = ((__pyx_t_1 == UV_EPIPE) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 == UV_ESHUTDOWN) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L8_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":22 * * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): * exc = BrokenPipeError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ECONNABORTED: */ __Pyx_INCREF(__pyx_builtin_BrokenPipeError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_BrokenPipeError); /* "uvloop/errors.pyx":21 * exc = BlockingIOError * * elif uverr in (uv.UV_EPIPE, uv.UV_ESHUTDOWN): # <<<<<<<<<<<<<< * exc = BrokenPipeError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":24 * exc = BrokenPipeError * * elif uverr == uv.UV_ECONNABORTED: # <<<<<<<<<<<<<< * exc = ConnectionAbortedError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNABORTED) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":25 * * elif uverr == uv.UV_ECONNABORTED: * exc = ConnectionAbortedError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ECONNREFUSED: */ __Pyx_INCREF(__pyx_builtin_ConnectionAbortedError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_ConnectionAbortedError); /* "uvloop/errors.pyx":24 * exc = BrokenPipeError * * elif uverr == uv.UV_ECONNABORTED: # <<<<<<<<<<<<<< * exc = ConnectionAbortedError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":27 * exc = ConnectionAbortedError * * elif uverr == uv.UV_ECONNREFUSED: # <<<<<<<<<<<<<< * exc = ConnectionRefusedError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNREFUSED) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":28 * * elif uverr == uv.UV_ECONNREFUSED: * exc = ConnectionRefusedError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ECONNRESET: */ __Pyx_INCREF(__pyx_builtin_ConnectionRefusedError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_ConnectionRefusedError); /* "uvloop/errors.pyx":27 * exc = ConnectionAbortedError * * elif uverr == uv.UV_ECONNREFUSED: # <<<<<<<<<<<<<< * exc = ConnectionRefusedError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":30 * exc = ConnectionRefusedError * * elif uverr == uv.UV_ECONNRESET: # <<<<<<<<<<<<<< * exc = ConnectionResetError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ECONNRESET) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":31 * * elif uverr == uv.UV_ECONNRESET: * exc = ConnectionResetError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EEXIST: */ __Pyx_INCREF(__pyx_builtin_ConnectionResetError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_ConnectionResetError); /* "uvloop/errors.pyx":30 * exc = ConnectionRefusedError * * elif uverr == uv.UV_ECONNRESET: # <<<<<<<<<<<<<< * exc = ConnectionResetError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":33 * exc = ConnectionResetError * * elif uverr == uv.UV_EEXIST: # <<<<<<<<<<<<<< * exc = FileExistsError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_EEXIST) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":34 * * elif uverr == uv.UV_EEXIST: * exc = FileExistsError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ENOENT: */ __Pyx_INCREF(__pyx_builtin_FileExistsError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_FileExistsError); /* "uvloop/errors.pyx":33 * exc = ConnectionResetError * * elif uverr == uv.UV_EEXIST: # <<<<<<<<<<<<<< * exc = FileExistsError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":36 * exc = FileExistsError * * elif uverr == uv.UV_ENOENT: # <<<<<<<<<<<<<< * exc = FileNotFoundError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ENOENT) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":37 * * elif uverr == uv.UV_ENOENT: * exc = FileNotFoundError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EINTR: */ __Pyx_INCREF(__pyx_builtin_FileNotFoundError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_FileNotFoundError); /* "uvloop/errors.pyx":36 * exc = FileExistsError * * elif uverr == uv.UV_ENOENT: # <<<<<<<<<<<<<< * exc = FileNotFoundError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":39 * exc = FileNotFoundError * * elif uverr == uv.UV_EINTR: # <<<<<<<<<<<<<< * exc = InterruptedError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_EINTR) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":40 * * elif uverr == uv.UV_EINTR: * exc = InterruptedError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EISDIR: */ __Pyx_INCREF(__pyx_builtin_InterruptedError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_InterruptedError); /* "uvloop/errors.pyx":39 * exc = FileNotFoundError * * elif uverr == uv.UV_EINTR: # <<<<<<<<<<<<<< * exc = InterruptedError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":42 * exc = InterruptedError * * elif uverr == uv.UV_EISDIR: # <<<<<<<<<<<<<< * exc = IsADirectoryError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_EISDIR) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":43 * * elif uverr == uv.UV_EISDIR: * exc = IsADirectoryError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ESRCH: */ __Pyx_INCREF(__pyx_builtin_IsADirectoryError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_IsADirectoryError); /* "uvloop/errors.pyx":42 * exc = InterruptedError * * elif uverr == uv.UV_EISDIR: # <<<<<<<<<<<<<< * exc = IsADirectoryError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":45 * exc = IsADirectoryError * * elif uverr == uv.UV_ESRCH: # <<<<<<<<<<<<<< * exc = ProcessLookupError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ESRCH) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":46 * * elif uverr == uv.UV_ESRCH: * exc = ProcessLookupError # <<<<<<<<<<<<<< * * elif uverr == uv.UV_ETIMEDOUT: */ __Pyx_INCREF(__pyx_builtin_ProcessLookupError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_ProcessLookupError); /* "uvloop/errors.pyx":45 * exc = IsADirectoryError * * elif uverr == uv.UV_ESRCH: # <<<<<<<<<<<<<< * exc = ProcessLookupError * */ goto __pyx_L3; } /* "uvloop/errors.pyx":48 * exc = ProcessLookupError * * elif uverr == uv.UV_ETIMEDOUT: # <<<<<<<<<<<<<< * exc = TimeoutError * */ __pyx_t_3 = ((__pyx_v_uverr == UV_ETIMEDOUT) != 0); if (__pyx_t_3) { /* "uvloop/errors.pyx":49 * * elif uverr == uv.UV_ETIMEDOUT: * exc = TimeoutError # <<<<<<<<<<<<<< * * return exc(oserr, __strerr(oserr)) */ __Pyx_INCREF(__pyx_builtin_TimeoutError); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_builtin_TimeoutError); /* "uvloop/errors.pyx":48 * exc = ProcessLookupError * * elif uverr == uv.UV_ETIMEDOUT: # <<<<<<<<<<<<<< * exc = TimeoutError * */ } __pyx_L3:; /* "uvloop/errors.pyx":51 * exc = TimeoutError * * return exc(oserr, __strerr(oserr)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_oserr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_f_6uvloop_4loop___strerr(__pyx_v_oserr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_exc); __pyx_t_7 = __pyx_v_exc; __pyx_t_8 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/errors.pyx":5 * * * cdef __convert_python_error(int uverr): # <<<<<<<<<<<<<< * # XXX Won't work for Windows: * # From libuv docs: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.__convert_python_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/errors.pyx":54 * * * cdef int __convert_socket_error(int uverr): # <<<<<<<<<<<<<< * cdef int sock_err = 0 * */ static int __pyx_f_6uvloop_4loop___convert_socket_error(int __pyx_v_uverr) { int __pyx_v_sock_err; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__convert_socket_error", 0); /* "uvloop/errors.pyx":55 * * cdef int __convert_socket_error(int uverr): * cdef int sock_err = 0 # <<<<<<<<<<<<<< * * if uverr == uv.UV_EAI_ADDRFAMILY: */ __pyx_v_sock_err = 0; /* "uvloop/errors.pyx":57 * cdef int sock_err = 0 * * if uverr == uv.UV_EAI_ADDRFAMILY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_ADDRFAMILY * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_ADDRFAMILY) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":58 * * if uverr == uv.UV_EAI_ADDRFAMILY: * sock_err = socket_EAI_ADDRFAMILY # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_AGAIN: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY; /* "uvloop/errors.pyx":57 * cdef int sock_err = 0 * * if uverr == uv.UV_EAI_ADDRFAMILY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_ADDRFAMILY * */ goto __pyx_L3; } /* "uvloop/errors.pyx":60 * sock_err = socket_EAI_ADDRFAMILY * * elif uverr == uv.UV_EAI_AGAIN: # <<<<<<<<<<<<<< * sock_err = socket_EAI_AGAIN * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_AGAIN) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":61 * * elif uverr == uv.UV_EAI_AGAIN: * sock_err = socket_EAI_AGAIN # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_BADFLAGS: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_AGAIN; /* "uvloop/errors.pyx":60 * sock_err = socket_EAI_ADDRFAMILY * * elif uverr == uv.UV_EAI_AGAIN: # <<<<<<<<<<<<<< * sock_err = socket_EAI_AGAIN * */ goto __pyx_L3; } /* "uvloop/errors.pyx":63 * sock_err = socket_EAI_AGAIN * * elif uverr == uv.UV_EAI_BADFLAGS: # <<<<<<<<<<<<<< * sock_err = socket_EAI_BADFLAGS * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_BADFLAGS) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":64 * * elif uverr == uv.UV_EAI_BADFLAGS: * sock_err = socket_EAI_BADFLAGS # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_BADHINTS: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS; /* "uvloop/errors.pyx":63 * sock_err = socket_EAI_AGAIN * * elif uverr == uv.UV_EAI_BADFLAGS: # <<<<<<<<<<<<<< * sock_err = socket_EAI_BADFLAGS * */ goto __pyx_L3; } /* "uvloop/errors.pyx":66 * sock_err = socket_EAI_BADFLAGS * * elif uverr == uv.UV_EAI_BADHINTS: # <<<<<<<<<<<<<< * sock_err = socket_EAI_BADHINTS * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_BADHINTS) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":67 * * elif uverr == uv.UV_EAI_BADHINTS: * sock_err = socket_EAI_BADHINTS # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_CANCELED: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS; /* "uvloop/errors.pyx":66 * sock_err = socket_EAI_BADFLAGS * * elif uverr == uv.UV_EAI_BADHINTS: # <<<<<<<<<<<<<< * sock_err = socket_EAI_BADHINTS * */ goto __pyx_L3; } /* "uvloop/errors.pyx":69 * sock_err = socket_EAI_BADHINTS * * elif uverr == uv.UV_EAI_CANCELED: # <<<<<<<<<<<<<< * sock_err = socket_EAI_CANCELED * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_CANCELED) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":70 * * elif uverr == uv.UV_EAI_CANCELED: * sock_err = socket_EAI_CANCELED # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_FAIL: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_CANCELED; /* "uvloop/errors.pyx":69 * sock_err = socket_EAI_BADHINTS * * elif uverr == uv.UV_EAI_CANCELED: # <<<<<<<<<<<<<< * sock_err = socket_EAI_CANCELED * */ goto __pyx_L3; } /* "uvloop/errors.pyx":72 * sock_err = socket_EAI_CANCELED * * elif uverr == uv.UV_EAI_FAIL: # <<<<<<<<<<<<<< * sock_err = socket_EAI_FAIL * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_FAIL) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":73 * * elif uverr == uv.UV_EAI_FAIL: * sock_err = socket_EAI_FAIL # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_FAMILY: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_FAIL; /* "uvloop/errors.pyx":72 * sock_err = socket_EAI_CANCELED * * elif uverr == uv.UV_EAI_FAIL: # <<<<<<<<<<<<<< * sock_err = socket_EAI_FAIL * */ goto __pyx_L3; } /* "uvloop/errors.pyx":75 * sock_err = socket_EAI_FAIL * * elif uverr == uv.UV_EAI_FAMILY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_FAMILY * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_FAMILY) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":76 * * elif uverr == uv.UV_EAI_FAMILY: * sock_err = socket_EAI_FAMILY # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_MEMORY: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_FAMILY; /* "uvloop/errors.pyx":75 * sock_err = socket_EAI_FAIL * * elif uverr == uv.UV_EAI_FAMILY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_FAMILY * */ goto __pyx_L3; } /* "uvloop/errors.pyx":78 * sock_err = socket_EAI_FAMILY * * elif uverr == uv.UV_EAI_MEMORY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_MEMORY * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_MEMORY) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":79 * * elif uverr == uv.UV_EAI_MEMORY: * sock_err = socket_EAI_MEMORY # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_NODATA: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_MEMORY; /* "uvloop/errors.pyx":78 * sock_err = socket_EAI_FAMILY * * elif uverr == uv.UV_EAI_MEMORY: # <<<<<<<<<<<<<< * sock_err = socket_EAI_MEMORY * */ goto __pyx_L3; } /* "uvloop/errors.pyx":81 * sock_err = socket_EAI_MEMORY * * elif uverr == uv.UV_EAI_NODATA: # <<<<<<<<<<<<<< * sock_err = socket_EAI_NODATA * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_NODATA) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":82 * * elif uverr == uv.UV_EAI_NODATA: * sock_err = socket_EAI_NODATA # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_NONAME: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_NODATA; /* "uvloop/errors.pyx":81 * sock_err = socket_EAI_MEMORY * * elif uverr == uv.UV_EAI_NODATA: # <<<<<<<<<<<<<< * sock_err = socket_EAI_NODATA * */ goto __pyx_L3; } /* "uvloop/errors.pyx":84 * sock_err = socket_EAI_NODATA * * elif uverr == uv.UV_EAI_NONAME: # <<<<<<<<<<<<<< * sock_err = socket_EAI_NONAME * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_NONAME) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":85 * * elif uverr == uv.UV_EAI_NONAME: * sock_err = socket_EAI_NONAME # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_OVERFLOW: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_NONAME; /* "uvloop/errors.pyx":84 * sock_err = socket_EAI_NODATA * * elif uverr == uv.UV_EAI_NONAME: # <<<<<<<<<<<<<< * sock_err = socket_EAI_NONAME * */ goto __pyx_L3; } /* "uvloop/errors.pyx":87 * sock_err = socket_EAI_NONAME * * elif uverr == uv.UV_EAI_OVERFLOW: # <<<<<<<<<<<<<< * sock_err = socket_EAI_OVERFLOW * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_OVERFLOW) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":88 * * elif uverr == uv.UV_EAI_OVERFLOW: * sock_err = socket_EAI_OVERFLOW # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_PROTOCOL: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW; /* "uvloop/errors.pyx":87 * sock_err = socket_EAI_NONAME * * elif uverr == uv.UV_EAI_OVERFLOW: # <<<<<<<<<<<<<< * sock_err = socket_EAI_OVERFLOW * */ goto __pyx_L3; } /* "uvloop/errors.pyx":90 * sock_err = socket_EAI_OVERFLOW * * elif uverr == uv.UV_EAI_PROTOCOL: # <<<<<<<<<<<<<< * sock_err = socket_EAI_PROTOCOL * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_PROTOCOL) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":91 * * elif uverr == uv.UV_EAI_PROTOCOL: * sock_err = socket_EAI_PROTOCOL # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_SERVICE: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL; /* "uvloop/errors.pyx":90 * sock_err = socket_EAI_OVERFLOW * * elif uverr == uv.UV_EAI_PROTOCOL: # <<<<<<<<<<<<<< * sock_err = socket_EAI_PROTOCOL * */ goto __pyx_L3; } /* "uvloop/errors.pyx":93 * sock_err = socket_EAI_PROTOCOL * * elif uverr == uv.UV_EAI_SERVICE: # <<<<<<<<<<<<<< * sock_err = socket_EAI_SERVICE * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_SERVICE) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":94 * * elif uverr == uv.UV_EAI_SERVICE: * sock_err = socket_EAI_SERVICE # <<<<<<<<<<<<<< * * elif uverr == uv.UV_EAI_SOCKTYPE: */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_SERVICE; /* "uvloop/errors.pyx":93 * sock_err = socket_EAI_PROTOCOL * * elif uverr == uv.UV_EAI_SERVICE: # <<<<<<<<<<<<<< * sock_err = socket_EAI_SERVICE * */ goto __pyx_L3; } /* "uvloop/errors.pyx":96 * sock_err = socket_EAI_SERVICE * * elif uverr == uv.UV_EAI_SOCKTYPE: # <<<<<<<<<<<<<< * sock_err = socket_EAI_SOCKTYPE * */ __pyx_t_1 = ((__pyx_v_uverr == UV_EAI_SOCKTYPE) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":97 * * elif uverr == uv.UV_EAI_SOCKTYPE: * sock_err = socket_EAI_SOCKTYPE # <<<<<<<<<<<<<< * * return sock_err */ __pyx_v_sock_err = __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE; /* "uvloop/errors.pyx":96 * sock_err = socket_EAI_SERVICE * * elif uverr == uv.UV_EAI_SOCKTYPE: # <<<<<<<<<<<<<< * sock_err = socket_EAI_SOCKTYPE * */ } __pyx_L3:; /* "uvloop/errors.pyx":99 * sock_err = socket_EAI_SOCKTYPE * * return sock_err # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_sock_err; goto __pyx_L0; /* "uvloop/errors.pyx":54 * * * cdef int __convert_socket_error(int uverr): # <<<<<<<<<<<<<< * cdef int sock_err = 0 * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/errors.pyx":102 * * * cdef convert_error(int uverr): # <<<<<<<<<<<<<< * cdef int sock_err * */ static PyObject *__pyx_f_6uvloop_4loop_convert_error(int __pyx_v_uverr) { int __pyx_v_sock_err; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("convert_error", 0); /* "uvloop/errors.pyx":105 * cdef int sock_err * * if uverr == uv.UV_ECANCELED: # <<<<<<<<<<<<<< * return aio_CancelledError() * */ __pyx_t_1 = ((__pyx_v_uverr == UV_ECANCELED) != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":106 * * if uverr == uv.UV_ECANCELED: * return aio_CancelledError() # <<<<<<<<<<<<<< * * sock_err = __convert_socket_error(uverr) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_CancelledError); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_CancelledError; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/errors.pyx":105 * cdef int sock_err * * if uverr == uv.UV_ECANCELED: # <<<<<<<<<<<<<< * return aio_CancelledError() * */ } /* "uvloop/errors.pyx":108 * return aio_CancelledError() * * sock_err = __convert_socket_error(uverr) # <<<<<<<<<<<<<< * if sock_err: * msg = system.gai_strerror(sock_err).decode('utf-8') */ __pyx_v_sock_err = __pyx_f_6uvloop_4loop___convert_socket_error(__pyx_v_uverr); /* "uvloop/errors.pyx":109 * * sock_err = __convert_socket_error(uverr) * if sock_err: # <<<<<<<<<<<<<< * msg = system.gai_strerror(sock_err).decode('utf-8') * return socket_gaierror(sock_err, msg) */ __pyx_t_1 = (__pyx_v_sock_err != 0); if (__pyx_t_1) { /* "uvloop/errors.pyx":110 * sock_err = __convert_socket_error(uverr) * if sock_err: * msg = system.gai_strerror(sock_err).decode('utf-8') # <<<<<<<<<<<<<< * return socket_gaierror(sock_err, msg) * */ __pyx_t_5 = gai_strerror(__pyx_v_sock_err); __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v_msg = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/errors.pyx":111 * if sock_err: * msg = system.gai_strerror(sock_err).decode('utf-8') * return socket_gaierror(sock_err, msg) # <<<<<<<<<<<<<< * * return __convert_python_error(uverr) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_sock_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_gaierror); __pyx_t_4 = __pyx_v_6uvloop_4loop_socket_gaierror; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_msg}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_v_msg}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_msg); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/errors.pyx":109 * * sock_err = __convert_socket_error(uverr) * if sock_err: # <<<<<<<<<<<<<< * msg = system.gai_strerror(sock_err).decode('utf-8') * return socket_gaierror(sock_err, msg) */ } /* "uvloop/errors.pyx":113 * return socket_gaierror(sock_err, msg) * * return __convert_python_error(uverr) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_python_error(__pyx_v_uverr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/errors.pyx":102 * * * cdef convert_error(int uverr): # <<<<<<<<<<<<<< * cdef int sock_err * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.convert_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":41 * * * cdef _is_sock_stream(sock_type): # <<<<<<<<<<<<<< * # Linux's socket.type is a bitmask that can include extra info * # about socket, therefore we can't do simple */ static PyObject *__pyx_f_6uvloop_4loop__is_sock_stream(PyObject *__pyx_v_sock_type) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_is_sock_stream", 0); /* "uvloop/loop.pyx":45 * # about socket, therefore we can't do simple * # `sock_type == socket.SOCK_STREAM`. * return (sock_type & uv.SOCK_STREAM) == uv.SOCK_STREAM # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_And(__pyx_v_sock_type, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":41 * * * cdef _is_sock_stream(sock_type): # <<<<<<<<<<<<<< * # Linux's socket.type is a bitmask that can include extra info * # about socket, therefore we can't do simple */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop._is_sock_stream", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":48 * * * cdef _is_sock_dgram(sock_type): # <<<<<<<<<<<<<< * # Linux's socket.type is a bitmask that can include extra info * # about socket, therefore we can't do simple */ static PyObject *__pyx_f_6uvloop_4loop__is_sock_dgram(PyObject *__pyx_v_sock_type) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_is_sock_dgram", 0); /* "uvloop/loop.pyx":52 * # about socket, therefore we can't do simple * # `sock_type == socket.SOCK_DGRAM`. * return (sock_type & uv.SOCK_DGRAM) == uv.SOCK_DGRAM # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(SOCK_DGRAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_And(__pyx_v_sock_type, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(SOCK_DGRAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":48 * * * cdef _is_sock_dgram(sock_type): # <<<<<<<<<<<<<< * # Linux's socket.type is a bitmask that can include extra info * # about socket, therefore we can't do simple */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop._is_sock_dgram", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":55 * * * cdef isfuture(obj): # <<<<<<<<<<<<<< * if aio_isfuture is None: * return isinstance(obj, aio_Future) */ static PyObject *__pyx_f_6uvloop_4loop_isfuture(PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("isfuture", 0); /* "uvloop/loop.pyx":56 * * cdef isfuture(obj): * if aio_isfuture is None: # <<<<<<<<<<<<<< * return isinstance(obj, aio_Future) * else: */ __pyx_t_1 = (__pyx_v_6uvloop_4loop_aio_isfuture == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":57 * cdef isfuture(obj): * if aio_isfuture is None: * return isinstance(obj, aio_Future) # <<<<<<<<<<<<<< * else: * return aio_isfuture(obj) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_Future; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":56 * * cdef isfuture(obj): * if aio_isfuture is None: # <<<<<<<<<<<<<< * return isinstance(obj, aio_Future) * else: */ } /* "uvloop/loop.pyx":59 * return isinstance(obj, aio_Future) * else: * return aio_isfuture(obj) # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_isfuture); __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_isfuture; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_obj); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "uvloop/loop.pyx":55 * * * cdef isfuture(obj): # <<<<<<<<<<<<<< * if aio_isfuture is None: * return isinstance(obj, aio_Future) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.isfuture", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":64 * @cython.no_gc_clear * cdef class Loop: * def __cinit__(self): # <<<<<<<<<<<<<< * cdef int err * */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_4Loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_4Loop_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop___cinit__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_4Loop___cinit__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { int __pyx_v_err; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/loop.pyx":68 * * # Install PyMem* memory allocators if they aren't installed yet. * __install_pymem() # <<<<<<<<<<<<<< * * # Install pthread_atfork handlers */ __pyx_t_1 = __pyx_f_6uvloop_4loop___install_pymem(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":71 * * # Install pthread_atfork handlers * __install_atfork() # <<<<<<<<<<<<<< * * self.uvloop = \ */ __pyx_t_1 = __pyx_f_6uvloop_4loop___install_atfork(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":73 * __install_atfork() * * self.uvloop = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_loop_t)) * if self.uvloop is NULL: */ __pyx_v_self->uvloop = ((uv_loop_t *)PyMem_RawMalloc((sizeof(uv_loop_t)))); /* "uvloop/loop.pyx":75 * self.uvloop = \ * PyMem_RawMalloc(sizeof(uv.uv_loop_t)) * if self.uvloop is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_2 = ((__pyx_v_self->uvloop == NULL) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":76 * PyMem_RawMalloc(sizeof(uv.uv_loop_t)) * if self.uvloop is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * * self.slow_callback_duration = 0.1 */ PyErr_NoMemory(); __PYX_ERR(1, 76, __pyx_L1_error) /* "uvloop/loop.pyx":75 * self.uvloop = \ * PyMem_RawMalloc(sizeof(uv.uv_loop_t)) * if self.uvloop is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ } /* "uvloop/loop.pyx":78 * raise MemoryError() * * self.slow_callback_duration = 0.1 # <<<<<<<<<<<<<< * * self._closed = 0 */ __Pyx_INCREF(__pyx_float_0_1); __Pyx_GIVEREF(__pyx_float_0_1); __Pyx_GOTREF(__pyx_v_self->slow_callback_duration); __Pyx_DECREF(__pyx_v_self->slow_callback_duration); __pyx_v_self->slow_callback_duration = __pyx_float_0_1; /* "uvloop/loop.pyx":80 * self.slow_callback_duration = 0.1 * * self._closed = 0 # <<<<<<<<<<<<<< * self._debug = 0 * self._thread_is_main = 0 */ __pyx_v_self->_closed = 0; /* "uvloop/loop.pyx":81 * * self._closed = 0 * self._debug = 0 # <<<<<<<<<<<<<< * self._thread_is_main = 0 * self._thread_id = 0 */ __pyx_v_self->_debug = 0; /* "uvloop/loop.pyx":82 * self._closed = 0 * self._debug = 0 * self._thread_is_main = 0 # <<<<<<<<<<<<<< * self._thread_id = 0 * self._running = 0 */ __pyx_v_self->_thread_is_main = 0; /* "uvloop/loop.pyx":83 * self._debug = 0 * self._thread_is_main = 0 * self._thread_id = 0 # <<<<<<<<<<<<<< * self._running = 0 * self._stopping = 0 */ __pyx_v_self->_thread_id = 0; /* "uvloop/loop.pyx":84 * self._thread_is_main = 0 * self._thread_id = 0 * self._running = 0 # <<<<<<<<<<<<<< * self._stopping = 0 * */ __pyx_v_self->_running = 0; /* "uvloop/loop.pyx":85 * self._thread_id = 0 * self._running = 0 * self._stopping = 0 # <<<<<<<<<<<<<< * * self._transports = weakref_WeakValueDictionary() */ __pyx_v_self->_stopping = 0; /* "uvloop/loop.pyx":87 * self._stopping = 0 * * self._transports = weakref_WeakValueDictionary() # <<<<<<<<<<<<<< * * self._timers = set() */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary); __pyx_t_3 = __pyx_v_6uvloop_4loop_weakref_WeakValueDictionary; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 87, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_transports); __Pyx_DECREF(__pyx_v_self->_transports); __pyx_v_self->_transports = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":89 * self._transports = weakref_WeakValueDictionary() * * self._timers = set() # <<<<<<<<<<<<<< * self._polls = dict() * */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_timers); __Pyx_DECREF(__pyx_v_self->_timers); __pyx_v_self->_timers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":90 * * self._timers = set() * self._polls = dict() # <<<<<<<<<<<<<< * * self._recv_buffer_in_use = 0 */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_polls); __Pyx_DECREF(__pyx_v_self->_polls); __pyx_v_self->_polls = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":92 * self._polls = dict() * * self._recv_buffer_in_use = 0 # <<<<<<<<<<<<<< * * err = uv.uv_loop_init(self.uvloop) */ __pyx_v_self->_recv_buffer_in_use = 0; /* "uvloop/loop.pyx":94 * self._recv_buffer_in_use = 0 * * err = uv.uv_loop_init(self.uvloop) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_loop_init(__pyx_v_self->uvloop); /* "uvloop/loop.pyx":95 * * err = uv.uv_loop_init(self.uvloop) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * self.uvloop.data = self */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":96 * err = uv.uv_loop_init(self.uvloop) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * self.uvloop.data = self * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 96, __pyx_L1_error) /* "uvloop/loop.pyx":95 * * err = uv.uv_loop_init(self.uvloop) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * self.uvloop.data = self */ } /* "uvloop/loop.pyx":97 * if err < 0: * raise convert_error(err) * self.uvloop.data = self # <<<<<<<<<<<<<< * * self._init_debug_fields() */ __pyx_v_self->uvloop->data = ((void *)__pyx_v_self); /* "uvloop/loop.pyx":99 * self.uvloop.data = self * * self._init_debug_fields() # <<<<<<<<<<<<<< * * self.active_process_handler = None */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_init_debug_fields(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":101 * self._init_debug_fields() * * self.active_process_handler = None # <<<<<<<<<<<<<< * * self._last_error = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->active_process_handler); __Pyx_DECREF(((PyObject *)__pyx_v_self->active_process_handler)); __pyx_v_self->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None); /* "uvloop/loop.pyx":103 * self.active_process_handler = None * * self._last_error = None # <<<<<<<<<<<<<< * * self._task_factory = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_last_error); __Pyx_DECREF(__pyx_v_self->_last_error); __pyx_v_self->_last_error = Py_None; /* "uvloop/loop.pyx":105 * self._last_error = None * * self._task_factory = None # <<<<<<<<<<<<<< * self._exception_handler = None * self._default_executor = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_task_factory); __Pyx_DECREF(__pyx_v_self->_task_factory); __pyx_v_self->_task_factory = Py_None; /* "uvloop/loop.pyx":106 * * self._task_factory = None * self._exception_handler = None # <<<<<<<<<<<<<< * self._default_executor = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_exception_handler); __Pyx_DECREF(__pyx_v_self->_exception_handler); __pyx_v_self->_exception_handler = Py_None; /* "uvloop/loop.pyx":107 * self._task_factory = None * self._exception_handler = None * self._default_executor = None # <<<<<<<<<<<<<< * * self._queued_streams = set() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_default_executor); __Pyx_DECREF(__pyx_v_self->_default_executor); __pyx_v_self->_default_executor = Py_None; /* "uvloop/loop.pyx":109 * self._default_executor = None * * self._queued_streams = set() # <<<<<<<<<<<<<< * self._ready = col_deque() * self._ready_len = 0 */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_queued_streams); __Pyx_DECREF(__pyx_v_self->_queued_streams); __pyx_v_self->_queued_streams = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":110 * * self._queued_streams = set() * self._ready = col_deque() # <<<<<<<<<<<<<< * self._ready_len = 0 * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_deque); __pyx_t_3 = __pyx_v_6uvloop_4loop_col_deque; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_ready); __Pyx_DECREF(__pyx_v_self->_ready); __pyx_v_self->_ready = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":111 * self._queued_streams = set() * self._ready = col_deque() * self._ready_len = 0 # <<<<<<<<<<<<<< * * self.handler_async = UVAsync.new( */ __pyx_v_self->_ready_len = 0; /* "uvloop/loop.pyx":113 * self._ready_len = 0 * * self.handler_async = UVAsync.new( # <<<<<<<<<<<<<< * self, self._on_wake, self) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVAsync_new(__pyx_v_self, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_on_wake), ((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->handler_async); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_async)); __pyx_v_self->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":118 * self.handler_idle = UVIdle.new( * self, * new_MethodHandle( # <<<<<<<<<<<<<< * self, "loop._on_idle", self._on_idle, self)) * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_loop__on_idle, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_on_idle), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 118, __pyx_L1_error) /* "uvloop/loop.pyx":116 * self, self._on_wake, self) * * self.handler_idle = UVIdle.new( # <<<<<<<<<<<<<< * self, * new_MethodHandle( */ __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVIdle_new(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->handler_idle); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_idle)); __pyx_v_self->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":125 * self.handler_check__exec_writes = UVCheck.new( * self, * new_MethodHandle( # <<<<<<<<<<<<<< * self, "loop._exec_queued_writes", * self._exec_queued_writes, self)) */ __pyx_t_3 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_loop__exec_queued_writes, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_exec_queued_writes), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 125, __pyx_L1_error) /* "uvloop/loop.pyx":123 * # Needed to call `UVStream._exec_write` for writes scheduled * # during `Protocol.data_received`. * self.handler_check__exec_writes = UVCheck.new( # <<<<<<<<<<<<<< * self, * new_MethodHandle( */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVCheck_new(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->handler_check__exec_writes); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_check__exec_writes)); __pyx_v_self->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":129 * self._exec_queued_writes, self)) * * self._ssock = self._csock = None # <<<<<<<<<<<<<< * self._signal_handlers = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_ssock); __Pyx_DECREF(__pyx_v_self->_ssock); __pyx_v_self->_ssock = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_csock); __Pyx_DECREF(__pyx_v_self->_csock); __pyx_v_self->_csock = Py_None; /* "uvloop/loop.pyx":130 * * self._ssock = self._csock = None * self._signal_handlers = None # <<<<<<<<<<<<<< * * self._coroutine_wrapper_set = False */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_signal_handlers); __Pyx_DECREF(__pyx_v_self->_signal_handlers); __pyx_v_self->_signal_handlers = ((PyObject*)Py_None); /* "uvloop/loop.pyx":132 * self._signal_handlers = None * * self._coroutine_wrapper_set = False # <<<<<<<<<<<<<< * * if hasattr(sys, 'get_asyncgen_hooks'): */ __pyx_v_self->_coroutine_wrapper_set = 0; /* "uvloop/loop.pyx":134 * self._coroutine_wrapper_set = False * * if hasattr(sys, 'get_asyncgen_hooks'): # <<<<<<<<<<<<<< * # Python >= 3.6 * # A weak set of all asynchronous generators that are */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_HasAttr(__pyx_t_1, __pyx_n_u_get_asyncgen_hooks); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (__pyx_t_2 != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":138 * # A weak set of all asynchronous generators that are * # being iterated by the loop. * self._asyncgens = weakref_WeakSet() # <<<<<<<<<<<<<< * else: * self._asyncgens = None */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_weakref_WeakSet); __pyx_t_3 = __pyx_v_6uvloop_4loop_weakref_WeakSet; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_asyncgens); __Pyx_DECREF(__pyx_v_self->_asyncgens); __pyx_v_self->_asyncgens = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":134 * self._coroutine_wrapper_set = False * * if hasattr(sys, 'get_asyncgen_hooks'): # <<<<<<<<<<<<<< * # Python >= 3.6 * # A weak set of all asynchronous generators that are */ goto __pyx_L5; } /* "uvloop/loop.pyx":140 * self._asyncgens = weakref_WeakSet() * else: * self._asyncgens = None # <<<<<<<<<<<<<< * * # Set to True when `loop.shutdown_asyncgens` is called. */ /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_asyncgens); __Pyx_DECREF(__pyx_v_self->_asyncgens); __pyx_v_self->_asyncgens = Py_None; } __pyx_L5:; /* "uvloop/loop.pyx":143 * * # Set to True when `loop.shutdown_asyncgens` is called. * self._asyncgens_shutdown_called = False # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_v_self->_asyncgens_shutdown_called = 0; /* "uvloop/loop.pyx":64 * @cython.no_gc_clear * cdef class Loop: * def __cinit__(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":145 * self._asyncgens_shutdown_called = False * * def __init__(self): # <<<<<<<<<<<<<< * self.set_debug((not sys_ignore_environment * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_4Loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_4Loop_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_2__init__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_4Loop_2__init__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "uvloop/loop.pyx":146 * * def __init__(self): * self.set_debug((not sys_ignore_environment # <<<<<<<<<<<<<< * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":147 * def __init__(self): * self.set_debug((not sys_ignore_environment * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_6uvloop_4loop_sys_ignore_environment); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 147, __pyx_L1_error) /* "uvloop/loop.pyx":146 * * def __init__(self): * self.set_debug((not sys_ignore_environment # <<<<<<<<<<<<<< * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) * */ __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { } else { __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L3_bool_binop_done; } /* "uvloop/loop.pyx":147 * def __init__(self): * self.set_debug((not sys_ignore_environment * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_os_environ, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_7); __pyx_t_3 = __pyx_t_7; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_L3_bool_binop_done:; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":145 * self._asyncgens_shutdown_called = False * * def __init__(self): # <<<<<<<<<<<<<< * self.set_debug((not sys_ignore_environment * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":149 * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_4Loop_4__dealloc__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/loop.pyx":150 * * def __dealloc__(self): * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: */ __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":151 * def __dealloc__(self): * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') # <<<<<<<<<<<<<< * if self._closed == 0: * aio_logger.error("deallocating an open event loop") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 151, __pyx_L1_error) /* "uvloop/loop.pyx":150 * * def __dealloc__(self): * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: */ } /* "uvloop/loop.pyx":152 * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: # <<<<<<<<<<<<<< * aio_logger.error("deallocating an open event loop") * return */ __pyx_t_1 = ((__pyx_v_self->_closed == 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":153 * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: * aio_logger.error("deallocating an open event loop") # <<<<<<<<<<<<<< * return * PyMem_RawFree(self.uvloop) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":154 * if self._closed == 0: * aio_logger.error("deallocating an open event loop") * return # <<<<<<<<<<<<<< * PyMem_RawFree(self.uvloop) * self.uvloop = NULL */ goto __pyx_L0; /* "uvloop/loop.pyx":152 * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: # <<<<<<<<<<<<<< * aio_logger.error("deallocating an open event loop") * return */ } /* "uvloop/loop.pyx":155 * aio_logger.error("deallocating an open event loop") * return * PyMem_RawFree(self.uvloop) # <<<<<<<<<<<<<< * self.uvloop = NULL * */ PyMem_RawFree(__pyx_v_self->uvloop); /* "uvloop/loop.pyx":156 * return * PyMem_RawFree(self.uvloop) * self.uvloop = NULL # <<<<<<<<<<<<<< * * cdef _init_debug_fields(self): */ __pyx_v_self->uvloop = NULL; /* "uvloop/loop.pyx":149 * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("uvloop.loop.Loop.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/loop.pyx":158 * self.uvloop = NULL * * cdef _init_debug_fields(self): # <<<<<<<<<<<<<< * self._debug_cc = bool(UVLOOP_DEBUG) * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__init_debug_fields(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_init_debug_fields", 0); /* "uvloop/loop.pyx":159 * * cdef _init_debug_fields(self): * self._debug_cc = bool(UVLOOP_DEBUG) # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __pyx_t_1 = __Pyx_PyInt_From_int(UVLOOP_DEBUG); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_debug_cc = (!(!__pyx_t_2)); /* "uvloop/loop.pyx":161 * self._debug_cc = bool(UVLOOP_DEBUG) * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._debug_handles_current = col_Counter() * self._debug_handles_closed = col_Counter() */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":162 * * if UVLOOP_DEBUG: * self._debug_handles_current = col_Counter() # <<<<<<<<<<<<<< * self._debug_handles_closed = col_Counter() * self._debug_handles_total = col_Counter() */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter); __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_debug_handles_current); __Pyx_DECREF(__pyx_v_self->_debug_handles_current); __pyx_v_self->_debug_handles_current = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":163 * if UVLOOP_DEBUG: * self._debug_handles_current = col_Counter() * self._debug_handles_closed = col_Counter() # <<<<<<<<<<<<<< * self._debug_handles_total = col_Counter() * else: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter); __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 163, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_debug_handles_closed); __Pyx_DECREF(__pyx_v_self->_debug_handles_closed); __pyx_v_self->_debug_handles_closed = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":164 * self._debug_handles_current = col_Counter() * self._debug_handles_closed = col_Counter() * self._debug_handles_total = col_Counter() # <<<<<<<<<<<<<< * else: * self._debug_handles_current = None */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_col_Counter); __pyx_t_3 = __pyx_v_6uvloop_4loop_col_Counter; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 164, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 164, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_debug_handles_total); __Pyx_DECREF(__pyx_v_self->_debug_handles_total); __pyx_v_self->_debug_handles_total = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":161 * self._debug_cc = bool(UVLOOP_DEBUG) * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._debug_handles_current = col_Counter() * self._debug_handles_closed = col_Counter() */ goto __pyx_L3; } /* "uvloop/loop.pyx":166 * self._debug_handles_total = col_Counter() * else: * self._debug_handles_current = None # <<<<<<<<<<<<<< * self._debug_handles_closed = None * self._debug_handles_total = None */ /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_debug_handles_current); __Pyx_DECREF(__pyx_v_self->_debug_handles_current); __pyx_v_self->_debug_handles_current = Py_None; /* "uvloop/loop.pyx":167 * else: * self._debug_handles_current = None * self._debug_handles_closed = None # <<<<<<<<<<<<<< * self._debug_handles_total = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_debug_handles_closed); __Pyx_DECREF(__pyx_v_self->_debug_handles_closed); __pyx_v_self->_debug_handles_closed = Py_None; /* "uvloop/loop.pyx":168 * self._debug_handles_current = None * self._debug_handles_closed = None * self._debug_handles_total = None # <<<<<<<<<<<<<< * * self._debug_uv_handles_total = 0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_debug_handles_total); __Pyx_DECREF(__pyx_v_self->_debug_handles_total); __pyx_v_self->_debug_handles_total = Py_None; } __pyx_L3:; /* "uvloop/loop.pyx":170 * self._debug_handles_total = None * * self._debug_uv_handles_total = 0 # <<<<<<<<<<<<<< * self._debug_uv_handles_freed = 0 * */ __pyx_v_self->_debug_uv_handles_total = 0; /* "uvloop/loop.pyx":171 * * self._debug_uv_handles_total = 0 * self._debug_uv_handles_freed = 0 # <<<<<<<<<<<<<< * * self._debug_stream_read_cb_total = 0 */ __pyx_v_self->_debug_uv_handles_freed = 0; /* "uvloop/loop.pyx":173 * self._debug_uv_handles_freed = 0 * * self._debug_stream_read_cb_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_read_eof_total = 0 * self._debug_stream_read_errors_total = 0 */ __pyx_v_self->_debug_stream_read_cb_total = 0; /* "uvloop/loop.pyx":174 * * self._debug_stream_read_cb_total = 0 * self._debug_stream_read_eof_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_read_errors_total = 0 * self._debug_stream_read_cb_errors_total = 0 */ __pyx_v_self->_debug_stream_read_eof_total = 0; /* "uvloop/loop.pyx":175 * self._debug_stream_read_cb_total = 0 * self._debug_stream_read_eof_total = 0 * self._debug_stream_read_errors_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_read_cb_errors_total = 0 * self._debug_stream_read_eof_cb_errors_total = 0 */ __pyx_v_self->_debug_stream_read_errors_total = 0; /* "uvloop/loop.pyx":176 * self._debug_stream_read_eof_total = 0 * self._debug_stream_read_errors_total = 0 * self._debug_stream_read_cb_errors_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_read_eof_cb_errors_total = 0 * */ __pyx_v_self->_debug_stream_read_cb_errors_total = 0; /* "uvloop/loop.pyx":177 * self._debug_stream_read_errors_total = 0 * self._debug_stream_read_cb_errors_total = 0 * self._debug_stream_read_eof_cb_errors_total = 0 # <<<<<<<<<<<<<< * * self._debug_stream_shutdown_errors_total = 0 */ __pyx_v_self->_debug_stream_read_eof_cb_errors_total = 0; /* "uvloop/loop.pyx":179 * self._debug_stream_read_eof_cb_errors_total = 0 * * self._debug_stream_shutdown_errors_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_listen_errors_total = 0 * */ __pyx_v_self->_debug_stream_shutdown_errors_total = 0; /* "uvloop/loop.pyx":180 * * self._debug_stream_shutdown_errors_total = 0 * self._debug_stream_listen_errors_total = 0 # <<<<<<<<<<<<<< * * self._debug_stream_write_tries = 0 */ __pyx_v_self->_debug_stream_listen_errors_total = 0; /* "uvloop/loop.pyx":182 * self._debug_stream_listen_errors_total = 0 * * self._debug_stream_write_tries = 0 # <<<<<<<<<<<<<< * self._debug_stream_write_errors_total = 0 * self._debug_stream_write_ctx_total = 0 */ __pyx_v_self->_debug_stream_write_tries = 0; /* "uvloop/loop.pyx":183 * * self._debug_stream_write_tries = 0 * self._debug_stream_write_errors_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_write_ctx_total = 0 * self._debug_stream_write_ctx_cnt = 0 */ __pyx_v_self->_debug_stream_write_errors_total = 0; /* "uvloop/loop.pyx":184 * self._debug_stream_write_tries = 0 * self._debug_stream_write_errors_total = 0 * self._debug_stream_write_ctx_total = 0 # <<<<<<<<<<<<<< * self._debug_stream_write_ctx_cnt = 0 * self._debug_stream_write_cb_errors_total = 0 */ __pyx_v_self->_debug_stream_write_ctx_total = 0; /* "uvloop/loop.pyx":185 * self._debug_stream_write_errors_total = 0 * self._debug_stream_write_ctx_total = 0 * self._debug_stream_write_ctx_cnt = 0 # <<<<<<<<<<<<<< * self._debug_stream_write_cb_errors_total = 0 * */ __pyx_v_self->_debug_stream_write_ctx_cnt = 0; /* "uvloop/loop.pyx":186 * self._debug_stream_write_ctx_total = 0 * self._debug_stream_write_ctx_cnt = 0 * self._debug_stream_write_cb_errors_total = 0 # <<<<<<<<<<<<<< * * self._debug_cb_handles_total = 0 */ __pyx_v_self->_debug_stream_write_cb_errors_total = 0; /* "uvloop/loop.pyx":188 * self._debug_stream_write_cb_errors_total = 0 * * self._debug_cb_handles_total = 0 # <<<<<<<<<<<<<< * self._debug_cb_handles_count = 0 * */ __pyx_v_self->_debug_cb_handles_total = 0; /* "uvloop/loop.pyx":189 * * self._debug_cb_handles_total = 0 * self._debug_cb_handles_count = 0 # <<<<<<<<<<<<<< * * self._debug_cb_timer_handles_total = 0 */ __pyx_v_self->_debug_cb_handles_count = 0; /* "uvloop/loop.pyx":191 * self._debug_cb_handles_count = 0 * * self._debug_cb_timer_handles_total = 0 # <<<<<<<<<<<<<< * self._debug_cb_timer_handles_count = 0 * */ __pyx_v_self->_debug_cb_timer_handles_total = 0; /* "uvloop/loop.pyx":192 * * self._debug_cb_timer_handles_total = 0 * self._debug_cb_timer_handles_count = 0 # <<<<<<<<<<<<<< * * self._poll_read_events_total = 0 */ __pyx_v_self->_debug_cb_timer_handles_count = 0; /* "uvloop/loop.pyx":194 * self._debug_cb_timer_handles_count = 0 * * self._poll_read_events_total = 0 # <<<<<<<<<<<<<< * self._poll_read_cb_errors_total = 0 * self._poll_write_events_total = 0 */ __pyx_v_self->_poll_read_events_total = 0; /* "uvloop/loop.pyx":195 * * self._poll_read_events_total = 0 * self._poll_read_cb_errors_total = 0 # <<<<<<<<<<<<<< * self._poll_write_events_total = 0 * self._poll_write_cb_errors_total = 0 */ __pyx_v_self->_poll_read_cb_errors_total = 0; /* "uvloop/loop.pyx":196 * self._poll_read_events_total = 0 * self._poll_read_cb_errors_total = 0 * self._poll_write_events_total = 0 # <<<<<<<<<<<<<< * self._poll_write_cb_errors_total = 0 * */ __pyx_v_self->_poll_write_events_total = 0; /* "uvloop/loop.pyx":197 * self._poll_read_cb_errors_total = 0 * self._poll_write_events_total = 0 * self._poll_write_cb_errors_total = 0 # <<<<<<<<<<<<<< * * self._sock_try_write_total = 0 */ __pyx_v_self->_poll_write_cb_errors_total = 0; /* "uvloop/loop.pyx":199 * self._poll_write_cb_errors_total = 0 * * self._sock_try_write_total = 0 # <<<<<<<<<<<<<< * * self._debug_exception_handler_cnt = 0 */ __pyx_v_self->_sock_try_write_total = 0; /* "uvloop/loop.pyx":201 * self._sock_try_write_total = 0 * * self._debug_exception_handler_cnt = 0 # <<<<<<<<<<<<<< * * cdef _setup_signals(self): */ __pyx_v_self->_debug_exception_handler_cnt = 0; /* "uvloop/loop.pyx":158 * self.uvloop = NULL * * cdef _init_debug_fields(self): # <<<<<<<<<<<<<< * self._debug_cc = bool(UVLOOP_DEBUG) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop._init_debug_fields", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":203 * self._debug_exception_handler_cnt = 0 * * cdef _setup_signals(self): # <<<<<<<<<<<<<< * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__setup_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("_setup_signals", 0); /* "uvloop/loop.pyx":204 * * cdef _setup_signals(self): * self._ssock, self._csock = socket_socketpair() # <<<<<<<<<<<<<< * self._ssock.setblocking(False) * self._csock.setblocking(False) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socketpair); __pyx_t_2 = __pyx_v_6uvloop_4loop_socket_socketpair; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 204, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 204, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(1, 204, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(1, 204, __pyx_L1_error) __pyx_L4_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_ssock); __Pyx_DECREF(__pyx_v_self->_ssock); __pyx_v_self->_ssock = __pyx_t_2; __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_csock); __Pyx_DECREF(__pyx_v_self->_csock); __pyx_v_self->_csock = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":205 * cdef _setup_signals(self): * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) # <<<<<<<<<<<<<< * self._csock.setblocking(False) * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":206 * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) * self._csock.setblocking(False) # <<<<<<<<<<<<<< * try: * signal_set_wakeup_fd(self._csock.fileno()) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":207 * self._ssock.setblocking(False) * self._csock.setblocking(False) * try: # <<<<<<<<<<<<<< * signal_set_wakeup_fd(self._csock.fileno()) * except ValueError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":208 * self._csock.setblocking(False) * try: * signal_set_wakeup_fd(self._csock.fileno()) # <<<<<<<<<<<<<< * except ValueError: * # Not the main thread */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 208, __pyx_L5_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd); __pyx_t_2 = __pyx_v_6uvloop_4loop_signal_set_wakeup_fd; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":207 * self._ssock.setblocking(False) * self._csock.setblocking(False) * try: # <<<<<<<<<<<<<< * signal_set_wakeup_fd(self._csock.fileno()) * except ValueError: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":209 * try: * signal_set_wakeup_fd(self._csock.fileno()) * except ValueError: # <<<<<<<<<<<<<< * # Not the main thread * self._ssock.close() */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop._setup_signals", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(1, 209, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/loop.pyx":211 * except ValueError: * # Not the main thread * self._ssock.close() # <<<<<<<<<<<<<< * self._csock.close() * self._ssock = self._csock = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 211, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_11) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 211, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 211, __pyx_L7_except_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":212 * # Not the main thread * self._ssock.close() * self._csock.close() # <<<<<<<<<<<<<< * self._ssock = self._csock = None * return */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 212, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_11) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 212, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 212, __pyx_L7_except_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":213 * self._ssock.close() * self._csock.close() * self._ssock = self._csock = None # <<<<<<<<<<<<<< * return * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_ssock); __Pyx_DECREF(__pyx_v_self->_ssock); __pyx_v_self->_ssock = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_csock); __Pyx_DECREF(__pyx_v_self->_csock); __pyx_v_self->_csock = Py_None; /* "uvloop/loop.pyx":214 * self._csock.close() * self._ssock = self._csock = None * return # <<<<<<<<<<<<<< * * self._add_reader( */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_except_return; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/loop.pyx":207 * self._ssock.setblocking(False) * self._csock.setblocking(False) * try: # <<<<<<<<<<<<<< * signal_set_wakeup_fd(self._csock.fileno()) * except ValueError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L0; __pyx_L12_try_end:; } /* "uvloop/loop.pyx":217 * * self._add_reader( * self._ssock.fileno(), # <<<<<<<<<<<<<< * new_MethodHandle( * self, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_1) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 217, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":218 * self._add_reader( * self._ssock.fileno(), * new_MethodHandle( # <<<<<<<<<<<<<< * self, * "Loop._read_from_self", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle(__pyx_v_self, __pyx_kp_u_Loop__read_from_self, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_read_from_self), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 218, __pyx_L1_error) /* "uvloop/loop.pyx":216 * return * * self._add_reader( # <<<<<<<<<<<<<< * self._ssock.fileno(), * new_MethodHandle( */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__add_reader(__pyx_v_self, __pyx_t_9, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":224 * self)) * * self._signal_handlers = {} # <<<<<<<<<<<<<< * * cdef _shutdown_signals(self): */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_signal_handlers); __Pyx_DECREF(__pyx_v_self->_signal_handlers); __pyx_v_self->_signal_handlers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":203 * self._debug_exception_handler_cnt = 0 * * cdef _setup_signals(self): # <<<<<<<<<<<<<< * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.Loop._setup_signals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":226 * self._signal_handlers = {} * * cdef _shutdown_signals(self): # <<<<<<<<<<<<<< * if self._signal_handlers is None: * return */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__shutdown_signals(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_v_sig = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_shutdown_signals", 0); /* "uvloop/loop.pyx":227 * * cdef _shutdown_signals(self): * if self._signal_handlers is None: # <<<<<<<<<<<<<< * return * for sig in list(self._signal_handlers): */ __pyx_t_1 = (__pyx_v_self->_signal_handlers == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":228 * cdef _shutdown_signals(self): * if self._signal_handlers is None: * return # <<<<<<<<<<<<<< * for sig in list(self._signal_handlers): * self.remove_signal_handler(sig) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":227 * * cdef _shutdown_signals(self): * if self._signal_handlers is None: # <<<<<<<<<<<<<< * return * for sig in list(self._signal_handlers): */ } /* "uvloop/loop.pyx":229 * if self._signal_handlers is None: * return * for sig in list(self._signal_handlers): # <<<<<<<<<<<<<< * self.remove_signal_handler(sig) * signal_set_wakeup_fd(-1) */ __pyx_t_3 = PySequence_List(__pyx_v_self->_signal_handlers); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 229, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":230 * return * for sig in list(self._signal_handlers): * self.remove_signal_handler(sig) # <<<<<<<<<<<<<< * signal_set_wakeup_fd(-1) * self._remove_reader(self._ssock.fileno()) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_signal_handler); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_sig); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_sig}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_sig}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_sig); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":229 * if self._signal_handlers is None: * return * for sig in list(self._signal_handlers): # <<<<<<<<<<<<<< * self.remove_signal_handler(sig) * signal_set_wakeup_fd(-1) */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":231 * for sig in list(self._signal_handlers): * self.remove_signal_handler(sig) * signal_set_wakeup_fd(-1) # <<<<<<<<<<<<<< * self._remove_reader(self._ssock.fileno()) * self._ssock.close() */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":232 * self.remove_signal_handler(sig) * signal_set_wakeup_fd(-1) * self._remove_reader(self._ssock.fileno()) # <<<<<<<<<<<<<< * self._ssock.close() * self._csock.close() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 232, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":233 * signal_set_wakeup_fd(-1) * self._remove_reader(self._ssock.fileno()) * self._ssock.close() # <<<<<<<<<<<<<< * self._csock.close() * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":234 * self._remove_reader(self._ssock.fileno()) * self._ssock.close() * self._csock.close() # <<<<<<<<<<<<<< * * cdef _read_from_self(self): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":226 * self._signal_handlers = {} * * cdef _shutdown_signals(self): # <<<<<<<<<<<<<< * if self._signal_handlers is None: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._shutdown_signals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sig); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":236 * self._csock.close() * * cdef _read_from_self(self): # <<<<<<<<<<<<<< * while True: * try: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__read_from_self(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_read_from_self", 0); /* "uvloop/loop.pyx":237 * * cdef _read_from_self(self): * while True: # <<<<<<<<<<<<<< * try: * data = self._ssock.recv(4096) */ while (1) { /* "uvloop/loop.pyx":238 * cdef _read_from_self(self): * while True: * try: # <<<<<<<<<<<<<< * data = self._ssock.recv(4096) * if not data: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/loop.pyx":239 * while True: * try: * data = self._ssock.recv(4096) # <<<<<<<<<<<<<< * if not data: * break */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ssock, __pyx_n_s_recv); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 239, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 239, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":240 * try: * data = self._ssock.recv(4096) * if not data: # <<<<<<<<<<<<<< * break * self._process_self_data(data) */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 240, __pyx_L5_error) __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { /* "uvloop/loop.pyx":241 * data = self._ssock.recv(4096) * if not data: * break # <<<<<<<<<<<<<< * self._process_self_data(data) * except InterruptedError: */ goto __pyx_L10_try_break; /* "uvloop/loop.pyx":240 * try: * data = self._ssock.recv(4096) * if not data: # <<<<<<<<<<<<<< * break * self._process_self_data(data) */ } /* "uvloop/loop.pyx":242 * if not data: * break * self._process_self_data(data) # <<<<<<<<<<<<<< * except InterruptedError: * continue */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_process_self_data(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 242, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":238 * cdef _read_from_self(self): * while True: * try: # <<<<<<<<<<<<<< * data = self._ssock.recv(4096) * if not data: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":243 * break * self._process_self_data(data) * except InterruptedError: # <<<<<<<<<<<<<< * continue * except BlockingIOError: */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(1, 243, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/loop.pyx":244 * self._process_self_data(data) * except InterruptedError: * continue # <<<<<<<<<<<<<< * except BlockingIOError: * break */ goto __pyx_L15_except_continue; __pyx_L15_except_continue:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_try_continue; } /* "uvloop/loop.pyx":245 * except InterruptedError: * continue * except BlockingIOError: # <<<<<<<<<<<<<< * break * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(1, 245, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":246 * continue * except BlockingIOError: * break # <<<<<<<<<<<<<< * * cdef _process_self_data(self, data): */ goto __pyx_L16_except_break; __pyx_L16_except_break:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_try_break; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/loop.pyx":238 * cdef _read_from_self(self): * while True: * try: # <<<<<<<<<<<<<< * data = self._ssock.recv(4096) * if not data: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L10_try_break:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L4_break; __pyx_L11_try_continue:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L3_continue; __pyx_L12_try_end:; } __pyx_L3_continue:; } __pyx_L4_break:; /* "uvloop/loop.pyx":236 * self._csock.close() * * cdef _read_from_self(self): # <<<<<<<<<<<<<< * while True: * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.Loop._read_from_self", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":248 * break * * cdef _process_self_data(self, data): # <<<<<<<<<<<<<< * for signum in data: * if not signum: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__process_self_data(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_v_signum = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_process_self_data", 0); /* "uvloop/loop.pyx":249 * * cdef _process_self_data(self, data): * for signum in data: # <<<<<<<<<<<<<< * if not signum: * # ignore null bytes written by _write_to_self() */ if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 249, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 249, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 249, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_signum, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":250 * cdef _process_self_data(self, data): * for signum in data: * if not signum: # <<<<<<<<<<<<<< * # ignore null bytes written by _write_to_self() * continue */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_signum); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 250, __pyx_L1_error) __pyx_t_6 = ((!__pyx_t_5) != 0); if (__pyx_t_6) { /* "uvloop/loop.pyx":252 * if not signum: * # ignore null bytes written by _write_to_self() * continue # <<<<<<<<<<<<<< * self._handle_signal(signum) * */ goto __pyx_L3_continue; /* "uvloop/loop.pyx":250 * cdef _process_self_data(self, data): * for signum in data: * if not signum: # <<<<<<<<<<<<<< * # ignore null bytes written by _write_to_self() * continue */ } /* "uvloop/loop.pyx":253 * # ignore null bytes written by _write_to_self() * continue * self._handle_signal(signum) # <<<<<<<<<<<<<< * * cdef _handle_signal(self, sig): */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_handle_signal(__pyx_v_self, __pyx_v_signum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":249 * * cdef _process_self_data(self, data): * for signum in data: # <<<<<<<<<<<<<< * if not signum: * # ignore null bytes written by _write_to_self() */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":248 * break * * cdef _process_self_data(self, data): # <<<<<<<<<<<<<< * for signum in data: * if not signum: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop._process_self_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_signum); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":255 * self._handle_signal(signum) * * cdef _handle_signal(self, sig): # <<<<<<<<<<<<<< * cdef Handle handle * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__handle_signal(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_handle_signal", 0); /* "uvloop/loop.pyx":258 * cdef Handle handle * * try: # <<<<<<<<<<<<<< * handle = (self._signal_handlers[sig]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/loop.pyx":259 * * try: * handle = (self._signal_handlers[sig]) # <<<<<<<<<<<<<< * except KeyError: * handle = None */ if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 259, __pyx_L3_error) } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_signal_handlers, __pyx_v_sig); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 259, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":258 * cdef Handle handle * * try: # <<<<<<<<<<<<<< * handle = (self._signal_handlers[sig]) * except KeyError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":260 * try: * handle = (self._signal_handlers[sig]) * except KeyError: # <<<<<<<<<<<<<< * handle = None * */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.Loop._handle_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 260, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":261 * handle = (self._signal_handlers[sig]) * except KeyError: * handle = None # <<<<<<<<<<<<<< * * if handle is None: */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_handle, ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/loop.pyx":258 * cdef Handle handle * * try: # <<<<<<<<<<<<<< * handle = (self._signal_handlers[sig]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/loop.pyx":263 * handle = None * * if handle is None: # <<<<<<<<<<<<<< * # Some signal that we aren't listening through * # add_signal_handler. Invoke CPython eval loop */ __pyx_t_8 = (((PyObject *)__pyx_v_handle) == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "uvloop/loop.pyx":267 * # add_signal_handler. Invoke CPython eval loop * # to let it being processed. * PyErr_CheckSignals() # <<<<<<<<<<<<<< * _noop.noop() * return */ __pyx_t_6 = PyErr_CheckSignals(); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 267, __pyx_L1_error) /* "uvloop/loop.pyx":268 * # to let it being processed. * PyErr_CheckSignals() * _noop.noop() # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_noop); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_noop_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 268, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":269 * PyErr_CheckSignals() * _noop.noop() * return # <<<<<<<<<<<<<< * * if handle.cancelled: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":263 * handle = None * * if handle is None: # <<<<<<<<<<<<<< * # Some signal that we aren't listening through * # add_signal_handler. Invoke CPython eval loop */ } /* "uvloop/loop.pyx":271 * return * * if handle.cancelled: # <<<<<<<<<<<<<< * self.remove_signal_handler(sig) # Remove it properly. * else: */ __pyx_t_9 = (__pyx_v_handle->cancelled != 0); if (__pyx_t_9) { /* "uvloop/loop.pyx":272 * * if handle.cancelled: * self.remove_signal_handler(sig) # Remove it properly. # <<<<<<<<<<<<<< * else: * self._call_soon_handle(handle) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_signal_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_sig); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_sig}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_sig}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_sig); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":271 * return * * if handle.cancelled: # <<<<<<<<<<<<<< * self.remove_signal_handler(sig) # Remove it properly. * else: */ goto __pyx_L14; } /* "uvloop/loop.pyx":274 * self.remove_signal_handler(sig) # Remove it properly. * else: * self._call_soon_handle(handle) # <<<<<<<<<<<<<< * self.handler_async.send() * */ /*else*/ { __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":275 * else: * self._call_soon_handle(handle) * self.handler_async.send() # <<<<<<<<<<<<<< * * cdef _on_wake(self): */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->send(__pyx_v_self->handler_async); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L14:; /* "uvloop/loop.pyx":255 * self._handle_signal(signum) * * cdef _handle_signal(self, sig): # <<<<<<<<<<<<<< * cdef Handle handle * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.Loop._handle_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":277 * self.handler_async.send() * * cdef _on_wake(self): # <<<<<<<<<<<<<< * if (self._ready_len > 0 or self._stopping) \ * and not self.handler_idle.running: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_wake(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_on_wake", 0); /* "uvloop/loop.pyx":278 * * cdef _on_wake(self): * if (self._ready_len > 0 or self._stopping) \ # <<<<<<<<<<<<<< * and not self.handler_idle.running: * self.handler_idle.start() */ __pyx_t_2 = ((__pyx_v_self->_ready_len > 0) != 0); if (!__pyx_t_2) { } else { goto __pyx_L5_next_and; } __pyx_t_2 = (__pyx_v_self->_stopping != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_L5_next_and:; /* "uvloop/loop.pyx":279 * cdef _on_wake(self): * if (self._ready_len > 0 or self._stopping) \ * and not self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.start() * */ __pyx_t_2 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; /* "uvloop/loop.pyx":278 * * cdef _on_wake(self): * if (self._ready_len > 0 or self._stopping) \ # <<<<<<<<<<<<<< * and not self.handler_idle.running: * self.handler_idle.start() */ if (__pyx_t_1) { /* "uvloop/loop.pyx":280 * if (self._ready_len > 0 or self._stopping) \ * and not self.handler_idle.running: * self.handler_idle.start() # <<<<<<<<<<<<<< * * cdef _on_idle(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":278 * * cdef _on_wake(self): * if (self._ready_len > 0 or self._stopping) \ # <<<<<<<<<<<<<< * and not self.handler_idle.running: * self.handler_idle.start() */ } /* "uvloop/loop.pyx":277 * self.handler_async.send() * * cdef _on_wake(self): # <<<<<<<<<<<<<< * if (self._ready_len > 0 or self._stopping) \ * and not self.handler_idle.running: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Loop._on_wake", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":282 * self.handler_idle.start() * * cdef _on_idle(self): # <<<<<<<<<<<<<< * cdef: * int i, ntodo */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__on_idle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { CYTHON_UNUSED int __pyx_v_i; int __pyx_v_ntodo; PyObject *__pyx_v_popleft = 0; struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handler = 0; PyObject *__pyx_v_started = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; char const *__pyx_t_20; int __pyx_t_21; __Pyx_RefNannySetupContext("_on_idle", 0); /* "uvloop/loop.pyx":285 * cdef: * int i, ntodo * object popleft = self._ready.popleft # <<<<<<<<<<<<<< * Handle handler * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ready, __pyx_n_s_popleft); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_popleft = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":288 * Handle handler * * ntodo = len(self._ready) # <<<<<<<<<<<<<< * if self._debug: * for i from 0 <= i < ntodo: */ __pyx_t_1 = __pyx_v_self->_ready; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ntodo = __pyx_t_2; /* "uvloop/loop.pyx":289 * * ntodo = len(self._ready) * if self._debug: # <<<<<<<<<<<<<< * for i from 0 <= i < ntodo: * handler = popleft() */ __pyx_t_3 = (__pyx_v_self->_debug != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":290 * ntodo = len(self._ready) * if self._debug: * for i from 0 <= i < ntodo: # <<<<<<<<<<<<<< * handler = popleft() * if handler.cancelled == 0: */ __pyx_t_4 = __pyx_v_ntodo; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "uvloop/loop.pyx":291 * if self._debug: * for i from 0 <= i < ntodo: * handler = popleft() # <<<<<<<<<<<<<< * if handler.cancelled == 0: * try: */ __Pyx_INCREF(__pyx_v_popleft); __pyx_t_5 = __pyx_v_popleft; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_handler, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5)); __pyx_t_5 = 0; /* "uvloop/loop.pyx":292 * for i from 0 <= i < ntodo: * handler = popleft() * if handler.cancelled == 0: # <<<<<<<<<<<<<< * try: * started = time_monotonic() */ __pyx_t_3 = ((__pyx_v_handler->cancelled == 0) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":293 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * started = time_monotonic() * handler._run() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":294 * if handler.cancelled == 0: * try: * started = time_monotonic() # <<<<<<<<<<<<<< * handler._run() * except BaseException as ex: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic); __pyx_t_1 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 294, __pyx_L7_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 294, __pyx_L7_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_started, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":295 * try: * started = time_monotonic() * handler._run() # <<<<<<<<<<<<<< * except BaseException as ex: * self._stop(ex) */ __pyx_t_5 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 295, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":293 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * started = time_monotonic() * handler._run() */ } /* "uvloop/loop.pyx":300 * return * else: * delta = time_monotonic() - started # <<<<<<<<<<<<<< * if delta > self.slow_callback_duration: * aio_logger.warning( */ /*else:*/ { __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic); __pyx_t_1 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 300, __pyx_L9_except_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 300, __pyx_L9_except_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_5, __pyx_v_started); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 300, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_delta, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":301 * else: * delta = time_monotonic() - started * if delta > self.slow_callback_duration: # <<<<<<<<<<<<<< * aio_logger.warning( * 'Executing %r took %.3f seconds', */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_self->slow_callback_duration, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 301, __pyx_L9_except_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 301, __pyx_L9_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":302 * delta = time_monotonic() - started * if delta > self.slow_callback_duration: * aio_logger.warning( # <<<<<<<<<<<<<< * 'Executing %r took %.3f seconds', * handler, delta) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 302, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":304 * aio_logger.warning( * 'Executing %r took %.3f seconds', * handler, delta) # <<<<<<<<<<<<<< * * else: */ __pyx_t_6 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_handler), __pyx_v_delta}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L9_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_handler), __pyx_v_delta}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L9_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 302, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_kp_u_Executing_r_took_3f_seconds); __Pyx_GIVEREF(__pyx_kp_u_Executing_r_took_3f_seconds); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_Executing_r_took_3f_seconds); __Pyx_INCREF(((PyObject *)__pyx_v_handler)); __Pyx_GIVEREF(((PyObject *)__pyx_v_handler)); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, ((PyObject *)__pyx_v_handler)); __Pyx_INCREF(__pyx_v_delta); __Pyx_GIVEREF(__pyx_v_delta); PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_v_delta); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":301 * else: * delta = time_monotonic() - started * if delta > self.slow_callback_duration: # <<<<<<<<<<<<<< * aio_logger.warning( * 'Executing %r took %.3f seconds', */ } } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":296 * started = time_monotonic() * handler._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._stop(ex) * return */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_11) < 0) __PYX_ERR(1, 296, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_v_ex = __pyx_t_5; /*try:*/ { /* "uvloop/loop.pyx":297 * handler._run() * except BaseException as ex: * self._stop(ex) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, __pyx_v_ex); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 297, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":298 * except BaseException as ex: * self._stop(ex) * return # <<<<<<<<<<<<<< * else: * delta = time_monotonic() - started */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L20_return; } /* "uvloop/loop.pyx":296 * started = time_monotonic() * handler._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._stop(ex) * return */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L21_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L9_except_error; } __pyx_L20_return: { __pyx_t_19 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; __pyx_r = __pyx_t_19; __pyx_t_19 = 0; goto __pyx_L10_except_return; } } } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/loop.pyx":293 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * started = time_monotonic() * handler._run() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L10_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L0; __pyx_L14_try_end:; } /* "uvloop/loop.pyx":292 * for i from 0 <= i < ntodo: * handler = popleft() * if handler.cancelled == 0: # <<<<<<<<<<<<<< * try: * started = time_monotonic() */ } } /* "uvloop/loop.pyx":289 * * ntodo = len(self._ready) * if self._debug: # <<<<<<<<<<<<<< * for i from 0 <= i < ntodo: * handler = popleft() */ goto __pyx_L3; } /* "uvloop/loop.pyx":307 * * else: * for i from 0 <= i < ntodo: # <<<<<<<<<<<<<< * handler = popleft() * if handler.cancelled == 0: */ /*else*/ { __pyx_t_4 = __pyx_v_ntodo; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "uvloop/loop.pyx":308 * else: * for i from 0 <= i < ntodo: * handler = popleft() # <<<<<<<<<<<<<< * if handler.cancelled == 0: * try: */ __Pyx_INCREF(__pyx_v_popleft); __pyx_t_5 = __pyx_v_popleft; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_1) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 308, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_handler, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5)); __pyx_t_5 = 0; /* "uvloop/loop.pyx":309 * for i from 0 <= i < ntodo: * handler = popleft() * if handler.cancelled == 0: # <<<<<<<<<<<<<< * try: * handler._run() */ __pyx_t_3 = ((__pyx_v_handler->cancelled == 0) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":310 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * handler._run() * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/loop.pyx":311 * if handler.cancelled == 0: * try: * handler._run() # <<<<<<<<<<<<<< * except BaseException as ex: * self._stop(ex) */ __pyx_t_5 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 311, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":310 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * handler._run() * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L37_try_end; __pyx_L30_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":312 * try: * handler._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._stop(ex) * return */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_12) { __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_11, &__pyx_t_1) < 0) __PYX_ERR(1, 312, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); __pyx_v_ex = __pyx_t_11; /*try:*/ { /* "uvloop/loop.pyx":313 * handler._run() * except BaseException as ex: * self._stop(ex) # <<<<<<<<<<<<<< * return * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, __pyx_v_ex); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 313, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":314 * except BaseException as ex: * self._stop(ex) * return # <<<<<<<<<<<<<< * * if len(self._queued_streams): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L42_return; } /* "uvloop/loop.pyx":312 * try: * handler._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._stop(ex) * return */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L43_error:; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_12 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_18, __pyx_t_17); __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_20; goto __pyx_L32_except_error; } __pyx_L42_return: { __pyx_t_14 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; __pyx_r = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L33_except_return; } } } goto __pyx_L32_except_error; __pyx_L32_except_error:; /* "uvloop/loop.pyx":310 * handler = popleft() * if handler.cancelled == 0: * try: # <<<<<<<<<<<<<< * handler._run() * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L1_error; __pyx_L33_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L0; __pyx_L37_try_end:; } /* "uvloop/loop.pyx":309 * for i from 0 <= i < ntodo: * handler = popleft() * if handler.cancelled == 0: # <<<<<<<<<<<<<< * try: * handler._run() */ } } } __pyx_L3:; /* "uvloop/loop.pyx":316 * return * * if len(self._queued_streams): # <<<<<<<<<<<<<< * self._exec_queued_writes() * */ __pyx_t_1 = __pyx_v_self->_queued_streams; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 316, __pyx_L1_error) } __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":317 * * if len(self._queued_streams): * self._exec_queued_writes() # <<<<<<<<<<<<<< * * self._ready_len = len(self._ready) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_exec_queued_writes(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":316 * return * * if len(self._queued_streams): # <<<<<<<<<<<<<< * self._exec_queued_writes() * */ } /* "uvloop/loop.pyx":319 * self._exec_queued_writes() * * self._ready_len = len(self._ready) # <<<<<<<<<<<<<< * if self._ready_len == 0 and self.handler_idle.running: * self.handler_idle.stop() */ __pyx_t_1 = __pyx_v_self->_ready; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_ready_len = __pyx_t_2; /* "uvloop/loop.pyx":320 * * self._ready_len = len(self._ready) * if self._ready_len == 0 and self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.stop() * */ __pyx_t_21 = ((__pyx_v_self->_ready_len == 0) != 0); if (__pyx_t_21) { } else { __pyx_t_3 = __pyx_t_21; goto __pyx_L51_bool_binop_done; } __pyx_t_21 = (__pyx_v_self->handler_idle->running != 0); __pyx_t_3 = __pyx_t_21; __pyx_L51_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":321 * self._ready_len = len(self._ready) * if self._ready_len == 0 and self.handler_idle.running: * self.handler_idle.stop() # <<<<<<<<<<<<<< * * if self._stopping: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6UVIdle_stop(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":320 * * self._ready_len = len(self._ready) * if self._ready_len == 0 and self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.stop() * */ } /* "uvloop/loop.pyx":323 * self.handler_idle.stop() * * if self._stopping: # <<<<<<<<<<<<<< * uv.uv_stop(self.uvloop) # void * */ __pyx_t_3 = (__pyx_v_self->_stopping != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":324 * * if self._stopping: * uv.uv_stop(self.uvloop) # void # <<<<<<<<<<<<<< * * cdef _stop(self, exc): */ uv_stop(__pyx_v_self->uvloop); /* "uvloop/loop.pyx":323 * self.handler_idle.stop() * * if self._stopping: # <<<<<<<<<<<<<< * uv.uv_stop(self.uvloop) # void * */ } /* "uvloop/loop.pyx":282 * self.handler_idle.start() * * cdef _on_idle(self): # <<<<<<<<<<<<<< * cdef: * int i, ntodo */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.Loop._on_idle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_popleft); __Pyx_XDECREF((PyObject *)__pyx_v_handler); __Pyx_XDECREF(__pyx_v_started); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":326 * uv.uv_stop(self.uvloop) # void * * cdef _stop(self, exc): # <<<<<<<<<<<<<< * if exc is not None: * self._last_error = exc */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_stop", 0); /* "uvloop/loop.pyx":327 * * cdef _stop(self, exc): * if exc is not None: # <<<<<<<<<<<<<< * self._last_error = exc * if self._stopping == 1: */ __pyx_t_1 = (__pyx_v_exc != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":328 * cdef _stop(self, exc): * if exc is not None: * self._last_error = exc # <<<<<<<<<<<<<< * if self._stopping == 1: * return */ __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); __Pyx_GOTREF(__pyx_v_self->_last_error); __Pyx_DECREF(__pyx_v_self->_last_error); __pyx_v_self->_last_error = __pyx_v_exc; /* "uvloop/loop.pyx":327 * * cdef _stop(self, exc): * if exc is not None: # <<<<<<<<<<<<<< * self._last_error = exc * if self._stopping == 1: */ } /* "uvloop/loop.pyx":329 * if exc is not None: * self._last_error = exc * if self._stopping == 1: # <<<<<<<<<<<<<< * return * self._stopping = 1 */ __pyx_t_2 = ((__pyx_v_self->_stopping == 1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":330 * self._last_error = exc * if self._stopping == 1: * return # <<<<<<<<<<<<<< * self._stopping = 1 * if not self.handler_idle.running: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":329 * if exc is not None: * self._last_error = exc * if self._stopping == 1: # <<<<<<<<<<<<<< * return * self._stopping = 1 */ } /* "uvloop/loop.pyx":331 * if self._stopping == 1: * return * self._stopping = 1 # <<<<<<<<<<<<<< * if not self.handler_idle.running: * self.handler_idle.start() */ __pyx_v_self->_stopping = 1; /* "uvloop/loop.pyx":332 * return * self._stopping = 1 * if not self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.start() * */ __pyx_t_2 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":333 * self._stopping = 1 * if not self.handler_idle.running: * self.handler_idle.start() # <<<<<<<<<<<<<< * * cdef __run(self, uv.uv_run_mode mode): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":332 * return * self._stopping = 1 * if not self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.start() * */ } /* "uvloop/loop.pyx":326 * uv.uv_stop(self.uvloop) # void * * cdef _stop(self, exc): # <<<<<<<<<<<<<< * if exc is not None: * self._last_error = exc */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Loop._stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":335 * self.handler_idle.start() * * cdef __run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<< * # Although every UVHandle holds a reference to the loop, * # we want to do everything to ensure that the loop will */ static PyObject *__pyx_f_6uvloop_4loop_4Loop___run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__run", 0); /* "uvloop/loop.pyx":340 * # never deallocate during the run -- so we do some * # manual refs management. * Py_INCREF(self) # <<<<<<<<<<<<<< * with nogil: * err = uv.uv_run(self.uvloop, mode) */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/loop.pyx":341 * # manual refs management. * Py_INCREF(self) * with nogil: # <<<<<<<<<<<<<< * err = uv.uv_run(self.uvloop, mode) * Py_DECREF(self) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS #endif /*try:*/ { /* "uvloop/loop.pyx":342 * Py_INCREF(self) * with nogil: * err = uv.uv_run(self.uvloop, mode) # <<<<<<<<<<<<<< * Py_DECREF(self) * */ __pyx_v_err = uv_run(__pyx_v_self->uvloop, __pyx_v_mode); } /* "uvloop/loop.pyx":341 * # manual refs management. * Py_INCREF(self) * with nogil: # <<<<<<<<<<<<<< * err = uv.uv_run(self.uvloop, mode) * Py_DECREF(self) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L5:; } } /* "uvloop/loop.pyx":343 * with nogil: * err = uv.uv_run(self.uvloop, mode) * Py_DECREF(self) # <<<<<<<<<<<<<< * * if err < 0: */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/loop.pyx":345 * Py_DECREF(self) * * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":346 * * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * cdef _run(self, uv.uv_run_mode mode): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 346, __pyx_L1_error) /* "uvloop/loop.pyx":345 * Py_DECREF(self) * * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/loop.pyx":335 * self.handler_idle.start() * * cdef __run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<< * # Although every UVHandle holds a reference to the loop, * # we want to do everything to ensure that the loop will */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.__run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":348 * raise convert_error(err) * * cdef _run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uv_run_mode __pyx_v_mode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("_run", 0); /* "uvloop/loop.pyx":351 * cdef int err * * if self._closed == 1: # <<<<<<<<<<<<<< * raise RuntimeError('unable to start the loop; it was closed') * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":352 * * if self._closed == 1: * raise RuntimeError('unable to start the loop; it was closed') # <<<<<<<<<<<<<< * * if self._running == 1: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 352, __pyx_L1_error) /* "uvloop/loop.pyx":351 * cdef int err * * if self._closed == 1: # <<<<<<<<<<<<<< * raise RuntimeError('unable to start the loop; it was closed') * */ } /* "uvloop/loop.pyx":354 * raise RuntimeError('unable to start the loop; it was closed') * * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError('this event loop is already running.') * */ __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":355 * * if self._running == 1: * raise RuntimeError('this event loop is already running.') # <<<<<<<<<<<<<< * * if (aio_get_running_loop is not None and */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 355, __pyx_L1_error) /* "uvloop/loop.pyx":354 * raise RuntimeError('unable to start the loop; it was closed') * * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError('this event loop is already running.') * */ } /* "uvloop/loop.pyx":357 * raise RuntimeError('this event loop is already running.') * * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<< * aio_get_running_loop() is not None): * raise RuntimeError( */ __pyx_t_3 = (__pyx_v_6uvloop_4loop_aio_get_running_loop != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L6_bool_binop_done; } /* "uvloop/loop.pyx":358 * * if (aio_get_running_loop is not None and * aio_get_running_loop() is not None): # <<<<<<<<<<<<<< * raise RuntimeError( * 'Cannot run the event loop while another loop is running') */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_get_running_loop); __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_get_running_loop; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 358, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L6_bool_binop_done:; /* "uvloop/loop.pyx":357 * raise RuntimeError('this event loop is already running.') * * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<< * aio_get_running_loop() is not None): * raise RuntimeError( */ if (__pyx_t_1) { /* "uvloop/loop.pyx":359 * if (aio_get_running_loop is not None and * aio_get_running_loop() is not None): * raise RuntimeError( # <<<<<<<<<<<<<< * 'Cannot run the event loop while another loop is running') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 359, __pyx_L1_error) /* "uvloop/loop.pyx":357 * raise RuntimeError('this event loop is already running.') * * if (aio_get_running_loop is not None and # <<<<<<<<<<<<<< * aio_get_running_loop() is not None): * raise RuntimeError( */ } /* "uvloop/loop.pyx":362 * 'Cannot run the event loop while another loop is running') * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * self._setup_signals() * */ __pyx_t_1 = (__pyx_v_self->_signal_handlers == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":363 * * if self._signal_handlers is None: * self._setup_signals() # <<<<<<<<<<<<<< * * # reset _last_error */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_setup_signals(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":362 * 'Cannot run the event loop while another loop is running') * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * self._setup_signals() * */ } /* "uvloop/loop.pyx":366 * * # reset _last_error * self._last_error = None # <<<<<<<<<<<<<< * * self._thread_id = PyThread_get_thread_ident() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_last_error); __Pyx_DECREF(__pyx_v_self->_last_error); __pyx_v_self->_last_error = Py_None; /* "uvloop/loop.pyx":368 * self._last_error = None * * self._thread_id = PyThread_get_thread_ident() # <<<<<<<<<<<<<< * self._thread_is_main = MAIN_THREAD_ID == self._thread_id * self._running = 1 */ __pyx_v_self->_thread_id = PyThread_get_thread_ident(); /* "uvloop/loop.pyx":369 * * self._thread_id = PyThread_get_thread_ident() * self._thread_is_main = MAIN_THREAD_ID == self._thread_id # <<<<<<<<<<<<<< * self._running = 1 * */ __pyx_v_self->_thread_is_main = (__pyx_v_6uvloop_4loop_MAIN_THREAD_ID == __pyx_v_self->_thread_id); /* "uvloop/loop.pyx":370 * self._thread_id = PyThread_get_thread_ident() * self._thread_is_main = MAIN_THREAD_ID == self._thread_id * self._running = 1 # <<<<<<<<<<<<<< * * self.handler_check__exec_writes.start() */ __pyx_v_self->_running = 1; /* "uvloop/loop.pyx":372 * self._running = 1 * * self.handler_check__exec_writes.start() # <<<<<<<<<<<<<< * self.handler_idle.start() * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_7UVCheck_start(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":373 * * self.handler_check__exec_writes.start() * self.handler_idle.start() # <<<<<<<<<<<<<< * * if aio_set_running_loop is not None: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":375 * self.handler_idle.start() * * if aio_set_running_loop is not None: # <<<<<<<<<<<<<< * aio_set_running_loop(self) * try: */ __pyx_t_3 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":376 * * if aio_set_running_loop is not None: * aio_set_running_loop(self) # <<<<<<<<<<<<<< * try: * self.__run(mode) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_set_running_loop); __pyx_t_5 = __pyx_v_6uvloop_4loop_aio_set_running_loop; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 376, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 376, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":375 * self.handler_idle.start() * * if aio_set_running_loop is not None: # <<<<<<<<<<<<<< * aio_set_running_loop(self) * try: */ } /* "uvloop/loop.pyx":377 * if aio_set_running_loop is not None: * aio_set_running_loop(self) * try: # <<<<<<<<<<<<<< * self.__run(mode) * finally: */ /*try:*/ { /* "uvloop/loop.pyx":378 * aio_set_running_loop(self) * try: * self.__run(mode) # <<<<<<<<<<<<<< * finally: * if aio_set_running_loop is not None: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->__pyx___run(__pyx_v_self, __pyx_v_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 378, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/loop.pyx":380 * self.__run(mode) * finally: * if aio_set_running_loop is not None: # <<<<<<<<<<<<<< * aio_set_running_loop(None) * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":381 * finally: * if aio_set_running_loop is not None: * aio_set_running_loop(None) # <<<<<<<<<<<<<< * * self.handler_check__exec_writes.stop() */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_set_running_loop, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":380 * self.__run(mode) * finally: * if aio_set_running_loop is not None: # <<<<<<<<<<<<<< * aio_set_running_loop(None) * */ } goto __pyx_L12; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L11_error:; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __pyx_t_3 = (__pyx_v_6uvloop_4loop_aio_set_running_loop != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":381 * finally: * if aio_set_running_loop is not None: * aio_set_running_loop(None) # <<<<<<<<<<<<<< * * self.handler_check__exec_writes.stop() */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_set_running_loop, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":380 * self.__run(mode) * finally: * if aio_set_running_loop is not None: # <<<<<<<<<<<<<< * aio_set_running_loop(None) * */ } } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L1_error; __pyx_L15_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; goto __pyx_L1_error; } __pyx_L12:; } /* "uvloop/loop.pyx":383 * aio_set_running_loop(None) * * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<< * self.handler_idle.stop() * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":384 * * self.handler_check__exec_writes.stop() * self.handler_idle.stop() # <<<<<<<<<<<<<< * * self._thread_is_main = 0 */ __pyx_t_2 = __pyx_f_6uvloop_4loop_6UVIdle_stop(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":386 * self.handler_idle.stop() * * self._thread_is_main = 0 # <<<<<<<<<<<<<< * self._thread_id = 0 * self._running = 0 */ __pyx_v_self->_thread_is_main = 0; /* "uvloop/loop.pyx":387 * * self._thread_is_main = 0 * self._thread_id = 0 # <<<<<<<<<<<<<< * self._running = 0 * self._stopping = 0 */ __pyx_v_self->_thread_id = 0; /* "uvloop/loop.pyx":388 * self._thread_is_main = 0 * self._thread_id = 0 * self._running = 0 # <<<<<<<<<<<<<< * self._stopping = 0 * */ __pyx_v_self->_running = 0; /* "uvloop/loop.pyx":389 * self._thread_id = 0 * self._running = 0 * self._stopping = 0 # <<<<<<<<<<<<<< * * if self._last_error is not None: */ __pyx_v_self->_stopping = 0; /* "uvloop/loop.pyx":391 * self._stopping = 0 * * if self._last_error is not None: # <<<<<<<<<<<<<< * # The loop was stopped with an error with 'loop._stop(error)' call * raise self._last_error */ __pyx_t_1 = (__pyx_v_self->_last_error != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":393 * if self._last_error is not None: * # The loop was stopped with an error with 'loop._stop(error)' call * raise self._last_error # <<<<<<<<<<<<<< * * cdef _close(self): */ __Pyx_Raise(__pyx_v_self->_last_error, 0, 0, 0); __PYX_ERR(1, 393, __pyx_L1_error) /* "uvloop/loop.pyx":391 * self._stopping = 0 * * if self._last_error is not None: # <<<<<<<<<<<<<< * # The loop was stopped with an error with 'loop._stop(error)' call * raise self._last_error */ } /* "uvloop/loop.pyx":348 * raise convert_error(err) * * cdef _run(self, uv.uv_run_mode mode): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop._run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":395 * raise self._last_error * * cdef _close(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_cb_handle = NULL; PyObject *__pyx_v_poll_handle = NULL; PyObject *__pyx_v_timer_cbhandle = NULL; PyObject *__pyx_v_executor = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("_close", 0); /* "uvloop/loop.pyx":398 * cdef int err * * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError("Cannot close a running event loop") * */ __pyx_t_1 = ((__pyx_v_self->_running == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":399 * * if self._running == 1: * raise RuntimeError("Cannot close a running event loop") # <<<<<<<<<<<<<< * * if self._closed == 1: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 399, __pyx_L1_error) /* "uvloop/loop.pyx":398 * cdef int err * * if self._running == 1: # <<<<<<<<<<<<<< * raise RuntimeError("Cannot close a running event loop") * */ } /* "uvloop/loop.pyx":401 * raise RuntimeError("Cannot close a running event loop") * * if self._closed == 1: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":402 * * if self._closed == 1: * return # <<<<<<<<<<<<<< * * self._closed = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":401 * raise RuntimeError("Cannot close a running event loop") * * if self._closed == 1: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/loop.pyx":404 * return * * self._closed = 1 # <<<<<<<<<<<<<< * * for cb_handle in self._ready: */ __pyx_v_self->_closed = 1; /* "uvloop/loop.pyx":406 * self._closed = 1 * * for cb_handle in self._ready: # <<<<<<<<<<<<<< * cb_handle.cancel() * self._ready.clear() */ if (likely(PyList_CheckExact(__pyx_v_self->_ready)) || PyTuple_CheckExact(__pyx_v_self->_ready)) { __pyx_t_2 = __pyx_v_self->_ready; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->_ready); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 406, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 406, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 406, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 406, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_cb_handle, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":407 * * for cb_handle in self._ready: * cb_handle.cancel() # <<<<<<<<<<<<<< * self._ready.clear() * self._ready_len = 0 */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cb_handle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 407, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":406 * self._closed = 1 * * for cb_handle in self._ready: # <<<<<<<<<<<<<< * cb_handle.cancel() * self._ready.clear() */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":408 * for cb_handle in self._ready: * cb_handle.cancel() * self._ready.clear() # <<<<<<<<<<<<<< * self._ready_len = 0 * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_ready, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 408, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":409 * cb_handle.cancel() * self._ready.clear() * self._ready_len = 0 # <<<<<<<<<<<<<< * * if self._polls: */ __pyx_v_self->_ready_len = 0; /* "uvloop/loop.pyx":411 * self._ready_len = 0 * * if self._polls: # <<<<<<<<<<<<<< * for poll_handle in self._polls.values(): * (poll_handle)._close() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_polls); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 411, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":412 * * if self._polls: * for poll_handle in self._polls.values(): # <<<<<<<<<<<<<< * (poll_handle)._close() * */ __pyx_t_3 = 0; if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "values"); __PYX_ERR(1, 412, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->_polls, 1, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_3, NULL, &__pyx_t_5, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(1, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_poll_handle, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":413 * if self._polls: * for poll_handle in self._polls.values(): * (poll_handle)._close() # <<<<<<<<<<<<<< * * self._polls.clear() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll_handle)->__pyx_vtab)->_close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll_handle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":415 * (poll_handle)._close() * * self._polls.clear() # <<<<<<<<<<<<<< * * if self._timers: */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear"); __PYX_ERR(1, 415, __pyx_L1_error) } __pyx_t_11 = __Pyx_PyDict_Clear(__pyx_v_self->_polls); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(1, 415, __pyx_L1_error) /* "uvloop/loop.pyx":411 * self._ready_len = 0 * * if self._polls: # <<<<<<<<<<<<<< * for poll_handle in self._polls.values(): * (poll_handle)._close() */ } /* "uvloop/loop.pyx":417 * self._polls.clear() * * if self._timers: # <<<<<<<<<<<<<< * for timer_cbhandle in tuple(self._timers): * timer_cbhandle.cancel() */ __pyx_t_1 = (__pyx_v_self->_timers != Py_None) && (PySet_GET_SIZE(__pyx_v_self->_timers) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":418 * * if self._timers: * for timer_cbhandle in tuple(self._timers): # <<<<<<<<<<<<<< * timer_cbhandle.cancel() * */ __pyx_t_2 = PySequence_Tuple(__pyx_v_self->_timers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 418, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_timer_cbhandle, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":419 * if self._timers: * for timer_cbhandle in tuple(self._timers): * timer_cbhandle.cancel() # <<<<<<<<<<<<<< * * # Close all remaining handles */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_timer_cbhandle, __pyx_n_s_cancel); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 419, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":418 * * if self._timers: * for timer_cbhandle in tuple(self._timers): # <<<<<<<<<<<<<< * timer_cbhandle.cancel() * */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":417 * self._polls.clear() * * if self._timers: # <<<<<<<<<<<<<< * for timer_cbhandle in tuple(self._timers): * timer_cbhandle.cancel() */ } /* "uvloop/loop.pyx":422 * * # Close all remaining handles * self.handler_async._close() # <<<<<<<<<<<<<< * self.handler_idle._close() * self.handler_check__exec_writes._close() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_async)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":423 * # Close all remaining handles * self.handler_async._close() * self.handler_idle._close() # <<<<<<<<<<<<<< * self.handler_check__exec_writes._close() * __close_all_handles(self) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->handler_idle->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_idle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":424 * self.handler_async._close() * self.handler_idle._close() * self.handler_check__exec_writes._close() # <<<<<<<<<<<<<< * __close_all_handles(self) * self._shutdown_signals() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->handler_check__exec_writes->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->handler_check__exec_writes)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":425 * self.handler_idle._close() * self.handler_check__exec_writes._close() * __close_all_handles(self) # <<<<<<<<<<<<<< * self._shutdown_signals() * # During this run there should be no open handles, */ __pyx_f_6uvloop_4loop___close_all_handles(__pyx_v_self); /* "uvloop/loop.pyx":426 * self.handler_check__exec_writes._close() * __close_all_handles(self) * self._shutdown_signals() # <<<<<<<<<<<<<< * # During this run there should be no open handles, * # so it should finish right away */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_shutdown_signals(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":429 * # During this run there should be no open handles, * # so it should finish right away * self.__run(uv.UV_RUN_DEFAULT) # <<<<<<<<<<<<<< * * if self._timers: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->__pyx___run(__pyx_v_self, UV_RUN_DEFAULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":431 * self.__run(uv.UV_RUN_DEFAULT) * * if self._timers: # <<<<<<<<<<<<<< * raise RuntimeError( * "new timers were queued during loop closing: {}" */ __pyx_t_1 = (__pyx_v_self->_timers != Py_None) && (PySet_GET_SIZE(__pyx_v_self->_timers) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":434 * raise RuntimeError( * "new timers were queued during loop closing: {}" * .format(self._timers)) # <<<<<<<<<<<<<< * * if self._polls: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_new_timers_were_queued_during_lo, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->_timers); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_timers}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_timers}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self->_timers); __Pyx_GIVEREF(__pyx_v_self->_timers); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self->_timers); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":432 * * if self._timers: * raise RuntimeError( # <<<<<<<<<<<<<< * "new timers were queued during loop closing: {}" * .format(self._timers)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 432, __pyx_L1_error) /* "uvloop/loop.pyx":431 * self.__run(uv.UV_RUN_DEFAULT) * * if self._timers: # <<<<<<<<<<<<<< * raise RuntimeError( * "new timers were queued during loop closing: {}" */ } /* "uvloop/loop.pyx":436 * .format(self._timers)) * * if self._polls: # <<<<<<<<<<<<<< * raise RuntimeError( * "new poll handles were queued during loop closing: {}" */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_polls); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 436, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":439 * raise RuntimeError( * "new poll handles were queued during loop closing: {}" * .format(self._polls)) # <<<<<<<<<<<<<< * * if self._ready: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_new_poll_handles_were_queued_dur, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->_polls); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_self->_polls}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_self->_polls}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_self->_polls); __Pyx_GIVEREF(__pyx_v_self->_polls); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->_polls); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":437 * * if self._polls: * raise RuntimeError( # <<<<<<<<<<<<<< * "new poll handles were queued during loop closing: {}" * .format(self._polls)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 437, __pyx_L1_error) /* "uvloop/loop.pyx":436 * .format(self._timers)) * * if self._polls: # <<<<<<<<<<<<<< * raise RuntimeError( * "new poll handles were queued during loop closing: {}" */ } /* "uvloop/loop.pyx":441 * .format(self._polls)) * * if self._ready: # <<<<<<<<<<<<<< * raise RuntimeError( * "new callbacks were queued during loop closing: {}" */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_ready); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 441, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":444 * raise RuntimeError( * "new callbacks were queued during loop closing: {}" * .format(self._ready)) # <<<<<<<<<<<<<< * * err = uv.uv_loop_close(self.uvloop) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_new_callbacks_were_queued_during, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->_ready); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_ready}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_ready}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self->_ready); __Pyx_GIVEREF(__pyx_v_self->_ready); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self->_ready); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":442 * * if self._ready: * raise RuntimeError( # <<<<<<<<<<<<<< * "new callbacks were queued during loop closing: {}" * .format(self._ready)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 442, __pyx_L1_error) /* "uvloop/loop.pyx":441 * .format(self._polls)) * * if self._ready: # <<<<<<<<<<<<<< * raise RuntimeError( * "new callbacks were queued during loop closing: {}" */ } /* "uvloop/loop.pyx":446 * .format(self._ready)) * * err = uv.uv_loop_close(self.uvloop) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_loop_close(__pyx_v_self->uvloop); /* "uvloop/loop.pyx":447 * * err = uv.uv_loop_close(self.uvloop) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":448 * err = uv.uv_loop_close(self.uvloop) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * self.handler_async = None */ __pyx_t_5 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 448, __pyx_L1_error) /* "uvloop/loop.pyx":447 * * err = uv.uv_loop_close(self.uvloop) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/loop.pyx":450 * raise convert_error(err) * * self.handler_async = None # <<<<<<<<<<<<<< * self.handler_idle = None * self.handler_check__exec_writes = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->handler_async); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_async)); __pyx_v_self->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)Py_None); /* "uvloop/loop.pyx":451 * * self.handler_async = None * self.handler_idle = None # <<<<<<<<<<<<<< * self.handler_check__exec_writes = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->handler_idle); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_idle)); __pyx_v_self->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)Py_None); /* "uvloop/loop.pyx":452 * self.handler_async = None * self.handler_idle = None * self.handler_check__exec_writes = None # <<<<<<<<<<<<<< * * executor = self._default_executor */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->handler_check__exec_writes); __Pyx_DECREF(((PyObject *)__pyx_v_self->handler_check__exec_writes)); __pyx_v_self->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)Py_None); /* "uvloop/loop.pyx":454 * self.handler_check__exec_writes = None * * executor = self._default_executor # <<<<<<<<<<<<<< * if executor is not None: * self._default_executor = None */ __pyx_t_5 = __pyx_v_self->_default_executor; __Pyx_INCREF(__pyx_t_5); __pyx_v_executor = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":455 * * executor = self._default_executor * if executor is not None: # <<<<<<<<<<<<<< * self._default_executor = None * executor.shutdown(wait=False) */ __pyx_t_1 = (__pyx_v_executor != Py_None); __pyx_t_12 = (__pyx_t_1 != 0); if (__pyx_t_12) { /* "uvloop/loop.pyx":456 * executor = self._default_executor * if executor is not None: * self._default_executor = None # <<<<<<<<<<<<<< * executor.shutdown(wait=False) * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_default_executor); __Pyx_DECREF(__pyx_v_self->_default_executor); __pyx_v_self->_default_executor = Py_None; /* "uvloop/loop.pyx":457 * if executor is not None: * self._default_executor = None * executor.shutdown(wait=False) # <<<<<<<<<<<<<< * * cdef uint64_t _time(self): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wait, Py_False) < 0) __PYX_ERR(1, 457, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":455 * * executor = self._default_executor * if executor is not None: # <<<<<<<<<<<<<< * self._default_executor = None * executor.shutdown(wait=False) */ } /* "uvloop/loop.pyx":395 * raise self._last_error * * cdef _close(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cb_handle); __Pyx_XDECREF(__pyx_v_poll_handle); __Pyx_XDECREF(__pyx_v_timer_cbhandle); __Pyx_XDECREF(__pyx_v_executor); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":459 * executor.shutdown(wait=False) * * cdef uint64_t _time(self): # <<<<<<<<<<<<<< * # asyncio doesn't have a time cache, neither should uvloop. * uv.uv_update_time(self.uvloop) # void */ static uint64_t __pyx_f_6uvloop_4loop_4Loop__time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { uint64_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_time", 0); /* "uvloop/loop.pyx":461 * cdef uint64_t _time(self): * # asyncio doesn't have a time cache, neither should uvloop. * uv.uv_update_time(self.uvloop) # void # <<<<<<<<<<<<<< * return uv.uv_now(self.uvloop) * */ uv_update_time(__pyx_v_self->uvloop); /* "uvloop/loop.pyx":462 * # asyncio doesn't have a time cache, neither should uvloop. * uv.uv_update_time(self.uvloop) # void * return uv.uv_now(self.uvloop) # <<<<<<<<<<<<<< * * cdef inline _queue_write(self, UVStream stream): */ __pyx_r = uv_now(__pyx_v_self->uvloop); goto __pyx_L0; /* "uvloop/loop.pyx":459 * executor.shutdown(wait=False) * * cdef uint64_t _time(self): # <<<<<<<<<<<<<< * # asyncio doesn't have a time cache, neither should uvloop. * uv.uv_update_time(self.uvloop) # void */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":464 * return uv.uv_now(self.uvloop) * * cdef inline _queue_write(self, UVStream stream): # <<<<<<<<<<<<<< * self._queued_streams.add(stream) * if not self.handler_check__exec_writes.running: */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__queue_write(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_queue_write", 0); /* "uvloop/loop.pyx":465 * * cdef inline _queue_write(self, UVStream stream): * self._queued_streams.add(stream) # <<<<<<<<<<<<<< * if not self.handler_check__exec_writes.running: * self.handler_check__exec_writes.start() */ if (unlikely(__pyx_v_self->_queued_streams == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); __PYX_ERR(1, 465, __pyx_L1_error) } __pyx_t_1 = PySet_Add(__pyx_v_self->_queued_streams, ((PyObject *)__pyx_v_stream)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(1, 465, __pyx_L1_error) /* "uvloop/loop.pyx":466 * cdef inline _queue_write(self, UVStream stream): * self._queued_streams.add(stream) * if not self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.start() * */ __pyx_t_2 = ((!(__pyx_v_self->handler_check__exec_writes->running != 0)) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":467 * self._queued_streams.add(stream) * if not self.handler_check__exec_writes.running: * self.handler_check__exec_writes.start() # <<<<<<<<<<<<<< * * cdef _exec_queued_writes(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_7UVCheck_start(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":466 * cdef inline _queue_write(self, UVStream stream): * self._queued_streams.add(stream) * if not self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.start() * */ } /* "uvloop/loop.pyx":464 * return uv.uv_now(self.uvloop) * * cdef inline _queue_write(self, UVStream stream): # <<<<<<<<<<<<<< * self._queued_streams.add(stream) * if not self.handler_check__exec_writes.running: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Loop._queue_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":469 * self.handler_check__exec_writes.start() * * cdef _exec_queued_writes(self): # <<<<<<<<<<<<<< * if len(self._queued_streams) == 0: * if self.handler_check__exec_writes.running: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0; int __pyx_v_queued_len; PyObject *__pyx_v_pystream = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_exec_queued_writes", 0); /* "uvloop/loop.pyx":470 * * cdef _exec_queued_writes(self): * if len(self._queued_streams) == 0: # <<<<<<<<<<<<<< * if self.handler_check__exec_writes.running: * self.handler_check__exec_writes.stop() */ __pyx_t_1 = __pyx_v_self->_queued_streams; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 470, __pyx_L1_error) } __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":471 * cdef _exec_queued_writes(self): * if len(self._queued_streams) == 0: * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.stop() * return */ __pyx_t_3 = (__pyx_v_self->handler_check__exec_writes->running != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":472 * if len(self._queued_streams) == 0: * if self.handler_check__exec_writes.running: * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":471 * cdef _exec_queued_writes(self): * if len(self._queued_streams) == 0: * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.stop() * return */ } /* "uvloop/loop.pyx":473 * if self.handler_check__exec_writes.running: * self.handler_check__exec_writes.stop() * return # <<<<<<<<<<<<<< * * cdef: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":470 * * cdef _exec_queued_writes(self): * if len(self._queued_streams) == 0: # <<<<<<<<<<<<<< * if self.handler_check__exec_writes.running: * self.handler_check__exec_writes.stop() */ } /* "uvloop/loop.pyx":479 * int queued_len * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * queued_len = len(self._queued_streams) * */ __pyx_t_3 = (UVLOOP_DEBUG != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":480 * * if UVLOOP_DEBUG: * queued_len = len(self._queued_streams) # <<<<<<<<<<<<<< * * for pystream in self._queued_streams: */ __pyx_t_1 = __pyx_v_self->_queued_streams; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 480, __pyx_L1_error) } __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_queued_len = __pyx_t_2; /* "uvloop/loop.pyx":479 * int queued_len * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * queued_len = len(self._queued_streams) * */ } /* "uvloop/loop.pyx":482 * queued_len = len(self._queued_streams) * * for pystream in self._queued_streams: # <<<<<<<<<<<<<< * stream = pystream * stream._exec_write() */ __pyx_t_1 = PyObject_GetIter(__pyx_v_self->_queued_streams); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 482, __pyx_L1_error) for (;;) { { __pyx_t_5 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 482, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_pystream, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":483 * * for pystream in self._queued_streams: * stream = pystream # <<<<<<<<<<<<<< * stream._exec_write() * */ __pyx_t_5 = __pyx_v_pystream; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_stream, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_5)); __pyx_t_5 = 0; /* "uvloop/loop.pyx":484 * for pystream in self._queued_streams: * stream = pystream * stream._exec_write() # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __pyx_t_5 = __pyx_f_6uvloop_4loop_8UVStream__exec_write(__pyx_v_stream); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":482 * queued_len = len(self._queued_streams) * * for pystream in self._queued_streams: # <<<<<<<<<<<<<< * stream = pystream * stream._exec_write() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":486 * stream._exec_write() * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if len(self._queued_streams) != queued_len: * raise RuntimeError( */ __pyx_t_3 = (UVLOOP_DEBUG != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":487 * * if UVLOOP_DEBUG: * if len(self._queued_streams) != queued_len: # <<<<<<<<<<<<<< * raise RuntimeError( * 'loop._queued_streams are not empty after ' */ __pyx_t_1 = __pyx_v_self->_queued_streams; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(1, 487, __pyx_L1_error) } __pyx_t_2 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_t_2 != __pyx_v_queued_len) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":488 * if UVLOOP_DEBUG: * if len(self._queued_streams) != queued_len: * raise RuntimeError( # <<<<<<<<<<<<<< * 'loop._queued_streams are not empty after ' * '_exec_queued_writes') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 488, __pyx_L1_error) /* "uvloop/loop.pyx":487 * * if UVLOOP_DEBUG: * if len(self._queued_streams) != queued_len: # <<<<<<<<<<<<<< * raise RuntimeError( * 'loop._queued_streams are not empty after ' */ } /* "uvloop/loop.pyx":486 * stream._exec_write() * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if len(self._queued_streams) != queued_len: * raise RuntimeError( */ } /* "uvloop/loop.pyx":492 * '_exec_queued_writes') * * self._queued_streams.clear() # <<<<<<<<<<<<<< * * if self.handler_check__exec_writes.running: */ if (unlikely(__pyx_v_self->_queued_streams == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear"); __PYX_ERR(1, 492, __pyx_L1_error) } __pyx_t_6 = PySet_Clear(__pyx_v_self->_queued_streams); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 492, __pyx_L1_error) /* "uvloop/loop.pyx":494 * self._queued_streams.clear() * * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.stop() * */ __pyx_t_3 = (__pyx_v_self->handler_check__exec_writes->running != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":495 * * if self.handler_check__exec_writes.running: * self.handler_check__exec_writes.stop() # <<<<<<<<<<<<<< * * cdef inline _call_soon(self, object callback, object args): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_7UVCheck_stop(__pyx_v_self->handler_check__exec_writes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":494 * self._queued_streams.clear() * * if self.handler_check__exec_writes.running: # <<<<<<<<<<<<<< * self.handler_check__exec_writes.stop() * */ } /* "uvloop/loop.pyx":469 * self.handler_check__exec_writes.start() * * cdef _exec_queued_writes(self): # <<<<<<<<<<<<<< * if len(self._queued_streams) == 0: * if self.handler_check__exec_writes.running: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop._exec_queued_writes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_stream); __Pyx_XDECREF(__pyx_v_pystream); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":497 * self.handler_check__exec_writes.stop() * * cdef inline _call_soon(self, object callback, object args): # <<<<<<<<<<<<<< * cdef Handle handle * handle = new_Handle(self, callback, args) */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_call_soon", 0); /* "uvloop/loop.pyx":499 * cdef inline _call_soon(self, object callback, object args): * cdef Handle handle * handle = new_Handle(self, callback, args) # <<<<<<<<<<<<<< * self._call_soon_handle(handle) * return handle */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 499, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":500 * cdef Handle handle * handle = new_Handle(self, callback, args) * self._call_soon_handle(handle) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, __pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":501 * handle = new_Handle(self, callback, args) * self._call_soon_handle(handle) * return handle # <<<<<<<<<<<<<< * * cdef inline _call_soon_handle(self, Handle handle): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/loop.pyx":497 * self.handler_check__exec_writes.stop() * * cdef inline _call_soon(self, object callback, object args): # <<<<<<<<<<<<<< * cdef Handle handle * handle = new_Handle(self, callback, args) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":503 * return handle * * cdef inline _call_soon_handle(self, Handle handle): # <<<<<<<<<<<<<< * self._check_closed() * self._ready.append(handle) */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__call_soon_handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_call_soon_handle", 0); /* "uvloop/loop.pyx":504 * * cdef inline _call_soon_handle(self, Handle handle): * self._check_closed() # <<<<<<<<<<<<<< * self._ready.append(handle) * self._ready_len += 1; */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":505 * cdef inline _call_soon_handle(self, Handle handle): * self._check_closed() * self._ready.append(handle) # <<<<<<<<<<<<<< * self._ready_len += 1; * if not self.handler_idle.running: */ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_self->_ready, ((PyObject *)__pyx_v_handle)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 505, __pyx_L1_error) /* "uvloop/loop.pyx":506 * self._check_closed() * self._ready.append(handle) * self._ready_len += 1; # <<<<<<<<<<<<<< * if not self.handler_idle.running: * self.handler_idle.start() */ __pyx_v_self->_ready_len = (__pyx_v_self->_ready_len + 1); /* "uvloop/loop.pyx":507 * self._ready.append(handle) * self._ready_len += 1; * if not self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.start() * */ __pyx_t_3 = ((!(__pyx_v_self->handler_idle->running != 0)) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":508 * self._ready_len += 1; * if not self.handler_idle.running: * self.handler_idle.start() # <<<<<<<<<<<<<< * * cdef _call_later(self, uint64_t delay, object callback, object args): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6UVIdle_start(__pyx_v_self->handler_idle); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":507 * self._ready.append(handle) * self._ready_len += 1; * if not self.handler_idle.running: # <<<<<<<<<<<<<< * self.handler_idle.start() * */ } /* "uvloop/loop.pyx":503 * return handle * * cdef inline _call_soon_handle(self, Handle handle): # <<<<<<<<<<<<<< * self._check_closed() * self._ready.append(handle) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._call_soon_handle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":510 * self.handler_idle.start() * * cdef _call_later(self, uint64_t delay, object callback, object args): # <<<<<<<<<<<<<< * return TimerHandle(self, callback, args, delay) * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, uint64_t __pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_call_later", 0); /* "uvloop/loop.pyx":511 * * cdef _call_later(self, uint64_t delay, object callback, object args): * return TimerHandle(self, callback, args, delay) # <<<<<<<<<<<<<< * * cdef void _handle_exception(self, object ex): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_callback); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_args); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_TimerHandle), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":510 * self.handler_idle.start() * * cdef _call_later(self, uint64_t delay, object callback, object args): # <<<<<<<<<<<<<< * return TimerHandle(self, callback, args, delay) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._call_later", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":513 * return TimerHandle(self, callback, args, delay) * * cdef void _handle_exception(self, object ex): # <<<<<<<<<<<<<< * if isinstance(ex, Exception): * self.call_exception_handler({'exception': ex}) */ static void __pyx_f_6uvloop_4loop_4Loop__handle_exception(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_ex) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_handle_exception", 0); /* "uvloop/loop.pyx":514 * * cdef void _handle_exception(self, object ex): * if isinstance(ex, Exception): # <<<<<<<<<<<<<< * self.call_exception_handler({'exception': ex}) * else: */ __pyx_t_1 = __Pyx_PyException_Check(__pyx_v_ex); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":515 * cdef void _handle_exception(self, object ex): * if isinstance(ex, Exception): * self.call_exception_handler({'exception': ex}) # <<<<<<<<<<<<<< * else: * # BaseException */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(1, 515, __pyx_L1_error) __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":514 * * cdef void _handle_exception(self, object ex): * if isinstance(ex, Exception): # <<<<<<<<<<<<<< * self.call_exception_handler({'exception': ex}) * else: */ goto __pyx_L3; } /* "uvloop/loop.pyx":518 * else: * # BaseException * self._last_error = ex # <<<<<<<<<<<<<< * # Exit ASAP * self._stop(None) */ /*else*/ { __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); __Pyx_GOTREF(__pyx_v_self->_last_error); __Pyx_DECREF(__pyx_v_self->_last_error); __pyx_v_self->_last_error = __pyx_v_ex; /* "uvloop/loop.pyx":520 * self._last_error = ex * # Exit ASAP * self._stop(None) # <<<<<<<<<<<<<< * * cdef inline _check_signal(self, sig): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/loop.pyx":513 * return TimerHandle(self, callback, args, delay) * * cdef void _handle_exception(self, object ex): # <<<<<<<<<<<<<< * if isinstance(ex, Exception): * self.call_exception_handler({'exception': ex}) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("uvloop.loop.Loop._handle_exception", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/loop.pyx":522 * self._stop(None) * * cdef inline _check_signal(self, sig): # <<<<<<<<<<<<<< * if not isinstance(sig, int): * raise TypeError('sig must be an int, not {!r}'.format(sig)) */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_signal(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_check_signal", 0); /* "uvloop/loop.pyx":523 * * cdef inline _check_signal(self, sig): * if not isinstance(sig, int): # <<<<<<<<<<<<<< * raise TypeError('sig must be an int, not {!r}'.format(sig)) * */ __pyx_t_1 = PyInt_Check(__pyx_v_sig); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":524 * cdef inline _check_signal(self, sig): * if not isinstance(sig, int): * raise TypeError('sig must be an int, not {!r}'.format(sig)) # <<<<<<<<<<<<<< * * if not (1 <= sig < signal_NSIG): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_must_be_an_int_not_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_sig); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_sig}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_sig}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_sig); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 524, __pyx_L1_error) /* "uvloop/loop.pyx":523 * * cdef inline _check_signal(self, sig): * if not isinstance(sig, int): # <<<<<<<<<<<<<< * raise TypeError('sig must be an int, not {!r}'.format(sig)) * */ } /* "uvloop/loop.pyx":526 * raise TypeError('sig must be an int, not {!r}'.format(sig)) * * if not (1 <= sig < signal_NSIG): # <<<<<<<<<<<<<< * raise ValueError( * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) */ __pyx_t_3 = PyObject_RichCompare(__pyx_int_1, __pyx_v_sig, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 526, __pyx_L1_error) if (__Pyx_PyObject_IsTrue(__pyx_t_3)) { __Pyx_DECREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_signal_NSIG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":528 * if not (1 <= sig < signal_NSIG): * raise ValueError( * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) # <<<<<<<<<<<<<< * * cdef inline _check_closed(self): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_out_of_range_1, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_signal_NSIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_sig, __pyx_t_6}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_sig, __pyx_t_6}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_sig); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":527 * * if not (1 <= sig < signal_NSIG): * raise ValueError( # <<<<<<<<<<<<<< * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 527, __pyx_L1_error) /* "uvloop/loop.pyx":526 * raise TypeError('sig must be an int, not {!r}'.format(sig)) * * if not (1 <= sig < signal_NSIG): # <<<<<<<<<<<<<< * raise ValueError( * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) */ } /* "uvloop/loop.pyx":522 * self._stop(None) * * cdef inline _check_signal(self, sig): # <<<<<<<<<<<<<< * if not isinstance(sig, int): * raise TypeError('sig must be an int, not {!r}'.format(sig)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._check_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":530 * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) * * cdef inline _check_closed(self): # <<<<<<<<<<<<<< * if self._closed == 1: * raise RuntimeError('Event loop is closed') */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_closed", 0); /* "uvloop/loop.pyx":531 * * cdef inline _check_closed(self): * if self._closed == 1: # <<<<<<<<<<<<<< * raise RuntimeError('Event loop is closed') * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":532 * cdef inline _check_closed(self): * if self._closed == 1: * raise RuntimeError('Event loop is closed') # <<<<<<<<<<<<<< * * cdef inline _check_thread(self): */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 532, __pyx_L1_error) /* "uvloop/loop.pyx":531 * * cdef inline _check_closed(self): * if self._closed == 1: # <<<<<<<<<<<<<< * raise RuntimeError('Event loop is closed') * */ } /* "uvloop/loop.pyx":530 * 'sig {} out of range(1, {})'.format(sig, signal_NSIG)) * * cdef inline _check_closed(self): # <<<<<<<<<<<<<< * if self._closed == 1: * raise RuntimeError('Event loop is closed') */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._check_closed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":534 * raise RuntimeError('Event loop is closed') * * cdef inline _check_thread(self): # <<<<<<<<<<<<<< * if self._thread_id == 0: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__check_thread(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { long __pyx_v_thread_id; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_thread", 0); /* "uvloop/loop.pyx":535 * * cdef inline _check_thread(self): * if self._thread_id == 0: # <<<<<<<<<<<<<< * return * cdef long thread_id = PyThread_get_thread_ident() */ __pyx_t_1 = ((__pyx_v_self->_thread_id == 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":536 * cdef inline _check_thread(self): * if self._thread_id == 0: * return # <<<<<<<<<<<<<< * cdef long thread_id = PyThread_get_thread_ident() * if thread_id != self._thread_id: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":535 * * cdef inline _check_thread(self): * if self._thread_id == 0: # <<<<<<<<<<<<<< * return * cdef long thread_id = PyThread_get_thread_ident() */ } /* "uvloop/loop.pyx":537 * if self._thread_id == 0: * return * cdef long thread_id = PyThread_get_thread_ident() # <<<<<<<<<<<<<< * if thread_id != self._thread_id: * raise RuntimeError( */ __pyx_v_thread_id = PyThread_get_thread_ident(); /* "uvloop/loop.pyx":538 * return * cdef long thread_id = PyThread_get_thread_ident() * if thread_id != self._thread_id: # <<<<<<<<<<<<<< * raise RuntimeError( * "Non-thread-safe operation invoked on an event loop other " */ __pyx_t_1 = ((__pyx_v_thread_id != __pyx_v_self->_thread_id) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":539 * cdef long thread_id = PyThread_get_thread_ident() * if thread_id != self._thread_id: * raise RuntimeError( # <<<<<<<<<<<<<< * "Non-thread-safe operation invoked on an event loop other " * "than the current one") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 539, __pyx_L1_error) /* "uvloop/loop.pyx":538 * return * cdef long thread_id = PyThread_get_thread_ident() * if thread_id != self._thread_id: # <<<<<<<<<<<<<< * raise RuntimeError( * "Non-thread-safe operation invoked on an event loop other " */ } /* "uvloop/loop.pyx":534 * raise RuntimeError('Event loop is closed') * * cdef inline _check_thread(self): # <<<<<<<<<<<<<< * if self._thread_id == 0: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._check_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":543 * "than the current one") * * cdef inline _new_future(self): # <<<<<<<<<<<<<< * return future_factory(loop=self) * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_4Loop__new_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_new_future", 0); /* "uvloop/loop.pyx":544 * * cdef inline _new_future(self): * return future_factory(loop=self) # <<<<<<<<<<<<<< * * cdef _track_transport(self, UVBaseTransport transport): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loop, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(1, 544, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_future_factory, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":543 * "than the current one") * * cdef inline _new_future(self): # <<<<<<<<<<<<<< * return future_factory(loop=self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._new_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":546 * return future_factory(loop=self) * * cdef _track_transport(self, UVBaseTransport transport): # <<<<<<<<<<<<<< * self._transports[transport._fileno()] = transport * */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__track_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_transport) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_track_transport", 0); /* "uvloop/loop.pyx":547 * * cdef _track_transport(self, UVBaseTransport transport): * self._transports[transport._fileno()] = transport # <<<<<<<<<<<<<< * * cdef _ensure_fd_no_transport(self, fd): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_transport)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_v_self->_transports, __pyx_t_1, ((PyObject *)__pyx_v_transport)) < 0)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":546 * return future_factory(loop=self) * * cdef _track_transport(self, UVBaseTransport transport): # <<<<<<<<<<<<<< * self._transports[transport._fileno()] = transport * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._track_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":549 * self._transports[transport._fileno()] = transport * * cdef _ensure_fd_no_transport(self, fd): # <<<<<<<<<<<<<< * cdef UVBaseTransport tr * try: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) { struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_tr = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_ensure_fd_no_transport", 0); /* "uvloop/loop.pyx":551 * cdef _ensure_fd_no_transport(self, fd): * cdef UVBaseTransport tr * try: # <<<<<<<<<<<<<< * tr = (self._transports[fd]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/loop.pyx":552 * cdef UVBaseTransport tr * try: * tr = (self._transports[fd]) # <<<<<<<<<<<<<< * except KeyError: * pass */ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->_transports, __pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 552, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":551 * cdef _ensure_fd_no_transport(self, fd): * cdef UVBaseTransport tr * try: # <<<<<<<<<<<<<< * tr = (self._transports[fd]) * except KeyError: */ } /* "uvloop/loop.pyx":556 * pass * else: * if tr._is_alive(): # <<<<<<<<<<<<<< * raise RuntimeError( * 'File descriptor {!r} is used by transport {!r}'.format( */ /*else:*/ { __pyx_t_6 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_tr->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_tr)) != 0); if (__pyx_t_6) { /* "uvloop/loop.pyx":558 * if tr._is_alive(): * raise RuntimeError( * 'File descriptor {!r} is used by transport {!r}'.format( # <<<<<<<<<<<<<< * fd, tr)) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_File_descriptor_r_is_used_by_tra, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 558, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":559 * raise RuntimeError( * 'File descriptor {!r} is used by transport {!r}'.format( * fd, tr)) # <<<<<<<<<<<<<< * * cdef inline _add_reader(self, fd, Handle handle): */ __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_fd, ((PyObject *)__pyx_v_tr)}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_fd, ((PyObject *)__pyx_v_tr)}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 558, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_fd); __Pyx_INCREF(((PyObject *)__pyx_v_tr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_tr)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_v_tr)); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 558, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":557 * else: * if tr._is_alive(): * raise RuntimeError( # <<<<<<<<<<<<<< * 'File descriptor {!r} is used by transport {!r}'.format( * fd, tr)) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 557, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 557, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 557, __pyx_L5_except_error) /* "uvloop/loop.pyx":556 * pass * else: * if tr._is_alive(): # <<<<<<<<<<<<<< * raise RuntimeError( * 'File descriptor {!r} is used by transport {!r}'.format( */ } } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":553 * try: * tr = (self._transports[fd]) * except KeyError: # <<<<<<<<<<<<<< * pass * else: */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/loop.pyx":551 * cdef _ensure_fd_no_transport(self, fd): * cdef UVBaseTransport tr * try: # <<<<<<<<<<<<<< * tr = (self._transports[fd]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/loop.pyx":549 * self._transports[transport._fileno()] = transport * * cdef _ensure_fd_no_transport(self, fd): # <<<<<<<<<<<<<< * cdef UVBaseTransport tr * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.Loop._ensure_fd_no_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_tr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":561 * fd, tr)) * * cdef inline _add_reader(self, fd, Handle handle): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_add_reader", 0); /* "uvloop/loop.pyx":565 * UVPoll poll * * self._check_closed() # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":567 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":568 * * try: * poll = (self._polls[fd]) # <<<<<<<<<<<<<< * except KeyError: * poll = UVPoll.new(self, fd) */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 568, __pyx_L3_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 568, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":567 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":569 * try: * poll = (self._polls[fd]) * except KeyError: # <<<<<<<<<<<<<< * poll = UVPoll.new(self, fd) * self._polls[fd] = poll */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.Loop._add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(1, 569, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":570 * poll = (self._polls[fd]) * except KeyError: * poll = UVPoll.new(self, fd) # <<<<<<<<<<<<<< * self._polls[fd] = poll * */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 570, __pyx_L5_except_error) __pyx_t_8 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVPoll_new(__pyx_v_self, __pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 570, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_poll, ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/loop.pyx":571 * except KeyError: * poll = UVPoll.new(self, fd) * self._polls[fd] = poll # <<<<<<<<<<<<<< * * poll.start_reading(handle) */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 571, __pyx_L5_except_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_polls, __pyx_v_fd, ((PyObject *)__pyx_v_poll)) < 0)) __PYX_ERR(1, 571, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/loop.pyx":567 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "uvloop/loop.pyx":573 * self._polls[fd] = poll * * poll.start_reading(handle) # <<<<<<<<<<<<<< * * cdef inline _remove_reader(self, fd): */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->start_reading(__pyx_v_poll, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":561 * fd, tr)) * * cdef inline _add_reader(self, fd, Handle handle): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_poll); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":575 * poll.start_reading(handle) * * cdef inline _remove_reader(self, fd): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_remove_reader", 0); /* "uvloop/loop.pyx":579 * UVPoll poll * * if self._closed == 1: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":580 * * if self._closed == 1: * return False # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/loop.pyx":579 * UVPoll poll * * if self._closed == 1: # <<<<<<<<<<<<<< * return False * */ } /* "uvloop/loop.pyx":582 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":583 * * try: * poll = (self._polls[fd]) # <<<<<<<<<<<<<< * except KeyError: * return False */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 583, __pyx_L4_error) } __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 583, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":582 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":584 * try: * poll = (self._polls[fd]) * except KeyError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.Loop._remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 584, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":585 * poll = (self._polls[fd]) * except KeyError: * return False # <<<<<<<<<<<<<< * * result = poll.stop_reading() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":582 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":587 * return False * * result = poll.stop_reading() # <<<<<<<<<<<<<< * if not poll.is_active(): * del self._polls[fd] */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->stop_reading(__pyx_v_poll); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_result = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/loop.pyx":588 * * result = poll.stop_reading() * if not poll.is_active(): # <<<<<<<<<<<<<< * del self._polls[fd] * poll._close() */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_active(__pyx_v_poll) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":589 * result = poll.stop_reading() * if not poll.is_active(): * del self._polls[fd] # <<<<<<<<<<<<<< * poll._close() * return result */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 589, __pyx_L1_error) } if (unlikely(PyDict_DelItem(__pyx_v_self->_polls, __pyx_v_fd) < 0)) __PYX_ERR(1, 589, __pyx_L1_error) /* "uvloop/loop.pyx":590 * if not poll.is_active(): * del self._polls[fd] * poll._close() # <<<<<<<<<<<<<< * return result * */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":588 * * result = poll.stop_reading() * if not poll.is_active(): # <<<<<<<<<<<<<< * del self._polls[fd] * poll._close() */ } /* "uvloop/loop.pyx":591 * del self._polls[fd] * poll._close() * return result # <<<<<<<<<<<<<< * * cdef inline _add_writer(self, fd, Handle handle): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "uvloop/loop.pyx":575 * poll.start_reading(handle) * * cdef inline _remove_reader(self, fd): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_poll); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":593 * return result * * cdef inline _add_writer(self, fd, Handle handle): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_add_writer", 0); /* "uvloop/loop.pyx":597 * UVPoll poll * * self._check_closed() # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":599 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":600 * * try: * poll = (self._polls[fd]) # <<<<<<<<<<<<<< * except KeyError: * poll = UVPoll.new(self, fd) */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 600, __pyx_L3_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 600, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":599 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":601 * try: * poll = (self._polls[fd]) * except KeyError: # <<<<<<<<<<<<<< * poll = UVPoll.new(self, fd) * self._polls[fd] = poll */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.Loop._add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(1, 601, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":602 * poll = (self._polls[fd]) * except KeyError: * poll = UVPoll.new(self, fd) # <<<<<<<<<<<<<< * self._polls[fd] = poll * */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 602, __pyx_L5_except_error) __pyx_t_8 = ((PyObject *)__pyx_f_6uvloop_4loop_6UVPoll_new(__pyx_v_self, __pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 602, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_poll, ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/loop.pyx":603 * except KeyError: * poll = UVPoll.new(self, fd) * self._polls[fd] = poll # <<<<<<<<<<<<<< * * poll.start_writing(handle) */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 603, __pyx_L5_except_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_polls, __pyx_v_fd, ((PyObject *)__pyx_v_poll)) < 0)) __PYX_ERR(1, 603, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/loop.pyx":599 * self._check_closed() * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "uvloop/loop.pyx":605 * self._polls[fd] = poll * * poll.start_writing(handle) # <<<<<<<<<<<<<< * * cdef inline _remove_writer(self, fd): */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->start_writing(__pyx_v_poll, __pyx_v_handle); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":593 * return result * * cdef inline _add_writer(self, fd, Handle handle): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_poll); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":607 * poll.start_writing(handle) * * cdef inline _remove_writer(self, fd): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_remove_writer", 0); /* "uvloop/loop.pyx":611 * UVPoll poll * * if self._closed == 1: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":612 * * if self._closed == 1: * return False # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/loop.pyx":611 * UVPoll poll * * if self._closed == 1: # <<<<<<<<<<<<<< * return False * */ } /* "uvloop/loop.pyx":614 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":615 * * try: * poll = (self._polls[fd]) # <<<<<<<<<<<<<< * except KeyError: * return False */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 615, __pyx_L4_error) } __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->_polls, __pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 615, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":614 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":616 * try: * poll = (self._polls[fd]) * except KeyError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.Loop._remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(1, 616, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":617 * poll = (self._polls[fd]) * except KeyError: * return False # <<<<<<<<<<<<<< * * result = poll.stop_writing() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":614 * return False * * try: # <<<<<<<<<<<<<< * poll = (self._polls[fd]) * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":619 * return False * * result = poll.stop_writing() # <<<<<<<<<<<<<< * if not poll.is_active(): * del self._polls[fd] */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->stop_writing(__pyx_v_poll); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_result = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/loop.pyx":620 * * result = poll.stop_writing() * if not poll.is_active(): # <<<<<<<<<<<<<< * del self._polls[fd] * poll._close() */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->is_active(__pyx_v_poll) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":621 * result = poll.stop_writing() * if not poll.is_active(): * del self._polls[fd] # <<<<<<<<<<<<<< * poll._close() * return result */ if (unlikely(__pyx_v_self->_polls == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 621, __pyx_L1_error) } if (unlikely(PyDict_DelItem(__pyx_v_self->_polls, __pyx_v_fd) < 0)) __PYX_ERR(1, 621, __pyx_L1_error) /* "uvloop/loop.pyx":622 * if not poll.is_active(): * del self._polls[fd] * poll._close() # <<<<<<<<<<<<<< * return result * */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":620 * * result = poll.stop_writing() * if not poll.is_active(): # <<<<<<<<<<<<<< * del self._polls[fd] * poll._close() */ } /* "uvloop/loop.pyx":623 * del self._polls[fd] * poll._close() * return result # <<<<<<<<<<<<<< * * cdef _getaddrinfo(self, object host, object port, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "uvloop/loop.pyx":607 * poll.start_writing(handle) * * cdef inline _remove_writer(self, fd): # <<<<<<<<<<<<<< * cdef: * UVPoll poll */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_poll); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":645 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if AddrInfo.isinstance(result): * try: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_12_getaddrinfo_1callback = {"callback", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getaddrinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("callback (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(__pyx_self, ((PyObject *)__pyx_v_result)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getaddrinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_outer_scope; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("callback", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "uvloop/loop.pyx":646 * * def callback(result): * if AddrInfo.isinstance(result): # <<<<<<<<<<<<<< * try: * if unpack == 0: */ __pyx_t_1 = (__pyx_f_6uvloop_4loop_8AddrInfo_isinstance(__pyx_v_result) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":647 * def callback(result): * if AddrInfo.isinstance(result): * try: # <<<<<<<<<<<<<< * if unpack == 0: * data = result */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":648 * if AddrInfo.isinstance(result): * try: * if unpack == 0: # <<<<<<<<<<<<<< * data = result * else: */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_unpack == 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":649 * try: * if unpack == 0: * data = result # <<<<<<<<<<<<<< * else: * data = (result).unpack() */ __Pyx_INCREF(__pyx_v_result); __pyx_v_data = __pyx_v_result; /* "uvloop/loop.pyx":648 * if AddrInfo.isinstance(result): * try: * if unpack == 0: # <<<<<<<<<<<<<< * data = result * else: */ goto __pyx_L12; } /* "uvloop/loop.pyx":651 * data = result * else: * data = (result).unpack() # <<<<<<<<<<<<<< * except Exception as ex: * if not fut.cancelled(): */ /*else*/ { __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *)((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_result)->__pyx_vtab)->unpack(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_result)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 651, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_data = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L12:; /* "uvloop/loop.pyx":647 * def callback(result): * if AddrInfo.isinstance(result): * try: # <<<<<<<<<<<<<< * if unpack == 0: * data = result */ } /* "uvloop/loop.pyx":656 * fut.set_exception(ex) * else: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_result(data) * else: */ /*else:*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 656, __pyx_L6_except_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 656, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 656, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 656, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 656, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = ((!__pyx_t_1) != 0); if (__pyx_t_8) { /* "uvloop/loop.pyx":657 * else: * if not fut.cancelled(): * fut.set_result(data) # <<<<<<<<<<<<<< * else: * if not fut.cancelled(): */ if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 657, __pyx_L6_except_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_data}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_data}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_data); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 657, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":656 * fut.set_exception(ex) * else: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_result(data) * else: */ } } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":652 * else: * data = (result).unpack() * except Exception as ex: # <<<<<<<<<<<<<< * if not fut.cancelled(): * fut.set_exception(ex) */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(1, 652, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_v_ex = __pyx_t_6; /*try:*/ { /* "uvloop/loop.pyx":653 * data = (result).unpack() * except Exception as ex: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_exception(ex) * else: */ if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 653, __pyx_L19_error) } __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 653, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (__pyx_t_12) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 653, __pyx_L19_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 653, __pyx_L19_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 653, __pyx_L19_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = ((!__pyx_t_8) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":654 * except Exception as ex: * if not fut.cancelled(): * fut.set_exception(ex) # <<<<<<<<<<<<<< * else: * if not fut.cancelled(): */ if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 654, __pyx_L19_error) } __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_12) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_ex); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_ex}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_ex}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_ex); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 654, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":653 * data = (result).unpack() * except Exception as ex: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_exception(ex) * else: */ } } /* "uvloop/loop.pyx":652 * else: * data = (result).unpack() * except Exception as ex: # <<<<<<<<<<<<<< * if not fut.cancelled(): * fut.set_exception(ex) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_10 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L6_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":647 * def callback(result): * if AddrInfo.isinstance(result): * try: # <<<<<<<<<<<<<< * if unpack == 0: * data = result */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L11_try_end:; } /* "uvloop/loop.pyx":646 * * def callback(result): * if AddrInfo.isinstance(result): # <<<<<<<<<<<<<< * try: * if unpack == 0: */ goto __pyx_L3; } /* "uvloop/loop.pyx":659 * fut.set_result(data) * else: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_exception(result) * */ /*else*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 659, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_5) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 659, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = ((!__pyx_t_1) != 0); if (__pyx_t_8) { /* "uvloop/loop.pyx":660 * else: * if not fut.cancelled(): * fut.set_exception(result) # <<<<<<<<<<<<<< * * AddrInfoRequest(self, host, port, family, type, proto, flags, callback) */ if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 660, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_5) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_result}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_result}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_result); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":659 * fut.set_result(data) * else: * if not fut.cancelled(): # <<<<<<<<<<<<<< * fut.set_exception(result) * */ } } __pyx_L3:; /* "uvloop/loop.pyx":645 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if AddrInfo.isinstance(result): * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":625 * return result * * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, int flags, */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, int __pyx_v_unpack) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_cur_scope; PyObject *__pyx_v_callback = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_getaddrinfo", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 625, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_unpack = __pyx_v_unpack; __Pyx_INCREF(__pyx_v_host); __Pyx_INCREF(__pyx_v_port); /* "uvloop/loop.pyx":630 * int unpack): * * if isinstance(port, str): # <<<<<<<<<<<<<< * port = port.encode() * elif isinstance(port, int): */ __pyx_t_1 = PyUnicode_Check(__pyx_v_port); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":631 * * if isinstance(port, str): * port = port.encode() # <<<<<<<<<<<<<< * elif isinstance(port, int): * port = str(port).encode() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_port, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 631, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":630 * int unpack): * * if isinstance(port, str): # <<<<<<<<<<<<<< * port = port.encode() * elif isinstance(port, int): */ goto __pyx_L3; } /* "uvloop/loop.pyx":632 * if isinstance(port, str): * port = port.encode() * elif isinstance(port, int): # <<<<<<<<<<<<<< * port = str(port).encode() * if port is not None and not isinstance(port, bytes): */ __pyx_t_2 = PyInt_Check(__pyx_v_port); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":633 * port = port.encode() * elif isinstance(port, int): * port = str(port).encode() # <<<<<<<<<<<<<< * if port is not None and not isinstance(port, bytes): * raise TypeError('port must be a str, bytes or int') */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_port); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_4), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":632 * if isinstance(port, str): * port = port.encode() * elif isinstance(port, int): # <<<<<<<<<<<<<< * port = str(port).encode() * if port is not None and not isinstance(port, bytes): */ } __pyx_L3:; /* "uvloop/loop.pyx":634 * elif isinstance(port, int): * port = str(port).encode() * if port is not None and not isinstance(port, bytes): # <<<<<<<<<<<<<< * raise TypeError('port must be a str, bytes or int') * */ __pyx_t_2 = (__pyx_v_port != Py_None); __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } __pyx_t_6 = PyBytes_Check(__pyx_v_port); __pyx_t_2 = ((!(__pyx_t_6 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":635 * port = str(port).encode() * if port is not None and not isinstance(port, bytes): * raise TypeError('port must be a str, bytes or int') # <<<<<<<<<<<<<< * * if isinstance(host, str): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 635, __pyx_L1_error) /* "uvloop/loop.pyx":634 * elif isinstance(port, int): * port = str(port).encode() * if port is not None and not isinstance(port, bytes): # <<<<<<<<<<<<<< * raise TypeError('port must be a str, bytes or int') * */ } /* "uvloop/loop.pyx":637 * raise TypeError('port must be a str, bytes or int') * * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * if host is not None: */ __pyx_t_1 = PyUnicode_Check(__pyx_v_host); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":638 * * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * if host is not None: * if not isinstance(host, bytes): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":637 * raise TypeError('port must be a str, bytes or int') * * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * if host is not None: */ } /* "uvloop/loop.pyx":639 * if isinstance(host, str): * host = host.encode('idna') * if host is not None: # <<<<<<<<<<<<<< * if not isinstance(host, bytes): * raise TypeError('host must be a str or bytes') */ __pyx_t_2 = (__pyx_v_host != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":640 * host = host.encode('idna') * if host is not None: * if not isinstance(host, bytes): # <<<<<<<<<<<<<< * raise TypeError('host must be a str or bytes') * */ __pyx_t_1 = PyBytes_Check(__pyx_v_host); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":641 * if host is not None: * if not isinstance(host, bytes): * raise TypeError('host must be a str or bytes') # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 641, __pyx_L1_error) /* "uvloop/loop.pyx":640 * host = host.encode('idna') * if host is not None: * if not isinstance(host, bytes): # <<<<<<<<<<<<<< * raise TypeError('host must be a str or bytes') * */ } /* "uvloop/loop.pyx":639 * if isinstance(host, str): * host = host.encode('idna') * if host is not None: # <<<<<<<<<<<<<< * if not isinstance(host, bytes): * raise TypeError('host must be a str or bytes') */ } /* "uvloop/loop.pyx":643 * raise TypeError('host must be a str or bytes') * * fut = self._new_future() # <<<<<<<<<<<<<< * * def callback(result): */ __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_fut = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":645 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if AddrInfo.isinstance(result): * try: */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_12_getaddrinfo_1callback, 0, __pyx_n_s_Loop__getaddrinfo_locals_callbac, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_callback = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":662 * fut.set_exception(result) * * AddrInfoRequest(self, host, port, family, type, proto, flags, callback) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_host); __Pyx_GIVEREF(__pyx_v_host); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_host); __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_port); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_8, 7, __pyx_v_callback); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfoRequest), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":663 * * AddrInfoRequest(self, host, port, family, type, proto, flags, callback) * return fut # <<<<<<<<<<<<<< * * cdef _getnameinfo(self, system.sockaddr *addr, int flags): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fut); __pyx_r = __pyx_cur_scope->__pyx_v_fut; goto __pyx_L0; /* "uvloop/loop.pyx":625 * return result * * cdef _getaddrinfo(self, object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, int flags, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_port); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":669 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if isinstance(result, tuple): * fut.set_result(result) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_12_getnameinfo_1callback = {"callback", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_12_getnameinfo_1callback(PyObject *__pyx_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("callback (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(__pyx_self, ((PyObject *)__pyx_v_result)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12_getnameinfo_callback(PyObject *__pyx_self, PyObject *__pyx_v_result) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("callback", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "uvloop/loop.pyx":670 * * def callback(result): * if isinstance(result, tuple): # <<<<<<<<<<<<<< * fut.set_result(result) * else: */ __pyx_t_1 = PyTuple_Check(__pyx_v_result); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":671 * def callback(result): * if isinstance(result, tuple): * fut.set_result(result) # <<<<<<<<<<<<<< * else: * fut.set_exception(result) */ if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 671, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_result}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_result}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_result); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":670 * * def callback(result): * if isinstance(result, tuple): # <<<<<<<<<<<<<< * fut.set_result(result) * else: */ goto __pyx_L3; } /* "uvloop/loop.pyx":673 * fut.set_result(result) * else: * fut.set_exception(result) # <<<<<<<<<<<<<< * * nr = NameInfoRequest(self, callback) */ /*else*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_fut)) { __Pyx_RaiseClosureNameError("fut"); __PYX_ERR(1, 673, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_result); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/loop.pyx":669 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if isinstance(result, tuple): * fut.set_result(result) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.Loop._getnameinfo.callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":665 * return fut * * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<< * cdef NameInfoRequest nr * fut = self._new_future() */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_nr = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_getnameinfo", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 665, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } /* "uvloop/loop.pyx":667 * cdef _getnameinfo(self, system.sockaddr *addr, int flags): * cdef NameInfoRequest nr * fut = self._new_future() # <<<<<<<<<<<<<< * * def callback(result): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_fut = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":669 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if isinstance(result, tuple): * fut.set_result(result) */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_12_getnameinfo_1callback, 0, __pyx_n_s_Loop__getnameinfo_locals_callbac, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_callback = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":675 * fut.set_exception(result) * * nr = NameInfoRequest(self, callback) # <<<<<<<<<<<<<< * nr.query(addr, flags) * return fut */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_callback); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_NameInfoRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nr = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":676 * * nr = NameInfoRequest(self, callback) * nr.query(addr, flags) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_nr->__pyx_base.__pyx_vtab)->query(__pyx_v_nr, __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":677 * nr = NameInfoRequest(self, callback) * nr.query(addr, flags) * return fut # <<<<<<<<<<<<<< * * cdef _sock_recv(self, fut, sock, n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fut); __pyx_r = __pyx_cur_scope->__pyx_v_fut; goto __pyx_L0; /* "uvloop/loop.pyx":665 * return fut * * cdef _getnameinfo(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<< * cdef NameInfoRequest nr * fut = self._new_future() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_nr); __Pyx_XDECREF(__pyx_v_callback); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":679 * return fut * * cdef _sock_recv(self, fut, sock, n): # <<<<<<<<<<<<<< * cdef: * Handle handle */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_n) { int __pyx_v_fd; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; __Pyx_RefNannySetupContext("_sock_recv", 0); /* "uvloop/loop.pyx":684 * int fd * * fd = sock.fileno() # <<<<<<<<<<<<<< * if fut.cancelled(): * self._remove_reader(fd) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fd = __pyx_t_4; /* "uvloop/loop.pyx":685 * * fd = sock.fileno() * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_reader(fd) * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 685, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "uvloop/loop.pyx":686 * fd = sock.fileno() * if fut.cancelled(): * self._remove_reader(fd) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":687 * if fut.cancelled(): * self._remove_reader(fd) * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":685 * * fd = sock.fileno() * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_reader(fd) * return */ } /* "uvloop/loop.pyx":689 * return * * try: # <<<<<<<<<<<<<< * data = sock.recv(n) * except (BlockingIOError, InterruptedError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":690 * * try: * data = sock.recv(n) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # No need to re-add the reader, let's just wait until */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_recv); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_n}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_n}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_n); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 690, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_data = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":689 * return * * try: # <<<<<<<<<<<<<< * data = sock.recv(n) * except (BlockingIOError, InterruptedError): */ } /* "uvloop/loop.pyx":699 * self._remove_reader(fd) * else: * fut.set_result(data) # <<<<<<<<<<<<<< * self._remove_reader(fd) * */ /*else:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_9) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_data}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_data}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_data); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 699, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":700 * else: * fut.set_result(data) * self._remove_reader(fd) # <<<<<<<<<<<<<< * * cdef _sock_sendall(self, fut, sock, data): */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 700, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 700, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":691 * try: * data = sock.recv(n) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * # No need to re-add the reader, let's just wait until * # the poll handler calls this callback again. */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_4) { __Pyx_ErrRestore(0,0,0); goto __pyx_L5_exception_handled; } /* "uvloop/loop.pyx":695 * # the poll handler calls this callback again. * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_reader(fd) */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 695, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; /*try:*/ { /* "uvloop/loop.pyx":696 * pass * except Exception as exc: * fut.set_exception(exc) # <<<<<<<<<<<<<< * self._remove_reader(fd) * else: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_11) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_exc); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_exc); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 696, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":697 * except Exception as exc: * fut.set_exception(exc) * self._remove_reader(fd) # <<<<<<<<<<<<<< * else: * fut.set_result(data) */ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 697, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 697, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/loop.pyx":695 * # the poll handler calls this callback again. * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_reader(fd) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_4 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":689 * return * * try: # <<<<<<<<<<<<<< * data = sock.recv(n) * except (BlockingIOError, InterruptedError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L11_try_end:; } /* "uvloop/loop.pyx":679 * return fut * * cdef _sock_recv(self, fut, sock, n): # <<<<<<<<<<<<<< * cdef: * Handle handle */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.Loop._sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":702 * self._remove_reader(fd) * * cdef _sock_sendall(self, fut, sock, data): # <<<<<<<<<<<<<< * cdef: * Handle handle */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_data) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; int __pyx_v_n; int __pyx_v_fd; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; Py_ssize_t __pyx_t_21; int __pyx_t_22; __Pyx_RefNannySetupContext("_sock_sendall", 0); __Pyx_INCREF(__pyx_v_data); /* "uvloop/loop.pyx":708 * int fd * * fd = sock.fileno() # <<<<<<<<<<<<<< * * if fut.cancelled(): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 708, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fd = __pyx_t_4; /* "uvloop/loop.pyx":710 * fd = sock.fileno() * * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_writer(fd) * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 710, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "uvloop/loop.pyx":711 * * if fut.cancelled(): * self._remove_writer(fd) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__remove_writer(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":712 * if fut.cancelled(): * self._remove_writer(fd) * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":710 * fd = sock.fileno() * * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_writer(fd) * return */ } /* "uvloop/loop.pyx":714 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":715 * * try: * n = sock.send(data) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # Try next time. */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_send); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_3) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_data); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 715, __pyx_L4_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n = __pyx_t_4; /* "uvloop/loop.pyx":714 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":716 * try: * n = sock.send(data) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * # Try next time. * return */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_4) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(1, 716, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/loop.pyx":718 * except (BlockingIOError, InterruptedError): * # Try next time. * return # <<<<<<<<<<<<<< * except Exception as exc: * fut.set_exception(exc) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; } /* "uvloop/loop.pyx":719 * # Try next time. * return * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_writer(fd) */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(1, 719, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; /*try:*/ { /* "uvloop/loop.pyx":720 * return * except Exception as exc: * fut.set_exception(exc) # <<<<<<<<<<<<<< * self._remove_writer(fd) * return */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_11) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 720, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":721 * except Exception as exc: * fut.set_exception(exc) * self._remove_writer(fd) # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 721, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __pyx_f_6uvloop_4loop_4Loop__remove_writer(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 721, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/loop.pyx":722 * fut.set_exception(exc) * self._remove_writer(fd) * return # <<<<<<<<<<<<<< * * if n == len(data): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L18_return; } /* "uvloop/loop.pyx":719 * # Try next time. * return * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_writer(fd) */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_4 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L6_except_error; } __pyx_L18_return: { __pyx_t_20 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; __pyx_r = __pyx_t_20; __pyx_t_20 = 0; goto __pyx_L7_except_return; } } } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":714 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L0; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":724 * return * * if n == len(data): # <<<<<<<<<<<<<< * fut.set_result(None) * self._remove_writer(fd) */ __pyx_t_21 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(1, 724, __pyx_L1_error) __pyx_t_5 = ((__pyx_v_n == __pyx_t_21) != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":725 * * if n == len(data): * fut.set_result(None) # <<<<<<<<<<<<<< * self._remove_writer(fd) * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":726 * if n == len(data): * fut.set_result(None) * self._remove_writer(fd) # <<<<<<<<<<<<<< * else: * if n: */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__remove_writer(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":724 * return * * if n == len(data): # <<<<<<<<<<<<<< * fut.set_result(None) * self._remove_writer(fd) */ goto __pyx_L25; } /* "uvloop/loop.pyx":728 * self._remove_writer(fd) * else: * if n: # <<<<<<<<<<<<<< * if not isinstance(data, memoryview): * data = memoryview(data) */ /*else*/ { __pyx_t_5 = (__pyx_v_n != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":729 * else: * if n: * if not isinstance(data, memoryview): # <<<<<<<<<<<<<< * data = memoryview(data) * data = data[n:] */ __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_builtin_memoryview); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 729, __pyx_L1_error) __pyx_t_22 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_22) { /* "uvloop/loop.pyx":730 * if n: * if not isinstance(data, memoryview): * data = memoryview(data) # <<<<<<<<<<<<<< * data = data[n:] * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":729 * else: * if n: * if not isinstance(data, memoryview): # <<<<<<<<<<<<<< * data = memoryview(data) * data = data[n:] */ } /* "uvloop/loop.pyx":731 * if not isinstance(data, memoryview): * data = memoryview(data) * data = data[n:] # <<<<<<<<<<<<<< * * handle = new_MethodHandle3( */ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_data, __pyx_v_n, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":728 * self._remove_writer(fd) * else: * if n: # <<<<<<<<<<<<<< * if not isinstance(data, memoryview): * data = memoryview(data) */ } /* "uvloop/loop.pyx":733 * data = data[n:] * * handle = new_MethodHandle3( # <<<<<<<<<<<<<< * self, * "Loop._sock_sendall", */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_v_self, __pyx_kp_u_Loop__sock_sendall, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_sock_sendall), ((PyObject *)__pyx_v_self), __pyx_v_fut, __pyx_v_sock, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 733, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":740 * fut, sock, data) * * self._add_writer(fd, handle) # <<<<<<<<<<<<<< * * cdef _sock_accept(self, fut, sock): */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__add_writer(__pyx_v_self, __pyx_t_1, __pyx_v_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L25:; /* "uvloop/loop.pyx":702 * self._remove_reader(fd) * * cdef _sock_sendall(self, fut, sock, data): # <<<<<<<<<<<<<< * cdef: * Handle handle */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.Loop._sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":742 * self._add_writer(fd, handle) * * cdef _sock_accept(self, fut, sock): # <<<<<<<<<<<<<< * cdef: * Handle handle */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock) { PyObject *__pyx_v_fd = NULL; PyObject *__pyx_v_conn = NULL; PyObject *__pyx_v_address = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("_sock_accept", 0); /* "uvloop/loop.pyx":746 * Handle handle * * fd = sock.fileno() # <<<<<<<<<<<<<< * * if fut.cancelled(): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 746, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 746, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fd = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":748 * fd = sock.fileno() * * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_reader(fd) * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/loop.pyx":749 * * if fut.cancelled(): * self._remove_reader(fd) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":750 * if fut.cancelled(): * self._remove_reader(fd) * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":748 * fd = sock.fileno() * * if fut.cancelled(): # <<<<<<<<<<<<<< * self._remove_reader(fd) * return */ } /* "uvloop/loop.pyx":752 * return * * try: # <<<<<<<<<<<<<< * conn, address = sock.accept() * conn.setblocking(False) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/loop.pyx":753 * * try: * conn, address = sock.accept() # <<<<<<<<<<<<<< * conn.setblocking(False) * except (BlockingIOError, InterruptedError): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_accept); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 753, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 753, __pyx_L4_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 753, __pyx_L4_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 753, __pyx_L4_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 753, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 753, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 753, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(1, 753, __pyx_L4_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(1, 753, __pyx_L4_error) __pyx_L13_unpacking_done:; } __pyx_v_conn = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_address = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":754 * try: * conn, address = sock.accept() * conn.setblocking(False) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # There is an active reader for _sock_accept, so */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 754, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 754, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":752 * return * * try: # <<<<<<<<<<<<<< * conn, address = sock.accept() * conn.setblocking(False) */ } /* "uvloop/loop.pyx":763 * self._remove_reader(fd) * else: * fut.set_result((conn, address)) # <<<<<<<<<<<<<< * self._remove_reader(fd) * */ /*else:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_conn); __Pyx_GIVEREF(__pyx_v_conn); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_conn); __Pyx_INCREF(__pyx_v_address); __Pyx_GIVEREF(__pyx_v_address); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_address); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_8) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 763, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":764 * else: * fut.set_result((conn, address)) * self._remove_reader(fd) # <<<<<<<<<<<<<< * * cdef _sock_connect(self, fut, sock, address): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 764, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":755 * conn, address = sock.accept() * conn.setblocking(False) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * # There is an active reader for _sock_accept, so * # do nothing, it will be called again. */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_11) { __Pyx_ErrRestore(0,0,0); goto __pyx_L5_exception_handled; } /* "uvloop/loop.pyx":759 * # do nothing, it will be called again. * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_reader(fd) */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_10) < 0) __PYX_ERR(1, 759, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; /*try:*/ { /* "uvloop/loop.pyx":760 * pass * except Exception as exc: * fut.set_exception(exc) # <<<<<<<<<<<<<< * self._remove_reader(fd) * else: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_12) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_exc); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":761 * except Exception as exc: * fut.set_exception(exc) * self._remove_reader(fd) # <<<<<<<<<<<<<< * else: * fut.set_result((conn, address)) */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 761, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/loop.pyx":759 * # do nothing, it will be called again. * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * self._remove_reader(fd) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_11 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L6_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":752 * return * * try: # <<<<<<<<<<<<<< * conn, address = sock.accept() * conn.setblocking(False) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L11_try_end:; } /* "uvloop/loop.pyx":742 * self._add_writer(fd, handle) * * cdef _sock_accept(self, fut, sock): # <<<<<<<<<<<<<< * cdef: * Handle handle */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.Loop._sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fd); __Pyx_XDECREF(__pyx_v_conn); __Pyx_XDECREF(__pyx_v_address); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":778 * # becomes writable to be notified when the connection succeed or * # fails. * fut.add_done_callback(lambda fut: self._remove_writer(fd)) # <<<<<<<<<<<<<< * * handle = new_MethodHandle3( */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda(PyObject *__pyx_self, PyObject *__pyx_v_fut); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_13_sock_connect_lambda = {"lambda", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13_sock_connect_lambda(PyObject *__pyx_self, PyObject *__pyx_v_fut) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_fut)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("lambda", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 778, __pyx_L1_error) } if (unlikely(!__pyx_cur_scope->__pyx_v_fd)) { __Pyx_RaiseClosureNameError("fd"); __PYX_ERR(1, 778, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_fd; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__remove_writer(__pyx_cur_scope->__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":766 * self._remove_reader(fd) * * cdef _sock_connect(self, fut, sock, address): # <<<<<<<<<<<<<< * cdef: * Handle handle */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; __Pyx_RefNannySetupContext("_sock_connect", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 766, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); /* "uvloop/loop.pyx":770 * Handle handle * * fd = sock.fileno() # <<<<<<<<<<<<<< * try: * sock.connect(address) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 770, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_fd = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":771 * * fd = sock.fileno() * try: # <<<<<<<<<<<<<< * sock.connect(address) * except (BlockingIOError, InterruptedError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/loop.pyx":772 * fd = sock.fileno() * try: * sock.connect(address) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # Issue #23618: When the C function connect() fails with EINTR, the */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_connect); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_address}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_address}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_address); __Pyx_GIVEREF(__pyx_v_address); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_address); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":771 * * fd = sock.fileno() * try: # <<<<<<<<<<<<<< * sock.connect(address) * except (BlockingIOError, InterruptedError): */ } /* "uvloop/loop.pyx":791 * fut.set_exception(exc) * else: * fut.set_result(None) # <<<<<<<<<<<<<< * * cdef _sock_connect_cb(self, fut, sock, address): */ /*else:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 791, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 791, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":773 * try: * sock.connect(address) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * # Issue #23618: When the C function connect() fails with EINTR, the * # connection runs in background. We have to wait until the socket */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(1, 773, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":778 * # becomes writable to be notified when the connection succeed or * # fails. * fut.add_done_callback(lambda fut: self._remove_writer(fd)) # <<<<<<<<<<<<<< * * handle = new_MethodHandle3( */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_13_sock_connect_lambda, 0, __pyx_n_s_Loop__sock_connect_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (!__pyx_t_11) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 778, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":781 * * handle = new_MethodHandle3( * self, # <<<<<<<<<<<<<< * "Loop._sock_connect", * self._sock_connect_cb, */ __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_3); /* "uvloop/loop.pyx":784 * "Loop._sock_connect", * self._sock_connect_cb, * self, # <<<<<<<<<<<<<< * fut, sock, address) * */ __pyx_t_9 = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_9); /* "uvloop/loop.pyx":780 * fut.add_done_callback(lambda fut: self._remove_writer(fd)) * * handle = new_MethodHandle3( # <<<<<<<<<<<<<< * self, * "Loop._sock_connect", */ __pyx_t_12 = __pyx_f_6uvloop_4loop_new_MethodHandle3(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_3), __pyx_kp_u_Loop__sock_connect, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect_cb), __pyx_t_9, __pyx_v_fut, __pyx_v_sock, __pyx_v_address); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 780, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 780, __pyx_L5_except_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_12); __pyx_t_12 = 0; /* "uvloop/loop.pyx":787 * fut, sock, address) * * self._add_writer(fd, handle) # <<<<<<<<<<<<<< * except Exception as exc: * fut.set_exception(exc) */ __pyx_t_12 = __pyx_cur_scope->__pyx_v_fd; __Pyx_INCREF(__pyx_t_12); __pyx_t_9 = __pyx_f_6uvloop_4loop_4Loop__add_writer(__pyx_cur_scope->__pyx_v_self, __pyx_t_12, __pyx_v_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 787, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "uvloop/loop.pyx":788 * * self._add_writer(fd, handle) * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * else: */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(1, 788, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; /*try:*/ { /* "uvloop/loop.pyx":789 * self._add_writer(fd, handle) * except Exception as exc: * fut.set_exception(exc) # <<<<<<<<<<<<<< * else: * fut.set_result(None) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_3) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_exc); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_exc); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 789, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/loop.pyx":788 * * self._add_writer(fd, handle) * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * else: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L19; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L5_except_error; } __pyx_L19:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/loop.pyx":771 * * fd = sock.fileno() * try: # <<<<<<<<<<<<<< * sock.connect(address) * except (BlockingIOError, InterruptedError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L10_try_end:; } /* "uvloop/loop.pyx":766 * self._remove_reader(fd) * * cdef _sock_connect(self, fut, sock, address): # <<<<<<<<<<<<<< * cdef: * Handle handle */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XDECREF(__pyx_v_exc); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":793 * fut.set_result(None) * * cdef _sock_connect_cb(self, fut, sock, address): # <<<<<<<<<<<<<< * if fut.cancelled(): * return */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fut, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) { PyObject *__pyx_v_err = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; __Pyx_RefNannySetupContext("_sock_connect_cb", 0); /* "uvloop/loop.pyx":794 * * cdef _sock_connect_cb(self, fut, sock, address): * if fut.cancelled(): # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 794, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/loop.pyx":795 * cdef _sock_connect_cb(self, fut, sock, address): * if fut.cancelled(): * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":794 * * cdef _sock_connect_cb(self, fut, sock, address): * if fut.cancelled(): # <<<<<<<<<<<<<< * return * */ } /* "uvloop/loop.pyx":797 * return * * try: # <<<<<<<<<<<<<< * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) * if err != 0: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/loop.pyx":798 * * try: * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) # <<<<<<<<<<<<<< * if err != 0: * # Jump to any except clause below. */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_getsockopt); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(SOL_SOCKET); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_int(SO_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8); __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_err = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":799 * try: * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) * if err != 0: # <<<<<<<<<<<<<< * # Jump to any except clause below. * raise OSError(err, 'Connect call failed %s' % (address,)) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_err, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 799, __pyx_L4_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 799, __pyx_L4_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/loop.pyx":801 * if err != 0: * # Jump to any except clause below. * raise OSError(err, 'Connect call failed %s' % (address,)) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # socket is still registered, the callback will be retried later */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_address); __Pyx_GIVEREF(__pyx_v_address); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_address); __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_Connect_call_failed_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 801, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_err); __Pyx_GIVEREF(__pyx_v_err); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_err); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 801, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 801, __pyx_L4_error) /* "uvloop/loop.pyx":799 * try: * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) * if err != 0: # <<<<<<<<<<<<<< * # Jump to any except clause below. * raise OSError(err, 'Connect call failed %s' % (address,)) */ } /* "uvloop/loop.pyx":797 * return * * try: # <<<<<<<<<<<<<< * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) * if err != 0: */ } /* "uvloop/loop.pyx":808 * fut.set_exception(exc) * else: * fut.set_result(None) # <<<<<<<<<<<<<< * * cdef _sock_set_reuseport(self, int fd): */ /*else:*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 808, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 808, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":802 * # Jump to any except clause below. * raise OSError(err, 'Connect call failed %s' % (address,)) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * # socket is still registered, the callback will be retried later * pass */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); goto __pyx_L5_exception_handled; } /* "uvloop/loop.pyx":805 * # socket is still registered, the callback will be retried later * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * else: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_11) < 0) __PYX_ERR(1, 805, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; /*try:*/ { /* "uvloop/loop.pyx":806 * pass * except Exception as exc: * fut.set_exception(exc) # <<<<<<<<<<<<<< * else: * fut.set_result(None) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_9) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_exc); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_exc}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_exc}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_exc); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 806, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } /* "uvloop/loop.pyx":805 * # socket is still registered, the callback will be retried later * pass * except Exception as exc: # <<<<<<<<<<<<<< * fut.set_exception(exc) * else: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L19; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L6_except_error; } __pyx_L19:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":797 * return * * try: # <<<<<<<<<<<<<< * err = sock.getsockopt(uv.SOL_SOCKET, uv.SO_ERROR) * if err != 0: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L11_try_end:; } /* "uvloop/loop.pyx":793 * fut.set_result(None) * * cdef _sock_connect_cb(self, fut, sock, address): # <<<<<<<<<<<<<< * if fut.cancelled(): * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.Loop._sock_connect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_err); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":810 * fut.set_result(None) * * cdef _sock_set_reuseport(self, int fd): # <<<<<<<<<<<<<< * cdef: * int err */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_fd) { int __pyx_v_err; int __pyx_v_reuseport_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_sock_set_reuseport", 0); /* "uvloop/loop.pyx":813 * cdef: * int err * int reuseport_flag = 1 # <<<<<<<<<<<<<< * * err = system.setsockopt( */ __pyx_v_reuseport_flag = 1; /* "uvloop/loop.pyx":815 * int reuseport_flag = 1 * * err = system.setsockopt( # <<<<<<<<<<<<<< * fd, * uv.SOL_SOCKET, */ __pyx_v_err = setsockopt(__pyx_v_fd, SOL_SOCKET, __pyx_v_6uvloop_4loop_SO_REUSEPORT, ((char *)(&__pyx_v_reuseport_flag)), (sizeof(__pyx_v_reuseport_flag))); /* "uvloop/loop.pyx":822 * sizeof(reuseport_flag)) * * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(-errno.errno) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":823 * * if err < 0: * raise convert_error(-errno.errno) # <<<<<<<<<<<<<< * * cdef _set_coroutine_wrapper(self, bint enabled): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-errno)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 823, __pyx_L1_error) /* "uvloop/loop.pyx":822 * sizeof(reuseport_flag)) * * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(-errno.errno) * */ } /* "uvloop/loop.pyx":810 * fut.set_result(None) * * cdef _sock_set_reuseport(self, int fd): # <<<<<<<<<<<<<< * cdef: * int err */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop._sock_set_reuseport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":825 * raise convert_error(-errno.errno) * * cdef _set_coroutine_wrapper(self, bint enabled): # <<<<<<<<<<<<<< * enabled = bool(enabled) * if self._coroutine_wrapper_set == enabled: */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__set_coroutine_wrapper(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, int __pyx_v_enabled) { PyObject *__pyx_v_wrapper = NULL; PyObject *__pyx_v_current_wrapper = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_set_coroutine_wrapper", 0); /* "uvloop/loop.pyx":826 * * cdef _set_coroutine_wrapper(self, bint enabled): * enabled = bool(enabled) # <<<<<<<<<<<<<< * if self._coroutine_wrapper_set == enabled: * return */ __pyx_t_1 = __pyx_v_enabled; __pyx_v_enabled = (!(!__pyx_t_1)); /* "uvloop/loop.pyx":827 * cdef _set_coroutine_wrapper(self, bint enabled): * enabled = bool(enabled) * if self._coroutine_wrapper_set == enabled: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->_coroutine_wrapper_set == __pyx_v_enabled) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":828 * enabled = bool(enabled) * if self._coroutine_wrapper_set == enabled: * return # <<<<<<<<<<<<<< * * wrapper = aio_debug_wrapper */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":827 * cdef _set_coroutine_wrapper(self, bint enabled): * enabled = bool(enabled) * if self._coroutine_wrapper_set == enabled: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/loop.pyx":830 * return * * wrapper = aio_debug_wrapper # <<<<<<<<<<<<<< * current_wrapper = sys_get_coroutine_wrapper() * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_debug_wrapper); __pyx_v_wrapper = __pyx_v_6uvloop_4loop_aio_debug_wrapper; /* "uvloop/loop.pyx":831 * * wrapper = aio_debug_wrapper * current_wrapper = sys_get_coroutine_wrapper() # <<<<<<<<<<<<<< * * if enabled: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper); __pyx_t_3 = __pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_current_wrapper = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":833 * current_wrapper = sys_get_coroutine_wrapper() * * if enabled: # <<<<<<<<<<<<<< * if current_wrapper not in (None, wrapper): * warnings.warn( */ __pyx_t_1 = (__pyx_v_enabled != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":834 * * if enabled: * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<< * warnings.warn( * "loop.set_debug(True): cannot set debug coroutine " */ __Pyx_INCREF(__pyx_v_current_wrapper); __pyx_t_2 = __pyx_v_current_wrapper; __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_wrapper, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":835 * if enabled: * if current_wrapper not in (None, wrapper): * warnings.warn( # <<<<<<<<<<<<<< * "loop.set_debug(True): cannot set debug coroutine " * "wrapper; another wrapper is already set %r" % */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":837 * warnings.warn( * "loop.set_debug(True): cannot set debug coroutine " * "wrapper; another wrapper is already set %r" % # <<<<<<<<<<<<<< * current_wrapper, RuntimeWarning) * else: */ __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_loop_set_debug_True_cannot_set_d, __pyx_v_current_wrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":838 * "loop.set_debug(True): cannot set debug coroutine " * "wrapper; another wrapper is already set %r" % * current_wrapper, RuntimeWarning) # <<<<<<<<<<<<<< * else: * sys_set_coroutine_wrapper(wrapper) */ __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_builtin_RuntimeWarning}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_builtin_RuntimeWarning}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_builtin_RuntimeWarning); __Pyx_GIVEREF(__pyx_builtin_RuntimeWarning); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_builtin_RuntimeWarning); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":834 * * if enabled: * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<< * warnings.warn( * "loop.set_debug(True): cannot set debug coroutine " */ goto __pyx_L5; } /* "uvloop/loop.pyx":840 * current_wrapper, RuntimeWarning) * else: * sys_set_coroutine_wrapper(wrapper) # <<<<<<<<<<<<<< * self._coroutine_wrapper_set = True * else: */ /*else*/ { __Pyx_INCREF(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper); __pyx_t_4 = __pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_wrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_wrapper}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_wrapper}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_wrapper); __Pyx_GIVEREF(__pyx_v_wrapper); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_wrapper); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":841 * else: * sys_set_coroutine_wrapper(wrapper) * self._coroutine_wrapper_set = True # <<<<<<<<<<<<<< * else: * if current_wrapper not in (None, wrapper): */ __pyx_v_self->_coroutine_wrapper_set = 1; } __pyx_L5:; /* "uvloop/loop.pyx":833 * current_wrapper = sys_get_coroutine_wrapper() * * if enabled: # <<<<<<<<<<<<<< * if current_wrapper not in (None, wrapper): * warnings.warn( */ goto __pyx_L4; } /* "uvloop/loop.pyx":843 * self._coroutine_wrapper_set = True * else: * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<< * warnings.warn( * "loop.set_debug(False): cannot unset debug coroutine " */ /*else*/ { __Pyx_INCREF(__pyx_v_current_wrapper); __pyx_t_2 = __pyx_v_current_wrapper; __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 843, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { } else { __pyx_t_5 = __pyx_t_1; goto __pyx_L9_bool_binop_done; } __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_v_wrapper, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 843, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_1; __pyx_L9_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = (__pyx_t_5 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":844 * else: * if current_wrapper not in (None, wrapper): * warnings.warn( # <<<<<<<<<<<<<< * "loop.set_debug(False): cannot unset debug coroutine " * "wrapper; another wrapper was set %r" % */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":846 * warnings.warn( * "loop.set_debug(False): cannot unset debug coroutine " * "wrapper; another wrapper was set %r" % # <<<<<<<<<<<<<< * current_wrapper, RuntimeWarning) * else: */ __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_loop_set_debug_False_cannot_unse, __pyx_v_current_wrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":847 * "loop.set_debug(False): cannot unset debug coroutine " * "wrapper; another wrapper was set %r" % * current_wrapper, RuntimeWarning) # <<<<<<<<<<<<<< * else: * sys_set_coroutine_wrapper(None) */ __pyx_t_8 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_builtin_RuntimeWarning}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, __pyx_builtin_RuntimeWarning}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_builtin_RuntimeWarning); __Pyx_GIVEREF(__pyx_builtin_RuntimeWarning); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_builtin_RuntimeWarning); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":843 * self._coroutine_wrapper_set = True * else: * if current_wrapper not in (None, wrapper): # <<<<<<<<<<<<<< * warnings.warn( * "loop.set_debug(False): cannot unset debug coroutine " */ goto __pyx_L8; } /* "uvloop/loop.pyx":849 * current_wrapper, RuntimeWarning) * else: * sys_set_coroutine_wrapper(None) # <<<<<<<<<<<<<< * self._coroutine_wrapper_set = False * */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":850 * else: * sys_set_coroutine_wrapper(None) * self._coroutine_wrapper_set = False # <<<<<<<<<<<<<< * * cdef _create_server(self, system.sockaddr *addr, */ __pyx_v_self->_coroutine_wrapper_set = 0; } __pyx_L8:; } __pyx_L4:; /* "uvloop/loop.pyx":825 * raise convert_error(-errno.errno) * * cdef _set_coroutine_wrapper(self, bint enabled): # <<<<<<<<<<<<<< * enabled = bool(enabled) * if self._coroutine_wrapper_set == enabled: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Loop._set_coroutine_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_wrapper); __Pyx_XDECREF(__pyx_v_current_wrapper); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":852 * self._coroutine_wrapper_set = False * * cdef _create_server(self, system.sockaddr *addr, # <<<<<<<<<<<<<< * object protocol_factory, * Server server, */ static PyObject *__pyx_f_6uvloop_4loop_4Loop__create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, struct sockaddr *__pyx_v_addr, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl, int __pyx_v_reuse_port, PyObject *__pyx_v_backlog) { struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_tcp = 0; int __pyx_v_bind_flags; PyObject *__pyx_v_err = NULL; PyObject *__pyx_v_pyaddr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("_create_server", 0); /* "uvloop/loop.pyx":862 * int bind_flags * * tcp = TCPServer.new(self, protocol_factory, server, ssl, # <<<<<<<<<<<<<< * addr.sa_family) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_9TCPServer_new(__pyx_v_self, __pyx_v_protocol_factory, __pyx_v_server, __pyx_v_ssl, __pyx_v_addr->sa_family)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tcp = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":865 * addr.sa_family) * * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(tcp._fileno()) * */ __pyx_t_2 = (__pyx_v_reuse_port != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":866 * * if reuse_port: * self._sock_set_reuseport(tcp._fileno()) # <<<<<<<<<<<<<< * * if addr.sa_family == uv.AF_INET6: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_tcp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_sock_set_reuseport(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":865 * addr.sa_family) * * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(tcp._fileno()) * */ } /* "uvloop/loop.pyx":868 * self._sock_set_reuseport(tcp._fileno()) * * if addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<< * # Disable IPv4/IPv6 dual stack support (enabled by * # default on Linux) which makes a single socket */ __pyx_t_2 = ((__pyx_v_addr->sa_family == AF_INET6) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":872 * # default on Linux) which makes a single socket * # listen on both address families. * bind_flags = uv.UV_TCP_IPV6ONLY # <<<<<<<<<<<<<< * else: * bind_flags = 0 */ __pyx_v_bind_flags = UV_TCP_IPV6ONLY; /* "uvloop/loop.pyx":868 * self._sock_set_reuseport(tcp._fileno()) * * if addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<< * # Disable IPv4/IPv6 dual stack support (enabled by * # default on Linux) which makes a single socket */ goto __pyx_L4; } /* "uvloop/loop.pyx":874 * bind_flags = uv.UV_TCP_IPV6ONLY * else: * bind_flags = 0 # <<<<<<<<<<<<<< * * try: */ /*else*/ { __pyx_v_bind_flags = 0; } __pyx_L4:; /* "uvloop/loop.pyx":876 * bind_flags = 0 * * try: # <<<<<<<<<<<<<< * tcp.bind(addr, bind_flags) * tcp.listen(backlog) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/loop.pyx":877 * * try: * tcp.bind(addr, bind_flags) # <<<<<<<<<<<<<< * tcp.listen(backlog) * except OSError as err: */ __pyx_t_7.__pyx_n = 1; __pyx_t_7.flags = __pyx_v_bind_flags; __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->bind(__pyx_v_tcp, __pyx_v_addr, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":878 * try: * tcp.bind(addr, bind_flags) * tcp.listen(backlog) # <<<<<<<<<<<<<< * except OSError as err: * pyaddr = __convert_sockaddr_to_pyaddr(addr) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.listen(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_tcp), __pyx_v_backlog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 878, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":876 * bind_flags = 0 * * try: # <<<<<<<<<<<<<< * tcp.bind(addr, bind_flags) * tcp.listen(backlog) */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":879 * tcp.bind(addr, bind_flags) * tcp.listen(backlog) * except OSError as err: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(addr) * tcp._close() */ __pyx_t_3 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_3) { __Pyx_AddTraceback("uvloop.loop.Loop._create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(1, 879, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_v_err = __pyx_t_8; /*try:*/ { /* "uvloop/loop.pyx":880 * tcp.listen(backlog) * except OSError as err: * pyaddr = __convert_sockaddr_to_pyaddr(addr) # <<<<<<<<<<<<<< * tcp._close() * raise OSError(err.errno, 'error while attempting ' */ __pyx_t_10 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_addr); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 880, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_pyaddr = __pyx_t_10; __pyx_t_10 = 0; /* "uvloop/loop.pyx":881 * except OSError as err: * pyaddr = __convert_sockaddr_to_pyaddr(addr) * tcp._close() # <<<<<<<<<<<<<< * raise OSError(err.errno, 'error while attempting ' * 'to bind on address %r: %s' */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_tcp)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 881, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/loop.pyx":882 * pyaddr = __convert_sockaddr_to_pyaddr(addr) * tcp._close() * raise OSError(err.errno, 'error while attempting ' # <<<<<<<<<<<<<< * 'to bind on address %r: %s' * % (pyaddr, err.strerror.lower())) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_errno); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 882, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); /* "uvloop/loop.pyx":884 * raise OSError(err.errno, 'error while attempting ' * 'to bind on address %r: %s' * % (pyaddr, err.strerror.lower())) # <<<<<<<<<<<<<< * except: * tcp._close() */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_err, __pyx_n_s_strerror); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 884, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_lower); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 884, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_12) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 884, __pyx_L18_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 884, __pyx_L18_error) } __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 884, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_pyaddr); __Pyx_GIVEREF(__pyx_v_pyaddr); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_pyaddr); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = PyUnicode_Format(__pyx_kp_u_error_while_attempting_to_bind_o, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 884, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "uvloop/loop.pyx":882 * pyaddr = __convert_sockaddr_to_pyaddr(addr) * tcp._close() * raise OSError(err.errno, 'error while attempting ' # <<<<<<<<<<<<<< * 'to bind on address %r: %s' * % (pyaddr, err.strerror.lower())) */ __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 882, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 882, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(1, 882, __pyx_L18_error) } /* "uvloop/loop.pyx":879 * tcp.bind(addr, bind_flags) * tcp.listen(backlog) * except OSError as err: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(addr) * tcp._close() */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_3 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_err); __pyx_v_err = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L7_except_error; } } } /* "uvloop/loop.pyx":885 * 'to bind on address %r: %s' * % (pyaddr, err.strerror.lower())) * except: # <<<<<<<<<<<<<< * tcp._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop._create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(1, 885, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_1); /* "uvloop/loop.pyx":886 * % (pyaddr, err.strerror.lower())) * except: * tcp._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_tcp)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 886, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/loop.pyx":887 * except: * tcp._close() * raise # <<<<<<<<<<<<<< * * return tcp */ __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_8, __pyx_t_1); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_1 = 0; __PYX_ERR(1, 887, __pyx_L7_except_error) } __pyx_L7_except_error:; /* "uvloop/loop.pyx":876 * bind_flags = 0 * * try: # <<<<<<<<<<<<<< * tcp.bind(addr, bind_flags) * tcp.listen(backlog) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L12_try_end:; } /* "uvloop/loop.pyx":889 * raise * * return tcp # <<<<<<<<<<<<<< * * def _get_backend_id(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tcp)); __pyx_r = ((PyObject *)__pyx_v_tcp); goto __pyx_L0; /* "uvloop/loop.pyx":852 * self._coroutine_wrapper_set = False * * cdef _create_server(self, system.sockaddr *addr, # <<<<<<<<<<<<<< * object protocol_factory, * Server server, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.Loop._create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_tcp); __Pyx_XDECREF(__pyx_v_err); __Pyx_XDECREF(__pyx_v_pyaddr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":891 * return tcp * * def _get_backend_id(self): # <<<<<<<<<<<<<< * """This method is used by uvloop tests and is not part of the API.""" * return uv.uv_backend_fd(self.uvloop) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_get_backend_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_6_get_backend_id[] = "Loop._get_backend_id(self)\nThis method is used by uvloop tests and is not part of the API."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_get_backend_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_backend_id (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_6_get_backend_id(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_6_get_backend_id(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_get_backend_id", 0); /* "uvloop/loop.pyx":893 * def _get_backend_id(self): * """This method is used by uvloop tests and is not part of the API.""" * return uv.uv_backend_fd(self.uvloop) # <<<<<<<<<<<<<< * * def print_debug_info(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(uv_backend_fd(__pyx_v_self->uvloop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":891 * return tcp * * def _get_backend_id(self): # <<<<<<<<<<<<<< * """This method is used by uvloop tests and is not part of the API.""" * return uv.uv_backend_fd(self.uvloop) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._get_backend_id", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":895 * return uv.uv_backend_fd(self.uvloop) * * def print_debug_info(self): # <<<<<<<<<<<<<< * cdef: * int err */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9print_debug_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_8print_debug_info[] = "Loop.print_debug_info(self)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9print_debug_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("print_debug_info (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_8print_debug_info(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_8print_debug_info(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { int __pyx_v_err; uv_rusage_t __pyx_v_rusage; PyObject *__pyx_v_name = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("print_debug_info", 0); /* "uvloop/loop.pyx":900 * uv.uv_rusage_t rusage * * if not UVLOOP_DEBUG: # <<<<<<<<<<<<<< * raise NotImplementedError * */ __pyx_t_1 = ((!(UVLOOP_DEBUG != 0)) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":901 * * if not UVLOOP_DEBUG: * raise NotImplementedError # <<<<<<<<<<<<<< * * err = uv.uv_getrusage(&rusage) */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(1, 901, __pyx_L1_error) /* "uvloop/loop.pyx":900 * uv.uv_rusage_t rusage * * if not UVLOOP_DEBUG: # <<<<<<<<<<<<<< * raise NotImplementedError * */ } /* "uvloop/loop.pyx":903 * raise NotImplementedError * * err = uv.uv_getrusage(&rusage) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_getrusage((&__pyx_v_rusage)); /* "uvloop/loop.pyx":904 * * err = uv.uv_getrusage(&rusage) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":905 * err = uv.uv_getrusage(&rusage) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * ################### OS */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 905, __pyx_L1_error) /* "uvloop/loop.pyx":904 * * err = uv.uv_getrusage(&rusage) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/loop.pyx":909 * ################### OS * * print('---- Process info: -----') # <<<<<<<<<<<<<< * print('Process memory: {}'.format(rusage.ru_maxrss)) * print('Number of signals: {}'.format(rusage.ru_nsignals)) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":910 * * print('---- Process info: -----') * print('Process memory: {}'.format(rusage.ru_maxrss)) # <<<<<<<<<<<<<< * print('Number of signals: {}'.format(rusage.ru_nsignals)) * print('') */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Process_memory, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_rusage.ru_maxrss); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":911 * print('---- Process info: -----') * print('Process memory: {}'.format(rusage.ru_maxrss)) * print('Number of signals: {}'.format(rusage.ru_nsignals)) # <<<<<<<<<<<<<< * print('') * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Number_of_signals, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_rusage.ru_nsignals); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":912 * print('Process memory: {}'.format(rusage.ru_maxrss)) * print('Number of signals: {}'.format(rusage.ru_nsignals)) * print('') # <<<<<<<<<<<<<< * * ################### Loop */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":916 * ################### Loop * * print('--- Loop debug info: ---') # <<<<<<<<<<<<<< * print('Loop time: {}'.format(self.time())) * print('Errors logged: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":917 * * print('--- Loop debug info: ---') * print('Loop time: {}'.format(self.time())) # <<<<<<<<<<<<<< * print('Errors logged: {}'.format( * self._debug_exception_handler_cnt)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Loop_time, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":918 * print('--- Loop debug info: ---') * print('Loop time: {}'.format(self.time())) * print('Errors logged: {}'.format( # <<<<<<<<<<<<<< * self._debug_exception_handler_cnt)) * print() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Errors_logged, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":919 * print('Loop time: {}'.format(self.time())) * print('Errors logged: {}'.format( * self._debug_exception_handler_cnt)) # <<<<<<<<<<<<<< * print() * print('Callback handles: {: <8} | {}'.format( */ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_exception_handler_cnt); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":918 * print('--- Loop debug info: ---') * print('Loop time: {}'.format(self.time())) * print('Errors logged: {}'.format( # <<<<<<<<<<<<<< * self._debug_exception_handler_cnt)) * print() */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":920 * print('Errors logged: {}'.format( * self._debug_exception_handler_cnt)) * print() # <<<<<<<<<<<<<< * print('Callback handles: {: <8} | {}'.format( * self._debug_cb_handles_count, */ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":921 * self._debug_exception_handler_cnt)) * print() * print('Callback handles: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_cb_handles_count, * self._debug_cb_handles_total)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Callback_handles_8, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":922 * print() * print('Callback handles: {: <8} | {}'.format( * self._debug_cb_handles_count, # <<<<<<<<<<<<<< * self._debug_cb_handles_total)) * print('Timer handles: {: <8} | {}'.format( */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":923 * print('Callback handles: {: <8} | {}'.format( * self._debug_cb_handles_count, * self._debug_cb_handles_total)) # <<<<<<<<<<<<<< * print('Timer handles: {: <8} | {}'.format( * self._debug_cb_timer_handles_count, */ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":921 * self._debug_exception_handler_cnt)) * print() * print('Callback handles: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_cb_handles_count, * self._debug_cb_handles_total)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":924 * self._debug_cb_handles_count, * self._debug_cb_handles_total)) * print('Timer handles: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_cb_timer_handles_count, * self._debug_cb_timer_handles_total)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Timer_handles_8, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":925 * self._debug_cb_handles_total)) * print('Timer handles: {: <8} | {}'.format( * self._debug_cb_timer_handles_count, # <<<<<<<<<<<<<< * self._debug_cb_timer_handles_total)) * print() */ __pyx_t_8 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_count); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":926 * print('Timer handles: {: <8} | {}'.format( * self._debug_cb_timer_handles_count, * self._debug_cb_timer_handles_total)) # <<<<<<<<<<<<<< * print() * */ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_4); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":924 * self._debug_cb_handles_count, * self._debug_cb_handles_total)) * print('Timer handles: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_cb_timer_handles_count, * self._debug_cb_timer_handles_total)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":927 * self._debug_cb_timer_handles_count, * self._debug_cb_timer_handles_total)) * print() # <<<<<<<<<<<<<< * * print(' alive | closed |') */ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":929 * print() * * print(' alive | closed |') # <<<<<<<<<<<<<< * print('UVHandles python | libuv | total') * print(' objs | handles |') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":930 * * print(' alive | closed |') * print('UVHandles python | libuv | total') # <<<<<<<<<<<<<< * print(' objs | handles |') * print('-------------------------------+---------+---------') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":931 * print(' alive | closed |') * print('UVHandles python | libuv | total') * print(' objs | handles |') # <<<<<<<<<<<<<< * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":932 * print('UVHandles python | libuv | total') * print(' objs | handles |') * print('-------------------------------+---------+---------') # <<<<<<<<<<<<<< * for name in sorted(self._debug_handles_total): * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":933 * print(' objs | handles |') * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): # <<<<<<<<<<<<<< * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( * name, */ __pyx_t_3 = __pyx_v_self->_debug_handles_total; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(1, 933, __pyx_L1_error) if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 933, __pyx_L1_error) } __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 933, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":934 * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( # <<<<<<<<<<<<<< * name, * self._debug_handles_current[name], */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_18_7_7_7, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":936 * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( * name, * self._debug_handles_current[name], # <<<<<<<<<<<<<< * self._debug_handles_closed[name], * self._debug_handles_total[name])) */ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->_debug_handles_current, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":937 * name, * self._debug_handles_current[name], * self._debug_handles_closed[name], # <<<<<<<<<<<<<< * self._debug_handles_total[name])) * print() */ __pyx_t_8 = PyObject_GetItem(__pyx_v_self->_debug_handles_closed, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":938 * self._debug_handles_current[name], * self._debug_handles_closed[name], * self._debug_handles_total[name])) # <<<<<<<<<<<<<< * print() * */ __pyx_t_6 = PyObject_GetItem(__pyx_v_self->_debug_handles_total, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_name, __pyx_t_4, __pyx_t_8, __pyx_t_6}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_name, __pyx_t_4, __pyx_t_8, __pyx_t_6}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_v_name); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_7, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_7, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":934 * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( # <<<<<<<<<<<<<< * name, * self._debug_handles_current[name], */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":933 * print(' objs | handles |') * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): # <<<<<<<<<<<<<< * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( * name, */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":939 * self._debug_handles_closed[name], * self._debug_handles_total[name])) * print() # <<<<<<<<<<<<<< * * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":941 * print() * * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( # <<<<<<<<<<<<<< * self._debug_uv_handles_total - self._debug_uv_handles_freed, * self._debug_uv_handles_freed, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_uv_handle_t_current_freed_total, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":942 * * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( * self._debug_uv_handles_total - self._debug_uv_handles_freed, # <<<<<<<<<<<<<< * self._debug_uv_handles_freed, * self._debug_uv_handles_total)) */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t((__pyx_v_self->_debug_uv_handles_total - __pyx_v_self->_debug_uv_handles_freed)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":943 * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( * self._debug_uv_handles_total - self._debug_uv_handles_freed, * self._debug_uv_handles_freed, # <<<<<<<<<<<<<< * self._debug_uv_handles_total)) * print() */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_freed); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); /* "uvloop/loop.pyx":944 * self._debug_uv_handles_total - self._debug_uv_handles_freed, * self._debug_uv_handles_freed, * self._debug_uv_handles_total)) # <<<<<<<<<<<<<< * print() * */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_3, __pyx_t_12, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_3, __pyx_t_12, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":941 * print() * * print('uv_handle_t (current: {}; freed: {}; total: {})'.format( # <<<<<<<<<<<<<< * self._debug_uv_handles_total - self._debug_uv_handles_freed, * self._debug_uv_handles_freed, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":945 * self._debug_uv_handles_freed, * self._debug_uv_handles_total)) * print() # <<<<<<<<<<<<<< * * print('--- Streams debug info: ---') */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":947 * print() * * print('--- Streams debug info: ---') # <<<<<<<<<<<<<< * print('Write errors: {}'.format( * self._debug_stream_write_errors_total)) */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":948 * * print('--- Streams debug info: ---') * print('Write errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_errors_total)) * print('Write without poll: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":949 * print('--- Streams debug info: ---') * print('Write errors: {}'.format( * self._debug_stream_write_errors_total)) # <<<<<<<<<<<<<< * print('Write without poll: {}'.format( * self._debug_stream_write_tries)) */ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_errors_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":948 * * print('--- Streams debug info: ---') * print('Write errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_errors_total)) * print('Write without poll: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":950 * print('Write errors: {}'.format( * self._debug_stream_write_errors_total)) * print('Write without poll: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_tries)) * print('Write contexts: {: <8} | {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_without_poll, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":951 * self._debug_stream_write_errors_total)) * print('Write without poll: {}'.format( * self._debug_stream_write_tries)) # <<<<<<<<<<<<<< * print('Write contexts: {: <8} | {}'.format( * self._debug_stream_write_ctx_cnt, */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_tries); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":950 * print('Write errors: {}'.format( * self._debug_stream_write_errors_total)) * print('Write without poll: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_tries)) * print('Write contexts: {: <8} | {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":952 * print('Write without poll: {}'.format( * self._debug_stream_write_tries)) * print('Write contexts: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_ctx_cnt, * self._debug_stream_write_ctx_total)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_contexts_8, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":953 * self._debug_stream_write_tries)) * print('Write contexts: {: <8} | {}'.format( * self._debug_stream_write_ctx_cnt, # <<<<<<<<<<<<<< * self._debug_stream_write_ctx_total)) * print('Write failed callbacks: {}'.format( */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_cnt); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":954 * print('Write contexts: {: <8} | {}'.format( * self._debug_stream_write_ctx_cnt, * self._debug_stream_write_ctx_total)) # <<<<<<<<<<<<<< * print('Write failed callbacks: {}'.format( * self._debug_stream_write_cb_errors_total)) */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_total); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_12); __pyx_t_6 = 0; __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":952 * print('Write without poll: {}'.format( * self._debug_stream_write_tries)) * print('Write contexts: {: <8} | {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_ctx_cnt, * self._debug_stream_write_ctx_total)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":955 * self._debug_stream_write_ctx_cnt, * self._debug_stream_write_ctx_total)) * print('Write failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_cb_errors_total)) * print() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":956 * self._debug_stream_write_ctx_total)) * print('Write failed callbacks: {}'.format( * self._debug_stream_write_cb_errors_total)) # <<<<<<<<<<<<<< * print() * print('Read errors: {}'.format( */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_cb_errors_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":955 * self._debug_stream_write_ctx_cnt, * self._debug_stream_write_ctx_total)) * print('Write failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_write_cb_errors_total)) * print() */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":957 * print('Write failed callbacks: {}'.format( * self._debug_stream_write_cb_errors_total)) * print() # <<<<<<<<<<<<<< * print('Read errors: {}'.format( * self._debug_stream_read_errors_total)) */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":958 * self._debug_stream_write_cb_errors_total)) * print() * print('Read errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_errors_total)) * print('Read callbacks: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":959 * print() * print('Read errors: {}'.format( * self._debug_stream_read_errors_total)) # <<<<<<<<<<<<<< * print('Read callbacks: {}'.format( * self._debug_stream_read_cb_total)) */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_errors_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":958 * self._debug_stream_write_cb_errors_total)) * print() * print('Read errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_errors_total)) * print('Read callbacks: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":960 * print('Read errors: {}'.format( * self._debug_stream_read_errors_total)) * print('Read callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_cb_total)) * print('Read failed callbacks: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":961 * self._debug_stream_read_errors_total)) * print('Read callbacks: {}'.format( * self._debug_stream_read_cb_total)) # <<<<<<<<<<<<<< * print('Read failed callbacks: {}'.format( * self._debug_stream_read_cb_errors_total)) */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_total); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":960 * print('Read errors: {}'.format( * self._debug_stream_read_errors_total)) * print('Read callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_cb_total)) * print('Read failed callbacks: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":962 * print('Read callbacks: {}'.format( * self._debug_stream_read_cb_total)) * print('Read failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_cb_errors_total)) * print('Read EOFs: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":963 * self._debug_stream_read_cb_total)) * print('Read failed callbacks: {}'.format( * self._debug_stream_read_cb_errors_total)) # <<<<<<<<<<<<<< * print('Read EOFs: {}'.format( * self._debug_stream_read_eof_total)) */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_errors_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":962 * print('Read callbacks: {}'.format( * self._debug_stream_read_cb_total)) * print('Read failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_cb_errors_total)) * print('Read EOFs: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":964 * print('Read failed callbacks: {}'.format( * self._debug_stream_read_cb_errors_total)) * print('Read EOFs: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_eof_total)) * print('Read EOF failed callbacks: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_EOFs, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":965 * self._debug_stream_read_cb_errors_total)) * print('Read EOFs: {}'.format( * self._debug_stream_read_eof_total)) # <<<<<<<<<<<<<< * print('Read EOF failed callbacks: {}'.format( * self._debug_stream_read_eof_cb_errors_total)) */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":964 * print('Read failed callbacks: {}'.format( * self._debug_stream_read_cb_errors_total)) * print('Read EOFs: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_eof_total)) * print('Read EOF failed callbacks: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":966 * print('Read EOFs: {}'.format( * self._debug_stream_read_eof_total)) * print('Read EOF failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_eof_cb_errors_total)) * print() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_EOF_failed_callbacks, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":967 * self._debug_stream_read_eof_total)) * print('Read EOF failed callbacks: {}'.format( * self._debug_stream_read_eof_cb_errors_total)) # <<<<<<<<<<<<<< * print() * print('Listen errors: {}'.format( */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_cb_errors_total); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":966 * print('Read EOFs: {}'.format( * self._debug_stream_read_eof_total)) * print('Read EOF failed callbacks: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_read_eof_cb_errors_total)) * print() */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":968 * print('Read EOF failed callbacks: {}'.format( * self._debug_stream_read_eof_cb_errors_total)) * print() # <<<<<<<<<<<<<< * print('Listen errors: {}'.format( * self._debug_stream_listen_errors_total)) */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":969 * self._debug_stream_read_eof_cb_errors_total)) * print() * print('Listen errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_listen_errors_total)) * print('Shutdown errors {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Listen_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":970 * print() * print('Listen errors: {}'.format( * self._debug_stream_listen_errors_total)) # <<<<<<<<<<<<<< * print('Shutdown errors {}'.format( * self._debug_stream_shutdown_errors_total)) */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_listen_errors_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":969 * self._debug_stream_read_eof_cb_errors_total)) * print() * print('Listen errors: {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_listen_errors_total)) * print('Shutdown errors {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":971 * print('Listen errors: {}'.format( * self._debug_stream_listen_errors_total)) * print('Shutdown errors {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_shutdown_errors_total)) * print() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shutdown_errors, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":972 * self._debug_stream_listen_errors_total)) * print('Shutdown errors {}'.format( * self._debug_stream_shutdown_errors_total)) # <<<<<<<<<<<<<< * print() * */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_shutdown_errors_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":971 * print('Listen errors: {}'.format( * self._debug_stream_listen_errors_total)) * print('Shutdown errors {}'.format( # <<<<<<<<<<<<<< * self._debug_stream_shutdown_errors_total)) * print() */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":973 * print('Shutdown errors {}'.format( * self._debug_stream_shutdown_errors_total)) * print() # <<<<<<<<<<<<<< * * print('--- Polls debug info: ---') */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":975 * print() * * print('--- Polls debug info: ---') # <<<<<<<<<<<<<< * print('Read events: {}'.format( * self._poll_read_events_total)) */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":976 * * print('--- Polls debug info: ---') * print('Read events: {}'.format( # <<<<<<<<<<<<<< * self._poll_read_events_total)) * print('Read callbacks failed: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_events, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":977 * print('--- Polls debug info: ---') * print('Read events: {}'.format( * self._poll_read_events_total)) # <<<<<<<<<<<<<< * print('Read callbacks failed: {}'.format( * self._poll_read_cb_errors_total)) */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_events_total); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":976 * * print('--- Polls debug info: ---') * print('Read events: {}'.format( # <<<<<<<<<<<<<< * self._poll_read_events_total)) * print('Read callbacks failed: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":978 * print('Read events: {}'.format( * self._poll_read_events_total)) * print('Read callbacks failed: {}'.format( # <<<<<<<<<<<<<< * self._poll_read_cb_errors_total)) * print('Write events: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Read_callbacks_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":979 * self._poll_read_events_total)) * print('Read callbacks failed: {}'.format( * self._poll_read_cb_errors_total)) # <<<<<<<<<<<<<< * print('Write events: {}'.format( * self._poll_write_events_total)) */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_cb_errors_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":978 * print('Read events: {}'.format( * self._poll_read_events_total)) * print('Read callbacks failed: {}'.format( # <<<<<<<<<<<<<< * self._poll_read_cb_errors_total)) * print('Write events: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":980 * print('Read callbacks failed: {}'.format( * self._poll_read_cb_errors_total)) * print('Write events: {}'.format( # <<<<<<<<<<<<<< * self._poll_write_events_total)) * print('Write callbacks failed: {}'.format( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_events, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":981 * self._poll_read_cb_errors_total)) * print('Write events: {}'.format( * self._poll_write_events_total)) # <<<<<<<<<<<<<< * print('Write callbacks failed: {}'.format( * self._poll_write_cb_errors_total)) */ __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_events_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":980 * print('Read callbacks failed: {}'.format( * self._poll_read_cb_errors_total)) * print('Write events: {}'.format( # <<<<<<<<<<<<<< * self._poll_write_events_total)) * print('Write callbacks failed: {}'.format( */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":982 * print('Write events: {}'.format( * self._poll_write_events_total)) * print('Write callbacks failed: {}'.format( # <<<<<<<<<<<<<< * self._poll_write_cb_errors_total)) * print() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Write_callbacks_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":983 * self._poll_write_events_total)) * print('Write callbacks failed: {}'.format( * self._poll_write_cb_errors_total)) # <<<<<<<<<<<<<< * print() * */ __pyx_t_12 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_cb_errors_total); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_12}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":982 * print('Write events: {}'.format( * self._poll_write_events_total)) * print('Write callbacks failed: {}'.format( # <<<<<<<<<<<<<< * self._poll_write_cb_errors_total)) * print() */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":984 * print('Write callbacks failed: {}'.format( * self._poll_write_cb_errors_total)) * print() # <<<<<<<<<<<<<< * * print('--- Sock ops successfull on 1st try: ---') */ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_builtin_print); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":986 * print() * * print('--- Sock ops successfull on 1st try: ---') # <<<<<<<<<<<<<< * print('Socket try-writes: {}'.format( * self._sock_try_write_total)) */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":987 * * print('--- Sock ops successfull on 1st try: ---') * print('Socket try-writes: {}'.format( # <<<<<<<<<<<<<< * self._sock_try_write_total)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Socket_try_writes, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":988 * print('--- Sock ops successfull on 1st try: ---') * print('Socket try-writes: {}'.format( * self._sock_try_write_total)) # <<<<<<<<<<<<<< * * print(flush=True) */ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_sock_try_write_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":987 * * print('--- Sock ops successfull on 1st try: ---') * print('Socket try-writes: {}'.format( # <<<<<<<<<<<<<< * self._sock_try_write_total)) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":990 * self._sock_try_write_total)) * * print(flush=True) # <<<<<<<<<<<<<< * * # Public API */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_flush, Py_True) < 0) __PYX_ERR(1, 990, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":895 * return uv.uv_backend_fd(self.uvloop) * * def print_debug_info(self): # <<<<<<<<<<<<<< * cdef: * int err */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.Loop.print_debug_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":994 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{}.{} running={} closed={} debug={}>'.format( * self.__class__.__module__, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_11__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_11__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_10__repr__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_10__repr__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/loop.pyx":995 * * def __repr__(self): * return '<{}.{} running={} closed={} debug={}>'.format( # <<<<<<<<<<<<<< * self.__class__.__module__, * self.__class__.__name__, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_running_closed_debug, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":996 * def __repr__(self): * return '<{}.{} running={} closed={} debug={}>'.format( * self.__class__.__module__, # <<<<<<<<<<<<<< * self.__class__.__name__, * self.is_running(), */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":997 * return '<{}.{} running={} closed={} debug={}>'.format( * self.__class__.__module__, * self.__class__.__name__, # <<<<<<<<<<<<<< * self.is_running(), * self.is_closed(), */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":998 * self.__class__.__module__, * self.__class__.__name__, * self.is_running(), # <<<<<<<<<<<<<< * self.is_closed(), * self.get_debug()) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_running); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 998, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":999 * self.__class__.__name__, * self.is_running(), * self.is_closed(), # <<<<<<<<<<<<<< * self.get_debug()) * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_closed); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 999, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1000 * self.is_running(), * self.is_closed(), * self.get_debug()) # <<<<<<<<<<<<<< * * def call_soon(self, callback, *args): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_9) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1000, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1000, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_t_3, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_t_3, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_10, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":994 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{}.{} running={} closed={} debug={}>'.format( * self.__class__.__module__, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.Loop.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1002 * self.get_debug()) * * def call_soon(self, callback, *args): # <<<<<<<<<<<<<< * """Arrange for a callback to be called as soon as possible. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13call_soon(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_12call_soon[] = "Loop.call_soon(self, callback, *args)\nArrange for a callback to be called as soon as possible.\n\n This operates as a FIFO queue: callbacks are called in the\n order in which they are registered. Each callback will be\n called exactly once.\n\n Any positional arguments after the callback will be passed to\n the callback when it is called.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_13call_soon(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("call_soon (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 1) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_soon") < 0)) __PYX_ERR(1, 1002, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("call_soon", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1002, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_12call_soon(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_12call_soon(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("call_soon", 0); /* "uvloop/loop.pyx":1012 * the callback when it is called. * """ * if self._debug == 1: # <<<<<<<<<<<<<< * self._check_thread() * if args: */ __pyx_t_1 = ((__pyx_v_self->_debug == 1) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1013 * """ * if self._debug == 1: * self._check_thread() # <<<<<<<<<<<<<< * if args: * return self._call_soon(callback, args) */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_thread(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1012 * the callback when it is called. * """ * if self._debug == 1: # <<<<<<<<<<<<<< * self._check_thread() * if args: */ } /* "uvloop/loop.pyx":1014 * if self._debug == 1: * self._check_thread() * if args: # <<<<<<<<<<<<<< * return self._call_soon(callback, args) * else: */ __pyx_t_1 = (__pyx_v_args != Py_None) && (PyTuple_GET_SIZE(__pyx_v_args) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1015 * self._check_thread() * if args: * return self._call_soon(callback, args) # <<<<<<<<<<<<<< * else: * return self._call_soon(callback, None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1014 * if self._debug == 1: * self._check_thread() * if args: # <<<<<<<<<<<<<< * return self._call_soon(callback, args) * else: */ } /* "uvloop/loop.pyx":1017 * return self._call_soon(callback, args) * else: * return self._call_soon(callback, None) # <<<<<<<<<<<<<< * * def call_soon_threadsafe(self, callback, *args): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "uvloop/loop.pyx":1002 * self.get_debug()) * * def call_soon(self, callback, *args): # <<<<<<<<<<<<<< * """Arrange for a callback to be called as soon as possible. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.call_soon", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1019 * return self._call_soon(callback, None) * * def call_soon_threadsafe(self, callback, *args): # <<<<<<<<<<<<<< * """Like call_soon(), but thread-safe.""" * if not args: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_14call_soon_threadsafe[] = "Loop.call_soon_threadsafe(self, callback, *args)\nLike call_soon(), but thread-safe."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("call_soon_threadsafe (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 1) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_soon_threadsafe") < 0)) __PYX_ERR(1, 1019, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("call_soon_threadsafe", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1019, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.call_soon_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_14call_soon_threadsafe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_v_handle = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("call_soon_threadsafe", 0); __Pyx_INCREF(__pyx_v_args); /* "uvloop/loop.pyx":1021 * def call_soon_threadsafe(self, callback, *args): * """Like call_soon(), but thread-safe.""" * if not args: # <<<<<<<<<<<<<< * args = None * handle = self._call_soon(callback, args) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1021, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1022 * """Like call_soon(), but thread-safe.""" * if not args: * args = None # <<<<<<<<<<<<<< * handle = self._call_soon(callback, args) * self.handler_async.send() */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_args, Py_None); /* "uvloop/loop.pyx":1021 * def call_soon_threadsafe(self, callback, *args): * """Like call_soon(), but thread-safe.""" * if not args: # <<<<<<<<<<<<<< * args = None * handle = self._call_soon(callback, args) */ } /* "uvloop/loop.pyx":1023 * if not args: * args = None * handle = self._call_soon(callback, args) # <<<<<<<<<<<<<< * self.handler_async.send() * return handle */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_handle = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":1024 * args = None * handle = self._call_soon(callback, args) * self.handler_async.send() # <<<<<<<<<<<<<< * return handle * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->send(__pyx_v_self->handler_async); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":1025 * handle = self._call_soon(callback, args) * self.handler_async.send() * return handle # <<<<<<<<<<<<<< * * def call_later(self, delay, callback, *args): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_handle); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/loop.pyx":1019 * return self._call_soon(callback, None) * * def call_soon_threadsafe(self, callback, *args): # <<<<<<<<<<<<<< * """Like call_soon(), but thread-safe.""" * if not args: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Loop.call_soon_threadsafe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1027 * return handle * * def call_later(self, delay, callback, *args): # <<<<<<<<<<<<<< * """Arrange for a callback to be called at a given time. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_17call_later(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_16call_later[] = "Loop.call_later(self, delay, callback, *args)\nArrange for a callback to be called at a given time.\n\n Return a Handle: an opaque object with a cancel() method that\n can be used to cancel the call.\n\n The delay can be an int or float, expressed in seconds. It is\n always relative to the current time.\n\n Each callback will be called exactly once. If two callbacks\n are scheduled for exactly the same time, it undefined which\n will be called first.\n\n Any positional arguments after the callback will be passed to\n the callback when it is called.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_17call_later(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_delay = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("call_later (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delay,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delay)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("call_later", 0, 2, 2, 1); __PYX_ERR(1, 1027, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_later") < 0)) __PYX_ERR(1, 1027, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_delay = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("call_later", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1027, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.call_later", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_16call_later(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_delay, __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_16call_later(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { uint64_t __pyx_v_when; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; uint64_t __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("call_later", 0); __Pyx_INCREF(__pyx_v_delay); __Pyx_INCREF(__pyx_v_args); /* "uvloop/loop.pyx":1043 * the callback when it is called. * """ * self._check_closed() # <<<<<<<<<<<<<< * if self._debug == 1: * self._check_thread() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1044 * """ * self._check_closed() * if self._debug == 1: # <<<<<<<<<<<<<< * self._check_thread() * if delay < 0: */ __pyx_t_2 = ((__pyx_v_self->_debug == 1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1045 * self._check_closed() * if self._debug == 1: * self._check_thread() # <<<<<<<<<<<<<< * if delay < 0: * delay = 0 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_thread(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1044 * """ * self._check_closed() * if self._debug == 1: # <<<<<<<<<<<<<< * self._check_thread() * if delay < 0: */ } /* "uvloop/loop.pyx":1046 * if self._debug == 1: * self._check_thread() * if delay < 0: # <<<<<<<<<<<<<< * delay = 0 * cdef uint64_t when = (delay * 1000) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_delay, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1046, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/loop.pyx":1047 * self._check_thread() * if delay < 0: * delay = 0 # <<<<<<<<<<<<<< * cdef uint64_t when = (delay * 1000) * if not args: */ __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_delay, __pyx_int_0); /* "uvloop/loop.pyx":1046 * if self._debug == 1: * self._check_thread() * if delay < 0: # <<<<<<<<<<<<<< * delay = 0 * cdef uint64_t when = (delay * 1000) */ } /* "uvloop/loop.pyx":1048 * if delay < 0: * delay = 0 * cdef uint64_t when = (delay * 1000) # <<<<<<<<<<<<<< * if not args: * args = None */ __pyx_t_1 = PyNumber_Multiply(__pyx_v_delay, __pyx_int_1000); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 1048, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_when = ((uint64_t)__pyx_t_3); /* "uvloop/loop.pyx":1049 * delay = 0 * cdef uint64_t when = (delay * 1000) * if not args: # <<<<<<<<<<<<<< * args = None * if when == 0: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1049, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_2) != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1050 * cdef uint64_t when = (delay * 1000) * if not args: * args = None # <<<<<<<<<<<<<< * if when == 0: * return self._call_soon(callback, args) */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_args, Py_None); /* "uvloop/loop.pyx":1049 * delay = 0 * cdef uint64_t when = (delay * 1000) * if not args: # <<<<<<<<<<<<<< * args = None * if when == 0: */ } /* "uvloop/loop.pyx":1051 * if not args: * args = None * if when == 0: # <<<<<<<<<<<<<< * return self._call_soon(callback, args) * else: */ __pyx_t_4 = ((__pyx_v_when == 0) != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1052 * args = None * if when == 0: * return self._call_soon(callback, args) # <<<<<<<<<<<<<< * else: * return self._call_later(when, callback, args) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1051 * if not args: * args = None * if when == 0: # <<<<<<<<<<<<<< * return self._call_soon(callback, args) * else: */ } /* "uvloop/loop.pyx":1054 * return self._call_soon(callback, args) * else: * return self._call_later(when, callback, args) # <<<<<<<<<<<<<< * * def call_at(self, when, callback, *args): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_call_later(__pyx_v_self, __pyx_v_when, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "uvloop/loop.pyx":1027 * return handle * * def call_later(self, delay, callback, *args): # <<<<<<<<<<<<<< * """Arrange for a callback to be called at a given time. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.call_later", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1056 * return self._call_later(when, callback, args) * * def call_at(self, when, callback, *args): # <<<<<<<<<<<<<< * """Like call_later(), but uses an absolute time. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_19call_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_18call_at[] = "Loop.call_at(self, when, callback, *args)\nLike call_later(), but uses an absolute time.\n\n Absolute time corresponds to the event loop's time() method.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_19call_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_when = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("call_at (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_when,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_when)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("call_at", 0, 2, 2, 1); __PYX_ERR(1, 1056, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "call_at") < 0)) __PYX_ERR(1, 1056, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_when = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("call_at", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1056, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.call_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_18call_at(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_when, __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_18call_at(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_when, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("call_at", 0); /* "uvloop/loop.pyx":1061 * Absolute time corresponds to the event loop's time() method. * """ * return self.call_later(when - self.time(), callback, *args) # <<<<<<<<<<<<<< * * def time(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call_later); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1061, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_v_when, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_callback); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1056 * return self._call_later(when, callback, args) * * def call_at(self, when, callback, *args): # <<<<<<<<<<<<<< * """Like call_later(), but uses an absolute time. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.call_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1063 * return self.call_later(when - self.time(), callback, *args) * * def time(self): # <<<<<<<<<<<<<< * """Return the time according to the event loop's clock. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_20time[] = "Loop.time(self)\nReturn the time according to the event loop's clock.\n\n This is a float expressed in seconds since an epoch, but the\n epoch, precision, accuracy and drift are unspecified and may\n differ per event loop.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("time (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_20time(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20time(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("time", 0); /* "uvloop/loop.pyx":1070 * differ per event loop. * """ * return self._time() / 1000 # <<<<<<<<<<<<<< * * def stop(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble((((double)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_time(__pyx_v_self)) / 1000.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1063 * return self.call_later(when - self.time(), callback, *args) * * def time(self): # <<<<<<<<<<<<<< * """Return the time according to the event loop's clock. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.time", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1072 * return self._time() / 1000 * * def stop(self): # <<<<<<<<<<<<<< * """Stop running the event loop. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_22stop[] = "Loop.stop(self)\nStop running the event loop.\n\n Every callback already scheduled will still run. This simply informs\n run_forever to stop looping after a complete iteration.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stop (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22stop(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22stop(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("stop", 0); /* "uvloop/loop.pyx":1079 * """ * self._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self, * "Loop._stop", */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_MethodHandle1(__pyx_v_self, __pyx_kp_u_Loop__stop, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_stop), ((PyObject *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 1079, __pyx_L1_error) /* "uvloop/loop.pyx":1078 * run_forever to stop looping after a complete iteration. * """ * self._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self, */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1072 * return self._time() / 1000 * * def stop(self): # <<<<<<<<<<<<<< * """Stop running the event loop. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1086 * None)) * * def run_forever(self): # <<<<<<<<<<<<<< * """Run the event loop until stop() is called.""" * self._check_closed() */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_24run_forever[] = "Loop.run_forever(self)\nRun the event loop until stop() is called."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run_forever (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_24run_forever(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24run_forever(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { uv_run_mode __pyx_v_mode; PyObject *__pyx_v_old_agen_hooks = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("run_forever", 0); /* "uvloop/loop.pyx":1088 * def run_forever(self): * """Run the event loop until stop() is called.""" * self._check_closed() # <<<<<<<<<<<<<< * mode = uv.UV_RUN_DEFAULT * if self._stopping: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1089 * """Run the event loop until stop() is called.""" * self._check_closed() * mode = uv.UV_RUN_DEFAULT # <<<<<<<<<<<<<< * if self._stopping: * # loop.stop() was called right before loop.run_forever(). */ __pyx_v_mode = UV_RUN_DEFAULT; /* "uvloop/loop.pyx":1090 * self._check_closed() * mode = uv.UV_RUN_DEFAULT * if self._stopping: # <<<<<<<<<<<<<< * # loop.stop() was called right before loop.run_forever(). * # This is how asyncio loop behaves. */ __pyx_t_2 = (__pyx_v_self->_stopping != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1093 * # loop.stop() was called right before loop.run_forever(). * # This is how asyncio loop behaves. * mode = uv.UV_RUN_NOWAIT # <<<<<<<<<<<<<< * self._set_coroutine_wrapper(self._debug) * if self._asyncgens is not None: */ __pyx_v_mode = UV_RUN_NOWAIT; /* "uvloop/loop.pyx":1090 * self._check_closed() * mode = uv.UV_RUN_DEFAULT * if self._stopping: # <<<<<<<<<<<<<< * # loop.stop() was called right before loop.run_forever(). * # This is how asyncio loop behaves. */ } /* "uvloop/loop.pyx":1094 * # This is how asyncio loop behaves. * mode = uv.UV_RUN_NOWAIT * self._set_coroutine_wrapper(self._debug) # <<<<<<<<<<<<<< * if self._asyncgens is not None: * old_agen_hooks = sys.get_asyncgen_hooks() */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_wrapper(__pyx_v_self, __pyx_v_self->_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1095 * mode = uv.UV_RUN_NOWAIT * self._set_coroutine_wrapper(self._debug) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * old_agen_hooks = sys.get_asyncgen_hooks() * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, */ __pyx_t_2 = (__pyx_v_self->_asyncgens != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1096 * self._set_coroutine_wrapper(self._debug) * if self._asyncgens is not None: * old_agen_hooks = sys.get_asyncgen_hooks() # <<<<<<<<<<<<<< * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, * finalizer=self._asyncgen_finalizer_hook) */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_asyncgen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_old_agen_hooks = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1097 * if self._asyncgens is not None: * old_agen_hooks = sys.get_asyncgen_hooks() * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, # <<<<<<<<<<<<<< * finalizer=self._asyncgen_finalizer_hook) * try: */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_asyncgen_firstiter_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_firstiter, __pyx_t_4) < 0) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1098 * old_agen_hooks = sys.get_asyncgen_hooks() * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, * finalizer=self._asyncgen_finalizer_hook) # <<<<<<<<<<<<<< * try: * self._run(mode) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_asyncgen_finalizer_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_finalizer, __pyx_t_4) < 0) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1097 * if self._asyncgens is not None: * old_agen_hooks = sys.get_asyncgen_hooks() * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, # <<<<<<<<<<<<<< * finalizer=self._asyncgen_finalizer_hook) * try: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1095 * mode = uv.UV_RUN_NOWAIT * self._set_coroutine_wrapper(self._debug) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * old_agen_hooks = sys.get_asyncgen_hooks() * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, */ } /* "uvloop/loop.pyx":1099 * sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook, * finalizer=self._asyncgen_finalizer_hook) * try: # <<<<<<<<<<<<<< * self._run(mode) * finally: */ /*try:*/ { /* "uvloop/loop.pyx":1100 * finalizer=self._asyncgen_finalizer_hook) * try: * self._run(mode) # <<<<<<<<<<<<<< * finally: * self._set_coroutine_wrapper(False) */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_run(__pyx_v_self, __pyx_v_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1100, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "uvloop/loop.pyx":1102 * self._run(mode) * finally: * self._set_coroutine_wrapper(False) # <<<<<<<<<<<<<< * if self._asyncgens is not None: * sys.set_asyncgen_hooks(*old_agen_hooks) */ /*finally:*/ { /*normal exit:*/{ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_wrapper(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1103 * finally: * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * sys.set_asyncgen_hooks(*old_agen_hooks) * */ __pyx_t_3 = (__pyx_v_self->_asyncgens != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1104 * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: * sys.set_asyncgen_hooks(*old_agen_hooks) # <<<<<<<<<<<<<< * * def close(self): */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_v_old_agen_hooks)) { __Pyx_RaiseUnboundLocalError("old_agen_hooks"); __PYX_ERR(1, 1104, __pyx_L1_error) } __pyx_t_4 = PySequence_Tuple(__pyx_v_old_agen_hooks); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1103 * finally: * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * sys.set_asyncgen_hooks(*old_agen_hooks) * */ } goto __pyx_L7; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L6_error:; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { /* "uvloop/loop.pyx":1102 * self._run(mode) * finally: * self._set_coroutine_wrapper(False) # <<<<<<<<<<<<<< * if self._asyncgens is not None: * sys.set_asyncgen_hooks(*old_agen_hooks) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_wrapper(__pyx_v_self, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1102, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1103 * finally: * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * sys.set_asyncgen_hooks(*old_agen_hooks) * */ __pyx_t_2 = (__pyx_v_self->_asyncgens != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1104 * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: * sys.set_asyncgen_hooks(*old_agen_hooks) # <<<<<<<<<<<<<< * * def close(self): */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1104, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_set_asyncgen_hooks); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1104, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_v_old_agen_hooks)) { __Pyx_RaiseUnboundLocalError("old_agen_hooks"); __PYX_ERR(1, 1104, __pyx_L10_error) } __pyx_t_5 = PySequence_Tuple(__pyx_v_old_agen_hooks); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1104, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1104, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1103 * finally: * self._set_coroutine_wrapper(False) * if self._asyncgens is not None: # <<<<<<<<<<<<<< * sys.set_asyncgen_hooks(*old_agen_hooks) * */ } } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; __pyx_L10_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; goto __pyx_L1_error; } __pyx_L7:; } /* "uvloop/loop.pyx":1086 * None)) * * def run_forever(self): # <<<<<<<<<<<<<< * """Run the event loop until stop() is called.""" * self._check_closed() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop.run_forever", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_old_agen_hooks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1106 * sys.set_asyncgen_hooks(*old_agen_hooks) * * def close(self): # <<<<<<<<<<<<<< * """Close the event loop. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_26close[] = "Loop.close(self)\nClose the event loop.\n\n The event loop must not be running.\n\n This is idempotent and irreversible.\n\n No other methods should be called after this one.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_26close(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26close(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/loop.pyx":1115 * No other methods should be called after this one. * """ * self._close() # <<<<<<<<<<<<<< * * def get_debug(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1106 * sys.set_asyncgen_hooks(*old_agen_hooks) * * def close(self): # <<<<<<<<<<<<<< * """Close the event loop. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1117 * self._close() * * def get_debug(self): # <<<<<<<<<<<<<< * return bool(self._debug) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29get_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_28get_debug[] = "Loop.get_debug(self)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29get_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_debug (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28get_debug(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28get_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_debug", 0); /* "uvloop/loop.pyx":1118 * * def get_debug(self): * return bool(self._debug) # <<<<<<<<<<<<<< * * def set_debug(self, enabled): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_debug; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1117 * self._close() * * def get_debug(self): # <<<<<<<<<<<<<< * return bool(self._debug) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.get_debug", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1120 * return bool(self._debug) * * def set_debug(self, enabled): # <<<<<<<<<<<<<< * self._debug = bool(enabled) * if self.is_running(): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31set_debug(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_30set_debug[] = "Loop.set_debug(self, enabled)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31set_debug(PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_debug (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_30set_debug(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_enabled)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_30set_debug(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_enabled) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("set_debug", 0); /* "uvloop/loop.pyx":1121 * * def set_debug(self, enabled): * self._debug = bool(enabled) # <<<<<<<<<<<<<< * if self.is_running(): * self._set_coroutine_wrapper(self._debug) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1121, __pyx_L1_error) __pyx_v_self->_debug = (!(!__pyx_t_1)); /* "uvloop/loop.pyx":1122 * def set_debug(self, enabled): * self._debug = bool(enabled) * if self.is_running(): # <<<<<<<<<<<<<< * self._set_coroutine_wrapper(self._debug) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_running); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1122, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":1123 * self._debug = bool(enabled) * if self.is_running(): * self._set_coroutine_wrapper(self._debug) # <<<<<<<<<<<<<< * * def is_running(self): */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_set_coroutine_wrapper(__pyx_v_self, __pyx_v_self->_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1122 * def set_debug(self, enabled): * self._debug = bool(enabled) * if self.is_running(): # <<<<<<<<<<<<<< * self._set_coroutine_wrapper(self._debug) * */ } /* "uvloop/loop.pyx":1120 * return bool(self._debug) * * def set_debug(self, enabled): # <<<<<<<<<<<<<< * self._debug = bool(enabled) * if self.is_running(): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.set_debug", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1125 * self._set_coroutine_wrapper(self._debug) * * def is_running(self): # <<<<<<<<<<<<<< * """Return whether the event loop is currently running.""" * return bool(self._running) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33is_running(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_32is_running[] = "Loop.is_running(self)\nReturn whether the event loop is currently running."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33is_running(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_running (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_32is_running(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32is_running(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("is_running", 0); /* "uvloop/loop.pyx":1127 * def is_running(self): * """Return whether the event loop is currently running.""" * return bool(self._running) # <<<<<<<<<<<<<< * * def is_closed(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_running; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1125 * self._set_coroutine_wrapper(self._debug) * * def is_running(self): # <<<<<<<<<<<<<< * """Return whether the event loop is currently running.""" * return bool(self._running) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.is_running", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1129 * return bool(self._running) * * def is_closed(self): # <<<<<<<<<<<<<< * """Returns True if the event loop was closed.""" * return bool(self._closed) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35is_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_34is_closed[] = "Loop.is_closed(self)\nReturns True if the event loop was closed."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35is_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_closed (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_34is_closed(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34is_closed(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("is_closed", 0); /* "uvloop/loop.pyx":1131 * def is_closed(self): * """Returns True if the event loop was closed.""" * return bool(self._closed) # <<<<<<<<<<<<<< * * def create_future(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->_closed; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1129 * return bool(self._running) * * def is_closed(self): # <<<<<<<<<<<<<< * """Returns True if the event loop was closed.""" * return bool(self._closed) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.Loop.is_closed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1133 * return bool(self._closed) * * def create_future(self): # <<<<<<<<<<<<<< * """Create a Future object attached to the loop.""" * return self._new_future() */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_37create_future(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_36create_future[] = "Loop.create_future(self)\nCreate a Future object attached to the loop."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_37create_future(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_future (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_36create_future(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_36create_future(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("create_future", 0); /* "uvloop/loop.pyx":1135 * def create_future(self): * """Create a Future object attached to the loop.""" * return self._new_future() # <<<<<<<<<<<<<< * * def create_task(self, coro): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1133 * return bool(self._closed) * * def create_future(self): # <<<<<<<<<<<<<< * """Create a Future object attached to the loop.""" * return self._new_future() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.create_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1137 * return self._new_future() * * def create_task(self, coro): # <<<<<<<<<<<<<< * """Schedule a coroutine object. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_39create_task(PyObject *__pyx_v_self, PyObject *__pyx_v_coro); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_38create_task[] = "Loop.create_task(self, coro)\nSchedule a coroutine object.\n\n Return a task object.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_39create_task(PyObject *__pyx_v_self, PyObject *__pyx_v_coro) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_task (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_38create_task(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_coro)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38create_task(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_coro) { PyObject *__pyx_v_task = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("create_task", 0); /* "uvloop/loop.pyx":1142 * Return a task object. * """ * self._check_closed() # <<<<<<<<<<<<<< * if self._task_factory is None: * task = task_factory(coro, loop=self) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1143 * """ * self._check_closed() * if self._task_factory is None: # <<<<<<<<<<<<<< * task = task_factory(coro, loop=self) * else: */ __pyx_t_2 = (__pyx_v_self->_task_factory == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1144 * self._check_closed() * if self._task_factory is None: * task = task_factory(coro, loop=self) # <<<<<<<<<<<<<< * else: * task = self._task_factory(self, coro) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_coro); __Pyx_GIVEREF(__pyx_v_coro); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_coro); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(1, 1144, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_task_factory, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_task = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":1143 * """ * self._check_closed() * if self._task_factory is None: # <<<<<<<<<<<<<< * task = task_factory(coro, loop=self) * else: */ goto __pyx_L3; } /* "uvloop/loop.pyx":1146 * task = task_factory(coro, loop=self) * else: * task = self._task_factory(self, coro) # <<<<<<<<<<<<<< * return task * */ /*else*/ { __Pyx_INCREF(__pyx_v_self->_task_factory); __pyx_t_4 = __pyx_v_self->_task_factory; __pyx_t_1 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_coro}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_v_coro}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_coro); __Pyx_GIVEREF(__pyx_v_coro); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_coro); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_task = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L3:; /* "uvloop/loop.pyx":1147 * else: * task = self._task_factory(self, coro) * return task # <<<<<<<<<<<<<< * * def set_task_factory(self, factory): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_task); __pyx_r = __pyx_v_task; goto __pyx_L0; /* "uvloop/loop.pyx":1137 * return self._new_future() * * def create_task(self, coro): # <<<<<<<<<<<<<< * """Schedule a coroutine object. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop.create_task", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_task); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1149 * return task * * def set_task_factory(self, factory): # <<<<<<<<<<<<<< * """Set a task factory that will be used by loop.create_task(). * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory(PyObject *__pyx_v_self, PyObject *__pyx_v_factory); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_40set_task_factory[] = "Loop.set_task_factory(self, factory)\nSet a task factory that will be used by loop.create_task().\n\n If factory is None the default task factory will be set.\n\n If factory is a callable, it should have a signature matching\n '(loop, coro)', where 'loop' will be a reference to the active\n event loop, 'coro' will be a coroutine object. The callable\n must return a Future.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory(PyObject *__pyx_v_self, PyObject *__pyx_v_factory) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_task_factory (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_factory)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_40set_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_factory) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("set_task_factory", 0); /* "uvloop/loop.pyx":1159 * must return a Future. * """ * if factory is not None and not callable(factory): # <<<<<<<<<<<<<< * raise TypeError('task factory must be a callable or None') * self._task_factory = factory */ __pyx_t_2 = (__pyx_v_factory != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_factory); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1159, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1160 * """ * if factory is not None and not callable(factory): * raise TypeError('task factory must be a callable or None') # <<<<<<<<<<<<<< * self._task_factory = factory * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1160, __pyx_L1_error) /* "uvloop/loop.pyx":1159 * must return a Future. * """ * if factory is not None and not callable(factory): # <<<<<<<<<<<<<< * raise TypeError('task factory must be a callable or None') * self._task_factory = factory */ } /* "uvloop/loop.pyx":1161 * if factory is not None and not callable(factory): * raise TypeError('task factory must be a callable or None') * self._task_factory = factory # <<<<<<<<<<<<<< * * def get_task_factory(self): */ __Pyx_INCREF(__pyx_v_factory); __Pyx_GIVEREF(__pyx_v_factory); __Pyx_GOTREF(__pyx_v_self->_task_factory); __Pyx_DECREF(__pyx_v_self->_task_factory); __pyx_v_self->_task_factory = __pyx_v_factory; /* "uvloop/loop.pyx":1149 * return task * * def set_task_factory(self, factory): # <<<<<<<<<<<<<< * """Set a task factory that will be used by loop.create_task(). * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.set_task_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1163 * self._task_factory = factory * * def get_task_factory(self): # <<<<<<<<<<<<<< * """Return a task factory, or None if the default one is in use.""" * return self._task_factory */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_42get_task_factory[] = "Loop.get_task_factory(self)\nReturn a task factory, or None if the default one is in use."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_task_factory (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_42get_task_factory(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_task_factory", 0); /* "uvloop/loop.pyx":1165 * def get_task_factory(self): * """Return a task factory, or None if the default one is in use.""" * return self._task_factory # <<<<<<<<<<<<<< * * def run_until_complete(self, future): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_task_factory); __pyx_r = __pyx_v_self->_task_factory; goto __pyx_L0; /* "uvloop/loop.pyx":1163 * self._task_factory = factory * * def get_task_factory(self): # <<<<<<<<<<<<<< * """Return a task factory, or None if the default one is in use.""" * return self._task_factory */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1167 * return self._task_factory * * def run_until_complete(self, future): # <<<<<<<<<<<<<< * """Run until the Future is done. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete(PyObject *__pyx_v_self, PyObject *__pyx_v_future); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_44run_until_complete[] = "Loop.run_until_complete(self, future)\nRun until the Future is done.\n\n If the argument is a coroutine, it is wrapped in a Task.\n\n WARNING: It would be disastrous to call run_until_complete()\n with the same coroutine twice -- it would wrap it in two\n different Tasks and that can't be good.\n\n Return the Future's result, or raise its exception.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete(PyObject *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run_until_complete (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_future)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1187 * future._log_destroy_pending = False * * done_cb = lambda fut: self.stop() # <<<<<<<<<<<<<< * * future.add_done_callback(done_cb) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_fut); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_4Loop_18run_until_complete_lambda1 = {"lambda1", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda1, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_18run_until_complete_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_fut) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_fut)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_fut) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("lambda1", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(1, 1187, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1187, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1167 * return self._task_factory * * def run_until_complete(self, future): # <<<<<<<<<<<<<< * """Run until the Future is done. * */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_44run_until_complete(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_future) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *__pyx_cur_scope; int __pyx_v_new_task; PyObject *__pyx_v_done_cb = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("run_until_complete", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_3_run_until_complete, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1167, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_v_future); /* "uvloop/loop.pyx":1178 * Return the Future's result, or raise its exception. * """ * self._check_closed() # <<<<<<<<<<<<<< * * new_task = not isfuture(future) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1180 * self._check_closed() * * new_task = not isfuture(future) # <<<<<<<<<<<<<< * future = aio_ensure_future(future, loop=self) * if new_task: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_new_task = (!__pyx_t_2); /* "uvloop/loop.pyx":1181 * * new_task = not isfuture(future) * future = aio_ensure_future(future, loop=self) # <<<<<<<<<<<<<< * if new_task: * # An exception is raised if the future didn't complete, so there */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_future); __Pyx_GIVEREF(__pyx_v_future); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_future); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(1, 1181, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_ensure_future, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_future, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1182 * new_task = not isfuture(future) * future = aio_ensure_future(future, loop=self) * if new_task: # <<<<<<<<<<<<<< * # An exception is raised if the future didn't complete, so there * # is no need to log the "destroy pending task" message */ __pyx_t_2 = (__pyx_v_new_task != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1185 * # An exception is raised if the future didn't complete, so there * # is no need to log the "destroy pending task" message * future._log_destroy_pending = False # <<<<<<<<<<<<<< * * done_cb = lambda fut: self.stop() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_future, __pyx_n_s_log_destroy_pending, Py_False) < 0) __PYX_ERR(1, 1185, __pyx_L1_error) /* "uvloop/loop.pyx":1182 * new_task = not isfuture(future) * future = aio_ensure_future(future, loop=self) * if new_task: # <<<<<<<<<<<<<< * # An exception is raised if the future didn't complete, so there * # is no need to log the "destroy pending task" message */ } /* "uvloop/loop.pyx":1187 * future._log_destroy_pending = False * * done_cb = lambda fut: self.stop() # <<<<<<<<<<<<<< * * future.add_done_callback(done_cb) */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_4Loop_18run_until_complete_lambda1, 0, __pyx_n_s_run_until_complete_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_done_cb = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":1189 * done_cb = lambda fut: self.stop() * * future.add_done_callback(done_cb) # <<<<<<<<<<<<<< * try: * self.run_forever() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_1) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_done_cb); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_done_cb}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_done_cb}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_done_cb); __Pyx_GIVEREF(__pyx_v_done_cb); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_done_cb); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1190 * * future.add_done_callback(done_cb) * try: # <<<<<<<<<<<<<< * self.run_forever() * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":1191 * future.add_done_callback(done_cb) * try: * self.run_forever() # <<<<<<<<<<<<<< * except: * if new_task and future.done() and not future.cancelled(): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_run_forever); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1191, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1191, __pyx_L4_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1191, __pyx_L4_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1190 * * future.add_done_callback(done_cb) * try: # <<<<<<<<<<<<<< * self.run_forever() * except: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1192 * try: * self.run_forever() * except: # <<<<<<<<<<<<<< * if new_task and future.done() and not future.cancelled(): * # The coroutine raised a BaseException. Consume the exception */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(1, 1192, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":1193 * self.run_forever() * except: * if new_task and future.done() and not future.cancelled(): # <<<<<<<<<<<<<< * # The coroutine raised a BaseException. Consume the exception * # to not log a warning, the caller doesn't have access to the */ __pyx_t_9 = (__pyx_v_new_task != 0); if (__pyx_t_9) { } else { __pyx_t_2 = __pyx_t_9; goto __pyx_L15_bool_binop_done; } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_done); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_11) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1193, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { } else { __pyx_t_2 = __pyx_t_9; goto __pyx_L15_bool_binop_done; } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_11) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1193, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 1193, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = ((!__pyx_t_9) != 0); __pyx_t_2 = __pyx_t_12; __pyx_L15_bool_binop_done:; if (__pyx_t_2) { /* "uvloop/loop.pyx":1197 * # to not log a warning, the caller doesn't have access to the * # local task. * future.exception() # <<<<<<<<<<<<<< * raise * future.remove_done_callback(done_cb) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_exception); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1197, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_11) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1197, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1197, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1193 * self.run_forever() * except: * if new_task and future.done() and not future.cancelled(): # <<<<<<<<<<<<<< * # The coroutine raised a BaseException. Consume the exception * # to not log a warning, the caller doesn't have access to the */ } /* "uvloop/loop.pyx":1198 * # local task. * future.exception() * raise # <<<<<<<<<<<<<< * future.remove_done_callback(done_cb) * if not future.done(): */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_3, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(1, 1198, __pyx_L6_except_error) } __pyx_L6_except_error:; /* "uvloop/loop.pyx":1190 * * future.add_done_callback(done_cb) * try: # <<<<<<<<<<<<<< * self.run_forever() * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":1199 * future.exception() * raise * future.remove_done_callback(done_cb) # <<<<<<<<<<<<<< * if not future.done(): * raise RuntimeError('Event loop stopped before Future completed.') */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_remove_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_done_cb); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_done_cb}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_done_cb}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_done_cb); __Pyx_GIVEREF(__pyx_v_done_cb); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_done_cb); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1200 * raise * future.remove_done_callback(done_cb) * if not future.done(): # <<<<<<<<<<<<<< * raise RuntimeError('Event loop stopped before Future completed.') * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_done); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_1) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1200, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = ((!__pyx_t_2) != 0); if (__pyx_t_12) { /* "uvloop/loop.pyx":1201 * future.remove_done_callback(done_cb) * if not future.done(): * raise RuntimeError('Event loop stopped before Future completed.') # <<<<<<<<<<<<<< * * return future.result() */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 1201, __pyx_L1_error) /* "uvloop/loop.pyx":1200 * raise * future.remove_done_callback(done_cb) * if not future.done(): # <<<<<<<<<<<<<< * raise RuntimeError('Event loop stopped before Future completed.') * */ } /* "uvloop/loop.pyx":1203 * raise RuntimeError('Event loop stopped before Future completed.') * * return future.result() # <<<<<<<<<<<<<< * * def getaddrinfo(self, object host, object port, *, */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_1) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1203, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1167 * return self._task_factory * * def run_until_complete(self, future): # <<<<<<<<<<<<<< * """Run until the Future is done. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.Loop.run_until_complete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_done_cb); __Pyx_XDECREF(__pyx_v_future); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1205 * return future.result() * * def getaddrinfo(self, object host, object port, *, # <<<<<<<<<<<<<< * int family=0, int type=0, int proto=0, int flags=0): * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_46getaddrinfo[] = "Loop.getaddrinfo(self, host, port, *, int family=0, int type=0, int proto=0, int flags=0)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_host = 0; PyObject *__pyx_v_port = 0; int __pyx_v_family; int __pyx_v_type; int __pyx_v_proto; int __pyx_v_flags; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getaddrinfo (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_type,&__pyx_n_s_proto,&__pyx_n_s_flags,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("getaddrinfo", 1, 2, 2, 1); __PYX_ERR(1, 1205, __pyx_L3_error) } } if (kw_args > 0 && likely(kw_args <= 4)) { Py_ssize_t index; for (index = 2; index < 6 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getaddrinfo") < 0)) __PYX_ERR(1, 1205, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_host = values[0]; __pyx_v_port = values[1]; if (values[2]) { __pyx_v_family = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1206, __pyx_L3_error) } else { __pyx_v_family = ((int)0); } if (values[3]) { __pyx_v_type = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1206, __pyx_L3_error) } else { __pyx_v_type = ((int)0); } if (values[4]) { __pyx_v_proto = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_proto == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1206, __pyx_L3_error) } else { __pyx_v_proto = ((int)0); } if (values[5]) { __pyx_v_flags = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1206, __pyx_L3_error) } else { __pyx_v_flags = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getaddrinfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1205, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_46getaddrinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags) { PyObject *__pyx_v_addr = NULL; PyObject *__pyx_v_fut = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("getaddrinfo", 0); /* "uvloop/loop.pyx":1208 * int family=0, int type=0, int proto=0, int flags=0): * * addr = __static_getaddrinfo_pyaddr(host, port, family, # <<<<<<<<<<<<<< * type, proto, flags) * if addr is not None: */ __pyx_t_1 = __pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(__pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_addr = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1210 * addr = __static_getaddrinfo_pyaddr(host, port, family, * type, proto, flags) * if addr is not None: # <<<<<<<<<<<<<< * fut = self._new_future() * fut.set_result([addr]) */ __pyx_t_2 = (__pyx_v_addr != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1211 * type, proto, flags) * if addr is not None: * fut = self._new_future() # <<<<<<<<<<<<<< * fut.set_result([addr]) * return fut */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fut = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1212 * if addr is not None: * fut = self._new_future() * fut.set_result([addr]) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_addr); __Pyx_GIVEREF(__pyx_v_addr); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_addr); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1213 * fut = self._new_future() * fut.set_result([addr]) * return fut # <<<<<<<<<<<<<< * * return self._getaddrinfo(host, port, family, type, proto, flags, 1) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fut); __pyx_r = __pyx_v_fut; goto __pyx_L0; /* "uvloop/loop.pyx":1210 * addr = __static_getaddrinfo_pyaddr(host, port, family, * type, proto, flags) * if addr is not None: # <<<<<<<<<<<<<< * fut = self._new_future() * fut.set_result([addr]) */ } /* "uvloop/loop.pyx":1215 * return fut * * return self._getaddrinfo(host, port, family, type, proto, flags, 1) # <<<<<<<<<<<<<< * * async def getnameinfo(self, sockaddr, int flags=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_v_self, __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1205 * return future.result() * * def getaddrinfo(self, object host, object port, *, # <<<<<<<<<<<<<< * int family=0, int type=0, int proto=0, int flags=0): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop.getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_addr); __Pyx_XDECREF(__pyx_v_fut); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_50generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1217 * return self._getaddrinfo(host, port, family, type, proto, flags, 1) * * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<< * cdef: * AddrInfo ai_cnt */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_49getnameinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_48getnameinfo[] = "Loop.getnameinfo(self, sockaddr, int flags=0)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_49getnameinfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sockaddr = 0; int __pyx_v_flags; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getnameinfo (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sockaddr,&__pyx_n_s_flags,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sockaddr)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getnameinfo") < 0)) __PYX_ERR(1, 1217, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sockaddr = values[0]; if (values[1]) { __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1217, __pyx_L3_error) } else { __pyx_v_flags = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("getnameinfo", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1217, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_48getnameinfo(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sockaddr, __pyx_v_flags); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_48getnameinfo(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sockaddr, int __pyx_v_flags) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getnameinfo", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_getnameinfo, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1217, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_sockaddr = __pyx_v_sockaddr; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sockaddr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sockaddr); __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags; { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_50generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_getnameinfo, __pyx_n_s_Loop_getnameinfo, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1217, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_50generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; struct addrinfo *__pyx_t_7; int __pyx_t_8; unsigned long __pyx_t_9; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L16_resume_from_yield; case 2: goto __pyx_L20_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1217, __pyx_L1_error) /* "uvloop/loop.pyx":1223 * system.sockaddr_in6 *sin6 * * if not isinstance(sockaddr, tuple): # <<<<<<<<<<<<<< * raise TypeError('getnameinfo() argument 1 must be a tuple') * */ __pyx_t_1 = PyTuple_Check(__pyx_cur_scope->__pyx_v_sockaddr); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1224 * * if not isinstance(sockaddr, tuple): * raise TypeError('getnameinfo() argument 1 must be a tuple') # <<<<<<<<<<<<<< * * sl = len(sockaddr) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1224, __pyx_L1_error) /* "uvloop/loop.pyx":1223 * system.sockaddr_in6 *sin6 * * if not isinstance(sockaddr, tuple): # <<<<<<<<<<<<<< * raise TypeError('getnameinfo() argument 1 must be a tuple') * */ } /* "uvloop/loop.pyx":1226 * raise TypeError('getnameinfo() argument 1 must be a tuple') * * sl = len(sockaddr) # <<<<<<<<<<<<<< * * if sl < 2 or sl > 4: */ __pyx_t_4 = PyObject_Length(__pyx_cur_scope->__pyx_v_sockaddr); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 1226, __pyx_L1_error) __pyx_cur_scope->__pyx_v_sl = __pyx_t_4; /* "uvloop/loop.pyx":1228 * sl = len(sockaddr) * * if sl < 2 or sl > 4: # <<<<<<<<<<<<<< * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') * */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_sl < 2) != 0); if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_sl > 4) != 0); __pyx_t_2 = __pyx_t_1; __pyx_L6_bool_binop_done:; if (__pyx_t_2) { /* "uvloop/loop.pyx":1229 * * if sl < 2 or sl > 4: * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') # <<<<<<<<<<<<<< * * if sl > 2: */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1229, __pyx_L1_error) /* "uvloop/loop.pyx":1228 * sl = len(sockaddr) * * if sl < 2 or sl > 4: # <<<<<<<<<<<<<< * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') * */ } /* "uvloop/loop.pyx":1231 * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') * * if sl > 2: # <<<<<<<<<<<<<< * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 2) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1232 * * if sl > 2: * flowinfo = sockaddr[2] # <<<<<<<<<<<<<< * if flowinfo < 0 or flowinfo > 0xfffff: * raise OverflowError( */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_flowinfo = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":1233 * if sl > 2: * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: # <<<<<<<<<<<<<< * raise OverflowError( * 'getsockaddrarg: flowinfo must be 0-1048575.') */ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_flowinfo, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1233, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L10_bool_binop_done; } __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_flowinfo, __pyx_int_1048575, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1233, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L10_bool_binop_done:; if (__pyx_t_2) { /* "uvloop/loop.pyx":1234 * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: * raise OverflowError( # <<<<<<<<<<<<<< * 'getsockaddrarg: flowinfo must be 0-1048575.') * else: */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OverflowError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1234, __pyx_L1_error) /* "uvloop/loop.pyx":1233 * if sl > 2: * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: # <<<<<<<<<<<<<< * raise OverflowError( * 'getsockaddrarg: flowinfo must be 0-1048575.') */ } /* "uvloop/loop.pyx":1231 * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') * * if sl > 2: # <<<<<<<<<<<<<< * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: */ goto __pyx_L8; } /* "uvloop/loop.pyx":1237 * 'getsockaddrarg: flowinfo must be 0-1048575.') * else: * flowinfo = 0 # <<<<<<<<<<<<<< * * if sl > 3: */ /*else*/ { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_cur_scope->__pyx_v_flowinfo = __pyx_int_0; } __pyx_L8:; /* "uvloop/loop.pyx":1239 * flowinfo = 0 * * if sl > 3: # <<<<<<<<<<<<<< * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 3) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1240 * * if sl > 3: * scope_id = sockaddr[3] # <<<<<<<<<<<<<< * if scope_id < 0 or scope_id > 2 ** 32: * raise OverflowError( */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_scope_id = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":1241 * if sl > 3: * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: # <<<<<<<<<<<<<< * raise OverflowError( * 'getsockaddrarg: scope_id must be unsigned 32 bit integer') */ __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_scope_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1241, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L14_bool_binop_done; } __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_scope_id, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1241, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { /* "uvloop/loop.pyx":1242 * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: * raise OverflowError( # <<<<<<<<<<<<<< * 'getsockaddrarg: scope_id must be unsigned 32 bit integer') * else: */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OverflowError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 1242, __pyx_L1_error) /* "uvloop/loop.pyx":1241 * if sl > 3: * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: # <<<<<<<<<<<<<< * raise OverflowError( * 'getsockaddrarg: scope_id must be unsigned 32 bit integer') */ } /* "uvloop/loop.pyx":1239 * flowinfo = 0 * * if sl > 3: # <<<<<<<<<<<<<< * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: */ goto __pyx_L12; } /* "uvloop/loop.pyx":1245 * 'getsockaddrarg: scope_id must be unsigned 32 bit integer') * else: * scope_id = 0 # <<<<<<<<<<<<<< * * ai_cnt = await self._getaddrinfo( */ /*else*/ { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); __pyx_cur_scope->__pyx_v_scope_id = __pyx_int_0; } __pyx_L12:; /* "uvloop/loop.pyx":1248 * * ai_cnt = await self._getaddrinfo( * sockaddr[0], sockaddr[1], # <<<<<<<<<<<<<< * uv.AF_UNSPEC, # family * uv.SOCK_DGRAM, # type */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sockaddr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":1247 * scope_id = 0 * * ai_cnt = await self._getaddrinfo( # <<<<<<<<<<<<<< * sockaddr[0], sockaddr[1], * uv.AF_UNSPEC, # family */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_3, __pyx_t_5, AF_UNSPEC, SOCK_DGRAM, 0, AI_NUMERICHOST, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L16_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1247, __pyx_L1_error) __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6); } else { __pyx_t_6 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(1, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(1, 1247, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_ai_cnt = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1255 * 0) # unpack * * ai = ai_cnt.data # <<<<<<<<<<<<<< * * if ai.ai_next: */ __pyx_t_7 = __pyx_cur_scope->__pyx_v_ai_cnt->data; __pyx_cur_scope->__pyx_v_ai = __pyx_t_7; /* "uvloop/loop.pyx":1257 * ai = ai_cnt.data * * if ai.ai_next: # <<<<<<<<<<<<<< * raise OSError("sockaddr resolved to multiple addresses") * */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ai->ai_next != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1258 * * if ai.ai_next: * raise OSError("sockaddr resolved to multiple addresses") # <<<<<<<<<<<<<< * * if ai.ai_family == uv.AF_INET: */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1258, __pyx_L1_error) /* "uvloop/loop.pyx":1257 * ai = ai_cnt.data * * if ai.ai_next: # <<<<<<<<<<<<<< * raise OSError("sockaddr resolved to multiple addresses") * */ } /* "uvloop/loop.pyx":1260 * raise OSError("sockaddr resolved to multiple addresses") * * if ai.ai_family == uv.AF_INET: # <<<<<<<<<<<<<< * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai->ai_family == AF_INET) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1261 * * if ai.ai_family == uv.AF_INET: * if sl > 2: # <<<<<<<<<<<<<< * raise OSError("IPv4 sockaddr must be 2 tuple") * elif ai.ai_family == uv.AF_INET6: */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_sl > 2) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1262 * if ai.ai_family == uv.AF_INET: * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") # <<<<<<<<<<<<<< * elif ai.ai_family == uv.AF_INET6: * # Modify some fields in `ai` */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1262, __pyx_L1_error) /* "uvloop/loop.pyx":1261 * * if ai.ai_family == uv.AF_INET: * if sl > 2: # <<<<<<<<<<<<<< * raise OSError("IPv4 sockaddr must be 2 tuple") * elif ai.ai_family == uv.AF_INET6: */ } /* "uvloop/loop.pyx":1260 * raise OSError("sockaddr resolved to multiple addresses") * * if ai.ai_family == uv.AF_INET: # <<<<<<<<<<<<<< * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") */ goto __pyx_L18; } /* "uvloop/loop.pyx":1263 * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") * elif ai.ai_family == uv.AF_INET6: # <<<<<<<<<<<<<< * # Modify some fields in `ai` * sin6 = ai.ai_addr */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_ai->ai_family == AF_INET6) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1265 * elif ai.ai_family == uv.AF_INET6: * # Modify some fields in `ai` * sin6 = ai.ai_addr # <<<<<<<<<<<<<< * sin6.sin6_flowinfo = system.htonl(flowinfo) * sin6.sin6_scope_id = scope_id */ __pyx_cur_scope->__pyx_v_sin6 = ((struct sockaddr_in6 *)__pyx_cur_scope->__pyx_v_ai->ai_addr); /* "uvloop/loop.pyx":1266 * # Modify some fields in `ai` * sin6 = ai.ai_addr * sin6.sin6_flowinfo = system.htonl(flowinfo) # <<<<<<<<<<<<<< * sin6.sin6_scope_id = scope_id * */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flowinfo); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1266, __pyx_L1_error) __pyx_cur_scope->__pyx_v_sin6->sin6_flowinfo = htonl(__pyx_t_8); /* "uvloop/loop.pyx":1267 * sin6 = ai.ai_addr * sin6.sin6_flowinfo = system.htonl(flowinfo) * sin6.sin6_scope_id = scope_id # <<<<<<<<<<<<<< * * return await self._getnameinfo(ai.ai_addr, flags) */ __pyx_t_9 = __Pyx_PyInt_As_unsigned_long(__pyx_cur_scope->__pyx_v_scope_id); if (unlikely((__pyx_t_9 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1267, __pyx_L1_error) __pyx_cur_scope->__pyx_v_sin6->sin6_scope_id = __pyx_t_9; /* "uvloop/loop.pyx":1263 * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") * elif ai.ai_family == uv.AF_INET6: # <<<<<<<<<<<<<< * # Modify some fields in `ai` * sin6 = ai.ai_addr */ } __pyx_L18:; /* "uvloop/loop.pyx":1269 * sin6.sin6_scope_id = scope_id * * return await self._getnameinfo(ai.ai_addr, flags) # <<<<<<<<<<<<<< * * async def create_server(self, protocol_factory, host=None, port=None, */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getnameinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_ai->ai_addr, __pyx_cur_scope->__pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L20_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1269, __pyx_L1_error) __pyx_t_6 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_6); } else { __pyx_t_6 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_6) < 0) __PYX_ERR(1, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1217 * return self._getaddrinfo(host, port, family, type, proto, flags, 1) * * async def getnameinfo(self, sockaddr, int flags=0): # <<<<<<<<<<<<<< * cdef: * AddrInfo ai_cnt */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("getnameinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_53generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1271 * return await self._getnameinfo(ai.ai_addr, flags) * * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<< * *, * int family=uv.AF_UNSPEC, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_52create_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_51create_server[] = "Loop.create_server(self, protocol_factory, host=None, port=None, *, int family=uv.AF_UNSPEC, int flags=uv.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, reuse_port=None)\nA coroutine which creates a TCP server bound to host and port.\n\n The return value is a Server object which can be used to stop\n the service.\n\n If host is an empty string or None all interfaces are assumed\n and a list of multiple sockets will be returned (most likely\n one for IPv4 and another one for IPv6). The host parameter can also be a\n sequence (e.g. list) of hosts to bind to.\n\n family can be set to either AF_INET or AF_INET6 to force the\n socket to use IPv4 or IPv6. If not set it will be determined\n from host (defaults to AF_UNSPEC).\n\n flags is a bitmask for getaddrinfo().\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n\n backlog is the maximum number of queued connections passed to\n listen() (defaults to 100).\n\n ssl can be set to an SSLContext to enable SSL over the\n accepted connections.\n\n reuse_address tells the kernel to reuse a local socket in\n TIME_WAIT state, without waiting for its natural timeout to\n expire. If not specified will automatically be set to True on\n UNIX.\n\n reuse_port tells the kernel to allow this endpoint to be bound to\n the same port as other existing endpoints are bound to, so long as\n they all set this flag when being created. This option is not\n supported on Windows.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_52create_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_port = 0; int __pyx_v_family; int __pyx_v_flags; PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_backlog = 0; PyObject *__pyx_v_ssl = 0; CYTHON_UNUSED PyObject *__pyx_v_reuse_address = 0; PyObject *__pyx_v_reuse_port = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_server (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_flags,&__pyx_n_s_sock,&__pyx_n_s_backlog,&__pyx_n_s_ssl,&__pyx_n_s_reuse_address,&__pyx_n_s_reuse_port,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1275 * int family=uv.AF_UNSPEC, * int flags=uv.AI_PASSIVE, * sock=None, # <<<<<<<<<<<<<< * backlog=100, * ssl=None, */ values[5] = ((PyObject *)Py_None); values[6] = ((PyObject *)__pyx_int_100); /* "uvloop/loop.pyx":1277 * sock=None, * backlog=100, * ssl=None, # <<<<<<<<<<<<<< * reuse_address=None, # ignored, libuv sets it * reuse_port=None): */ values[7] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1278 * backlog=100, * ssl=None, * reuse_address=None, # ignored, libuv sets it # <<<<<<<<<<<<<< * reuse_port=None): * """A coroutine which creates a TCP server bound to host and port. */ values[8] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1279 * ssl=None, * reuse_address=None, # ignored, libuv sets it * reuse_port=None): # <<<<<<<<<<<<<< * """A coroutine which creates a TCP server bound to host and port. * */ values[9] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port); if (value) { values[2] = value; kw_args--; } } } if (kw_args > 0 && likely(kw_args <= 7)) { Py_ssize_t index; for (index = 3; index < 10 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_server") < 0)) __PYX_ERR(1, 1271, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_protocol_factory = values[0]; __pyx_v_host = values[1]; __pyx_v_port = values[2]; if (values[3]) { __pyx_v_family = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1273, __pyx_L3_error) } else { __pyx_v_family = __pyx_k__49; } if (values[4]) { __pyx_v_flags = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1274, __pyx_L3_error) } else { __pyx_v_flags = __pyx_k__50; } __pyx_v_sock = values[5]; __pyx_v_backlog = values[6]; __pyx_v_ssl = values[7]; __pyx_v_reuse_address = values[8]; __pyx_v_reuse_port = values[9]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create_server", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1271, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_51create_server(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_flags, __pyx_v_sock, __pyx_v_backlog, __pyx_v_ssl, __pyx_v_reuse_address, __pyx_v_reuse_port); /* "uvloop/loop.pyx":1271 * return await self._getnameinfo(ai.ai_addr, flags) * * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<< * *, * int family=uv.AF_UNSPEC, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_51create_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_backlog, PyObject *__pyx_v_ssl, CYTHON_UNUSED PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_server", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_create_server(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_create_server, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1271, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_host = __pyx_v_host; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); __pyx_cur_scope->__pyx_v_port = __pyx_v_port; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_port); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_port); __pyx_cur_scope->__pyx_v_family = __pyx_v_family; __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags; __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_backlog = __pyx_v_backlog; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_backlog); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_backlog); __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); __pyx_cur_scope->__pyx_v_reuse_address = __pyx_v_reuse_address; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_address); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_address); __pyx_cur_scope->__pyx_v_reuse_port = __pyx_v_reuse_port; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_port); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_port); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_53generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_server, __pyx_n_s_Loop_create_server, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1271, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_53generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); struct addrinfo *__pyx_t_10; int __pyx_t_11; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L10_resume_from_yield; case 2: goto __pyx_L30_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1271, __pyx_L1_error) /* "uvloop/loop.pyx":1320 * Server server * * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * if host is not None or port is not None: * raise ValueError( */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1321 * * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L8_bool_binop_done; } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L8_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1322 * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * return await self.create_unix_server( */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1322, __pyx_L1_error) /* "uvloop/loop.pyx":1321 * * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1324 * raise ValueError( * 'host/port and sock can not be specified at the same time') * return await self.create_unix_server( # <<<<<<<<<<<<<< * protocol_factory, sock=sock, ssl=ssl) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_create_unix_server); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1325 * 'host/port and sock can not be specified at the same time') * return await self.create_unix_server( * protocol_factory, sock=sock, ssl=ssl) # <<<<<<<<<<<<<< * * server = Server(self) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sock, __pyx_cur_scope->__pyx_v_sock) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl, __pyx_cur_scope->__pyx_v_ssl) < 0) __PYX_ERR(1, 1325, __pyx_L1_error) /* "uvloop/loop.pyx":1324 * raise ValueError( * 'host/port and sock can not be specified at the same time') * return await self.create_unix_server( # <<<<<<<<<<<<<< * protocol_factory, sock=sock, ssl=ssl) * */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L10_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1324, __pyx_L1_error) __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_7 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(1, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1320 * Server server * * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * if host is not None or port is not None: * raise ValueError( */ } /* "uvloop/loop.pyx":1327 * protocol_factory, sock=sock, ssl=ssl) * * server = Server(self) # <<<<<<<<<<<<<< * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_Server), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1329 * server = Server(self) * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_ssl != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L12_bool_binop_done; } __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_SSLContext; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L12_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1330 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * * if host is not None or port is not None: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1330, __pyx_L1_error) /* "uvloop/loop.pyx":1329 * server = Server(self) * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * */ } /* "uvloop/loop.pyx":1332 * raise TypeError('ssl argument must be an SSLContext or None') * * if host is not None or port is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L15_bool_binop_done; } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1333 * * if host is not None or port is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1334 * if host is not None or port is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1334, __pyx_L1_error) /* "uvloop/loop.pyx":1333 * * if host is not None or port is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1337 * 'host/port and sock can not be specified at the same time') * * reuse_port = bool(reuse_port) # <<<<<<<<<<<<<< * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1337, __pyx_L1_error) __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_port); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_port, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1338 * * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<< * raise ValueError( * 'reuse_port not supported by socket module') */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1338, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L19_bool_binop_done; } __pyx_t_1 = ((!(__pyx_v_6uvloop_4loop_has_SO_REUSEPORT != 0)) != 0); __pyx_t_3 = __pyx_t_1; __pyx_L19_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":1339 * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( # <<<<<<<<<<<<<< * 'reuse_port not supported by socket module') * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1339, __pyx_L1_error) /* "uvloop/loop.pyx":1338 * * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<< * raise ValueError( * 'reuse_port not supported by socket module') */ } /* "uvloop/loop.pyx":1342 * 'reuse_port not supported by socket module') * * if host == '': # <<<<<<<<<<<<<< * hosts = [None] * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): */ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_host, __pyx_kp_u__30, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1342, __pyx_L1_error) if (__pyx_t_3) { /* "uvloop/loop.pyx":1343 * * if host == '': * hosts = [None] # <<<<<<<<<<<<<< * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): * hosts = [host] */ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_hosts = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":1342 * 'reuse_port not supported by socket module') * * if host == '': # <<<<<<<<<<<<<< * hosts = [None] * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): */ goto __pyx_L21; } /* "uvloop/loop.pyx":1344 * if host == '': * hosts = [None] * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): # <<<<<<<<<<<<<< * hosts = [host] * else: */ __pyx_t_1 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_host); __pyx_t_2 = (__pyx_t_1 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L22_bool_binop_done; } __pyx_t_4 = __pyx_v_6uvloop_4loop_col_Iterable; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_host, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); __pyx_t_3 = __pyx_t_1; __pyx_L22_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":1345 * hosts = [None] * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): * hosts = [host] # <<<<<<<<<<<<<< * else: * hosts = host */ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_hosts = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":1344 * if host == '': * hosts = [None] * elif (isinstance(host, str) or not isinstance(host, col_Iterable)): # <<<<<<<<<<<<<< * hosts = [host] * else: */ goto __pyx_L21; } /* "uvloop/loop.pyx":1347 * hosts = [host] * else: * hosts = host # <<<<<<<<<<<<<< * * fs = [self._getaddrinfo(host, port, family, */ /*else*/ { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); __pyx_cur_scope->__pyx_v_hosts = __pyx_cur_scope->__pyx_v_host; } __pyx_L21:; /* "uvloop/loop.pyx":1349 * hosts = host * * fs = [self._getaddrinfo(host, port, family, # <<<<<<<<<<<<<< * uv.SOCK_STREAM, 0, flags, * 0) for host in hosts] */ { /* enter inner scope */ PyObject *__pyx_7genexpr__pyx_v_host = NULL; __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1349, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":1351 * fs = [self._getaddrinfo(host, port, family, * uv.SOCK_STREAM, 0, flags, * 0) for host in hosts] # <<<<<<<<<<<<<< * * infos = await aio_gather(*fs, loop=self) */ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_hosts)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_hosts)) { __pyx_t_7 = __pyx_cur_scope->__pyx_v_hosts; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_hosts); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1351, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1351, __pyx_L26_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1351, __pyx_L26_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1351, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1351, __pyx_L26_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1351, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1351, __pyx_L26_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_host, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1349 * hosts = host * * fs = [self._getaddrinfo(host, port, family, # <<<<<<<<<<<<<< * uv.SOCK_STREAM, 0, flags, * 0) for host in hosts] */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_7genexpr__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_cur_scope->__pyx_v_family, SOCK_STREAM, 0, __pyx_cur_scope->__pyx_v_flags, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1349, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 1349, __pyx_L26_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1351 * fs = [self._getaddrinfo(host, port, family, * uv.SOCK_STREAM, 0, flags, * 0) for host in hosts] # <<<<<<<<<<<<<< * * infos = await aio_gather(*fs, loop=self) */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_host); goto __pyx_L29_exit_scope; __pyx_L26_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_host); goto __pyx_L1_error; __pyx_L29_exit_scope:; } /* exit inner scope */ __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_fs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1353 * 0) for host in hosts] * * infos = await aio_gather(*fs, loop=self) # <<<<<<<<<<<<<< * * completed = False */ __pyx_t_4 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_fs); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(1, 1353, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L30_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1353, __pyx_L1_error) __pyx_t_5 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_5); } else { __pyx_t_5 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_5) < 0) __PYX_ERR(1, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_infos = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":1355 * infos = await aio_gather(*fs, loop=self) * * completed = False # <<<<<<<<<<<<<< * try: * for info in infos: */ __pyx_cur_scope->__pyx_v_completed = 0; /* "uvloop/loop.pyx":1356 * * completed = False * try: # <<<<<<<<<<<<<< * for info in infos: * addrinfo = (info).data */ /*try:*/ { /* "uvloop/loop.pyx":1357 * completed = False * try: * for info in infos: # <<<<<<<<<<<<<< * addrinfo = (info).data * while addrinfo != NULL: */ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_infos)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_infos)) { __pyx_t_5 = __pyx_cur_scope->__pyx_v_infos; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_infos); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1357, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1357, __pyx_L32_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1357, __pyx_L32_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1357, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1357, __pyx_L32_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1357, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_7); #endif } } else { __pyx_t_7 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1357, __pyx_L32_error) } break; } __Pyx_GOTREF(__pyx_t_7); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_info); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_info, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1358 * try: * for info in infos: * addrinfo = (info).data # <<<<<<<<<<<<<< * while addrinfo != NULL: * if addrinfo.ai_family == uv.AF_UNSPEC: */ __pyx_t_10 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_info)->data; __pyx_cur_scope->__pyx_v_addrinfo = __pyx_t_10; /* "uvloop/loop.pyx":1359 * for info in infos: * addrinfo = (info).data * while addrinfo != NULL: # <<<<<<<<<<<<<< * if addrinfo.ai_family == uv.AF_UNSPEC: * raise RuntimeError('AF_UNSPEC in DNS results') */ while (1) { __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_addrinfo != NULL) != 0); if (!__pyx_t_3) break; /* "uvloop/loop.pyx":1360 * addrinfo = (info).data * while addrinfo != NULL: * if addrinfo.ai_family == uv.AF_UNSPEC: # <<<<<<<<<<<<<< * raise RuntimeError('AF_UNSPEC in DNS results') * */ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_addrinfo->ai_family == AF_UNSPEC) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1361 * while addrinfo != NULL: * if addrinfo.ai_family == uv.AF_UNSPEC: * raise RuntimeError('AF_UNSPEC in DNS results') # <<<<<<<<<<<<<< * * tcp = self._create_server( */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1361, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1361, __pyx_L32_error) /* "uvloop/loop.pyx":1360 * addrinfo = (info).data * while addrinfo != NULL: * if addrinfo.ai_family == uv.AF_UNSPEC: # <<<<<<<<<<<<<< * raise RuntimeError('AF_UNSPEC in DNS results') * */ } /* "uvloop/loop.pyx":1365 * tcp = self._create_server( * addrinfo.ai_addr, protocol_factory, server, * ssl, reuse_port, backlog) # <<<<<<<<<<<<<< * * server._add_server(tcp) */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1365, __pyx_L32_error) /* "uvloop/loop.pyx":1363 * raise RuntimeError('AF_UNSPEC in DNS results') * * tcp = self._create_server( # <<<<<<<<<<<<<< * addrinfo.ai_addr, protocol_factory, server, * ssl, reuse_port, backlog) */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_create_server(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_addrinfo->ai_addr, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, __pyx_cur_scope->__pyx_v_ssl, __pyx_t_3, __pyx_cur_scope->__pyx_v_backlog); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1363, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_7); if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6uvloop_4loop_TCPServer))))) __PYX_ERR(1, 1363, __pyx_L32_error) __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tcp)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tcp, ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1367 * ssl, reuse_port, backlog) * * server._add_server(tcp) # <<<<<<<<<<<<<< * * addrinfo = addrinfo.ai_next */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1367, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1369 * server._add_server(tcp) * * addrinfo = addrinfo.ai_next # <<<<<<<<<<<<<< * * completed = True */ __pyx_t_10 = __pyx_cur_scope->__pyx_v_addrinfo->ai_next; __pyx_cur_scope->__pyx_v_addrinfo = __pyx_t_10; } /* "uvloop/loop.pyx":1357 * completed = False * try: * for info in infos: # <<<<<<<<<<<<<< * addrinfo = (info).data * while addrinfo != NULL: */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1371 * addrinfo = addrinfo.ai_next * * completed = True # <<<<<<<<<<<<<< * finally: * if not completed: */ __pyx_cur_scope->__pyx_v_completed = 1; } /* "uvloop/loop.pyx":1373 * completed = True * finally: * if not completed: # <<<<<<<<<<<<<< * server.close() * else: */ /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_completed != 0)) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1374 * finally: * if not completed: * server.close() # <<<<<<<<<<<<<< * else: * if sock is None: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_server), __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1374, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1373 * completed = True * finally: * if not completed: # <<<<<<<<<<<<<< * server.close() * else: */ } goto __pyx_L33; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L32_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_completed != 0)) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1374 * finally: * if not completed: * server.close() # <<<<<<<<<<<<<< * else: * if sock is None: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_server), __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1374, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1374, __pyx_L41_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1374, __pyx_L41_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1373 * completed = True * finally: * if not completed: # <<<<<<<<<<<<<< * server.close() * else: */ } } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L1_error; __pyx_L41_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; goto __pyx_L1_error; } __pyx_L33:; } /* "uvloop/loop.pyx":1332 * raise TypeError('ssl argument must be an SSLContext or None') * * if host is not None or port is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ goto __pyx_L14; } /* "uvloop/loop.pyx":1376 * server.close() * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError('Neither host/port nor sock were specified') * if not _is_sock_stream(sock.type): */ /*else*/ { __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock == Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1377 * else: * if sock is None: * raise ValueError('Neither host/port nor sock were specified') # <<<<<<<<<<<<<< * if not _is_sock_stream(sock.type): * raise ValueError( */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 1377, __pyx_L1_error) /* "uvloop/loop.pyx":1376 * server.close() * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError('Neither host/port nor sock were specified') * if not _is_sock_stream(sock.type): */ } /* "uvloop/loop.pyx":1378 * if sock is None: * raise ValueError('Neither host/port nor sock were specified') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1380 * if not _is_sock_stream(sock.type): * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<< * * tcp = TCPServer.new(self, protocol_factory, server, ssl, */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1379 * raise ValueError('Neither host/port nor sock were specified') * if not _is_sock_stream(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A Stream Socket was expected, got {!r}'.format(sock)) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1379, __pyx_L1_error) /* "uvloop/loop.pyx":1378 * if sock is None: * raise ValueError('Neither host/port nor sock were specified') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ } /* "uvloop/loop.pyx":1382 * 'A Stream Socket was expected, got {!r}'.format(sock)) * * tcp = TCPServer.new(self, protocol_factory, server, ssl, # <<<<<<<<<<<<<< * uv.AF_UNSPEC) * */ __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_9TCPServer_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, __pyx_cur_scope->__pyx_v_ssl, AF_UNSPEC)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_tcp = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1386 * * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) # <<<<<<<<<<<<<< * try: * tcp._open(fileno) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_4) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1386, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_6 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_4) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_fileno = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/loop.pyx":1387 * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) * try: # <<<<<<<<<<<<<< * tcp._open(fileno) * tcp._attach_fileobj(sock) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { /* "uvloop/loop.pyx":1388 * fileno = os_dup(sock.fileno()) * try: * tcp._open(fileno) # <<<<<<<<<<<<<< * tcp._attach_fileobj(sock) * tcp.listen(backlog) */ __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_fileno); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1388, __pyx_L45_error) __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tcp), __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1388, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1389 * try: * tcp._open(fileno) * tcp._attach_fileobj(sock) # <<<<<<<<<<<<<< * tcp.listen(backlog) * except: */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tcp), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1389, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1390 * tcp._open(fileno) * tcp._attach_fileobj(sock) * tcp.listen(backlog) # <<<<<<<<<<<<<< * except: * tcp._close() */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.listen(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_tcp), __pyx_cur_scope->__pyx_v_backlog); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1390, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1387 * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) * try: # <<<<<<<<<<<<<< * tcp._open(fileno) * tcp._attach_fileobj(sock) */ } __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L52_try_end; __pyx_L45_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1391 * tcp._attach_fileobj(sock) * tcp.listen(backlog) * except: # <<<<<<<<<<<<<< * tcp._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_20) < 0) __PYX_ERR(1, 1391, __pyx_L47_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_20); /* "uvloop/loop.pyx":1392 * tcp.listen(backlog) * except: * tcp._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_cur_scope->__pyx_v_tcp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1392, __pyx_L47_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1393 * except: * tcp._close() * raise # <<<<<<<<<<<<<< * * server._add_server(tcp) */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_6, __pyx_t_20); __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_20 = 0; __PYX_ERR(1, 1393, __pyx_L47_except_error) } __pyx_L47_except_error:; /* "uvloop/loop.pyx":1387 * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) * try: # <<<<<<<<<<<<<< * tcp._open(fileno) * tcp._attach_fileobj(sock) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); goto __pyx_L1_error; __pyx_L52_try_end:; } /* "uvloop/loop.pyx":1395 * raise * * server._add_server(tcp) # <<<<<<<<<<<<<< * * return server */ __pyx_t_20 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_tcp)); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } __pyx_L14:; /* "uvloop/loop.pyx":1397 * server._add_server(tcp) * * return server # <<<<<<<<<<<<<< * * async def create_connection(self, protocol_factory, host=None, port=None, *, */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_server)); goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1271 * return await self._getnameinfo(ai.ai_addr, flags) * * async def create_server(self, protocol_factory, host=None, port=None, # <<<<<<<<<<<<<< * *, * int family=uv.AF_UNSPEC, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("create_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_56generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1399 * return server * * async def create_connection(self, protocol_factory, host=None, port=None, *, # <<<<<<<<<<<<<< * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_55create_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_54create_connection[] = "Loop.create_connection(self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None)\nConnect to a TCP server.\n\n Create a streaming transport connection to a given Internet host and\n port: socket family AF_INET or socket.AF_INET6 depending on host (or\n family if specified), socket type SOCK_STREAM. protocol_factory must be\n a callable returning a protocol instance.\n\n This method is a coroutine which will try to establish the connection\n in the background. When successful, the coroutine returns a\n (transport, protocol) pair.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_55create_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_port = 0; PyObject *__pyx_v_ssl = 0; PyObject *__pyx_v_family = 0; PyObject *__pyx_v_proto = 0; PyObject *__pyx_v_flags = 0; PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_local_addr = 0; PyObject *__pyx_v_server_hostname = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_connection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_ssl,&__pyx_n_s_family,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_sock,&__pyx_n_s_local_addr,&__pyx_n_s_server_hostname,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1400 * * async def create_connection(self, protocol_factory, host=None, port=None, *, * ssl=None, family=0, proto=0, flags=0, sock=None, # <<<<<<<<<<<<<< * local_addr=None, server_hostname=None): * """Connect to a TCP server. */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)__pyx_int_0); values[5] = ((PyObject *)__pyx_int_0); values[6] = ((PyObject *)__pyx_int_0); values[7] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1401 * async def create_connection(self, protocol_factory, host=None, port=None, *, * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): # <<<<<<<<<<<<<< * """Connect to a TCP server. * */ values[8] = ((PyObject *)Py_None); values[9] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port); if (value) { values[2] = value; kw_args--; } } } if (kw_args > 0 && likely(kw_args <= 7)) { Py_ssize_t index; for (index = 3; index < 10 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_connection") < 0)) __PYX_ERR(1, 1399, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_protocol_factory = values[0]; __pyx_v_host = values[1]; __pyx_v_port = values[2]; __pyx_v_ssl = values[3]; __pyx_v_family = values[4]; __pyx_v_proto = values[5]; __pyx_v_flags = values[6]; __pyx_v_sock = values[7]; __pyx_v_local_addr = values[8]; __pyx_v_server_hostname = values[9]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create_connection", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1399, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_54create_connection(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_host, __pyx_v_port, __pyx_v_ssl, __pyx_v_family, __pyx_v_proto, __pyx_v_flags, __pyx_v_sock, __pyx_v_local_addr, __pyx_v_server_hostname); /* "uvloop/loop.pyx":1399 * return server * * async def create_connection(self, protocol_factory, host=None, port=None, *, # <<<<<<<<<<<<<< * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1567 * # If they all have the same str(), raise one. * model = str(exceptions[0]) * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<< * raise exceptions[0] * # Raise a combined exception so the user can see all */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(PyObject *__pyx_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1567, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator17, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_connection_locals_genexpr, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_connection.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_2generator17(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1567, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions)) { __Pyx_RaiseClosureNameError("exceptions"); __PYX_ERR(1, 1567, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 1567, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1567, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_exc); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_model)) { __Pyx_RaiseClosureNameError("model"); __PYX_ERR(1, 1567, __pyx_L1_error) } __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_model, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = ((!__pyx_t_5) != 0); if (__pyx_t_6) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } } /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator18(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1572 * # the various error messages. * raise OSError('Multiple exceptions: {}'.format( * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<< * else: * if sock is None: */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(PyObject *__pyx_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1572, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator18, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_connection_locals_genexpr, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_connection.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_17create_connection_5generator18(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1572, __pyx_L1_error) __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions)) { __Pyx_RaiseClosureNameError("exceptions"); __PYX_ERR(1, 1572, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 1572, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_exceptions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 1572, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_exc); __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1399 * return server * * async def create_connection(self, protocol_factory, host=None, port=None, *, # <<<<<<<<<<<<<< * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_54create_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_ssl, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_sock, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_server_hostname) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_connection", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_create_connection(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_create_connection, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1399, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_host = __pyx_v_host; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); __pyx_cur_scope->__pyx_v_port = __pyx_v_port; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_port); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_port); __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); __pyx_cur_scope->__pyx_v_family = __pyx_v_family; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_family); __pyx_cur_scope->__pyx_v_proto = __pyx_v_proto; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto); __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_flags); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_flags); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_local_addr = __pyx_v_local_addr; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_local_addr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_local_addr); __pyx_cur_scope->__pyx_v_server_hostname = __pyx_v_server_hostname; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_56generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_connection, __pyx_n_s_Loop_create_connection, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1399, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_56generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; Py_ssize_t __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; struct addrinfo *__pyx_t_19; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; char const *__pyx_t_23; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; char const *__pyx_t_30; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L10_resume_from_yield; case 2: goto __pyx_L46_resume_from_yield; case 3: goto __pyx_L85_resume_from_yield; case 4: goto __pyx_L112_resume_from_yield; case 5: goto __pyx_L116_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1399, __pyx_L1_error) /* "uvloop/loop.pyx":1414 * """ * cdef: * AddrInfo ai_local = None # <<<<<<<<<<<<<< * AddrInfo ai_remote * TCPTransport tr */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_ai_local = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)Py_None); /* "uvloop/loop.pyx":1418 * TCPTransport tr * * system.addrinfo *rai = NULL # <<<<<<<<<<<<<< * system.addrinfo *lai = NULL * */ __pyx_cur_scope->__pyx_v_rai = NULL; /* "uvloop/loop.pyx":1419 * * system.addrinfo *rai = NULL * system.addrinfo *lai = NULL # <<<<<<<<<<<<<< * * system.addrinfo *rai_iter = NULL */ __pyx_cur_scope->__pyx_v_lai = NULL; /* "uvloop/loop.pyx":1421 * system.addrinfo *lai = NULL * * system.addrinfo *rai_iter = NULL # <<<<<<<<<<<<<< * system.addrinfo *lai_iter = NULL * */ __pyx_cur_scope->__pyx_v_rai_iter = NULL; /* "uvloop/loop.pyx":1422 * * system.addrinfo *rai_iter = NULL * system.addrinfo *lai_iter = NULL # <<<<<<<<<<<<<< * * system.addrinfo rai_static */ __pyx_cur_scope->__pyx_v_lai_iter = NULL; /* "uvloop/loop.pyx":1433 * object ssl_waiter * * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * if host is not None or port is not None: * raise ValueError( */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1434 * * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_host != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L8_bool_binop_done; } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L8_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1435 * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * return await self.create_unix_connection( */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1435, __pyx_L1_error) /* "uvloop/loop.pyx":1434 * * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1437 * raise ValueError( * 'host/port and sock can not be specified at the same time') * return await self.create_unix_connection( # <<<<<<<<<<<<<< * protocol_factory, None, * sock=sock, ssl=ssl, server_hostname=server_hostname) */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_create_unix_connection); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1438 * 'host/port and sock can not be specified at the same time') * return await self.create_unix_connection( * protocol_factory, None, # <<<<<<<<<<<<<< * sock=sock, ssl=ssl, server_hostname=server_hostname) * */ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_5, 1, Py_None); /* "uvloop/loop.pyx":1439 * return await self.create_unix_connection( * protocol_factory, None, * sock=sock, ssl=ssl, server_hostname=server_hostname) # <<<<<<<<<<<<<< * * app_protocol = protocol = protocol_factory() */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sock, __pyx_cur_scope->__pyx_v_sock) < 0) __PYX_ERR(1, 1439, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ssl, __pyx_cur_scope->__pyx_v_ssl) < 0) __PYX_ERR(1, 1439, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_server_hostname, __pyx_cur_scope->__pyx_v_server_hostname) < 0) __PYX_ERR(1, 1439, __pyx_L1_error) /* "uvloop/loop.pyx":1437 * raise ValueError( * 'host/port and sock can not be specified at the same time') * return await self.create_unix_connection( # <<<<<<<<<<<<<< * protocol_factory, None, * sock=sock, ssl=ssl, server_hostname=server_hostname) */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L10_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1437, __pyx_L1_error) __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_7 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(1, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1433 * object ssl_waiter * * if sock is not None and sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * if host is not None or port is not None: * raise ValueError( */ } /* "uvloop/loop.pyx":1441 * sock=sock, ssl=ssl, server_hostname=server_hostname) * * app_protocol = protocol = protocol_factory() # <<<<<<<<<<<<<< * ssl_waiter = None * if ssl: */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_4 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1441, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_7; __Pyx_INCREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_protocol = __pyx_t_7; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1442 * * app_protocol = protocol = protocol_factory() * ssl_waiter = None # <<<<<<<<<<<<<< * if ssl: * if server_hostname is None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_ssl_waiter = Py_None; /* "uvloop/loop.pyx":1443 * app_protocol = protocol = protocol_factory() * ssl_waiter = None * if ssl: # <<<<<<<<<<<<<< * if server_hostname is None: * if not host: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1443, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":1444 * ssl_waiter = None * if ssl: * if server_hostname is None: # <<<<<<<<<<<<<< * if not host: * raise ValueError('You must set server_hostname ' */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_server_hostname == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1445 * if ssl: * if server_hostname is None: * if not host: # <<<<<<<<<<<<<< * raise ValueError('You must set server_hostname ' * 'when using ssl without a host') */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_host); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1445, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_3) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1446 * if server_hostname is None: * if not host: * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<< * 'when using ssl without a host') * server_hostname = host */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1446, __pyx_L1_error) /* "uvloop/loop.pyx":1445 * if ssl: * if server_hostname is None: * if not host: # <<<<<<<<<<<<<< * raise ValueError('You must set server_hostname ' * 'when using ssl without a host') */ } /* "uvloop/loop.pyx":1448 * raise ValueError('You must set server_hostname ' * 'when using ssl without a host') * server_hostname = host # <<<<<<<<<<<<<< * * ssl_waiter = self._new_future() */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_server_hostname); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_server_hostname, __pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); /* "uvloop/loop.pyx":1444 * ssl_waiter = None * if ssl: * if server_hostname is None: # <<<<<<<<<<<<<< * if not host: * raise ValueError('You must set server_hostname ' */ } /* "uvloop/loop.pyx":1450 * server_hostname = host * * ssl_waiter = self._new_future() # <<<<<<<<<<<<<< * sslcontext = None if isinstance(ssl, bool) else ssl * protocol = aio_SSLProtocol( */ __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ssl_waiter, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1451 * * ssl_waiter = self._new_future() * sslcontext = None if isinstance(ssl, bool) else ssl # <<<<<<<<<<<<<< * protocol = aio_SSLProtocol( * self, app_protocol, sslcontext, ssl_waiter, */ __pyx_t_4 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(1, 1451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((__pyx_t_1 != 0)) { __Pyx_INCREF(Py_None); __pyx_t_7 = Py_None; } else { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __pyx_t_7 = __pyx_cur_scope->__pyx_v_ssl; } __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_sslcontext = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/loop.pyx":1454 * protocol = aio_SSLProtocol( * self, app_protocol, sslcontext, ssl_waiter, * False, server_hostname) # <<<<<<<<<<<<<< * else: * if server_hostname is not None: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_SSLProtocol); __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_SSLProtocol; __pyx_t_5 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[7] = {__pyx_t_5, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_sslcontext, __pyx_cur_scope->__pyx_v_ssl_waiter, Py_False, __pyx_cur_scope->__pyx_v_server_hostname}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1452, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[7] = {__pyx_t_5, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_sslcontext, __pyx_cur_scope->__pyx_v_ssl_waiter, Py_False, __pyx_cur_scope->__pyx_v_server_hostname}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1452, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_6 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_cur_scope->__pyx_v_app_protocol); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_cur_scope->__pyx_v_sslcontext); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_waiter); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_8, Py_False); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname); PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_8, __pyx_cur_scope->__pyx_v_server_hostname); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_protocol, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1443 * app_protocol = protocol = protocol_factory() * ssl_waiter = None * if ssl: # <<<<<<<<<<<<<< * if server_hostname is None: * if not host: */ goto __pyx_L11; } /* "uvloop/loop.pyx":1456 * False, server_hostname) * else: * if server_hostname is not None: # <<<<<<<<<<<<<< * raise ValueError('server_hostname is only meaningful with ssl') * */ /*else*/ { __pyx_t_1 = (__pyx_cur_scope->__pyx_v_server_hostname != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1457 * else: * if server_hostname is not None: * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<< * * if host is not None or port is not None: */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1457, __pyx_L1_error) /* "uvloop/loop.pyx":1456 * False, server_hostname) * else: * if server_hostname is not None: # <<<<<<<<<<<<<< * raise ValueError('server_hostname is only meaningful with ssl') * */ } } __pyx_L11:; /* "uvloop/loop.pyx":1459 * raise ValueError('server_hostname is only meaningful with ssl') * * if host is not None or port is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_host != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L16_bool_binop_done; } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_port != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_1; __pyx_L16_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":1460 * * if host is not None or port is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1461 * if host is not None or port is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1461, __pyx_L1_error) /* "uvloop/loop.pyx":1460 * * if host is not None or port is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'host/port and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1464 * 'host/port and sock can not be specified at the same time') * * fs = [] # <<<<<<<<<<<<<< * f1 = f2 = None * */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_fs = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1465 * * fs = [] * f1 = f2 = None # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_f1 = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_f2 = Py_None; /* "uvloop/loop.pyx":1467 * f1 = f2 = None * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * host, port, family, uv.SOCK_STREAM, */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "uvloop/loop.pyx":1469 * try: * __static_getaddrinfo( * host, port, family, uv.SOCK_STREAM, # <<<<<<<<<<<<<< * proto, &rai_addr_static) * except LookupError: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1469, __pyx_L19_error) /* "uvloop/loop.pyx":1470 * __static_getaddrinfo( * host, port, family, uv.SOCK_STREAM, * proto, &rai_addr_static) # <<<<<<<<<<<<<< * except LookupError: * f1 = self._getaddrinfo( */ __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1470, __pyx_L19_error) /* "uvloop/loop.pyx":1468 * * try: * __static_getaddrinfo( # <<<<<<<<<<<<<< * host, port, family, uv.SOCK_STREAM, * proto, &rai_addr_static) */ __pyx_t_7 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_t_8, SOCK_STREAM, __pyx_t_12, ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_rai_addr_static))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1468, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1467 * f1 = f2 = None * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * host, port, family, uv.SOCK_STREAM, */ } /* "uvloop/loop.pyx":1479 * fs.append(f1) * else: * rai_static.ai_addr = &rai_addr_static # <<<<<<<<<<<<<< * rai_static.ai_next = NULL * rai = &rai_static */ /*else:*/ { __pyx_cur_scope->__pyx_v_rai_static.ai_addr = ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_rai_addr_static)); /* "uvloop/loop.pyx":1480 * else: * rai_static.ai_addr = &rai_addr_static * rai_static.ai_next = NULL # <<<<<<<<<<<<<< * rai = &rai_static * */ __pyx_cur_scope->__pyx_v_rai_static.ai_next = NULL; /* "uvloop/loop.pyx":1481 * rai_static.ai_addr = &rai_addr_static * rai_static.ai_next = NULL * rai = &rai_static # <<<<<<<<<<<<<< * * if local_addr is not None: */ __pyx_cur_scope->__pyx_v_rai = (&__pyx_cur_scope->__pyx_v_rai_static); } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L26_try_end; __pyx_L19_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1471 * host, port, family, uv.SOCK_STREAM, * proto, &rai_addr_static) * except LookupError: # <<<<<<<<<<<<<< * f1 = self._getaddrinfo( * host, port, family, */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_LookupError); if (__pyx_t_12) { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 1471, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1473 * except LookupError: * f1 = self._getaddrinfo( * host, port, family, # <<<<<<<<<<<<<< * uv.SOCK_STREAM, proto, flags, * 0) # 0 == don't unpack */ __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1473, __pyx_L21_except_error) /* "uvloop/loop.pyx":1474 * f1 = self._getaddrinfo( * host, port, family, * uv.SOCK_STREAM, proto, flags, # <<<<<<<<<<<<<< * 0) # 0 == don't unpack * */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1474, __pyx_L21_except_error) __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1474, __pyx_L21_except_error) /* "uvloop/loop.pyx":1472 * proto, &rai_addr_static) * except LookupError: * f1 = self._getaddrinfo( # <<<<<<<<<<<<<< * host, port, family, * uv.SOCK_STREAM, proto, flags, */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_host, __pyx_cur_scope->__pyx_v_port, __pyx_t_12, SOCK_STREAM, __pyx_t_8, __pyx_t_13, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1472, __pyx_L21_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f1); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1477 * 0) # 0 == don't unpack * * fs.append(f1) # <<<<<<<<<<<<<< * else: * rai_static.ai_addr = &rai_addr_static */ __pyx_t_14 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_fs, __pyx_cur_scope->__pyx_v_f1); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(1, 1477, __pyx_L21_except_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L20_exception_handled; } goto __pyx_L21_except_error; __pyx_L21_except_error:; /* "uvloop/loop.pyx":1467 * f1 = f2 = None * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * host, port, family, uv.SOCK_STREAM, */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L20_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L26_try_end:; } /* "uvloop/loop.pyx":1483 * rai = &rai_static * * if local_addr is not None: # <<<<<<<<<<<<<< * if not isinstance(local_addr, (tuple, list)) or \ * len(local_addr) != 2: */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_local_addr != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1484 * * if local_addr is not None: * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<< * len(local_addr) != 2: * raise ValueError( */ __pyx_t_2 = PyTuple_Check(__pyx_cur_scope->__pyx_v_local_addr); __pyx_t_15 = (__pyx_t_2 != 0); if (!__pyx_t_15) { } else { __pyx_t_1 = __pyx_t_15; goto __pyx_L33_bool_binop_done; } __pyx_t_15 = PyList_Check(__pyx_cur_scope->__pyx_v_local_addr); __pyx_t_2 = (__pyx_t_15 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L33_bool_binop_done:; __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L31_bool_binop_done; } /* "uvloop/loop.pyx":1485 * if local_addr is not None: * if not isinstance(local_addr, (tuple, list)) or \ * len(local_addr) != 2: # <<<<<<<<<<<<<< * raise ValueError( * 'local_addr must be a tuple of host and port') */ __pyx_t_16 = PyObject_Length(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(1, 1485, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_16 != 2) != 0); __pyx_t_3 = __pyx_t_2; __pyx_L31_bool_binop_done:; /* "uvloop/loop.pyx":1484 * * if local_addr is not None: * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<< * len(local_addr) != 2: * raise ValueError( */ if (__pyx_t_3) { /* "uvloop/loop.pyx":1486 * if not isinstance(local_addr, (tuple, list)) or \ * len(local_addr) != 2: * raise ValueError( # <<<<<<<<<<<<<< * 'local_addr must be a tuple of host and port') * */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1486, __pyx_L1_error) /* "uvloop/loop.pyx":1484 * * if local_addr is not None: * if not isinstance(local_addr, (tuple, list)) or \ # <<<<<<<<<<<<<< * len(local_addr) != 2: * raise ValueError( */ } /* "uvloop/loop.pyx":1489 * 'local_addr must be a tuple of host and port') * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * local_addr[0], local_addr[1], */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":1491 * try: * __static_getaddrinfo( * local_addr[0], local_addr[1], # <<<<<<<<<<<<<< * family, uv.SOCK_STREAM, * proto, &lai_addr_static) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1491, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1491, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":1492 * __static_getaddrinfo( * local_addr[0], local_addr[1], * family, uv.SOCK_STREAM, # <<<<<<<<<<<<<< * proto, &lai_addr_static) * except LookupError: */ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1492, __pyx_L35_error) /* "uvloop/loop.pyx":1493 * local_addr[0], local_addr[1], * family, uv.SOCK_STREAM, * proto, &lai_addr_static) # <<<<<<<<<<<<<< * except LookupError: * f2 = self._getaddrinfo( */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1493, __pyx_L35_error) /* "uvloop/loop.pyx":1490 * * try: * __static_getaddrinfo( # <<<<<<<<<<<<<< * local_addr[0], local_addr[1], * family, uv.SOCK_STREAM, */ __pyx_t_7 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_t_6, __pyx_t_4, __pyx_t_13, SOCK_STREAM, __pyx_t_8, ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_lai_addr_static))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1490, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1489 * 'local_addr must be a tuple of host and port') * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * local_addr[0], local_addr[1], */ } /* "uvloop/loop.pyx":1502 * fs.append(f2) * else: * lai_static.ai_addr = &lai_addr_static # <<<<<<<<<<<<<< * lai_static.ai_next = NULL * lai = &lai_static */ /*else:*/ { __pyx_cur_scope->__pyx_v_lai_static.ai_addr = ((struct sockaddr *)(&__pyx_cur_scope->__pyx_v_lai_addr_static)); /* "uvloop/loop.pyx":1503 * else: * lai_static.ai_addr = &lai_addr_static * lai_static.ai_next = NULL # <<<<<<<<<<<<<< * lai = &lai_static * */ __pyx_cur_scope->__pyx_v_lai_static.ai_next = NULL; /* "uvloop/loop.pyx":1504 * lai_static.ai_addr = &lai_addr_static * lai_static.ai_next = NULL * lai = &lai_static # <<<<<<<<<<<<<< * * if len(fs): */ __pyx_cur_scope->__pyx_v_lai = (&__pyx_cur_scope->__pyx_v_lai_static); } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L42_try_end; __pyx_L35_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1494 * family, uv.SOCK_STREAM, * proto, &lai_addr_static) * except LookupError: # <<<<<<<<<<<<<< * f2 = self._getaddrinfo( * local_addr[0], local_addr[1], family, */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_LookupError); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 1494, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1496 * except LookupError: * f2 = self._getaddrinfo( * local_addr[0], local_addr[1], family, # <<<<<<<<<<<<<< * uv.SOCK_STREAM, proto, flags, * 0) # 0 == don't unpack */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1496, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1496, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1496, __pyx_L37_except_error) /* "uvloop/loop.pyx":1497 * f2 = self._getaddrinfo( * local_addr[0], local_addr[1], family, * uv.SOCK_STREAM, proto, flags, # <<<<<<<<<<<<<< * 0) # 0 == don't unpack * */ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1497, __pyx_L37_except_error) __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1497, __pyx_L37_except_error) /* "uvloop/loop.pyx":1495 * proto, &lai_addr_static) * except LookupError: * f2 = self._getaddrinfo( # <<<<<<<<<<<<<< * local_addr[0], local_addr[1], family, * uv.SOCK_STREAM, proto, flags, */ __pyx_t_18 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_5, __pyx_t_17, __pyx_t_8, SOCK_STREAM, __pyx_t_13, __pyx_t_12, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1495, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f2); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f2, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; /* "uvloop/loop.pyx":1500 * 0) # 0 == don't unpack * * fs.append(f2) # <<<<<<<<<<<<<< * else: * lai_static.ai_addr = &lai_addr_static */ __pyx_t_14 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_fs, __pyx_cur_scope->__pyx_v_f2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(1, 1500, __pyx_L37_except_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L36_exception_handled; } goto __pyx_L37_except_error; __pyx_L37_except_error:; /* "uvloop/loop.pyx":1489 * 'local_addr must be a tuple of host and port') * * try: # <<<<<<<<<<<<<< * __static_getaddrinfo( * local_addr[0], local_addr[1], */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L36_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_L42_try_end:; } /* "uvloop/loop.pyx":1483 * rai = &rai_static * * if local_addr is not None: # <<<<<<<<<<<<<< * if not isinstance(local_addr, (tuple, list)) or \ * len(local_addr) != 2: */ } /* "uvloop/loop.pyx":1506 * lai = &lai_static * * if len(fs): # <<<<<<<<<<<<<< * await aio_wait(fs, loop=self) * */ __pyx_t_16 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_fs); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(1, 1506, __pyx_L1_error) __pyx_t_3 = (__pyx_t_16 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1507 * * if len(fs): * await aio_wait(fs, loop=self) # <<<<<<<<<<<<<< * * if rai is NULL: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fs); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fs); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_fs); __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(1, 1507, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_wait, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L46_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1507, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1507, __pyx_L1_error) } } /* "uvloop/loop.pyx":1506 * lai = &lai_static * * if len(fs): # <<<<<<<<<<<<<< * await aio_wait(fs, loop=self) * */ } /* "uvloop/loop.pyx":1509 * await aio_wait(fs, loop=self) * * if rai is NULL: # <<<<<<<<<<<<<< * ai_remote = f1.result() * if ai_remote.data is NULL: */ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_rai == NULL) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1510 * * if rai is NULL: * ai_remote = f1.result() # <<<<<<<<<<<<<< * if ai_remote.data is NULL: * raise OSError('getaddrinfo() returned empty list') */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f1, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_6) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1510, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(1, 1510, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_ai_remote = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1511 * if rai is NULL: * ai_remote = f1.result() * if ai_remote.data is NULL: # <<<<<<<<<<<<<< * raise OSError('getaddrinfo() returned empty list') * rai = ai_remote.data */ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_ai_remote->data == NULL) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1512 * ai_remote = f1.result() * if ai_remote.data is NULL: * raise OSError('getaddrinfo() returned empty list') # <<<<<<<<<<<<<< * rai = ai_remote.data * */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1512, __pyx_L1_error) /* "uvloop/loop.pyx":1511 * if rai is NULL: * ai_remote = f1.result() * if ai_remote.data is NULL: # <<<<<<<<<<<<<< * raise OSError('getaddrinfo() returned empty list') * rai = ai_remote.data */ } /* "uvloop/loop.pyx":1513 * if ai_remote.data is NULL: * raise OSError('getaddrinfo() returned empty list') * rai = ai_remote.data # <<<<<<<<<<<<<< * * if lai is NULL and f2 is not None: */ __pyx_t_19 = __pyx_cur_scope->__pyx_v_ai_remote->data; __pyx_cur_scope->__pyx_v_rai = __pyx_t_19; /* "uvloop/loop.pyx":1509 * await aio_wait(fs, loop=self) * * if rai is NULL: # <<<<<<<<<<<<<< * ai_remote = f1.result() * if ai_remote.data is NULL: */ } /* "uvloop/loop.pyx":1515 * rai = ai_remote.data * * if lai is NULL and f2 is not None: # <<<<<<<<<<<<<< * ai_local = f2.result() * if ai_local.data is NULL: */ __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_lai == NULL) != 0); if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L50_bool_binop_done; } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_f2 != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_1; __pyx_L50_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":1516 * * if lai is NULL and f2 is not None: * ai_local = f2.result() # <<<<<<<<<<<<<< * if ai_local.data is NULL: * raise OSError( */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_f2, __pyx_n_s_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_6) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1516, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6uvloop_4loop_AddrInfo))))) __PYX_ERR(1, 1516, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_ai_local)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ai_local, ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1517 * if lai is NULL and f2 is not None: * ai_local = f2.result() * if ai_local.data is NULL: # <<<<<<<<<<<<<< * raise OSError( * 'getaddrinfo() returned empty list for local_addr') */ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_ai_local->data == NULL) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1518 * ai_local = f2.result() * if ai_local.data is NULL: * raise OSError( # <<<<<<<<<<<<<< * 'getaddrinfo() returned empty list for local_addr') * lai = ai_local.data */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1518, __pyx_L1_error) /* "uvloop/loop.pyx":1517 * if lai is NULL and f2 is not None: * ai_local = f2.result() * if ai_local.data is NULL: # <<<<<<<<<<<<<< * raise OSError( * 'getaddrinfo() returned empty list for local_addr') */ } /* "uvloop/loop.pyx":1520 * raise OSError( * 'getaddrinfo() returned empty list for local_addr') * lai = ai_local.data # <<<<<<<<<<<<<< * * exceptions = [] */ __pyx_t_19 = __pyx_cur_scope->__pyx_v_ai_local->data; __pyx_cur_scope->__pyx_v_lai = __pyx_t_19; /* "uvloop/loop.pyx":1515 * rai = ai_remote.data * * if lai is NULL and f2 is not None: # <<<<<<<<<<<<<< * ai_local = f2.result() * if ai_local.data is NULL: */ } /* "uvloop/loop.pyx":1522 * lai = ai_local.data * * exceptions = [] # <<<<<<<<<<<<<< * rai_iter = rai * while rai_iter is not NULL: */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_exceptions = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1523 * * exceptions = [] * rai_iter = rai # <<<<<<<<<<<<<< * while rai_iter is not NULL: * tr = None */ __pyx_cur_scope->__pyx_v_rai_iter = __pyx_cur_scope->__pyx_v_rai; /* "uvloop/loop.pyx":1524 * exceptions = [] * rai_iter = rai * while rai_iter is not NULL: # <<<<<<<<<<<<<< * tr = None * try: */ while (1) { __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_rai_iter != NULL) != 0); if (!__pyx_t_3) break; /* "uvloop/loop.pyx":1525 * rai_iter = rai * while rai_iter is not NULL: * tr = None # <<<<<<<<<<<<<< * try: * waiter = self._new_future() */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/loop.pyx":1526 * while rai_iter is not NULL: * tr = None * try: # <<<<<<<<<<<<<< * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "uvloop/loop.pyx":1527 * tr = None * try: * waiter = self._new_future() # <<<<<<<<<<<<<< * tr = TCPTransport.new(self, protocol, None, waiter) * */ __pyx_t_7 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1527, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_waiter); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_waiter, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1528 * try: * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<< * * if lai is not NULL: */ __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1528, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1530 * tr = TCPTransport.new(self, protocol, None, waiter) * * if lai is not NULL: # <<<<<<<<<<<<<< * lai_iter = lai * while lai_iter is not NULL: */ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_lai != NULL) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1531 * * if lai is not NULL: * lai_iter = lai # <<<<<<<<<<<<<< * while lai_iter is not NULL: * try: */ __pyx_cur_scope->__pyx_v_lai_iter = __pyx_cur_scope->__pyx_v_lai; /* "uvloop/loop.pyx":1532 * if lai is not NULL: * lai_iter = lai * while lai_iter is not NULL: # <<<<<<<<<<<<<< * try: * tr.bind(lai_iter.ai_addr) */ while (1) { __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_lai_iter != NULL) != 0); if (!__pyx_t_3) break; /* "uvloop/loop.pyx":1533 * lai_iter = lai * while lai_iter is not NULL: * try: # <<<<<<<<<<<<<< * tr.bind(lai_iter.ai_addr) * break */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); /*try:*/ { /* "uvloop/loop.pyx":1534 * while lai_iter is not NULL: * try: * tr.bind(lai_iter.ai_addr) # <<<<<<<<<<<<<< * break * except OSError as exc: */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->bind(__pyx_cur_scope->__pyx_v_tr, __pyx_cur_scope->__pyx_v_lai_iter->ai_addr, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1534, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1535 * try: * tr.bind(lai_iter.ai_addr) * break # <<<<<<<<<<<<<< * except OSError as exc: * exceptions.append(exc) */ goto __pyx_L71_try_break; /* "uvloop/loop.pyx":1533 * lai_iter = lai * while lai_iter is not NULL: * try: # <<<<<<<<<<<<<< * tr.bind(lai_iter.ai_addr) * break */ } __pyx_L66_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1536 * tr.bind(lai_iter.ai_addr) * break * except OSError as exc: # <<<<<<<<<<<<<< * exceptions.append(exc) * lai_iter = lai_iter.ai_next */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_12) { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 1536, __pyx_L68_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_exc = __pyx_t_4; /*try:*/ { /* "uvloop/loop.pyx":1537 * break * except OSError as exc: * exceptions.append(exc) # <<<<<<<<<<<<<< * lai_iter = lai_iter.ai_next * else: */ __pyx_t_14 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_exceptions, __pyx_cur_scope->__pyx_v_exc); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(1, 1537, __pyx_L79_error) } /* "uvloop/loop.pyx":1536 * tr.bind(lai_iter.ai_addr) * break * except OSError as exc: # <<<<<<<<<<<<<< * exceptions.append(exc) * lai_iter = lai_iter.ai_next */ /*finally:*/ { /*normal exit:*/{ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc); __pyx_cur_scope->__pyx_v_exc = NULL; goto __pyx_L80; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L79_error:; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_27); __Pyx_XGOTREF(__pyx_t_28); __Pyx_XGOTREF(__pyx_t_29); __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc); __pyx_cur_scope->__pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_27); __Pyx_XGIVEREF(__pyx_t_28); __Pyx_XGIVEREF(__pyx_t_29); __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29); } __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26); __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_23; goto __pyx_L68_except_error; } __pyx_L80:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L67_exception_handled; } goto __pyx_L68_except_error; __pyx_L68_except_error:; /* "uvloop/loop.pyx":1533 * lai_iter = lai * while lai_iter is not NULL: * try: # <<<<<<<<<<<<<< * tr.bind(lai_iter.ai_addr) * break */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); goto __pyx_L55_error; __pyx_L71_try_break:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); goto __pyx_L65_break; __pyx_L67_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } /* "uvloop/loop.pyx":1538 * except OSError as exc: * exceptions.append(exc) * lai_iter = lai_iter.ai_next # <<<<<<<<<<<<<< * else: * tr._close() */ __pyx_t_19 = __pyx_cur_scope->__pyx_v_lai_iter->ai_next; __pyx_cur_scope->__pyx_v_lai_iter = __pyx_t_19; } /* "uvloop/loop.pyx":1540 * lai_iter = lai_iter.ai_next * else: * tr._close() # <<<<<<<<<<<<<< * tr = None * */ /*else*/ { __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1540, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1541 * else: * tr._close() * tr = None # <<<<<<<<<<<<<< * * rai_iter = rai_iter.ai_next */ __Pyx_INCREF(Py_None); __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/loop.pyx":1543 * tr = None * * rai_iter = rai_iter.ai_next # <<<<<<<<<<<<<< * continue * */ __pyx_t_19 = __pyx_cur_scope->__pyx_v_rai_iter->ai_next; __pyx_cur_scope->__pyx_v_rai_iter = __pyx_t_19; /* "uvloop/loop.pyx":1544 * * rai_iter = rai_iter.ai_next * continue # <<<<<<<<<<<<<< * * tr.connect(rai_iter.ai_addr) */ goto __pyx_L61_try_continue; } __pyx_L65_break:; /* "uvloop/loop.pyx":1530 * tr = TCPTransport.new(self, protocol, None, waiter) * * if lai is not NULL: # <<<<<<<<<<<<<< * lai_iter = lai * while lai_iter is not NULL: */ } /* "uvloop/loop.pyx":1546 * continue * * tr.connect(rai_iter.ai_addr) # <<<<<<<<<<<<<< * await waiter * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->connect(__pyx_cur_scope->__pyx_v_tr, __pyx_cur_scope->__pyx_v_rai_iter->ai_addr); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1546, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1547 * * tr.connect(rai_iter.ai_addr) * await waiter # <<<<<<<<<<<<<< * * except OSError as exc: */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_0 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_t_10); __pyx_cur_scope->__pyx_t_1 = __pyx_t_10; __Pyx_XGIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_t_2 = __pyx_t_11; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L85_resume_from_yield:; __pyx_t_9 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_9); __pyx_t_10 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_11 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1547, __pyx_L55_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1547, __pyx_L55_error) } } /* "uvloop/loop.pyx":1526 * while rai_iter is not NULL: * tr = None * try: # <<<<<<<<<<<<<< * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) */ } /* "uvloop/loop.pyx":1560 * raise * else: * break # <<<<<<<<<<<<<< * * rai_iter = rai_iter.ai_next */ /*else:*/ { goto __pyx_L60_try_break; } __pyx_L55_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1549 * await waiter * * except OSError as exc: # <<<<<<<<<<<<<< * if tr is not None: * tr._close() */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_13) { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 1549, __pyx_L57_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_exc, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":1550 * * except OSError as exc: * if tr is not None: # <<<<<<<<<<<<<< * tr._close() * tr = None */ __pyx_t_3 = (((PyObject *)__pyx_cur_scope->__pyx_v_tr) != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1551 * except OSError as exc: * if tr is not None: * tr._close() # <<<<<<<<<<<<<< * tr = None * exceptions.append(exc) */ __pyx_t_18 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1551, __pyx_L91_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "uvloop/loop.pyx":1552 * if tr is not None: * tr._close() * tr = None # <<<<<<<<<<<<<< * exceptions.append(exc) * except: */ __Pyx_INCREF(Py_None); __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/loop.pyx":1550 * * except OSError as exc: * if tr is not None: # <<<<<<<<<<<<<< * tr._close() * tr = None */ } /* "uvloop/loop.pyx":1553 * tr._close() * tr = None * exceptions.append(exc) # <<<<<<<<<<<<<< * except: * if tr is not None: */ __pyx_t_14 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_exceptions, __pyx_cur_scope->__pyx_v_exc); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(1, 1553, __pyx_L91_error) } /* "uvloop/loop.pyx":1549 * await waiter * * except OSError as exc: # <<<<<<<<<<<<<< * if tr is not None: * tr._close() */ /*finally:*/ { /*normal exit:*/{ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc); __pyx_cur_scope->__pyx_v_exc = NULL; goto __pyx_L92; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L91_error:; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_29, &__pyx_t_28, &__pyx_t_27); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_29); __Pyx_XGOTREF(__pyx_t_28); __Pyx_XGOTREF(__pyx_t_27); __pyx_t_13 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_30 = __pyx_filename; { __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc); __pyx_cur_scope->__pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_29); __Pyx_XGIVEREF(__pyx_t_28); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ExceptionReset(__pyx_t_29, __pyx_t_28, __pyx_t_27); } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20); __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_30; goto __pyx_L57_except_error; } __pyx_L92:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L56_exception_handled; } /* "uvloop/loop.pyx":1554 * tr = None * exceptions.append(exc) * except: # <<<<<<<<<<<<<< * if tr is not None: * tr._close() */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(1, 1554, __pyx_L57_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1555 * exceptions.append(exc) * except: * if tr is not None: # <<<<<<<<<<<<<< * tr._close() * tr = None */ __pyx_t_1 = (((PyObject *)__pyx_cur_scope->__pyx_v_tr) != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1556 * except: * if tr is not None: * tr._close() # <<<<<<<<<<<<<< * tr = None * raise */ __pyx_t_18 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1556, __pyx_L57_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "uvloop/loop.pyx":1557 * if tr is not None: * tr._close() * tr = None # <<<<<<<<<<<<<< * raise * else: */ __Pyx_INCREF(Py_None); __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_tr, ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/loop.pyx":1555 * exceptions.append(exc) * except: * if tr is not None: # <<<<<<<<<<<<<< * tr._close() * tr = None */ } /* "uvloop/loop.pyx":1558 * tr._close() * tr = None * raise # <<<<<<<<<<<<<< * else: * break */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_4, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0; __PYX_ERR(1, 1558, __pyx_L57_except_error) } __pyx_L57_except_error:; /* "uvloop/loop.pyx":1526 * while rai_iter is not NULL: * tr = None * try: # <<<<<<<<<<<<<< * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L60_try_break:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L54_break; __pyx_L61_try_continue:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L53_continue; __pyx_L56_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); } /* "uvloop/loop.pyx":1562 * break * * rai_iter = rai_iter.ai_next # <<<<<<<<<<<<<< * * else: */ __pyx_t_19 = __pyx_cur_scope->__pyx_v_rai_iter->ai_next; __pyx_cur_scope->__pyx_v_rai_iter = __pyx_t_19; __pyx_L53_continue:; } /* "uvloop/loop.pyx":1566 * else: * # If they all have the same str(), raise one. * model = str(exceptions[0]) # <<<<<<<<<<<<<< * if all(str(exc) == model for exc in exceptions): * raise exceptions[0] */ /*else*/ { __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_exceptions, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_model = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/loop.pyx":1567 * # If they all have the same str(), raise one. * model = str(exceptions[0]) * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<< * raise exceptions[0] * # Raise a combined exception so the user can see all */ __pyx_t_6 = __pyx_pf_6uvloop_4loop_4Loop_17create_connection_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":1568 * model = str(exceptions[0]) * if all(str(exc) == model for exc in exceptions): * raise exceptions[0] # <<<<<<<<<<<<<< * # Raise a combined exception so the user can see all * # the various error messages. */ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_exceptions, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1568, __pyx_L1_error) /* "uvloop/loop.pyx":1567 * # If they all have the same str(), raise one. * model = str(exceptions[0]) * if all(str(exc) == model for exc in exceptions): # <<<<<<<<<<<<<< * raise exceptions[0] * # Raise a combined exception so the user can see all */ } /* "uvloop/loop.pyx":1571 * # Raise a combined exception so the user can see all * # the various error messages. * raise OSError('Multiple exceptions: {}'.format( # <<<<<<<<<<<<<< * ', '.join(str(exc) for exc in exceptions))) * else: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Multiple_exceptions, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1572 * # the various error messages. * raise OSError('Multiple exceptions: {}'.format( * ', '.join(str(exc) for exc in exceptions))) # <<<<<<<<<<<<<< * else: * if sock is None: */ __pyx_t_7 = __pyx_pf_6uvloop_4loop_4Loop_17create_connection_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_18 = __Pyx_Generator_Next(__pyx_t_7); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__64, __pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_18)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_18) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_18, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_18, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __pyx_t_18 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1571 * # Raise a combined exception so the user can see all * # the various error messages. * raise OSError('Multiple exceptions: {}'.format( # <<<<<<<<<<<<<< * ', '.join(str(exc) for exc in exceptions))) * else: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1571, __pyx_L1_error) } __pyx_L54_break:; /* "uvloop/loop.pyx":1459 * raise ValueError('server_hostname is only meaningful with ssl') * * if host is not None or port is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ goto __pyx_L15; } /* "uvloop/loop.pyx":1574 * ', '.join(str(exc) for exc in exceptions))) * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError( * 'host and port was not specified and no sock specified') */ /*else*/ { __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock == Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1575 * else: * if sock is None: * raise ValueError( # <<<<<<<<<<<<<< * 'host and port was not specified and no sock specified') * if not _is_sock_stream(sock.type): */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1575, __pyx_L1_error) /* "uvloop/loop.pyx":1574 * ', '.join(str(exc) for exc in exceptions))) * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError( * 'host and port was not specified and no sock specified') */ } /* "uvloop/loop.pyx":1577 * raise ValueError( * 'host and port was not specified and no sock specified') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1579 * if not _is_sock_stream(sock.type): * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<< * * waiter = self._new_future() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_17) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_17); __pyx_t_17 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1578 * 'host and port was not specified and no sock specified') * if not _is_sock_stream(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A Stream Socket was expected, got {!r}'.format(sock)) * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1578, __pyx_L1_error) /* "uvloop/loop.pyx":1577 * raise ValueError( * 'host and port was not specified and no sock specified') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ } /* "uvloop/loop.pyx":1581 * 'A Stream Socket was expected, got {!r}'.format(sock)) * * waiter = self._new_future() # <<<<<<<<<<<<<< * tr = TCPTransport.new(self, protocol, None, waiter) * try: */ __pyx_t_6 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/loop.pyx":1582 * * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<< * try: * # Why we use os.dup here and other places */ __pyx_t_6 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1583 * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # Why we use os.dup here and other places * # --------------------------------------- */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":1610 * # any control of the FD once it is passed to uvloop. * # See also: https://github.com/python/asyncio/pull/449 * fileno = os_dup(sock.fileno()) # <<<<<<<<<<<<<< * * # libuv will make socket non-blocking */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_17) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1610, __pyx_L104_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_7 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_17) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_4}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_4}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1610, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_fileno = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/loop.pyx":1613 * * # libuv will make socket non-blocking * tr._open(fileno) # <<<<<<<<<<<<<< * tr._attach_fileobj(sock) * tr._init_protocol() */ __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_fileno); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1613, __pyx_L104_error) __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1613, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1614 * # libuv will make socket non-blocking * tr._open(fileno) * tr._attach_fileobj(sock) # <<<<<<<<<<<<<< * tr._init_protocol() * await waiter */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1614, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1615 * tr._open(fileno) * tr._attach_fileobj(sock) * tr._init_protocol() # <<<<<<<<<<<<<< * await waiter * except: */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1615, __pyx_L104_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1616 * tr._attach_fileobj(sock) * tr._init_protocol() * await waiter # <<<<<<<<<<<<<< * except: * tr._close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_0 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_t_10); __pyx_cur_scope->__pyx_t_1 = __pyx_t_10; __Pyx_XGIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_t_2 = __pyx_t_11; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L112_resume_from_yield:; __pyx_t_9 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_9); __pyx_t_10 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_11 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1616, __pyx_L104_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1616, __pyx_L104_error) } } /* "uvloop/loop.pyx":1583 * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # Why we use os.dup here and other places * # --------------------------------------- */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L111_try_end; __pyx_L104_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1617 * tr._init_protocol() * await waiter * except: # <<<<<<<<<<<<<< * tr._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_18) < 0) __PYX_ERR(1, 1617, __pyx_L106_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_18); /* "uvloop/loop.pyx":1618 * await waiter * except: * tr._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1618, __pyx_L106_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1619 * except: * tr._close() * raise # <<<<<<<<<<<<<< * * if ssl: */ __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_7, __pyx_t_18); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_18 = 0; __PYX_ERR(1, 1619, __pyx_L106_except_error) } __pyx_L106_except_error:; /* "uvloop/loop.pyx":1583 * waiter = self._new_future() * tr = TCPTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # Why we use os.dup here and other places * # --------------------------------------- */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L111_try_end:; } } __pyx_L15:; /* "uvloop/loop.pyx":1621 * raise * * if ssl: # <<<<<<<<<<<<<< * await ssl_waiter * return protocol._app_transport, app_protocol */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1621, __pyx_L1_error) if (__pyx_t_3) { /* "uvloop/loop.pyx":1622 * * if ssl: * await ssl_waiter # <<<<<<<<<<<<<< * return protocol._app_transport, app_protocol * else: */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 5; return __pyx_r; __pyx_L116_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1622, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1622, __pyx_L1_error) } } /* "uvloop/loop.pyx":1623 * if ssl: * await ssl_waiter * return protocol._app_transport, app_protocol # <<<<<<<<<<<<<< * else: * return tr, protocol */ __Pyx_XDECREF(__pyx_r); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_protocol, __pyx_n_s_app_transport); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_18); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_app_protocol); __pyx_t_18 = 0; __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1621 * raise * * if ssl: # <<<<<<<<<<<<<< * await ssl_waiter * return protocol._app_transport, app_protocol */ } /* "uvloop/loop.pyx":1625 * return protocol._app_transport, app_protocol * else: * return tr, protocol # <<<<<<<<<<<<<< * * async def create_unix_server(self, protocol_factory, str path=None, */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_protocol); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = 0; goto __pyx_L0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1399 * return server * * async def create_connection(self, protocol_factory, host=None, port=None, *, # <<<<<<<<<<<<<< * ssl=None, family=0, proto=0, flags=0, sock=None, * local_addr=None, server_hostname=None): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("create_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_59generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1627 * return tr, protocol * * async def create_unix_server(self, protocol_factory, str path=None, # <<<<<<<<<<<<<< * *, backlog=100, sock=None, ssl=None): * """A coroutine which creates a UNIX Domain Socket server. */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_58create_unix_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_57create_unix_server[] = "Loop.create_unix_server(self, protocol_factory, unicode path=None, *, backlog=100, sock=None, ssl=None)\nA coroutine which creates a UNIX Domain Socket server.\n\n The return value is a Server object, which can be used to stop\n the service.\n\n path is a str, representing a file systsem path to bind the\n server socket to.\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n\n backlog is the maximum number of queued connections passed to\n listen() (defaults to 100).\n\n ssl can be set to an SSLContext to enable SSL over the\n accepted connections.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_58create_unix_server(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_path = 0; PyObject *__pyx_v_backlog = 0; PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_ssl = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_unix_server (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_path,&__pyx_n_s_backlog,&__pyx_n_s_sock,&__pyx_n_s_ssl,0}; PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject*)Py_None); values[2] = ((PyObject *)__pyx_int_100); /* "uvloop/loop.pyx":1628 * * async def create_unix_server(self, protocol_factory, str path=None, * *, backlog=100, sock=None, ssl=None): # <<<<<<<<<<<<<< * """A coroutine which creates a UNIX Domain Socket server. * */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path); if (value) { values[1] = value; kw_args--; } } } if (kw_args > 0 && likely(kw_args <= 3)) { Py_ssize_t index; for (index = 2; index < 5 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_unix_server") < 0)) __PYX_ERR(1, 1627, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_protocol_factory = values[0]; __pyx_v_path = ((PyObject*)values[1]); __pyx_v_backlog = values[2]; __pyx_v_sock = values[3]; __pyx_v_ssl = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create_unix_server", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1627, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyUnicode_Type), 1, "path", 1))) __PYX_ERR(1, 1627, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_57create_unix_server(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_path, __pyx_v_backlog, __pyx_v_sock, __pyx_v_ssl); /* "uvloop/loop.pyx":1627 * return tr, protocol * * async def create_unix_server(self, protocol_factory, str path=None, # <<<<<<<<<<<<<< * *, backlog=100, sock=None, ssl=None): * """A coroutine which creates a UNIX Domain Socket server. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_57create_unix_server(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_backlog, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_unix_server", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_unix_server, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1627, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_path = __pyx_v_path; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path); __pyx_cur_scope->__pyx_v_backlog = __pyx_v_backlog; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_backlog); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_backlog); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_59generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_unix_server, __pyx_n_s_Loop_create_unix_server, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1627, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_59generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1627, __pyx_L1_error) /* "uvloop/loop.pyx":1648 * cdef: * UnixServer pipe * Server server = Server(self) # <<<<<<<<<<<<<< * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_Server), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1650 * Server server = Server(self) * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_ssl != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = __pyx_v_6uvloop_4loop_ssl_SSLContext; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 1650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/loop.pyx":1651 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * * if path is not None: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1651, __pyx_L1_error) /* "uvloop/loop.pyx":1650 * Server server = Server(self) * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * */ } /* "uvloop/loop.pyx":1653 * raise TypeError('ssl argument must be an SSLContext or None') * * if path is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_path != ((PyObject*)Py_None)); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1654 * * if path is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'path and sock can not be specified at the same time') */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1655 * if path is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'path and sock can not be specified at the same time') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1655, __pyx_L1_error) /* "uvloop/loop.pyx":1654 * * if path is not None: * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'path and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1662 * # they were bound to. This is different from asyncio, which * # doesn't cleanup the socket path. * sock = socket_socket(uv.AF_UNIX) # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket); __pyx_t_6 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1664 * sock = socket_socket(uv.AF_UNIX) * * try: # <<<<<<<<<<<<<< * sock.bind(path) * except OSError as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "uvloop/loop.pyx":1665 * * try: * sock.bind(path) # <<<<<<<<<<<<<< * except OSError as exc: * sock.close() */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_bind); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_path}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_path}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_cur_scope->__pyx_v_path); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1665, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1664 * sock = socket_socket(uv.AF_UNIX) * * try: # <<<<<<<<<<<<<< * sock.bind(path) * except OSError as exc: */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L16_try_end; __pyx_L9_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1666 * try: * sock.bind(path) * except OSError as exc: # <<<<<<<<<<<<<< * sock.close() * if exc.errno == errno.EADDRINUSE: */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_12) { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 1666, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_exc = __pyx_t_6; /*try:*/ { /* "uvloop/loop.pyx":1667 * sock.bind(path) * except OSError as exc: * sock.close() # <<<<<<<<<<<<<< * if exc.errno == errno.EADDRINUSE: * # Let's improve the error message by adding */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1667, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_13) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1667, __pyx_L22_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1667, __pyx_L22_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":1668 * except OSError as exc: * sock.close() * if exc.errno == errno.EADDRINUSE: # <<<<<<<<<<<<<< * # Let's improve the error message by adding * # with what exact address it occurs. */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1668, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __Pyx_PyInt_From_int(EADDRINUSE); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1668, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_13 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1668, __pyx_L22_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1668, __pyx_L22_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":1671 * # Let's improve the error message by adding * # with what exact address it occurs. * msg = 'Address {!r} is already in use'.format(path) # <<<<<<<<<<<<<< * raise OSError(errno.EADDRINUSE, msg) from None * else: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Address_r_is_already_in_use, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_path); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_13); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_path}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_13); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_cur_scope->__pyx_v_path}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_13); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_cur_scope->__pyx_v_path); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1671, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_13); __pyx_cur_scope->__pyx_v_msg = __pyx_t_13; __pyx_t_13 = 0; /* "uvloop/loop.pyx":1672 * # with what exact address it occurs. * msg = 'Address {!r} is already in use'.format(path) * raise OSError(errno.EADDRINUSE, msg) from None # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_13 = __Pyx_PyInt_From_int(EADDRINUSE); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1672, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1672, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_msg); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_msg); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1672, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_13, 0, 0, Py_None); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __PYX_ERR(1, 1672, __pyx_L22_error) /* "uvloop/loop.pyx":1668 * except OSError as exc: * sock.close() * if exc.errno == errno.EADDRINUSE: # <<<<<<<<<<<<<< * # Let's improve the error message by adding * # with what exact address it occurs. */ } /* "uvloop/loop.pyx":1674 * raise OSError(errno.EADDRINUSE, msg) from None * else: * raise # <<<<<<<<<<<<<< * except: * sock.close() */ /*else*/ { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_6, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; __PYX_ERR(1, 1674, __pyx_L22_error) } } /* "uvloop/loop.pyx":1666 * try: * sock.bind(path) * except OSError as exc: # <<<<<<<<<<<<<< * sock.close() * if exc.errno == errno.EADDRINUSE: */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L22_error:; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_12 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_exc); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_exc); __pyx_cur_scope->__pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L11_except_error; } } } /* "uvloop/loop.pyx":1675 * else: * raise * except: # <<<<<<<<<<<<<< * sock.close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(1, 1675, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":1676 * raise * except: * sock.close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1676, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_14) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1676, __pyx_L11_except_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1676, __pyx_L11_except_error) } __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "uvloop/loop.pyx":1677 * except: * sock.close() * raise # <<<<<<<<<<<<<< * * else: */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0; __PYX_ERR(1, 1677, __pyx_L11_except_error) } __pyx_L11_except_error:; /* "uvloop/loop.pyx":1664 * sock = socket_socket(uv.AF_UNIX) * * try: # <<<<<<<<<<<<<< * sock.bind(path) * except OSError as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L16_try_end:; } /* "uvloop/loop.pyx":1653 * raise TypeError('ssl argument must be an SSLContext or None') * * if path is not None: # <<<<<<<<<<<<<< * if sock is not None: * raise ValueError( */ goto __pyx_L7; } /* "uvloop/loop.pyx":1680 * * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError( * 'path was not specified, and no sock specified') */ /*else*/ { __pyx_t_3 = (__pyx_cur_scope->__pyx_v_sock == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1681 * else: * if sock is None: * raise ValueError( # <<<<<<<<<<<<<< * 'path was not specified, and no sock specified') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1681, __pyx_L1_error) /* "uvloop/loop.pyx":1680 * * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError( * 'path was not specified, and no sock specified') */ } /* "uvloop/loop.pyx":1684 * 'path was not specified, and no sock specified') * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L33_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = ((!__pyx_t_3) != 0); __pyx_t_4 = __pyx_t_5; __pyx_L33_bool_binop_done:; if (__pyx_t_4) { /* "uvloop/loop.pyx":1687 * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' * .format(sock)) # <<<<<<<<<<<<<< * * pipe = UnixServer.new(self, protocol_factory, server, ssl) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_2) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1685 * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A UNIX Domain Stream Socket was expected, got {!r}' * .format(sock)) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 1685, __pyx_L1_error) /* "uvloop/loop.pyx":1684 * 'path was not specified, and no sock specified') * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' */ } } __pyx_L7:; /* "uvloop/loop.pyx":1689 * .format(sock)) * * pipe = UnixServer.new(self, protocol_factory, server, ssl) # <<<<<<<<<<<<<< * * try: */ __pyx_t_6 = ((PyObject *)__pyx_f_6uvloop_4loop_10UnixServer_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol_factory, __pyx_cur_scope->__pyx_v_server, __pyx_cur_scope->__pyx_v_ssl)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_pipe = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1691 * pipe = UnixServer.new(self, protocol_factory, server, ssl) * * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":1693 * try: * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) # <<<<<<<<<<<<<< * * pipe._open(fileno) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_2) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1693, __pyx_L35_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_13 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (!__pyx_t_2) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1693, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_v_fileno = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/loop.pyx":1695 * fileno = os_dup(sock.fileno()) * * pipe._open(fileno) # <<<<<<<<<<<<<< * except: * pipe._close() */ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_fileno); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1695, __pyx_L35_error) __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_pipe), __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1695, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1691 * pipe = UnixServer.new(self, protocol_factory, server, ssl) * * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L42_try_end; __pyx_L35_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1696 * * pipe._open(fileno) * except: # <<<<<<<<<<<<<< * pipe._close() * sock.close() */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_13, &__pyx_t_7) < 0) __PYX_ERR(1, 1696, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":1697 * pipe._open(fileno) * except: * pipe._close() # <<<<<<<<<<<<<< * sock.close() * raise */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_pipe)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1697, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1698 * except: * pipe._close() * sock.close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1698, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_14) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1698, __pyx_L37_except_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1698, __pyx_L37_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1699 * pipe._close() * sock.close() * raise # <<<<<<<<<<<<<< * * pipe._attach_fileobj(sock) */ __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_13, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_13 = 0; __pyx_t_7 = 0; __PYX_ERR(1, 1699, __pyx_L37_except_error) } __pyx_L37_except_error:; /* "uvloop/loop.pyx":1691 * pipe = UnixServer.new(self, protocol_factory, server, ssl) * * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L42_try_end:; } /* "uvloop/loop.pyx":1701 * raise * * pipe._attach_fileobj(sock) # <<<<<<<<<<<<<< * * try: */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_pipe), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1703 * pipe._attach_fileobj(sock) * * try: # <<<<<<<<<<<<<< * pipe.listen(backlog) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "uvloop/loop.pyx":1704 * * try: * pipe.listen(backlog) # <<<<<<<<<<<<<< * except: * pipe._close() */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.listen(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_pipe), __pyx_cur_scope->__pyx_v_backlog); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1704, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1703 * pipe._attach_fileobj(sock) * * try: # <<<<<<<<<<<<<< * pipe.listen(backlog) * except: */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L52_try_end; __pyx_L45_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1705 * try: * pipe.listen(backlog) * except: # <<<<<<<<<<<<<< * pipe._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_13, &__pyx_t_6) < 0) __PYX_ERR(1, 1705, __pyx_L47_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":1706 * pipe.listen(backlog) * except: * pipe._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_cur_scope->__pyx_v_pipe->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_pipe)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1706, __pyx_L47_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1707 * except: * pipe._close() * raise # <<<<<<<<<<<<<< * * server._add_server(pipe) */ __Pyx_GIVEREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_13, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_13 = 0; __pyx_t_6 = 0; __PYX_ERR(1, 1707, __pyx_L47_except_error) } __pyx_L47_except_error:; /* "uvloop/loop.pyx":1703 * pipe._attach_fileobj(sock) * * try: # <<<<<<<<<<<<<< * pipe.listen(backlog) * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L52_try_end:; } /* "uvloop/loop.pyx":1709 * raise * * server._add_server(pipe) # <<<<<<<<<<<<<< * return server * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_cur_scope->__pyx_v_server->__pyx_vtab)->_add_server(__pyx_cur_scope->__pyx_v_server, ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_cur_scope->__pyx_v_pipe)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1710 * * server._add_server(pipe) * return server # <<<<<<<<<<<<<< * * async def create_unix_connection(self, protocol_factory, path, *, */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_server)); goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1627 * return tr, protocol * * async def create_unix_server(self, protocol_factory, str path=None, # <<<<<<<<<<<<<< * *, backlog=100, sock=None, ssl=None): * """A coroutine which creates a UNIX Domain Socket server. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("create_unix_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_62generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1712 * return server * * async def create_unix_connection(self, protocol_factory, path, *, # <<<<<<<<<<<<<< * ssl=None, sock=None, * server_hostname=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_61create_unix_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_60create_unix_connection[] = "Loop.create_unix_connection(self, protocol_factory, path, *, ssl=None, sock=None, server_hostname=None)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_61create_unix_connection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_path = 0; PyObject *__pyx_v_ssl = 0; PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_server_hostname = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_unix_connection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_path,&__pyx_n_s_ssl,&__pyx_n_s_sock,&__pyx_n_s_server_hostname,0}; PyObject* values[5] = {0,0,0,0,0}; /* "uvloop/loop.pyx":1713 * * async def create_unix_connection(self, protocol_factory, path, *, * ssl=None, sock=None, # <<<<<<<<<<<<<< * server_hostname=None): * */ values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":1714 * async def create_unix_connection(self, protocol_factory, path, *, * ssl=None, sock=None, * server_hostname=None): # <<<<<<<<<<<<<< * * cdef: */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("create_unix_connection", 1, 2, 2, 1); __PYX_ERR(1, 1712, __pyx_L3_error) } } if (kw_args > 0 && likely(kw_args <= 3)) { Py_ssize_t index; for (index = 2; index < 5 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_unix_connection") < 0)) __PYX_ERR(1, 1712, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_protocol_factory = values[0]; __pyx_v_path = values[1]; __pyx_v_ssl = values[2]; __pyx_v_sock = values[3]; __pyx_v_server_hostname = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create_unix_connection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1712, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_60create_unix_connection(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_path, __pyx_v_ssl, __pyx_v_sock, __pyx_v_server_hostname); /* "uvloop/loop.pyx":1712 * return server * * async def create_unix_connection(self, protocol_factory, path, *, # <<<<<<<<<<<<<< * ssl=None, sock=None, * server_hostname=None): */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_60create_unix_connection(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_path, PyObject *__pyx_v_ssl, PyObject *__pyx_v_sock, PyObject *__pyx_v_server_hostname) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_unix_connection", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1712, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_path = __pyx_v_path; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path); __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_server_hostname = __pyx_v_server_hostname; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_62generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_unix_connection, __pyx_n_s_Loop_create_unix_connection, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1712, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_62generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L18_resume_from_yield; case 2: goto __pyx_L33_resume_from_yield; case 3: goto __pyx_L37_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1712, __pyx_L1_error) /* "uvloop/loop.pyx":1722 * object ssl_waiter * * app_protocol = protocol = protocol_factory() # <<<<<<<<<<<<<< * ssl_waiter = None * if ssl: */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_2 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1722, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_1; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_protocol = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1723 * * app_protocol = protocol = protocol_factory() * ssl_waiter = None # <<<<<<<<<<<<<< * if ssl: * if server_hostname is None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_ssl_waiter = Py_None; /* "uvloop/loop.pyx":1724 * app_protocol = protocol = protocol_factory() * ssl_waiter = None * if ssl: # <<<<<<<<<<<<<< * if server_hostname is None: * raise ValueError('You must set server_hostname ' */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1724, __pyx_L1_error) if (__pyx_t_4) { /* "uvloop/loop.pyx":1725 * ssl_waiter = None * if ssl: * if server_hostname is None: # <<<<<<<<<<<<<< * raise ValueError('You must set server_hostname ' * 'when using ssl without a host') */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_server_hostname == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":1726 * if ssl: * if server_hostname is None: * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<< * 'when using ssl without a host') * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1726, __pyx_L1_error) /* "uvloop/loop.pyx":1725 * ssl_waiter = None * if ssl: * if server_hostname is None: # <<<<<<<<<<<<<< * raise ValueError('You must set server_hostname ' * 'when using ssl without a host') */ } /* "uvloop/loop.pyx":1729 * 'when using ssl without a host') * * ssl_waiter = self._new_future() # <<<<<<<<<<<<<< * sslcontext = None if isinstance(ssl, bool) else ssl * protocol = aio_SSLProtocol( */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ssl_waiter, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1730 * * ssl_waiter = self._new_future() * sslcontext = None if isinstance(ssl, bool) else ssl # <<<<<<<<<<<<<< * protocol = aio_SSLProtocol( * self, app_protocol, sslcontext, ssl_waiter, */ __pyx_t_2 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 1730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((__pyx_t_5 != 0)) { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __pyx_t_1 = __pyx_cur_scope->__pyx_v_ssl; } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_sslcontext = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1733 * protocol = aio_SSLProtocol( * self, app_protocol, sslcontext, ssl_waiter, * False, server_hostname) # <<<<<<<<<<<<<< * else: * if server_hostname is not None: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_SSLProtocol); __pyx_t_2 = __pyx_v_6uvloop_4loop_aio_SSLProtocol; __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_sslcontext, __pyx_cur_scope->__pyx_v_ssl_waiter, Py_False, __pyx_cur_scope->__pyx_v_server_hostname}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1731, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_sslcontext, __pyx_cur_scope->__pyx_v_ssl_waiter, Py_False, __pyx_cur_scope->__pyx_v_server_hostname}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1731, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_cur_scope->__pyx_v_app_protocol); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sslcontext); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sslcontext); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_cur_scope->__pyx_v_sslcontext); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl_waiter); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_6, Py_False); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_server_hostname); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_server_hostname); PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_6, __pyx_cur_scope->__pyx_v_server_hostname); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_protocol, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1724 * app_protocol = protocol = protocol_factory() * ssl_waiter = None * if ssl: # <<<<<<<<<<<<<< * if server_hostname is None: * raise ValueError('You must set server_hostname ' */ goto __pyx_L4; } /* "uvloop/loop.pyx":1735 * False, server_hostname) * else: * if server_hostname is not None: # <<<<<<<<<<<<<< * raise ValueError('server_hostname is only meaningful with ssl') * */ /*else*/ { __pyx_t_5 = (__pyx_cur_scope->__pyx_v_server_hostname != Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1736 * else: * if server_hostname is not None: * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<< * * if path is not None: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1736, __pyx_L1_error) /* "uvloop/loop.pyx":1735 * False, server_hostname) * else: * if server_hostname is not None: # <<<<<<<<<<<<<< * raise ValueError('server_hostname is only meaningful with ssl') * */ } } __pyx_L4:; /* "uvloop/loop.pyx":1738 * raise ValueError('server_hostname is only meaningful with ssl') * * if path is not None: # <<<<<<<<<<<<<< * if isinstance(path, str): * path = PyUnicode_EncodeFSDefault(path) */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_path != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":1739 * * if path is not None: * if isinstance(path, str): # <<<<<<<<<<<<<< * path = PyUnicode_EncodeFSDefault(path) * */ __pyx_t_5 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_path); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1740 * if path is not None: * if isinstance(path, str): * path = PyUnicode_EncodeFSDefault(path) # <<<<<<<<<<<<<< * * if sock is not None: */ __pyx_t_1 = PyUnicode_EncodeFSDefault(__pyx_cur_scope->__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_path); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1739 * * if path is not None: * if isinstance(path, str): # <<<<<<<<<<<<<< * path = PyUnicode_EncodeFSDefault(path) * */ } /* "uvloop/loop.pyx":1742 * path = PyUnicode_EncodeFSDefault(path) * * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'path and sock can not be specified at the same time') */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/loop.pyx":1743 * * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'path and sock can not be specified at the same time') * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 1743, __pyx_L1_error) /* "uvloop/loop.pyx":1742 * path = PyUnicode_EncodeFSDefault(path) * * if sock is not None: # <<<<<<<<<<<<<< * raise ValueError( * 'path and sock can not be specified at the same time') */ } /* "uvloop/loop.pyx":1746 * 'path and sock can not be specified at the same time') * * waiter = self._new_future() # <<<<<<<<<<<<<< * tr = UnixTransport.new(self, protocol, None, waiter) * tr.connect(path) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1747 * * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<< * tr.connect(path) * try: */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1748 * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) * tr.connect(path) # <<<<<<<<<<<<<< * try: * await waiter */ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_path); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 1748, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->connect(__pyx_cur_scope->__pyx_v_tr, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1749 * tr = UnixTransport.new(self, protocol, None, waiter) * tr.connect(path) * try: # <<<<<<<<<<<<<< * await waiter * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "uvloop/loop.pyx":1750 * tr.connect(path) * try: * await waiter # <<<<<<<<<<<<<< * except: * tr._close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_0 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_t_10); __pyx_cur_scope->__pyx_t_1 = __pyx_t_10; __Pyx_XGIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_t_2 = __pyx_t_11; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L18_resume_from_yield:; __pyx_t_9 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_9); __pyx_t_10 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_11 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1750, __pyx_L10_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1750, __pyx_L10_error) } } /* "uvloop/loop.pyx":1749 * tr = UnixTransport.new(self, protocol, None, waiter) * tr.connect(path) * try: # <<<<<<<<<<<<<< * await waiter * except: */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1751 * try: * await waiter * except: # <<<<<<<<<<<<<< * tr._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(1, 1751, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/loop.pyx":1752 * await waiter * except: * tr._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1752, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":1753 * except: * tr._close() * raise # <<<<<<<<<<<<<< * * else: */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_7); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_7 = 0; __PYX_ERR(1, 1753, __pyx_L12_except_error) } __pyx_L12_except_error:; /* "uvloop/loop.pyx":1749 * tr = UnixTransport.new(self, protocol, None, waiter) * tr.connect(path) * try: # <<<<<<<<<<<<<< * await waiter * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L17_try_end:; } /* "uvloop/loop.pyx":1738 * raise ValueError('server_hostname is only meaningful with ssl') * * if path is not None: # <<<<<<<<<<<<<< * if isinstance(path, str): * path = PyUnicode_EncodeFSDefault(path) */ goto __pyx_L7; } /* "uvloop/loop.pyx":1756 * * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError('no path and sock were specified') * */ /*else*/ { __pyx_t_5 = (__pyx_cur_scope->__pyx_v_sock == Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1757 * else: * if sock is None: * raise ValueError('no path and sock were specified') # <<<<<<<<<<<<<< * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(1, 1757, __pyx_L1_error) /* "uvloop/loop.pyx":1756 * * else: * if sock is None: # <<<<<<<<<<<<<< * raise ValueError('no path and sock were specified') * */ } /* "uvloop/loop.pyx":1759 * raise ValueError('no path and sock were specified') * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L23_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 1759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = ((!__pyx_t_5) != 0); __pyx_t_4 = __pyx_t_12; __pyx_L23_bool_binop_done:; if (__pyx_t_4) { /* "uvloop/loop.pyx":1762 * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' * .format(sock)) # <<<<<<<<<<<<<< * * waiter = self._new_future() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1760 * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A UNIX Domain Stream Socket was expected, got {!r}' * .format(sock)) */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 1760, __pyx_L1_error) /* "uvloop/loop.pyx":1759 * raise ValueError('no path and sock were specified') * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UNIX Domain Stream Socket was expected, got {!r}' */ } /* "uvloop/loop.pyx":1764 * .format(sock)) * * waiter = self._new_future() # <<<<<<<<<<<<<< * tr = UnixTransport.new(self, protocol, None, waiter) * try: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":1765 * * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) # <<<<<<<<<<<<<< * try: * # See a comment on os_dup in create_connection */ __pyx_t_2 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1766 * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":1768 * try: * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) # <<<<<<<<<<<<<< * * # libuv will make socket non-blocking */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1768, __pyx_L25_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_1}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1768, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_fileno = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":1771 * * # libuv will make socket non-blocking * tr._open(fileno) # <<<<<<<<<<<<<< * tr._attach_fileobj(sock) * tr._init_protocol() */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_fileno); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1771, __pyx_L25_error) __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1771, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1772 * # libuv will make socket non-blocking * tr._open(fileno) * tr._attach_fileobj(sock) # <<<<<<<<<<<<<< * tr._init_protocol() * await waiter */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_tr), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1772, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1773 * tr._open(fileno) * tr._attach_fileobj(sock) * tr._init_protocol() # <<<<<<<<<<<<<< * await waiter * except: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1773, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1774 * tr._attach_fileobj(sock) * tr._init_protocol() * await waiter # <<<<<<<<<<<<<< * except: * tr._close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_0 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_t_10); __pyx_cur_scope->__pyx_t_1 = __pyx_t_10; __Pyx_XGIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_t_2 = __pyx_t_11; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L33_resume_from_yield:; __pyx_t_9 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_9); __pyx_t_10 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_11 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1774, __pyx_L25_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1774, __pyx_L25_error) } } /* "uvloop/loop.pyx":1766 * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L32_try_end; __pyx_L25_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1775 * tr._init_protocol() * await waiter * except: # <<<<<<<<<<<<<< * tr._close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_13) < 0) __PYX_ERR(1, 1775, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_13); /* "uvloop/loop.pyx":1776 * await waiter * except: * tr._close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_cur_scope->__pyx_v_tr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_cur_scope->__pyx_v_tr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1776, __pyx_L27_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1777 * except: * tr._close() * raise # <<<<<<<<<<<<<< * * if ssl: */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_13); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_13 = 0; __PYX_ERR(1, 1777, __pyx_L27_except_error) } __pyx_L27_except_error:; /* "uvloop/loop.pyx":1766 * waiter = self._new_future() * tr = UnixTransport.new(self, protocol, None, waiter) * try: # <<<<<<<<<<<<<< * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L32_try_end:; } } __pyx_L7:; /* "uvloop/loop.pyx":1779 * raise * * if ssl: # <<<<<<<<<<<<<< * await ssl_waiter * return protocol._app_transport, app_protocol */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ssl); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1779, __pyx_L1_error) if (__pyx_t_4) { /* "uvloop/loop.pyx":1780 * * if ssl: * await ssl_waiter # <<<<<<<<<<<<<< * return protocol._app_transport, app_protocol * else: */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_ssl_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L37_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1780, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 1780, __pyx_L1_error) } } /* "uvloop/loop.pyx":1781 * if ssl: * await ssl_waiter * return protocol._app_transport, app_protocol # <<<<<<<<<<<<<< * else: * return tr, protocol */ __Pyx_XDECREF(__pyx_r); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_protocol, __pyx_n_s_app_transport); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_app_protocol); __pyx_t_13 = 0; __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":1779 * raise * * if ssl: # <<<<<<<<<<<<<< * await ssl_waiter * return protocol._app_transport, app_protocol */ } /* "uvloop/loop.pyx":1783 * return protocol._app_transport, app_protocol * else: * return tr, protocol # <<<<<<<<<<<<<< * * def default_exception_handler(self, context): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_tr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_tr)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_protocol); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = 0; goto __pyx_L0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1712 * return server * * async def create_unix_connection(self, protocol_factory, path, *, # <<<<<<<<<<<<<< * ssl=None, sock=None, * server_hostname=None): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("create_unix_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1785 * return tr, protocol * * def default_exception_handler(self, context): # <<<<<<<<<<<<<< * """Default exception handler. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_64default_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_63default_exception_handler[] = "Loop.default_exception_handler(self, context)\nDefault exception handler.\n\n This is called when an exception occurs and no exception\n handler is set, and can be called by a custom exception\n handler that wants to defer to the default behavior.\n\n The context parameter has the same meaning as in\n `call_exception_handler()`.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_64default_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_exception_handler (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_63default_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_context)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_63default_exception_handler(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_v_exception = NULL; PyObject *__pyx_v_exc_info = NULL; PyObject *__pyx_v_log_lines = NULL; PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_value = NULL; PyObject *__pyx_v_tb = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; char const *__pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; __Pyx_RefNannySetupContext("default_exception_handler", 0); /* "uvloop/loop.pyx":1795 * `call_exception_handler()`. * """ * message = context.get('message') # <<<<<<<<<<<<<< * if not message: * message = 'Unhandled exception in event loop' */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_message = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":1796 * """ * message = context.get('message') * if not message: # <<<<<<<<<<<<<< * message = 'Unhandled exception in event loop' * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_message); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 1796, __pyx_L1_error) __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1797 * message = context.get('message') * if not message: * message = 'Unhandled exception in event loop' # <<<<<<<<<<<<<< * * exception = context.get('exception') */ __Pyx_INCREF(__pyx_kp_u_Unhandled_exception_in_event_loo); __Pyx_DECREF_SET(__pyx_v_message, __pyx_kp_u_Unhandled_exception_in_event_loo); /* "uvloop/loop.pyx":1796 * """ * message = context.get('message') * if not message: # <<<<<<<<<<<<<< * message = 'Unhandled exception in event loop' * */ } /* "uvloop/loop.pyx":1799 * message = 'Unhandled exception in event loop' * * exception = context.get('exception') # <<<<<<<<<<<<<< * if exception is not None: * exc_info = (type(exception), exception, exception.__traceback__) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exception = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":1800 * * exception = context.get('exception') * if exception is not None: # <<<<<<<<<<<<<< * exc_info = (type(exception), exception, exception.__traceback__) * else: */ __pyx_t_4 = (__pyx_v_exception != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1801 * exception = context.get('exception') * if exception is not None: * exc_info = (type(exception), exception, exception.__traceback__) # <<<<<<<<<<<<<< * else: * exc_info = False */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_traceback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_exception))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_exception))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_exception))); __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_exception); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; __pyx_v_exc_info = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":1800 * * exception = context.get('exception') * if exception is not None: # <<<<<<<<<<<<<< * exc_info = (type(exception), exception, exception.__traceback__) * else: */ goto __pyx_L4; } /* "uvloop/loop.pyx":1803 * exc_info = (type(exception), exception, exception.__traceback__) * else: * exc_info = False # <<<<<<<<<<<<<< * * log_lines = [message] */ /*else*/ { __Pyx_INCREF(Py_False); __pyx_v_exc_info = Py_False; } __pyx_L4:; /* "uvloop/loop.pyx":1805 * exc_info = False * * log_lines = [message] # <<<<<<<<<<<<<< * for key in sorted(context): * if key in {'message', 'exception'}: */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_message); __Pyx_GIVEREF(__pyx_v_message); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_message); __pyx_v_log_lines = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1806 * * log_lines = [message] * for key in sorted(context): # <<<<<<<<<<<<<< * if key in {'message', 'exception'}: * continue */ __pyx_t_1 = PySequence_List(__pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 1806, __pyx_L1_error) if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(1, 1806, __pyx_L1_error) } __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 1806, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1807 * log_lines = [message] * for key in sorted(context): * if key in {'message', 'exception'}: # <<<<<<<<<<<<<< * continue * value = context[key] */ __Pyx_INCREF(__pyx_v_key); __pyx_t_2 = __pyx_v_key; __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_message, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1807, __pyx_L1_error) if (!__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L8_bool_binop_done; } __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_exception, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1807, __pyx_L1_error) __pyx_t_3 = __pyx_t_4; __pyx_L8_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/loop.pyx":1808 * for key in sorted(context): * if key in {'message', 'exception'}: * continue # <<<<<<<<<<<<<< * value = context[key] * if key == 'source_traceback': */ goto __pyx_L5_continue; /* "uvloop/loop.pyx":1807 * log_lines = [message] * for key in sorted(context): * if key in {'message', 'exception'}: # <<<<<<<<<<<<<< * continue * value = context[key] */ } /* "uvloop/loop.pyx":1809 * if key in {'message', 'exception'}: * continue * value = context[key] # <<<<<<<<<<<<<< * if key == 'source_traceback': * tb = ''.join(tb_format_list(value)) */ __pyx_t_2 = PyObject_GetItem(__pyx_v_context, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1810 * continue * value = context[key] * if key == 'source_traceback': # <<<<<<<<<<<<<< * tb = ''.join(tb_format_list(value)) * value = 'Object created at (most recent call last):\n' */ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_key, __pyx_n_u_source_traceback, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 1810, __pyx_L1_error) if (__pyx_t_4) { /* "uvloop/loop.pyx":1811 * value = context[key] * if key == 'source_traceback': * tb = ''.join(tb_format_list(value)) # <<<<<<<<<<<<<< * value = 'Object created at (most recent call last):\n' * value += tb.rstrip() */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_format_list); __pyx_t_7 = __pyx_v_6uvloop_4loop_tb_format_list; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_value); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__30, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_tb, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; /* "uvloop/loop.pyx":1812 * if key == 'source_traceback': * tb = ''.join(tb_format_list(value)) * value = 'Object created at (most recent call last):\n' # <<<<<<<<<<<<<< * value += tb.rstrip() * else: */ __Pyx_INCREF(__pyx_kp_u_Object_created_at_most_recent_ca); __Pyx_DECREF_SET(__pyx_v_value, __pyx_kp_u_Object_created_at_most_recent_ca); /* "uvloop/loop.pyx":1813 * tb = ''.join(tb_format_list(value)) * value = 'Object created at (most recent call last):\n' * value += tb.rstrip() # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_9) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1813, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1810 * continue * value = context[key] * if key == 'source_traceback': # <<<<<<<<<<<<<< * tb = ''.join(tb_format_list(value)) * value = 'Object created at (most recent call last):\n' */ goto __pyx_L10; } /* "uvloop/loop.pyx":1815 * value += tb.rstrip() * else: * try: # <<<<<<<<<<<<<< * value = repr(value) * except Exception as ex: */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { /* "uvloop/loop.pyx":1816 * else: * try: * value = repr(value) # <<<<<<<<<<<<<< * except Exception as ex: * value = ('Exception in __repr__ {!r}; ' */ __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1816, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1815 * value += tb.rstrip() * else: * try: # <<<<<<<<<<<<<< * value = repr(value) * except Exception as ex: */ } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1817 * try: * value = repr(value) * except Exception as ex: # <<<<<<<<<<<<<< * value = ('Exception in __repr__ {!r}; ' * 'value type: {!r}'.format(ex, type(value))) */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_13) { __Pyx_AddTraceback("uvloop.loop.Loop.default_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(1, 1817, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/loop.pyx":1819 * except Exception as ex: * value = ('Exception in __repr__ {!r}; ' * 'value type: {!r}'.format(ex, type(value))) # <<<<<<<<<<<<<< * log_lines.append('{}: {}'.format(key, value)) * */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in___repr___r_value_ty, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1819, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; __pyx_t_13 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_ex, ((PyObject *)Py_TYPE(__pyx_v_value))}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1819, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_ex, ((PyObject *)Py_TYPE(__pyx_v_value))}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1819, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_16 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1819, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; } __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_13, __pyx_v_ex); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value))); PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_13, ((PyObject *)Py_TYPE(__pyx_v_value))); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1819, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; } /* "uvloop/loop.pyx":1817 * try: * value = repr(value) * except Exception as ex: # <<<<<<<<<<<<<< * value = ('Exception in __repr__ {!r}; ' * 'value type: {!r}'.format(ex, type(value))) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L25; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L24_error:; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_13 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; goto __pyx_L13_except_error; } __pyx_L25:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; __pyx_L13_except_error:; /* "uvloop/loop.pyx":1815 * value += tb.rstrip() * else: * try: # <<<<<<<<<<<<<< * value = repr(value) * except Exception as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L1_error; __pyx_L12_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); __pyx_L18_try_end:; } } __pyx_L10:; /* "uvloop/loop.pyx":1820 * value = ('Exception in __repr__ {!r}; ' * 'value type: {!r}'.format(ex, type(value))) * log_lines.append('{}: {}'.format(key, value)) # <<<<<<<<<<<<<< * * aio_logger.error('\n'.join(log_lines), exc_info=exc_info) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__75, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = NULL; __pyx_t_17 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_17 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_value}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_value}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_17, __pyx_v_key); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_17, __pyx_v_value); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_log_lines, __pyx_t_9); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 1820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":1806 * * log_lines = [message] * for key in sorted(context): # <<<<<<<<<<<<<< * if key in {'message', 'exception'}: * continue */ __pyx_L5_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1822 * log_lines.append('{}: {}'.format(key, value)) * * aio_logger.error('\n'.join(log_lines), exc_info=exc_info) # <<<<<<<<<<<<<< * * def get_exception_handler(self): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = PyUnicode_Join(__pyx_kp_u__76, __pyx_v_log_lines); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, __pyx_v_exc_info) < 0) __PYX_ERR(1, 1822, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":1785 * return tr, protocol * * def default_exception_handler(self, context): # <<<<<<<<<<<<<< * """Default exception handler. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("uvloop.loop.Loop.default_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_exception); __Pyx_XDECREF(__pyx_v_exc_info); __Pyx_XDECREF(__pyx_v_log_lines); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_tb); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1824 * aio_logger.error('\n'.join(log_lines), exc_info=exc_info) * * def get_exception_handler(self): # <<<<<<<<<<<<<< * """Return an exception handler, or None if the default one is in use. * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_66get_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_65get_exception_handler[] = "Loop.get_exception_handler(self)\nReturn an exception handler, or None if the default one is in use.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_66get_exception_handler(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_exception_handler (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_65get_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_65get_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_exception_handler", 0); /* "uvloop/loop.pyx":1827 * """Return an exception handler, or None if the default one is in use. * """ * return self._exception_handler # <<<<<<<<<<<<<< * * def set_exception_handler(self, handler): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_exception_handler); __pyx_r = __pyx_v_self->_exception_handler; goto __pyx_L0; /* "uvloop/loop.pyx":1824 * aio_logger.error('\n'.join(log_lines), exc_info=exc_info) * * def get_exception_handler(self): # <<<<<<<<<<<<<< * """Return an exception handler, or None if the default one is in use. * """ */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1829 * return self._exception_handler * * def set_exception_handler(self, handler): # <<<<<<<<<<<<<< * """Set handler as the new event loop exception handler. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_68set_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_handler); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_67set_exception_handler[] = "Loop.set_exception_handler(self, handler)\nSet handler as the new event loop exception handler.\n\n If handler is None, the default exception handler will\n be set.\n\n If handler is a callable object, it should have a\n signature matching '(loop, context)', where 'loop'\n will be a reference to the active event loop, 'context'\n will be a dict object (see `call_exception_handler()`\n documentation for details about context).\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_68set_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_handler) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_exception_handler (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_67set_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_handler)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_67set_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_handler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("set_exception_handler", 0); /* "uvloop/loop.pyx":1841 * documentation for details about context). * """ * if handler is not None and not callable(handler): # <<<<<<<<<<<<<< * raise TypeError('A callable object or None is expected, ' * 'got {!r}'.format(handler)) */ __pyx_t_2 = (__pyx_v_handler != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 1841, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1843 * if handler is not None and not callable(handler): * raise TypeError('A callable object or None is expected, ' * 'got {!r}'.format(handler)) # <<<<<<<<<<<<<< * self._exception_handler = handler * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_callable_object_or_None_is_exp, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_handler}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_handler}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_handler); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":1842 * """ * if handler is not None and not callable(handler): * raise TypeError('A callable object or None is expected, ' # <<<<<<<<<<<<<< * 'got {!r}'.format(handler)) * self._exception_handler = handler */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1842, __pyx_L1_error) /* "uvloop/loop.pyx":1841 * documentation for details about context). * """ * if handler is not None and not callable(handler): # <<<<<<<<<<<<<< * raise TypeError('A callable object or None is expected, ' * 'got {!r}'.format(handler)) */ } /* "uvloop/loop.pyx":1844 * raise TypeError('A callable object or None is expected, ' * 'got {!r}'.format(handler)) * self._exception_handler = handler # <<<<<<<<<<<<<< * * def call_exception_handler(self, context): */ __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); __Pyx_GOTREF(__pyx_v_self->_exception_handler); __Pyx_DECREF(__pyx_v_self->_exception_handler); __pyx_v_self->_exception_handler = __pyx_v_handler; /* "uvloop/loop.pyx":1829 * return self._exception_handler * * def set_exception_handler(self, handler): # <<<<<<<<<<<<<< * """Set handler as the new event loop exception handler. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop.set_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1846 * self._exception_handler = handler * * def call_exception_handler(self, context): # <<<<<<<<<<<<<< * """Call the current event loop's exception handler. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_70call_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_69call_exception_handler[] = "Loop.call_exception_handler(self, context)\nCall the current event loop's exception handler.\n\n The context argument is a dict containing the following keys:\n\n - 'message': Error message;\n - 'exception' (optional): Exception object;\n - 'future' (optional): Future instance;\n - 'handle' (optional): Handle instance;\n - 'protocol' (optional): Protocol instance;\n - 'transport' (optional): Transport instance;\n - 'socket' (optional): Socket instance.\n\n New keys maybe introduced in the future.\n\n Note: do not overload this method in an event loop subclass.\n For custom exception handling, use the\n `set_exception_handler()` method.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_70call_exception_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_context) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("call_exception_handler (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_69call_exception_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_context)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_69call_exception_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_context) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; char const *__pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; __Pyx_RefNannySetupContext("call_exception_handler", 0); /* "uvloop/loop.pyx":1865 * `set_exception_handler()` method. * """ * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._debug_exception_handler_cnt += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1866 * """ * if UVLOOP_DEBUG: * self._debug_exception_handler_cnt += 1 # <<<<<<<<<<<<<< * * if self._exception_handler is None: */ __pyx_v_self->_debug_exception_handler_cnt = (__pyx_v_self->_debug_exception_handler_cnt + 1); /* "uvloop/loop.pyx":1865 * `set_exception_handler()` method. * """ * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._debug_exception_handler_cnt += 1 * */ } /* "uvloop/loop.pyx":1868 * self._debug_exception_handler_cnt += 1 * * if self._exception_handler is None: # <<<<<<<<<<<<<< * try: * self.default_exception_handler(context) */ __pyx_t_1 = (__pyx_v_self->_exception_handler == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1869 * * if self._exception_handler is None: * try: # <<<<<<<<<<<<<< * self.default_exception_handler(context) * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/loop.pyx":1870 * if self._exception_handler is None: * try: * self.default_exception_handler(context) # <<<<<<<<<<<<<< * except Exception: * # Second protection layer for unexpected errors */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_exception_handler); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_context); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_context}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_context}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_context); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1870, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1869 * * if self._exception_handler is None: * try: # <<<<<<<<<<<<<< * self.default_exception_handler(context) * except Exception: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1871 * try: * self.default_exception_handler(context) * except Exception: # <<<<<<<<<<<<<< * # Second protection layer for unexpected errors * # in the default implementation, as well as for subclassed */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(1, 1871, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/loop.pyx":1875 * # in the default implementation, as well as for subclassed * # event loops with overloaded "default_exception_handler". * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<< * exc_info=True) * else: */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1875, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":1876 * # event loops with overloaded "default_exception_handler". * aio_logger.error('Exception in default exception handler', * exc_info=True) # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1876, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(1, 1876, __pyx_L7_except_error) /* "uvloop/loop.pyx":1875 * # in the default implementation, as well as for subclassed * # event loops with overloaded "default_exception_handler". * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<< * exc_info=True) * else: */ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__77, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1875, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/loop.pyx":1869 * * if self._exception_handler is None: * try: # <<<<<<<<<<<<<< * self.default_exception_handler(context) * except Exception: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L12_try_end:; } /* "uvloop/loop.pyx":1868 * self._debug_exception_handler_cnt += 1 * * if self._exception_handler is None: # <<<<<<<<<<<<<< * try: * self.default_exception_handler(context) */ goto __pyx_L4; } /* "uvloop/loop.pyx":1878 * exc_info=True) * else: * try: # <<<<<<<<<<<<<< * self._exception_handler(self, context) * except Exception as exc: */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/loop.pyx":1879 * else: * try: * self._exception_handler(self, context) # <<<<<<<<<<<<<< * except Exception as exc: * # Exception in the user set custom exception handler. */ __Pyx_INCREF(__pyx_v_self->_exception_handler); __pyx_t_7 = __pyx_v_self->_exception_handler; __pyx_t_6 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_context}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1879, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_context}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1879, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_12 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1879, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_10, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_10, __pyx_v_context); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1879, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":1878 * exc_info=True) * else: * try: # <<<<<<<<<<<<<< * self._exception_handler(self, context) * except Exception as exc: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":1880 * try: * self._exception_handler(self, context) * except Exception as exc: # <<<<<<<<<<<<<< * # Exception in the user set custom exception handler. * try: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_12) < 0) __PYX_ERR(1, 1880, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_v_exc = __pyx_t_7; /*try:*/ { /* "uvloop/loop.pyx":1882 * except Exception as exc: * # Exception in the user set custom exception handler. * try: # <<<<<<<<<<<<<< * # Let's try default handler. * self.default_exception_handler({ */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { /* "uvloop/loop.pyx":1884 * try: * # Let's try default handler. * self.default_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'Unhandled error in exception handler', * 'exception': exc, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_11); /* "uvloop/loop.pyx":1885 * # Let's try default handler. * self.default_exception_handler({ * 'message': 'Unhandled error in exception handler', # <<<<<<<<<<<<<< * 'exception': exc, * 'context': context, */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1885, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_message, __pyx_kp_u_Unhandled_error_in_exception_han) < 0) __PYX_ERR(1, 1885, __pyx_L30_error) /* "uvloop/loop.pyx":1886 * self.default_exception_handler({ * 'message': 'Unhandled error in exception handler', * 'exception': exc, # <<<<<<<<<<<<<< * 'context': context, * }) */ if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(1, 1885, __pyx_L30_error) /* "uvloop/loop.pyx":1887 * 'message': 'Unhandled error in exception handler', * 'exception': exc, * 'context': context, # <<<<<<<<<<<<<< * }) * except Exception: */ if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_context, __pyx_v_context) < 0) __PYX_ERR(1, 1885, __pyx_L30_error) __pyx_t_16 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_16) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_8}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_8}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1884, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1882 * except Exception as exc: * # Exception in the user set custom exception handler. * try: # <<<<<<<<<<<<<< * # Let's try default handler. * self.default_exception_handler({ */ } __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L37_try_end; __pyx_L30_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/loop.pyx":1889 * 'context': context, * }) * except Exception: # <<<<<<<<<<<<<< * # Guard 'default_exception_handler' in case it is * # overloaded. */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_11, &__pyx_t_17) < 0) __PYX_ERR(1, 1889, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_17); /* "uvloop/loop.pyx":1892 * # Guard 'default_exception_handler' in case it is * # overloaded. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<< * 'while handling an unexpected error ' * 'in custom exception handler', */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1892, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":1895 * 'while handling an unexpected error ' * 'in custom exception handler', * exc_info=True) # <<<<<<<<<<<<<< * * def add_reader(self, fd, callback, *args): */ __pyx_t_16 = PyDict_New(); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1895, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_16); if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(1, 1895, __pyx_L32_except_error) /* "uvloop/loop.pyx":1892 * # Guard 'default_exception_handler' in case it is * # overloaded. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<< * 'while handling an unexpected error ' * 'in custom exception handler', */ __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__78, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1892, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L31_exception_handled; } goto __pyx_L32_except_error; __pyx_L32_except_error:; /* "uvloop/loop.pyx":1882 * except Exception as exc: * # Exception in the user set custom exception handler. * try: # <<<<<<<<<<<<<< * # Let's try default handler. * self.default_exception_handler({ */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); goto __pyx_L28_error; __pyx_L31_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_L37_try_end:; } } /* "uvloop/loop.pyx":1880 * try: * self._exception_handler(self, context) * except Exception as exc: # <<<<<<<<<<<<<< * # Exception in the user set custom exception handler. * try: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L29; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L28_error:; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __pyx_t_10 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; goto __pyx_L17_except_error; } __pyx_L29:; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L16_exception_handled; } goto __pyx_L17_except_error; __pyx_L17_except_error:; /* "uvloop/loop.pyx":1878 * exc_info=True) * else: * try: # <<<<<<<<<<<<<< * self._exception_handler(self, context) * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); goto __pyx_L1_error; __pyx_L16_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_L22_try_end:; } } __pyx_L4:; /* "uvloop/loop.pyx":1846 * self._exception_handler = handler * * def call_exception_handler(self, context): # <<<<<<<<<<<<<< * """Call the current event loop's exception handler. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("uvloop.loop.Loop.call_exception_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1897 * exc_info=True) * * def add_reader(self, fd, callback, *args): # <<<<<<<<<<<<<< * """Add a reader callback.""" * self._ensure_fd_no_transport(fd) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_72add_reader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_71add_reader[] = "Loop.add_reader(self, fd, callback, *args)\nAdd a reader callback."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_72add_reader(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fd = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_reader (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_reader", 0, 2, 2, 1); __PYX_ERR(1, 1897, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_reader") < 0)) __PYX_ERR(1, 1897, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_fd = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_reader", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1897, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_71add_reader(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_fd, __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_71add_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("add_reader", 0); __Pyx_INCREF(__pyx_v_args); /* "uvloop/loop.pyx":1899 * def add_reader(self, fd, callback, *args): * """Add a reader callback.""" * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<< * if len(args) == 0: * args = None */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1900 * """Add a reader callback.""" * self._ensure_fd_no_transport(fd) * if len(args) == 0: # <<<<<<<<<<<<<< * args = None * self._add_reader(fd, new_Handle(self, callback, args)) */ __pyx_t_2 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1900, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1901 * self._ensure_fd_no_transport(fd) * if len(args) == 0: * args = None # <<<<<<<<<<<<<< * self._add_reader(fd, new_Handle(self, callback, args)) * */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_args, Py_None); /* "uvloop/loop.pyx":1900 * """Add a reader callback.""" * self._ensure_fd_no_transport(fd) * if len(args) == 0: # <<<<<<<<<<<<<< * args = None * self._add_reader(fd, new_Handle(self, callback, args)) */ } /* "uvloop/loop.pyx":1902 * if len(args) == 0: * args = None * self._add_reader(fd, new_Handle(self, callback, args)) # <<<<<<<<<<<<<< * * def remove_reader(self, fd): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 1902, __pyx_L1_error) __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__add_reader(__pyx_v_self, __pyx_v_fd, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1897 * exc_info=True) * * def add_reader(self, fd, callback, *args): # <<<<<<<<<<<<<< * """Add a reader callback.""" * self._ensure_fd_no_transport(fd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.add_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1904 * self._add_reader(fd, new_Handle(self, callback, args)) * * def remove_reader(self, fd): # <<<<<<<<<<<<<< * """Remove a reader callback.""" * self._ensure_fd_no_transport(fd) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_74remove_reader(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_73remove_reader[] = "Loop.remove_reader(self, fd)\nRemove a reader callback."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_74remove_reader(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_reader (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_73remove_reader(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_fd)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_73remove_reader(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("remove_reader", 0); /* "uvloop/loop.pyx":1906 * def remove_reader(self, fd): * """Remove a reader callback.""" * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<< * self._remove_reader(fd) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1907 * """Remove a reader callback.""" * self._ensure_fd_no_transport(fd) * self._remove_reader(fd) # <<<<<<<<<<<<<< * * def add_writer(self, fd, callback, *args): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__remove_reader(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1904 * self._add_reader(fd, new_Handle(self, callback, args)) * * def remove_reader(self, fd): # <<<<<<<<<<<<<< * """Remove a reader callback.""" * self._ensure_fd_no_transport(fd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.remove_reader", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1909 * self._remove_reader(fd) * * def add_writer(self, fd, callback, *args): # <<<<<<<<<<<<<< * """Add a writer callback..""" * self._ensure_fd_no_transport(fd) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_76add_writer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_75add_writer[] = "Loop.add_writer(self, fd, callback, *args)\nAdd a writer callback.."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_76add_writer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_fd = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_writer (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_writer", 0, 2, 2, 1); __PYX_ERR(1, 1909, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_writer") < 0)) __PYX_ERR(1, 1909, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_fd = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_writer", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1909, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_75add_writer(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_fd, __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_75add_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("add_writer", 0); __Pyx_INCREF(__pyx_v_args); /* "uvloop/loop.pyx":1911 * def add_writer(self, fd, callback, *args): * """Add a writer callback..""" * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<< * if len(args) == 0: * args = None */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1912 * """Add a writer callback..""" * self._ensure_fd_no_transport(fd) * if len(args) == 0: # <<<<<<<<<<<<<< * args = None * self._add_writer(fd, new_Handle(self, callback, args)) */ __pyx_t_2 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1912, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":1913 * self._ensure_fd_no_transport(fd) * if len(args) == 0: * args = None # <<<<<<<<<<<<<< * self._add_writer(fd, new_Handle(self, callback, args)) * */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_args, Py_None); /* "uvloop/loop.pyx":1912 * """Add a writer callback..""" * self._ensure_fd_no_transport(fd) * if len(args) == 0: # <<<<<<<<<<<<<< * args = None * self._add_writer(fd, new_Handle(self, callback, args)) */ } /* "uvloop/loop.pyx":1914 * if len(args) == 0: * args = None * self._add_writer(fd, new_Handle(self, callback, args)) # <<<<<<<<<<<<<< * * def remove_writer(self, fd): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 1914, __pyx_L1_error) __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__add_writer(__pyx_v_self, __pyx_v_fd, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1909 * self._remove_reader(fd) * * def add_writer(self, fd, callback, *args): # <<<<<<<<<<<<<< * """Add a writer callback..""" * self._ensure_fd_no_transport(fd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Loop.add_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1916 * self._add_writer(fd, new_Handle(self, callback, args)) * * def remove_writer(self, fd): # <<<<<<<<<<<<<< * """Remove a writer callback.""" * self._ensure_fd_no_transport(fd) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_78remove_writer(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_77remove_writer[] = "Loop.remove_writer(self, fd)\nRemove a writer callback."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_78remove_writer(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_writer (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_77remove_writer(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_fd)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_77remove_writer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("remove_writer", 0); /* "uvloop/loop.pyx":1918 * def remove_writer(self, fd): * """Remove a writer callback.""" * self._ensure_fd_no_transport(fd) # <<<<<<<<<<<<<< * self._remove_writer(fd) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_ensure_fd_no_transport(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1919 * """Remove a writer callback.""" * self._ensure_fd_no_transport(fd) * self._remove_writer(fd) # <<<<<<<<<<<<<< * * def sock_recv(self, sock, n): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__remove_writer(__pyx_v_self, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":1916 * self._add_writer(fd, new_Handle(self, callback, args)) * * def remove_writer(self, fd): # <<<<<<<<<<<<<< * """Remove a writer callback.""" * self._ensure_fd_no_transport(fd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop.remove_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1921 * self._remove_writer(fd) * * def sock_recv(self, sock, n): # <<<<<<<<<<<<<< * """Receive data from the socket. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_80sock_recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_79sock_recv[] = "Loop.sock_recv(self, sock, n)\nReceive data from the socket.\n\n The return value is a bytes object representing the data received.\n The maximum amount of data to be received at once is specified by\n nbytes.\n\n This method is a coroutine.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_80sock_recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_n = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_recv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sock_recv", 1, 2, 2, 1); __PYX_ERR(1, 1921, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_recv") < 0)) __PYX_ERR(1, 1921, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sock = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sock_recv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1921, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_79sock_recv(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_79sock_recv(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_n) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; int __pyx_v_fd; PyObject *__pyx_v_fut = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("sock_recv", 0); /* "uvloop/loop.pyx":1934 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ __pyx_t_2 = (__pyx_v_self->_debug != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1934, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1935 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1935, __pyx_L1_error) /* "uvloop/loop.pyx":1934 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ } /* "uvloop/loop.pyx":1937 * raise ValueError("the socket must be non-blocking") * * fut = self._new_future() # <<<<<<<<<<<<<< * handle = new_MethodHandle3( * self, */ __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_fut = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":1938 * * fut = self._new_future() * handle = new_MethodHandle3( # <<<<<<<<<<<<<< * self, * "Loop._sock_recv", */ __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_v_self, __pyx_kp_u_Loop__sock_recv, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_sock_recv), ((PyObject *)__pyx_v_self), __pyx_v_fut, __pyx_v_sock, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 1938, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1945 * fut, sock, n) * * fd = sock.fileno() # <<<<<<<<<<<<<< * self._add_reader(fd, handle) * return fut */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1945, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1945, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_fd = __pyx_t_6; /* "uvloop/loop.pyx":1946 * * fd = sock.fileno() * self._add_reader(fd, handle) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__add_reader(__pyx_v_self, __pyx_t_4, __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":1947 * fd = sock.fileno() * self._add_reader(fd, handle) * return fut # <<<<<<<<<<<<<< * * async def sock_sendall(self, sock, data): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fut); __pyx_r = __pyx_v_fut; goto __pyx_L0; /* "uvloop/loop.pyx":1921 * self._remove_writer(fd) * * def sock_recv(self, sock, n): # <<<<<<<<<<<<<< * """Receive data from the socket. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop.sock_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XDECREF(__pyx_v_fut); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_83generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":1949 * return fut * * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<< * """Send data to the socket. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_82sock_sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_81sock_sendall[] = "Loop.sock_sendall(self, sock, data)\nSend data to the socket.\n\n The socket must be connected to a remote socket. This method continues\n to send data from data until either all data has been sent or an\n error occurs. None is returned on success. On error, an exception is\n raised, and there is no way to determine how much data, if any, was\n successfully processed by the receiving end of the connection.\n\n This method is a coroutine.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_82sock_sendall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_data = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_sendall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_data,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sock_sendall", 1, 2, 2, 1); __PYX_ERR(1, 1949, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_sendall") < 0)) __PYX_ERR(1, 1949, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sock = values[0]; __pyx_v_data = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sock_sendall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1949, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_81sock_sendall(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_data); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_81sock_sendall(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_data) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_sendall", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_sock_sendall, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 1949, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_data = __pyx_v_data; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_83generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_sendall, __pyx_n_s_Loop_sock_sendall, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 1949, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_83generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; Py_ssize_t __pyx_t_11; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L19_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1949, __pyx_L1_error) /* "uvloop/loop.pyx":1965 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1965, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 1965, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":1966 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * if not data: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 1966, __pyx_L1_error) /* "uvloop/loop.pyx":1965 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ } /* "uvloop/loop.pyx":1968 * raise ValueError("the socket must be non-blocking") * * if not data: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 1968, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1969 * * if not data: * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; goto __pyx_L0; /* "uvloop/loop.pyx":1968 * raise ValueError("the socket must be non-blocking") * * if not data: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/loop.pyx":1971 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":1972 * * try: * n = sock.send(data) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * pass */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_data}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_data}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_cur_scope->__pyx_v_data); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1972, __pyx_L8_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_cur_scope->__pyx_v_n = __pyx_t_10; /* "uvloop/loop.pyx":1971 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ } /* "uvloop/loop.pyx":1976 * pass * else: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * # This can be a partial success, i.e. only part * # of the data was sent */ /*else:*/ { __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1979 * # This can be a partial success, i.e. only part * # of the data was sent * self._sock_try_write_total += 1 # <<<<<<<<<<<<<< * * if n == len(data): */ __pyx_cur_scope->__pyx_v_self->_sock_try_write_total = (__pyx_cur_scope->__pyx_v_self->_sock_try_write_total + 1); /* "uvloop/loop.pyx":1976 * pass * else: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * # This can be a partial success, i.e. only part * # of the data was sent */ } /* "uvloop/loop.pyx":1981 * self._sock_try_write_total += 1 * * if n == len(data): # <<<<<<<<<<<<<< * return * if not isinstance(data, memoryview): */ __pyx_t_11 = PyObject_Length(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(1, 1981, __pyx_L10_except_error) __pyx_t_2 = ((__pyx_cur_scope->__pyx_v_n == __pyx_t_11) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":1982 * * if n == len(data): * return # <<<<<<<<<<<<<< * if not isinstance(data, memoryview): * data = memoryview(data) */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; goto __pyx_L11_except_return; /* "uvloop/loop.pyx":1981 * self._sock_try_write_total += 1 * * if n == len(data): # <<<<<<<<<<<<<< * return * if not isinstance(data, memoryview): */ } /* "uvloop/loop.pyx":1983 * if n == len(data): * return * if not isinstance(data, memoryview): # <<<<<<<<<<<<<< * data = memoryview(data) * data = data[n:] */ __pyx_t_2 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_data, __pyx_builtin_memoryview); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(1, 1983, __pyx_L10_except_error) __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":1984 * return * if not isinstance(data, memoryview): * data = memoryview(data) # <<<<<<<<<<<<<< * data = data[n:] * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1984, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_data); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1984, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_data); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_data, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":1983 * if n == len(data): * return * if not isinstance(data, memoryview): # <<<<<<<<<<<<<< * data = memoryview(data) * data = data[n:] */ } /* "uvloop/loop.pyx":1985 * if not isinstance(data, memoryview): * data = memoryview(data) * data = data[n:] # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_data, __pyx_cur_scope->__pyx_v_n, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1985, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_data); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_data, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1973 * try: * n = sock.send(data) * except (BlockingIOError, InterruptedError): # <<<<<<<<<<<<<< * pass * else: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BlockingIOError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_InterruptedError); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; /* "uvloop/loop.pyx":1971 * return * * try: # <<<<<<<<<<<<<< * n = sock.send(data) * except (BlockingIOError, InterruptedError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L0; __pyx_L9_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L15_try_end:; } /* "uvloop/loop.pyx":1987 * data = data[n:] * * fut = self._new_future() # <<<<<<<<<<<<<< * handle = new_MethodHandle3( * self, */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_fut = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":1988 * * fut = self._new_future() * handle = new_MethodHandle3( # <<<<<<<<<<<<<< * self, * "Loop._sock_sendall", */ __pyx_t_3 = __pyx_f_6uvloop_4loop_new_MethodHandle3(__pyx_cur_scope->__pyx_v_self, __pyx_kp_u_Loop__sock_sendall, ((__pyx_t_6uvloop_4loop_method3_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_sendall), ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 1988, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":1995 * fut, sock, data) * * fd = sock.fileno() # <<<<<<<<<<<<<< * self._add_writer(fd, handle) * return await fut */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_9) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1995, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1995, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1995, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_cur_scope->__pyx_v_fd = __pyx_t_10; /* "uvloop/loop.pyx":1996 * * fd = sock.fileno() * self._add_writer(fd, handle) # <<<<<<<<<<<<<< * return await fut * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__add_writer(__pyx_cur_scope->__pyx_v_self, __pyx_t_3, __pyx_cur_scope->__pyx_v_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":1997 * fd = sock.fileno() * self._add_writer(fd, handle) * return await fut # <<<<<<<<<<<<<< * * def sock_accept(self, sock): */ __Pyx_XDECREF(__pyx_r); __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L19_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 1997, __pyx_L1_error) __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_4 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(1, 1997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":1949 * return fut * * async def sock_sendall(self, sock, data): # <<<<<<<<<<<<<< * """Send data to the socket. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("sock_sendall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":1999 * return await fut * * def sock_accept(self, sock): # <<<<<<<<<<<<<< * """Accept a connection. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_85sock_accept(PyObject *__pyx_v_self, PyObject *__pyx_v_sock); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_84sock_accept[] = "Loop.sock_accept(self, sock)\nAccept a connection.\n\n The socket must be bound to an address and listening for connections.\n The return value is a pair (conn, address) where conn is a new socket\n object usable to send and receive data on the connection, and address\n is the address bound to the socket on the other end of the connection.\n\n This method is a coroutine.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_85sock_accept(PyObject *__pyx_v_self, PyObject *__pyx_v_sock) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_accept (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_84sock_accept(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_sock)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_84sock_accept(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; int __pyx_v_fd; PyObject *__pyx_v_fut = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("sock_accept", 0); /* "uvloop/loop.pyx":2013 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ __pyx_t_2 = (__pyx_v_self->_debug != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2013, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2014 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2014, __pyx_L1_error) /* "uvloop/loop.pyx":2013 * int fd * * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ } /* "uvloop/loop.pyx":2016 * raise ValueError("the socket must be non-blocking") * * fut = self._new_future() # <<<<<<<<<<<<<< * handle = new_MethodHandle2( * self, */ __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_fut = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":2017 * * fut = self._new_future() * handle = new_MethodHandle2( # <<<<<<<<<<<<<< * self, * "Loop._sock_accept", */ __pyx_t_4 = __pyx_f_6uvloop_4loop_new_MethodHandle2(__pyx_v_self, __pyx_kp_u_Loop__sock_accept, ((__pyx_t_6uvloop_4loop_method2_t)((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_sock_accept), ((PyObject *)__pyx_v_self), __pyx_v_fut, __pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 2017, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2024 * fut, sock) * * fd = sock.fileno() # <<<<<<<<<<<<<< * self._add_reader(fd, handle) * return fut */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2024, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_fd = __pyx_t_6; /* "uvloop/loop.pyx":2025 * * fd = sock.fileno() * self._add_reader(fd, handle) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__add_reader(__pyx_v_self, __pyx_t_4, __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2026 * fd = sock.fileno() * self._add_reader(fd, handle) * return fut # <<<<<<<<<<<<<< * * async def sock_connect(self, sock, address): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fut); __pyx_r = __pyx_v_fut; goto __pyx_L0; /* "uvloop/loop.pyx":1999 * return await fut * * def sock_accept(self, sock): # <<<<<<<<<<<<<< * """Accept a connection. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop.sock_accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XDECREF(__pyx_v_fut); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_88generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2028 * return fut * * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<< * """Connect to a remote socket at address. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_87sock_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_86sock_connect[] = "Loop.sock_connect(self, sock, address)\nConnect to a remote socket at address.\n\n This method is a coroutine.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_87sock_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_address = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_connect (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sock,&__pyx_n_s_address,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_address)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sock_connect", 1, 2, 2, 1); __PYX_ERR(1, 2028, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sock_connect") < 0)) __PYX_ERR(1, 2028, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sock = values[0]; __pyx_v_address = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sock_connect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2028, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_86sock_connect(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sock, __pyx_v_address); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_86sock_connect(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sock, PyObject *__pyx_v_address) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sock_connect", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_sock_connect(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_sock_connect, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2028, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_address = __pyx_v_address; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_address); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_address); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_88generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_sock_connect, __pyx_n_s_Loop_sock_connect, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2028, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_88generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; case 2: goto __pyx_L9_resume_from_yield; case 3: goto __pyx_L12_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2028, __pyx_L1_error) /* "uvloop/loop.pyx":2033 * This method is a coroutine. * """ * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_debug != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_gettimeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2033, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2034 * """ * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2034, __pyx_L1_error) /* "uvloop/loop.pyx":2033 * This method is a coroutine. * """ * if self._debug and sock.gettimeout() != 0: # <<<<<<<<<<<<<< * raise ValueError("the socket must be non-blocking") * */ } /* "uvloop/loop.pyx":2036 * raise ValueError("the socket must be non-blocking") * * fut = self._new_future() # <<<<<<<<<<<<<< * if sock.family == uv.AF_UNIX: * self._sock_connect(fut, sock, address) */ __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_fut = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/loop.pyx":2037 * * fut = self._new_future() * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * self._sock_connect(fut, sock, address) * await fut */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2037, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2037, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":2038 * fut = self._new_future() * if sock.family == uv.AF_UNIX: * self._sock_connect(fut, sock, address) # <<<<<<<<<<<<<< * await fut * return */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_address); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2039 * if sock.family == uv.AF_UNIX: * self._sock_connect(fut, sock, address) * await fut # <<<<<<<<<<<<<< * return * */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2039, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2039, __pyx_L1_error) } } /* "uvloop/loop.pyx":2040 * self._sock_connect(fut, sock, address) * await fut * return # <<<<<<<<<<<<<< * * _, _, _, _, address = (await self.getaddrinfo(*address))[0] */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; goto __pyx_L0; /* "uvloop/loop.pyx":2037 * * fut = self._new_future() * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * self._sock_connect(fut, sock, address) * await fut */ } /* "uvloop/loop.pyx":2042 * return * * _, _, _, _, address = (await self.getaddrinfo(*address))[0] # <<<<<<<<<<<<<< * self._sock_connect(fut, sock, address) * await fut */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_getaddrinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PySequence_Tuple(__pyx_cur_scope->__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L9_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2042, __pyx_L1_error) __pyx_t_4 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_4 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_4) < 0) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 2042, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); __pyx_t_7 = PyList_GET_ITEM(sequence, 3); __pyx_t_8 = PyList_GET_ITEM(sequence, 4); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else { Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; for (i=0; i < 5; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; for (index=0; index < 5; index++) { PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 5) < 0) __PYX_ERR(1, 2042, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_unpacking_done; __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(1, 2042, __pyx_L1_error) __pyx_L11_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v__ = __pyx_t_4; __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_address); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_address, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2043 * * _, _, _, _, address = (await self.getaddrinfo(*address))[0] * self._sock_connect(fut, sock, address) # <<<<<<<<<<<<<< * await fut * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_connect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_fut, __pyx_cur_scope->__pyx_v_sock, __pyx_cur_scope->__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2044 * _, _, _, _, address = (await self.getaddrinfo(*address))[0] * self._sock_connect(fut, sock, address) * await fut # <<<<<<<<<<<<<< * * async def connect_accepted_socket(self, protocol_factory, sock, *, */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L12_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2044, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2044, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2028 * return fut * * async def sock_connect(self, sock, address): # <<<<<<<<<<<<<< * """Connect to a remote socket at address. * */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("sock_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_91generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2046 * await fut * * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<< * ssl=None): * """Handle an accepted connection. */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_90connect_accepted_socket(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_89connect_accepted_socket[] = "Loop.connect_accepted_socket(self, protocol_factory, sock, *, ssl=None)\nHandle an accepted connection.\n\n This is used by servers that accept connections outside of\n asyncio but that use asyncio to handle connections.\n\n This method is a coroutine. When completed, the coroutine\n returns a (transport, protocol) pair.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_90connect_accepted_socket(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_sock = 0; PyObject *__pyx_v_ssl = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_accepted_socket (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_sock,&__pyx_n_s_ssl,0}; PyObject* values[3] = {0,0,0}; /* "uvloop/loop.pyx":2047 * * async def connect_accepted_socket(self, protocol_factory, sock, *, * ssl=None): # <<<<<<<<<<<<<< * """Handle an accepted connection. * */ values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sock)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("connect_accepted_socket", 1, 2, 2, 1); __PYX_ERR(1, 2046, __pyx_L3_error) } } if (kw_args == 1) { const Py_ssize_t index = 2; PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_accepted_socket") < 0)) __PYX_ERR(1, 2046, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_protocol_factory = values[0]; __pyx_v_sock = values[1]; __pyx_v_ssl = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connect_accepted_socket", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2046, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_89connect_accepted_socket(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_sock, __pyx_v_ssl); /* "uvloop/loop.pyx":2046 * await fut * * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<< * ssl=None): * """Handle an accepted connection. */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_89connect_accepted_socket(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_sock, PyObject *__pyx_v_ssl) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_accepted_socket", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2046, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); __pyx_cur_scope->__pyx_v_ssl = __pyx_v_ssl; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_91generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_accepted_socket, __pyx_n_s_Loop_connect_accepted_socket, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2046, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_91generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L13_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2046, __pyx_L1_error) /* "uvloop/loop.pyx":2058 * * cdef: * UVStream transport = None # <<<<<<<<<<<<<< * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); /* "uvloop/loop.pyx":2060 * UVStream transport = None * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * if not _is_sock_stream(sock.type): */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_SSLContext; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(1, 2060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2061 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * if not _is_sock_stream(sock.type): * raise ValueError( */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2061, __pyx_L1_error) /* "uvloop/loop.pyx":2060 * UVStream transport = None * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError('ssl argument must be an SSLContext or None') * if not _is_sock_stream(sock.type): */ } /* "uvloop/loop.pyx":2062 * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_f_6uvloop_4loop__is_sock_stream(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2064 * if not _is_sock_stream(sock.type): * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<< * * # See a comment on os_dup in create_connection */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2063 * raise TypeError('ssl argument must be an SSLContext or None') * if not _is_sock_stream(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A Stream Socket was expected, got {!r}'.format(sock)) * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(1, 2063, __pyx_L1_error) /* "uvloop/loop.pyx":2062 * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') * if not _is_sock_stream(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A Stream Socket was expected, got {!r}'.format(sock)) */ } /* "uvloop/loop.pyx":2067 * * # See a comment on os_dup in create_connection * fileno = os_dup(sock.fileno()) # <<<<<<<<<<<<<< * * app_protocol = protocol_factory() */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2067, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_7 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_fileno = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":2069 * fileno = os_dup(sock.fileno()) * * app_protocol = protocol_factory() # <<<<<<<<<<<<<< * waiter = self._new_future() * transport_waiter = None */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_7 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2069, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_app_protocol = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":2070 * * app_protocol = protocol_factory() * waiter = self._new_future() # <<<<<<<<<<<<<< * transport_waiter = None * */ __pyx_t_5 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":2071 * app_protocol = protocol_factory() * waiter = self._new_future() * transport_waiter = None # <<<<<<<<<<<<<< * * if ssl is None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_transport_waiter = Py_None; /* "uvloop/loop.pyx":2073 * transport_waiter = None * * if ssl is None: # <<<<<<<<<<<<<< * protocol = app_protocol * transport_waiter = waiter */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ssl == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2074 * * if ssl is None: * protocol = app_protocol # <<<<<<<<<<<<<< * transport_waiter = waiter * else: */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); __pyx_cur_scope->__pyx_v_protocol = __pyx_cur_scope->__pyx_v_app_protocol; /* "uvloop/loop.pyx":2075 * if ssl is None: * protocol = app_protocol * transport_waiter = waiter # <<<<<<<<<<<<<< * else: * protocol = aio_SSLProtocol( */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_waiter); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_transport_waiter); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport_waiter, __pyx_cur_scope->__pyx_v_waiter); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_waiter); /* "uvloop/loop.pyx":2073 * transport_waiter = None * * if ssl is None: # <<<<<<<<<<<<<< * protocol = app_protocol * transport_waiter = waiter */ goto __pyx_L8; } /* "uvloop/loop.pyx":2077 * transport_waiter = waiter * else: * protocol = aio_SSLProtocol( # <<<<<<<<<<<<<< * self, app_protocol, ssl, waiter, * True, # server_side */ /*else*/ { /* "uvloop/loop.pyx":2080 * self, app_protocol, ssl, waiter, * True, # server_side * None) # server_hostname # <<<<<<<<<<<<<< * transport_waiter = None * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_SSLProtocol); __pyx_t_7 = __pyx_v_6uvloop_4loop_aio_SSLProtocol; __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_8, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_ssl, __pyx_cur_scope->__pyx_v_waiter, Py_True, Py_None}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2077, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_8, ((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_app_protocol, __pyx_cur_scope->__pyx_v_ssl, __pyx_cur_scope->__pyx_v_waiter, Py_True, Py_None}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2077, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_4 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, ((PyObject *)__pyx_cur_scope->__pyx_v_self)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_app_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_app_protocol); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_app_protocol); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ssl); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ssl); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_9, __pyx_cur_scope->__pyx_v_ssl); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_waiter); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_waiter); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_9, __pyx_cur_scope->__pyx_v_waiter); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_4, 4+__pyx_t_9, Py_True); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 5+__pyx_t_9, Py_None); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_protocol = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":2081 * True, # server_side * None) # server_hostname * transport_waiter = None # <<<<<<<<<<<<<< * * if sock.family == uv.AF_UNIX: */ __Pyx_INCREF(Py_None); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_transport_waiter); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport_waiter, Py_None); __Pyx_GIVEREF(Py_None); } __pyx_L8:; /* "uvloop/loop.pyx":2083 * transport_waiter = None * * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * transport = UnixTransport.new( * self, protocol, None, transport_waiter) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":2084 * * if sock.family == uv.AF_UNIX: * transport = UnixTransport.new( # <<<<<<<<<<<<<< * self, protocol, None, transport_waiter) * elif sock.family in (uv.AF_INET, uv.AF_INET6): */ __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_transport_waiter)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/loop.pyx":2083 * transport_waiter = None * * if sock.family == uv.AF_UNIX: # <<<<<<<<<<<<<< * transport = UnixTransport.new( * self, protocol, None, transport_waiter) */ goto __pyx_L9; } /* "uvloop/loop.pyx":2086 * transport = UnixTransport.new( * self, protocol, None, transport_waiter) * elif sock.family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * transport = TCPTransport.new( * self, protocol, None, transport_waiter) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L10_bool_binop_done; } __pyx_t_5 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2087 * self, protocol, None, transport_waiter) * elif sock.family in (uv.AF_INET, uv.AF_INET6): * transport = TCPTransport.new( # <<<<<<<<<<<<<< * self, protocol, None, transport_waiter) * */ __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_transport_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_transport, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_4)); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2086 * transport = UnixTransport.new( * self, protocol, None, transport_waiter) * elif sock.family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * transport = TCPTransport.new( * self, protocol, None, transport_waiter) */ } __pyx_L9:; /* "uvloop/loop.pyx":2090 * self, protocol, None, transport_waiter) * * if transport is None: # <<<<<<<<<<<<<< * raise ValueError( * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') */ __pyx_t_2 = (((PyObject *)__pyx_cur_scope->__pyx_v_transport) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2091 * * if transport is None: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2091, __pyx_L1_error) /* "uvloop/loop.pyx":2090 * self, protocol, None, transport_waiter) * * if transport is None: # <<<<<<<<<<<<<< * raise ValueError( * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') */ } /* "uvloop/loop.pyx":2094 * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') * * transport._open(fileno) # <<<<<<<<<<<<<< * transport._init_protocol() * */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_fileno); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2094, __pyx_L1_error) __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transport), __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2095 * * transport._open(fileno) * transport._init_protocol() # <<<<<<<<<<<<<< * * await waiter */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_cur_scope->__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transport)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2097 * transport._init_protocol() * * await waiter # <<<<<<<<<<<<<< * return transport, protocol * */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2097, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2097, __pyx_L1_error) } } /* "uvloop/loop.pyx":2098 * * await waiter * return transport, protocol # <<<<<<<<<<<<<< * * def run_in_executor(self, executor, func, *args): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transport)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transport)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_protocol); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2046 * await fut * * async def connect_accepted_socket(self, protocol_factory, sock, *, # <<<<<<<<<<<<<< * ssl=None): * """Handle an accepted connection. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("connect_accepted_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2100 * return transport, protocol * * def run_in_executor(self, executor, func, *args): # <<<<<<<<<<<<<< * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): * raise TypeError("coroutines cannot be used with run_in_executor()") */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_93run_in_executor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_92run_in_executor[] = "Loop.run_in_executor(self, executor, func, *args)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_93run_in_executor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_executor = 0; PyObject *__pyx_v_func = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run_in_executor (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_executor,&__pyx_n_s_func,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_executor)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("run_in_executor", 0, 2, 2, 1); __PYX_ERR(1, 2100, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "run_in_executor") < 0)) __PYX_ERR(1, 2100, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_executor = values[0]; __pyx_v_func = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("run_in_executor", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2100, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_92run_in_executor(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_executor, __pyx_v_func, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_92run_in_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor, PyObject *__pyx_v_func, PyObject *__pyx_v_args) { PyObject *__pyx_v_new_fut = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("run_in_executor", 0); __Pyx_INCREF(__pyx_v_executor); /* "uvloop/loop.pyx":2101 * * def run_in_executor(self, executor, func, *args): * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): # <<<<<<<<<<<<<< * raise TypeError("coroutines cannot be used with run_in_executor()") * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutine); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutine; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_func}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_func}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_func); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_iscoroutinefunction; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_func}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_func}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_func); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 2101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2102 * def run_in_executor(self, executor, func, *args): * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): * raise TypeError("coroutines cannot be used with run_in_executor()") # <<<<<<<<<<<<<< * * self._check_closed() */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2102, __pyx_L1_error) /* "uvloop/loop.pyx":2101 * * def run_in_executor(self, executor, func, *args): * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): # <<<<<<<<<<<<<< * raise TypeError("coroutines cannot be used with run_in_executor()") * */ } /* "uvloop/loop.pyx":2104 * raise TypeError("coroutines cannot be used with run_in_executor()") * * self._check_closed() # <<<<<<<<<<<<<< * * if executor is None: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2106 * self._check_closed() * * if executor is None: # <<<<<<<<<<<<<< * executor = self._default_executor * if executor is None: */ __pyx_t_1 = (__pyx_v_executor == Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { /* "uvloop/loop.pyx":2107 * * if executor is None: * executor = self._default_executor # <<<<<<<<<<<<<< * if executor is None: * executor = cc_ThreadPoolExecutor() */ __pyx_t_2 = __pyx_v_self->_default_executor; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_executor, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2108 * if executor is None: * executor = self._default_executor * if executor is None: # <<<<<<<<<<<<<< * executor = cc_ThreadPoolExecutor() * self._default_executor = executor */ __pyx_t_6 = (__pyx_v_executor == Py_None); __pyx_t_1 = (__pyx_t_6 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2109 * executor = self._default_executor * if executor is None: * executor = cc_ThreadPoolExecutor() # <<<<<<<<<<<<<< * self._default_executor = executor * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor); __pyx_t_3 = __pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2109, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_executor, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2110 * if executor is None: * executor = cc_ThreadPoolExecutor() * self._default_executor = executor # <<<<<<<<<<<<<< * * new_fut = self._new_future() */ __Pyx_INCREF(__pyx_v_executor); __Pyx_GIVEREF(__pyx_v_executor); __Pyx_GOTREF(__pyx_v_self->_default_executor); __Pyx_DECREF(__pyx_v_self->_default_executor); __pyx_v_self->_default_executor = __pyx_v_executor; /* "uvloop/loop.pyx":2108 * if executor is None: * executor = self._default_executor * if executor is None: # <<<<<<<<<<<<<< * executor = cc_ThreadPoolExecutor() * self._default_executor = executor */ } /* "uvloop/loop.pyx":2106 * self._check_closed() * * if executor is None: # <<<<<<<<<<<<<< * executor = self._default_executor * if executor is None: */ } /* "uvloop/loop.pyx":2112 * self._default_executor = executor * * new_fut = self._new_future() # <<<<<<<<<<<<<< * _chain_future(executor.submit(func, *args), new_fut) * return new_fut */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_fut = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":2113 * * new_fut = self._new_future() * _chain_future(executor.submit(func, *args), new_fut) # <<<<<<<<<<<<<< * return new_fut * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_func); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_f_6uvloop_4loop__chain_future(__pyx_t_3, __pyx_v_new_fut); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2114 * new_fut = self._new_future() * _chain_future(executor.submit(func, *args), new_fut) * return new_fut # <<<<<<<<<<<<<< * * def set_default_executor(self, executor): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_new_fut); __pyx_r = __pyx_v_new_fut; goto __pyx_L0; /* "uvloop/loop.pyx":2100 * return transport, protocol * * def run_in_executor(self, executor, func, *args): # <<<<<<<<<<<<<< * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): * raise TypeError("coroutines cannot be used with run_in_executor()") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_new_fut); __Pyx_XDECREF(__pyx_v_executor); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2116 * return new_fut * * def set_default_executor(self, executor): # <<<<<<<<<<<<<< * self._default_executor = executor * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_95set_default_executor(PyObject *__pyx_v_self, PyObject *__pyx_v_executor); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_94set_default_executor[] = "Loop.set_default_executor(self, executor)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_95set_default_executor(PyObject *__pyx_v_self, PyObject *__pyx_v_executor) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_default_executor (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_94set_default_executor(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_executor)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_94set_default_executor(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_executor) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_default_executor", 0); /* "uvloop/loop.pyx":2117 * * def set_default_executor(self, executor): * self._default_executor = executor # <<<<<<<<<<<<<< * * async def __subprocess_run(self, protocol_factory, args, */ __Pyx_INCREF(__pyx_v_executor); __Pyx_GIVEREF(__pyx_v_executor); __Pyx_GOTREF(__pyx_v_self->_default_executor); __Pyx_DECREF(__pyx_v_self->_default_executor); __pyx_v_self->_default_executor = __pyx_v_executor; /* "uvloop/loop.pyx":2116 * return new_fut * * def set_default_executor(self, executor): # <<<<<<<<<<<<<< * self._default_executor = executor * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_98generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2119 * self._default_executor = executor * * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<< * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_97__subprocess_run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_96__subprocess_run[] = "Loop.__subprocess_run(self, protocol_factory, args, stdin=subprocess_PIPE, stdout=subprocess_PIPE, stderr=subprocess_PIPE, universal_newlines=False, shell=True, bufsize=0, preexec_fn=None, close_fds=None, cwd=None, env=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, executable=None, pass_fds=(), __uvloop_sleep_after_fork=False)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_97__subprocess_run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_stdin = 0; PyObject *__pyx_v_stdout = 0; PyObject *__pyx_v_stderr = 0; PyObject *__pyx_v_universal_newlines = 0; CYTHON_UNUSED PyObject *__pyx_v_shell = 0; PyObject *__pyx_v_bufsize = 0; PyObject *__pyx_v_preexec_fn = 0; CYTHON_UNUSED PyObject *__pyx_v_close_fds = 0; PyObject *__pyx_v_cwd = 0; PyObject *__pyx_v_env = 0; PyObject *__pyx_v_startupinfo = 0; PyObject *__pyx_v_creationflags = 0; PyObject *__pyx_v_restore_signals = 0; PyObject *__pyx_v_start_new_session = 0; PyObject *__pyx_v_executable = 0; PyObject *__pyx_v_pass_fds = 0; PyObject *__pyx_v___uvloop_sleep_after_fork = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__subprocess_run (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_args,&__pyx_n_s_stdin,&__pyx_n_s_stdout,&__pyx_n_s_stderr,&__pyx_n_s_universal_newlines,&__pyx_n_s_shell,&__pyx_n_s_bufsize,&__pyx_n_s_preexec_fn,&__pyx_n_s_close_fds,&__pyx_n_s_cwd,&__pyx_n_s_env,&__pyx_n_s_startupinfo,&__pyx_n_s_creationflags,&__pyx_n_s_restore_signals,&__pyx_n_s_start_new_session,&__pyx_n_s_executable,&__pyx_n_s_pass_fds,&__pyx_n_s_uvloop_sleep_after_fork,0}; PyObject* values[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; values[2] = __pyx_k__86; values[3] = __pyx_k__87; values[4] = __pyx_k__88; /* "uvloop/loop.pyx":2123 * stdout=subprocess_PIPE, * stderr=subprocess_PIPE, * universal_newlines=False, # <<<<<<<<<<<<<< * shell=True, * bufsize=0, */ values[5] = ((PyObject *)Py_False); /* "uvloop/loop.pyx":2124 * stderr=subprocess_PIPE, * universal_newlines=False, * shell=True, # <<<<<<<<<<<<<< * bufsize=0, * preexec_fn=None, */ values[6] = ((PyObject *)Py_True); values[7] = ((PyObject *)__pyx_int_0); /* "uvloop/loop.pyx":2126 * shell=True, * bufsize=0, * preexec_fn=None, # <<<<<<<<<<<<<< * close_fds=None, * cwd=None, */ values[8] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2127 * bufsize=0, * preexec_fn=None, * close_fds=None, # <<<<<<<<<<<<<< * cwd=None, * env=None, */ values[9] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2128 * preexec_fn=None, * close_fds=None, * cwd=None, # <<<<<<<<<<<<<< * env=None, * startupinfo=None, */ values[10] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2129 * close_fds=None, * cwd=None, * env=None, # <<<<<<<<<<<<<< * startupinfo=None, * creationflags=0, */ values[11] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2130 * cwd=None, * env=None, * startupinfo=None, # <<<<<<<<<<<<<< * creationflags=0, * restore_signals=True, */ values[12] = ((PyObject *)Py_None); values[13] = ((PyObject *)__pyx_int_0); /* "uvloop/loop.pyx":2132 * startupinfo=None, * creationflags=0, * restore_signals=True, # <<<<<<<<<<<<<< * start_new_session=False, * executable=None, */ values[14] = ((PyObject *)Py_True); /* "uvloop/loop.pyx":2133 * creationflags=0, * restore_signals=True, * start_new_session=False, # <<<<<<<<<<<<<< * executable=None, * pass_fds=(), */ values[15] = ((PyObject *)Py_False); /* "uvloop/loop.pyx":2134 * restore_signals=True, * start_new_session=False, * executable=None, # <<<<<<<<<<<<<< * pass_fds=(), * */ values[16] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2135 * start_new_session=False, * executable=None, * pass_fds=(), # <<<<<<<<<<<<<< * * # For tests only! Do not use in your code. Ever. */ values[17] = ((PyObject *)__pyx_empty_tuple); /* "uvloop/loop.pyx":2138 * * # For tests only! Do not use in your code. Ever. * __uvloop_sleep_after_fork=False # <<<<<<<<<<<<<< * ): * */ values[18] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18); case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17); case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16); case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15); case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__subprocess_run", 0, 2, 19, 1); __PYX_ERR(1, 2119, __pyx_L3_error) } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stdin); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stdout); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stderr); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_universal_newlines); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shell); if (value) { values[6] = value; kw_args--; } } case 7: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bufsize); if (value) { values[7] = value; kw_args--; } } case 8: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_preexec_fn); if (value) { values[8] = value; kw_args--; } } case 9: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_close_fds); if (value) { values[9] = value; kw_args--; } } case 10: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cwd); if (value) { values[10] = value; kw_args--; } } case 11: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_env); if (value) { values[11] = value; kw_args--; } } case 12: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_startupinfo); if (value) { values[12] = value; kw_args--; } } case 13: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_creationflags); if (value) { values[13] = value; kw_args--; } } case 14: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_restore_signals); if (value) { values[14] = value; kw_args--; } } case 15: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start_new_session); if (value) { values[15] = value; kw_args--; } } case 16: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_executable); if (value) { values[16] = value; kw_args--; } } case 17: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pass_fds); if (value) { values[17] = value; kw_args--; } } case 18: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uvloop_sleep_after_fork); if (value) { values[18] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__subprocess_run") < 0)) __PYX_ERR(1, 2119, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18); case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17); case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16); case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15); case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14); case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13); case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12); case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11); case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10); case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_protocol_factory = values[0]; __pyx_v_args = values[1]; __pyx_v_stdin = values[2]; __pyx_v_stdout = values[3]; __pyx_v_stderr = values[4]; __pyx_v_universal_newlines = values[5]; __pyx_v_shell = values[6]; __pyx_v_bufsize = values[7]; __pyx_v_preexec_fn = values[8]; __pyx_v_close_fds = values[9]; __pyx_v_cwd = values[10]; __pyx_v_env = values[11]; __pyx_v_startupinfo = values[12]; __pyx_v_creationflags = values[13]; __pyx_v_restore_signals = values[14]; __pyx_v_start_new_session = values[15]; __pyx_v_executable = values[16]; __pyx_v_pass_fds = values[17]; __pyx_v___uvloop_sleep_after_fork = values[18]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__subprocess_run", 0, 2, 19, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2119, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_96__subprocess_run(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_args, __pyx_v_stdin, __pyx_v_stdout, __pyx_v_stderr, __pyx_v_universal_newlines, __pyx_v_shell, __pyx_v_bufsize, __pyx_v_preexec_fn, __pyx_v_close_fds, __pyx_v_cwd, __pyx_v_env, __pyx_v_startupinfo, __pyx_v_creationflags, __pyx_v_restore_signals, __pyx_v_start_new_session, __pyx_v_executable, __pyx_v_pass_fds, __pyx_v___uvloop_sleep_after_fork); /* "uvloop/loop.pyx":2119 * self._default_executor = executor * * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<< * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_96__subprocess_run(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_args, PyObject *__pyx_v_stdin, PyObject *__pyx_v_stdout, PyObject *__pyx_v_stderr, PyObject *__pyx_v_universal_newlines, CYTHON_UNUSED PyObject *__pyx_v_shell, PyObject *__pyx_v_bufsize, PyObject *__pyx_v_preexec_fn, CYTHON_UNUSED PyObject *__pyx_v_close_fds, PyObject *__pyx_v_cwd, PyObject *__pyx_v_env, PyObject *__pyx_v_startupinfo, PyObject *__pyx_v_creationflags, PyObject *__pyx_v_restore_signals, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v_executable, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v___uvloop_sleep_after_fork) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__subprocess_run", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_14___subprocess_run, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2119, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_args = __pyx_v_args; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args); __pyx_cur_scope->__pyx_v_stdin = __pyx_v_stdin; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stdin); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stdin); __pyx_cur_scope->__pyx_v_stdout = __pyx_v_stdout; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stdout); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stdout); __pyx_cur_scope->__pyx_v_stderr = __pyx_v_stderr; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stderr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stderr); __pyx_cur_scope->__pyx_v_universal_newlines = __pyx_v_universal_newlines; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_universal_newlines); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_universal_newlines); __pyx_cur_scope->__pyx_v_shell = __pyx_v_shell; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shell); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shell); __pyx_cur_scope->__pyx_v_bufsize = __pyx_v_bufsize; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bufsize); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bufsize); __pyx_cur_scope->__pyx_v_preexec_fn = __pyx_v_preexec_fn; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_preexec_fn); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_preexec_fn); __pyx_cur_scope->__pyx_v_close_fds = __pyx_v_close_fds; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_close_fds); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_close_fds); __pyx_cur_scope->__pyx_v_cwd = __pyx_v_cwd; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cwd); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_cwd); __pyx_cur_scope->__pyx_v_env = __pyx_v_env; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_env); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_env); __pyx_cur_scope->__pyx_v_startupinfo = __pyx_v_startupinfo; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_startupinfo); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_startupinfo); __pyx_cur_scope->__pyx_v_creationflags = __pyx_v_creationflags; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_creationflags); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_creationflags); __pyx_cur_scope->__pyx_v_restore_signals = __pyx_v_restore_signals; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_restore_signals); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_restore_signals); __pyx_cur_scope->__pyx_v_start_new_session = __pyx_v_start_new_session; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_start_new_session); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_start_new_session); __pyx_cur_scope->__pyx_v_executable = __pyx_v_executable; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_executable); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_executable); __pyx_cur_scope->__pyx_v_pass_fds = __pyx_v_pass_fds; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pass_fds); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pass_fds); __pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork = __pyx_v___uvloop_sleep_after_fork; __Pyx_INCREF(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_98generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_subprocess_run, __pyx_n_s_Loop___subprocess_run, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2119, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_98generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L18_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2119, __pyx_L1_error) /* "uvloop/loop.pyx":2145 * * cdef: * int debug_flags = 0 # <<<<<<<<<<<<<< * * if universal_newlines: */ __pyx_cur_scope->__pyx_v_debug_flags = 0; /* "uvloop/loop.pyx":2147 * int debug_flags = 0 * * if universal_newlines: # <<<<<<<<<<<<<< * raise ValueError("universal_newlines must be False") * if bufsize != 0: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_universal_newlines); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2147, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":2148 * * if universal_newlines: * raise ValueError("universal_newlines must be False") # <<<<<<<<<<<<<< * if bufsize != 0: * raise ValueError("bufsize must be 0") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2148, __pyx_L1_error) /* "uvloop/loop.pyx":2147 * int debug_flags = 0 * * if universal_newlines: # <<<<<<<<<<<<<< * raise ValueError("universal_newlines must be False") * if bufsize != 0: */ } /* "uvloop/loop.pyx":2149 * if universal_newlines: * raise ValueError("universal_newlines must be False") * if bufsize != 0: # <<<<<<<<<<<<<< * raise ValueError("bufsize must be 0") * if startupinfo is not None: */ __pyx_t_2 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_bufsize, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2149, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":2150 * raise ValueError("universal_newlines must be False") * if bufsize != 0: * raise ValueError("bufsize must be 0") # <<<<<<<<<<<<<< * if startupinfo is not None: * raise ValueError('startupinfo is not supported') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2150, __pyx_L1_error) /* "uvloop/loop.pyx":2149 * if universal_newlines: * raise ValueError("universal_newlines must be False") * if bufsize != 0: # <<<<<<<<<<<<<< * raise ValueError("bufsize must be 0") * if startupinfo is not None: */ } /* "uvloop/loop.pyx":2151 * if bufsize != 0: * raise ValueError("bufsize must be 0") * if startupinfo is not None: # <<<<<<<<<<<<<< * raise ValueError('startupinfo is not supported') * if creationflags != 0: */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_startupinfo != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":2152 * raise ValueError("bufsize must be 0") * if startupinfo is not None: * raise ValueError('startupinfo is not supported') # <<<<<<<<<<<<<< * if creationflags != 0: * raise ValueError('creationflags is not supported') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2152, __pyx_L1_error) /* "uvloop/loop.pyx":2151 * if bufsize != 0: * raise ValueError("bufsize must be 0") * if startupinfo is not None: # <<<<<<<<<<<<<< * raise ValueError('startupinfo is not supported') * if creationflags != 0: */ } /* "uvloop/loop.pyx":2153 * if startupinfo is not None: * raise ValueError('startupinfo is not supported') * if creationflags != 0: # <<<<<<<<<<<<<< * raise ValueError('creationflags is not supported') * */ __pyx_t_2 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_creationflags, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2153, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":2154 * raise ValueError('startupinfo is not supported') * if creationflags != 0: * raise ValueError('creationflags is not supported') # <<<<<<<<<<<<<< * * if executable is not None: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2154, __pyx_L1_error) /* "uvloop/loop.pyx":2153 * if startupinfo is not None: * raise ValueError('startupinfo is not supported') * if creationflags != 0: # <<<<<<<<<<<<<< * raise ValueError('creationflags is not supported') * */ } /* "uvloop/loop.pyx":2156 * raise ValueError('creationflags is not supported') * * if executable is not None: # <<<<<<<<<<<<<< * args[0] = executable * */ __pyx_t_3 = (__pyx_cur_scope->__pyx_v_executable != Py_None); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2157 * * if executable is not None: * args[0] = executable # <<<<<<<<<<<<<< * * if __uvloop_sleep_after_fork: */ if (unlikely(__Pyx_SetItemInt(__pyx_cur_scope->__pyx_v_args, 0, __pyx_cur_scope->__pyx_v_executable, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(1, 2157, __pyx_L1_error) /* "uvloop/loop.pyx":2156 * raise ValueError('creationflags is not supported') * * if executable is not None: # <<<<<<<<<<<<<< * args[0] = executable * */ } /* "uvloop/loop.pyx":2159 * args[0] = executable * * if __uvloop_sleep_after_fork: # <<<<<<<<<<<<<< * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v___uvloop_sleep_after_fork); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2159, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":2160 * * if __uvloop_sleep_after_fork: * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK # <<<<<<<<<<<<<< * * waiter = self._new_future() */ __pyx_cur_scope->__pyx_v_debug_flags = (__pyx_cur_scope->__pyx_v_debug_flags | 1); /* "uvloop/loop.pyx":2159 * args[0] = executable * * if __uvloop_sleep_after_fork: # <<<<<<<<<<<<<< * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK * */ } /* "uvloop/loop.pyx":2162 * debug_flags |= __PROCESS_DEBUG_SLEEP_AFTER_FORK * * waiter = self._new_future() # <<<<<<<<<<<<<< * protocol = protocol_factory() * proc = UVProcessTransport.new(self, protocol, */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":2163 * * waiter = self._new_future() * protocol = protocol_factory() # <<<<<<<<<<<<<< * proc = UVProcessTransport.new(self, protocol, * args, env, cwd, start_new_session, */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_4 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2163, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_protocol = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/loop.pyx":2168 * stdin, stdout, stderr, pass_fds, * waiter, * debug_flags, # <<<<<<<<<<<<<< * preexec_fn, * restore_signals) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_debug_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/loop.pyx":2164 * waiter = self._new_future() * protocol = protocol_factory() * proc = UVProcessTransport.new(self, protocol, # <<<<<<<<<<<<<< * args, env, cwd, start_new_session, * stdin, stdout, stderr, pass_fds, */ __pyx_t_4 = ((PyObject *)__pyx_f_6uvloop_4loop_18UVProcessTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_protocol, __pyx_cur_scope->__pyx_v_args, __pyx_cur_scope->__pyx_v_env, __pyx_cur_scope->__pyx_v_cwd, __pyx_cur_scope->__pyx_v_start_new_session, __pyx_cur_scope->__pyx_v_stdin, __pyx_cur_scope->__pyx_v_stdout, __pyx_cur_scope->__pyx_v_stderr, __pyx_cur_scope->__pyx_v_pass_fds, __pyx_cur_scope->__pyx_v_waiter, __pyx_t_2, __pyx_cur_scope->__pyx_v_preexec_fn, __pyx_cur_scope->__pyx_v_restore_signals)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_proc = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2172 * restore_signals) * * try: # <<<<<<<<<<<<<< * await waiter * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/loop.pyx":2173 * * try: * await waiter # <<<<<<<<<<<<<< * except: * proc.close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_6); __pyx_cur_scope->__pyx_t_0 = __pyx_t_6; __Pyx_XGIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_t_1 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_t_2 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L18_resume_from_yield:; __pyx_t_6 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_6); __pyx_t_7 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2173, __pyx_L10_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2173, __pyx_L10_error) } } /* "uvloop/loop.pyx":2172 * restore_signals) * * try: # <<<<<<<<<<<<<< * await waiter * except: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2174 * try: * await waiter * except: # <<<<<<<<<<<<<< * proc.close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(1, 2174, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":2175 * await waiter * except: * proc.close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_proc), __pyx_n_s_close); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2175, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_11) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2175, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2175, __pyx_L12_except_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":2176 * except: * proc.close() * raise # <<<<<<<<<<<<<< * * return proc, protocol */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; __PYX_ERR(1, 2176, __pyx_L12_except_error) } __pyx_L12_except_error:; /* "uvloop/loop.pyx":2172 * restore_signals) * * try: # <<<<<<<<<<<<<< * await waiter * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L17_try_end:; } /* "uvloop/loop.pyx":2178 * raise * * return proc, protocol # <<<<<<<<<<<<<< * * def subprocess_shell(self, protocol_factory, cmd, *, */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_proc)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_proc)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_protocol); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2119 * self._default_executor = executor * * async def __subprocess_run(self, protocol_factory, args, # <<<<<<<<<<<<<< * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("__subprocess_run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2180 * return proc, protocol * * def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<< * shell=True, * **kwargs): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_100subprocess_shell(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_99subprocess_shell[] = "Loop.subprocess_shell(self, protocol_factory, cmd, *, shell=True, **kwargs)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_100subprocess_shell(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_cmd = 0; PyObject *__pyx_v_shell = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("subprocess_shell (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_cmd,&__pyx_n_s_shell,0}; PyObject* values[3] = {0,0,0}; /* "uvloop/loop.pyx":2181 * * def subprocess_shell(self, protocol_factory, cmd, *, * shell=True, # <<<<<<<<<<<<<< * **kwargs): * */ values[2] = ((PyObject *)Py_True); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cmd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("subprocess_shell", 1, 2, 2, 1); __PYX_ERR(1, 2180, __pyx_L3_error) } } if (kw_args == 1) { const Py_ssize_t index = 2; PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "subprocess_shell") < 0)) __PYX_ERR(1, 2180, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_protocol_factory = values[0]; __pyx_v_cmd = values[1]; __pyx_v_shell = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("subprocess_shell", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2180, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_shell", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_99subprocess_shell(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_cmd, __pyx_v_shell, __pyx_v_kwargs); /* "uvloop/loop.pyx":2180 * return proc, protocol * * def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<< * shell=True, * **kwargs): */ /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_99subprocess_shell(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_cmd, PyObject *__pyx_v_shell, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("subprocess_shell", 0); /* "uvloop/loop.pyx":2184 * **kwargs): * * if not shell: # <<<<<<<<<<<<<< * raise ValueError("shell must be True") * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_shell); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2184, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2185 * * if not shell: * raise ValueError("shell must be True") # <<<<<<<<<<<<<< * * args = [cmd] */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2185, __pyx_L1_error) /* "uvloop/loop.pyx":2184 * **kwargs): * * if not shell: # <<<<<<<<<<<<<< * raise ValueError("shell must be True") * */ } /* "uvloop/loop.pyx":2187 * raise ValueError("shell must be True") * * args = [cmd] # <<<<<<<<<<<<<< * if shell: * args = [b'/bin/sh', b'-c'] + args */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_cmd); __Pyx_GIVEREF(__pyx_v_cmd); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_cmd); __pyx_v_args = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2188 * * args = [cmd] * if shell: # <<<<<<<<<<<<<< * args = [b'/bin/sh', b'-c'] + args * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shell); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2188, __pyx_L1_error) if (__pyx_t_2) { /* "uvloop/loop.pyx":2189 * args = [cmd] * if shell: * args = [b'/bin/sh', b'-c'] + args # <<<<<<<<<<<<<< * * return self.__subprocess_run(protocol_factory, args, shell=True, */ __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_b_bin_sh); __Pyx_GIVEREF(__pyx_kp_b_bin_sh); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_bin_sh); __Pyx_INCREF(__pyx_kp_b_c); __Pyx_GIVEREF(__pyx_kp_b_c); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_kp_b_c); __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2188 * * args = [cmd] * if shell: # <<<<<<<<<<<<<< * args = [b'/bin/sh', b'-c'] + args * */ } /* "uvloop/loop.pyx":2191 * args = [b'/bin/sh', b'-c'] + args * * return self.__subprocess_run(protocol_factory, args, shell=True, # <<<<<<<<<<<<<< * **kwargs) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_subprocess_run); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_v_protocol_factory); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_protocol_factory); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args); __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shell, Py_True) < 0) __PYX_ERR(1, 2191, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/loop.pyx":2192 * * return self.__subprocess_run(protocol_factory, args, shell=True, * **kwargs) # <<<<<<<<<<<<<< * * def subprocess_exec(self, protocol_factory, program, *args, */ if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < 0) __PYX_ERR(1, 2192, __pyx_L1_error) /* "uvloop/loop.pyx":2191 * args = [b'/bin/sh', b'-c'] + args * * return self.__subprocess_run(protocol_factory, args, shell=True, # <<<<<<<<<<<<<< * **kwargs) * */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":2180 * return proc, protocol * * def subprocess_shell(self, protocol_factory, cmd, *, # <<<<<<<<<<<<<< * shell=True, * **kwargs): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_shell", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2194 * **kwargs) * * def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<< * shell=False, **kwargs): * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_102subprocess_exec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_101subprocess_exec[] = "Loop.subprocess_exec(self, protocol_factory, program, *args, shell=False, **kwargs)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_102subprocess_exec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_program = 0; PyObject *__pyx_v_shell = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("subprocess_exec (wrapper)", 0); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_program,&__pyx_n_s_shell,0}; PyObject* values[3] = {0,0,0}; /* "uvloop/loop.pyx":2195 * * def subprocess_exec(self, protocol_factory, program, *args, * shell=False, **kwargs): # <<<<<<<<<<<<<< * * if shell: */ values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_program)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("subprocess_exec", 0, 2, 2, 1); __PYX_ERR(1, 2194, __pyx_L3_error) } } if (kw_args == 1) { const Py_ssize_t index = 2; PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "subprocess_exec") < 0)) __PYX_ERR(1, 2194, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_protocol_factory = values[0]; __pyx_v_program = values[1]; __pyx_v_shell = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("subprocess_exec", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2194, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_exec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_101subprocess_exec(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_program, __pyx_v_shell, __pyx_v_args, __pyx_v_kwargs); /* "uvloop/loop.pyx":2194 * **kwargs) * * def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<< * shell=False, **kwargs): * */ /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_101subprocess_exec(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_program, PyObject *__pyx_v_shell, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("subprocess_exec", 0); __Pyx_INCREF(__pyx_v_args); /* "uvloop/loop.pyx":2197 * shell=False, **kwargs): * * if shell: # <<<<<<<<<<<<<< * raise ValueError("shell must be False") * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_shell); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2197, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":2198 * * if shell: * raise ValueError("shell must be False") # <<<<<<<<<<<<<< * * args = list((program,) + args) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2198, __pyx_L1_error) /* "uvloop/loop.pyx":2197 * shell=False, **kwargs): * * if shell: # <<<<<<<<<<<<<< * raise ValueError("shell must be False") * */ } /* "uvloop/loop.pyx":2200 * raise ValueError("shell must be False") * * args = list((program,) + args) # <<<<<<<<<<<<<< * * return self.__subprocess_run(protocol_factory, args, shell=False, */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_program); __Pyx_GIVEREF(__pyx_v_program); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_program); __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2202 * args = list((program,) + args) * * return self.__subprocess_run(protocol_factory, args, shell=False, # <<<<<<<<<<<<<< * **kwargs) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_subprocess_run); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_v_protocol_factory); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_protocol_factory); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args); __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shell, Py_False) < 0) __PYX_ERR(1, 2202, __pyx_L1_error) __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/loop.pyx":2203 * * return self.__subprocess_run(protocol_factory, args, shell=False, * **kwargs) # <<<<<<<<<<<<<< * * async def connect_read_pipe(self, proto_factory, pipe): */ if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < 0) __PYX_ERR(1, 2203, __pyx_L1_error) /* "uvloop/loop.pyx":2202 * args = list((program,) + args) * * return self.__subprocess_run(protocol_factory, args, shell=False, # <<<<<<<<<<<<<< * **kwargs) * */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "uvloop/loop.pyx":2194 * **kwargs) * * def subprocess_exec(self, protocol_factory, program, *args, # <<<<<<<<<<<<<< * shell=False, **kwargs): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop.subprocess_exec", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_105generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2205 * **kwargs) * * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register read pipe in event loop. Set the pipe to non-blocking mode. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_104connect_read_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_103connect_read_pipe[] = "Loop.connect_read_pipe(self, proto_factory, pipe)\nRegister read pipe in event loop. Set the pipe to non-blocking mode.\n\n protocol_factory should instantiate object with Protocol interface.\n pipe is a file-like object.\n Return pair (transport, protocol), where transport supports the\n ReadTransport interface."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_104connect_read_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_proto_factory = 0; PyObject *__pyx_v_pipe = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_read_pipe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proto_factory,&__pyx_n_s_pipe,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_proto_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pipe)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("connect_read_pipe", 1, 2, 2, 1); __PYX_ERR(1, 2205, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_read_pipe") < 0)) __PYX_ERR(1, 2205, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_proto_factory = values[0]; __pyx_v_pipe = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connect_read_pipe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2205, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_103connect_read_pipe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_proto_factory, __pyx_v_pipe); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_103connect_read_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_read_pipe", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2205, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_proto_factory = __pyx_v_proto_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto_factory); __pyx_cur_scope->__pyx_v_pipe = __pyx_v_pipe; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pipe); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pipe); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_105generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_read_pipe, __pyx_n_s_Loop_connect_read_pipe, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2205, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_105generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L12_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2205, __pyx_L1_error) /* "uvloop/loop.pyx":2215 * ReadUnixTransport transp * # See a comment on os_dup in create_connection * int fileno = os_dup(pipe.fileno()) # <<<<<<<<<<<<<< * * waiter = self._new_future() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipe, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2215, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_fileno = __pyx_t_6; /* "uvloop/loop.pyx":2217 * int fileno = os_dup(pipe.fileno()) * * waiter = self._new_future() # <<<<<<<<<<<<<< * proto = proto_factory() * transp = ReadUnixTransport.new(self, proto, None, waiter) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":2218 * * waiter = self._new_future() * proto = proto_factory() # <<<<<<<<<<<<<< * transp = ReadUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory); __pyx_t_3 = __pyx_cur_scope->__pyx_v_proto_factory; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2218, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_proto = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":2219 * waiter = self._new_future() * proto = proto_factory() * transp = ReadUnixTransport.new(self, proto, None, waiter) # <<<<<<<<<<<<<< * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_proto, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2220 * proto = proto_factory() * transp = ReadUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) # <<<<<<<<<<<<<< * transp._attach_fileobj(pipe) * try: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._add_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_u_pipe, __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2221 * transp = ReadUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) # <<<<<<<<<<<<<< * try: * transp._open(fileno) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2222 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":2223 * transp._attach_fileobj(pipe) * try: * transp._open(fileno) # <<<<<<<<<<<<<< * transp._init_protocol() * await waiter */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2223, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2224 * try: * transp._open(fileno) * transp._init_protocol() # <<<<<<<<<<<<<< * await waiter * except: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2224, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2225 * transp._open(fileno) * transp._init_protocol() * await waiter # <<<<<<<<<<<<<< * except: * transp.close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_t_0 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_t_1 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_2 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L12_resume_from_yield:; __pyx_t_7 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_8); __pyx_t_9 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2225, __pyx_L4_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2225, __pyx_L4_error) } } /* "uvloop/loop.pyx":2222 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2226 * transp._init_protocol() * await waiter * except: # <<<<<<<<<<<<<< * transp.close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(1, 2226, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":2227 * await waiter * except: * transp.close() # <<<<<<<<<<<<<< * raise * return transp, proto */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2227, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_10) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2227, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2227, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2228 * except: * transp.close() * raise # <<<<<<<<<<<<<< * return transp, proto * */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(1, 2228, __pyx_L6_except_error) } __pyx_L6_except_error:; /* "uvloop/loop.pyx":2222 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":2229 * transp.close() * raise * return transp, proto # <<<<<<<<<<<<<< * * async def connect_write_pipe(self, proto_factory, pipe): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transp)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_proto); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2205 * **kwargs) * * async def connect_read_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register read pipe in event loop. Set the pipe to non-blocking mode. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("connect_read_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_108generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2231 * return transp, proto * * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register write pipe in event loop. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_107connect_write_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_106connect_write_pipe[] = "Loop.connect_write_pipe(self, proto_factory, pipe)\nRegister write pipe in event loop.\n\n protocol_factory should instantiate object with BaseProtocol interface.\n Pipe is file-like object already switched to nonblocking.\n Return pair (transport, protocol), where transport support\n WriteTransport interface."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_107connect_write_pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_proto_factory = 0; PyObject *__pyx_v_pipe = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_write_pipe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proto_factory,&__pyx_n_s_pipe,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_proto_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pipe)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("connect_write_pipe", 1, 2, 2, 1); __PYX_ERR(1, 2231, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connect_write_pipe") < 0)) __PYX_ERR(1, 2231, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_proto_factory = values[0]; __pyx_v_pipe = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connect_write_pipe", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2231, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_106connect_write_pipe(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_proto_factory, __pyx_v_pipe); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_106connect_write_pipe(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_proto_factory, PyObject *__pyx_v_pipe) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_write_pipe", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2231, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_proto_factory = __pyx_v_proto_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto_factory); __pyx_cur_scope->__pyx_v_pipe = __pyx_v_pipe; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pipe); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pipe); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_108generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_connect_write_pipe, __pyx_n_s_Loop_connect_write_pipe, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2231, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_108generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L12_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2231, __pyx_L1_error) /* "uvloop/loop.pyx":2241 * WriteUnixTransport transp * # See a comment on os_dup in create_connection * int fileno = os_dup(pipe.fileno()) # <<<<<<<<<<<<<< * * waiter = self._new_future() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_pipe, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2241, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_fileno = __pyx_t_6; /* "uvloop/loop.pyx":2243 * int fileno = os_dup(pipe.fileno()) * * waiter = self._new_future() # <<<<<<<<<<<<<< * proto = proto_factory() * transp = WriteUnixTransport.new(self, proto, None, waiter) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":2244 * * waiter = self._new_future() * proto = proto_factory() # <<<<<<<<<<<<<< * transp = WriteUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto_factory); __pyx_t_3 = __pyx_cur_scope->__pyx_v_proto_factory; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2244, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_proto = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":2245 * waiter = self._new_future() * proto = proto_factory() * transp = WriteUnixTransport.new(self, proto, None, waiter) # <<<<<<<<<<<<<< * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) */ __pyx_t_1 = ((PyObject *)__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_proto, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_cur_scope->__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2246 * proto = proto_factory() * transp = WriteUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) # <<<<<<<<<<<<<< * transp._attach_fileobj(pipe) * try: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._add_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_u_pipe, __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2247 * transp = WriteUnixTransport.new(self, proto, None, waiter) * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) # <<<<<<<<<<<<<< * try: * transp._open(fileno) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2248 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":2249 * transp._attach_fileobj(pipe) * try: * transp._open(fileno) # <<<<<<<<<<<<<< * transp._init_protocol() * await waiter */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_transp), __pyx_cur_scope->__pyx_v_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2249, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2250 * try: * transp._open(fileno) * transp._init_protocol() # <<<<<<<<<<<<<< * await waiter * except: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_cur_scope->__pyx_v_transp->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_transp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2250, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2251 * transp._open(fileno) * transp._init_protocol() * await waiter # <<<<<<<<<<<<<< * except: * transp.close() */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_t_0 = __pyx_t_7; __Pyx_XGIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_t_1 = __pyx_t_8; __Pyx_XGIVEREF(__pyx_t_9); __pyx_cur_scope->__pyx_t_2 = __pyx_t_9; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L12_resume_from_yield:; __pyx_t_7 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __pyx_cur_scope->__pyx_t_1; __pyx_cur_scope->__pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_t_8); __pyx_t_9 = __pyx_cur_scope->__pyx_t_2; __pyx_cur_scope->__pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2251, __pyx_L4_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2251, __pyx_L4_error) } } /* "uvloop/loop.pyx":2248 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2252 * transp._init_protocol() * await waiter * except: # <<<<<<<<<<<<<< * transp.close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.Loop.connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(1, 2252, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":2253 * await waiter * except: * transp.close() # <<<<<<<<<<<<<< * raise * return transp, proto */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_transp), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2253, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_10) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2253, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2253, __pyx_L6_except_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2254 * except: * transp.close() * raise # <<<<<<<<<<<<<< * return transp, proto * */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(1, 2254, __pyx_L6_except_error) } __pyx_L6_except_error:; /* "uvloop/loop.pyx":2248 * transp._add_extra_info('pipe', pipe) * transp._attach_fileobj(pipe) * try: # <<<<<<<<<<<<<< * transp._open(fileno) * transp._init_protocol() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":2255 * transp.close() * raise * return transp, proto # <<<<<<<<<<<<<< * * def add_signal_handler(self, sig, callback, *args): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_transp)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_transp)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_proto); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2231 * return transp, proto * * async def connect_write_pipe(self, proto_factory, pipe): # <<<<<<<<<<<<<< * """Register write pipe in event loop. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("connect_write_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2257 * return transp, proto * * def add_signal_handler(self, sig, callback, *args): # <<<<<<<<<<<<<< * """Add a handler for a signal. UNIX only. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_110add_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_109add_signal_handler[] = "Loop.add_signal_handler(self, sig, callback, *args)\nAdd a handler for a signal. UNIX only.\n\n Raise ValueError if the signal number is invalid or uncatchable.\n Raise RuntimeError if there is a problem setting up the handler.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_110add_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sig = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_signal_handler (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 2) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sig,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sig)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_signal_handler", 0, 2, 2, 1); __PYX_ERR(1, 2257, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "add_signal_handler") < 0)) __PYX_ERR(1, 2257, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sig = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_signal_handler", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2257, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_109add_signal_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_sig, __pyx_v_callback, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_109add_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; char const *__pyx_t_22; __Pyx_RefNannySetupContext("add_signal_handler", 0); /* "uvloop/loop.pyx":2266 * Handle h * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * self._setup_signals() * if self._signal_handlers is None: */ __pyx_t_1 = (__pyx_v_self->_signal_handlers == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2267 * * if self._signal_handlers is None: * self._setup_signals() # <<<<<<<<<<<<<< * if self._signal_handlers is None: * raise ValueError('set_wakeup_fd only works in main thread') */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_vtab)->_setup_signals(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2268 * if self._signal_handlers is None: * self._setup_signals() * if self._signal_handlers is None: # <<<<<<<<<<<<<< * raise ValueError('set_wakeup_fd only works in main thread') * */ __pyx_t_2 = (__pyx_v_self->_signal_handlers == ((PyObject*)Py_None)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2269 * self._setup_signals() * if self._signal_handlers is None: * raise ValueError('set_wakeup_fd only works in main thread') # <<<<<<<<<<<<<< * * if (aio_iscoroutine(callback) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2269, __pyx_L1_error) /* "uvloop/loop.pyx":2268 * if self._signal_handlers is None: * self._setup_signals() * if self._signal_handlers is None: # <<<<<<<<<<<<<< * raise ValueError('set_wakeup_fd only works in main thread') * */ } /* "uvloop/loop.pyx":2266 * Handle h * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * self._setup_signals() * if self._signal_handlers is None: */ } /* "uvloop/loop.pyx":2271 * raise ValueError('set_wakeup_fd only works in main thread') * * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<< * or aio_iscoroutinefunction(callback)): * raise TypeError("coroutines cannot be used " */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutine); __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_iscoroutine; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_callback}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_callback}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_callback); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } /* "uvloop/loop.pyx":2272 * * if (aio_iscoroutine(callback) * or aio_iscoroutinefunction(callback)): # <<<<<<<<<<<<<< * raise TypeError("coroutines cannot be used " * "with add_signal_handler()") */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction); __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_iscoroutinefunction; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_callback}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_callback}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_callback); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; /* "uvloop/loop.pyx":2271 * raise ValueError('set_wakeup_fd only works in main thread') * * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<< * or aio_iscoroutinefunction(callback)): * raise TypeError("coroutines cannot be used " */ if (__pyx_t_1) { /* "uvloop/loop.pyx":2273 * if (aio_iscoroutine(callback) * or aio_iscoroutinefunction(callback)): * raise TypeError("coroutines cannot be used " # <<<<<<<<<<<<<< * "with add_signal_handler()") * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2273, __pyx_L1_error) /* "uvloop/loop.pyx":2271 * raise ValueError('set_wakeup_fd only works in main thread') * * if (aio_iscoroutine(callback) # <<<<<<<<<<<<<< * or aio_iscoroutinefunction(callback)): * raise TypeError("coroutines cannot be used " */ } /* "uvloop/loop.pyx":2276 * "with add_signal_handler()") * * self._check_signal(sig) # <<<<<<<<<<<<<< * self._check_closed() * */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__check_signal(__pyx_v_self, __pyx_v_sig); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2277 * * self._check_signal(sig) * self._check_closed() # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__check_closed(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2279 * self._check_closed() * * try: # <<<<<<<<<<<<<< * # set_wakeup_fd() raises ValueError if this is not the * # main thread. By calling it early we ensure that an */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/loop.pyx":2284 * # event loop running in another thread cannot add a signal * # handler. * signal_set_wakeup_fd(self._csock.fileno()) # <<<<<<<<<<<<<< * except (ValueError, OSError) as exc: * raise RuntimeError(str(exc)) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_csock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2284, __pyx_L8_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd); __pyx_t_5 = __pyx_v_6uvloop_4loop_signal_set_wakeup_fd; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2284, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2279 * self._check_closed() * * try: # <<<<<<<<<<<<<< * # set_wakeup_fd() raises ValueError if this is not the * # main thread. By calling it early we ensure that an */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2285 * # handler. * signal_set_wakeup_fd(self._csock.fileno()) * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<< * raise RuntimeError(str(exc)) * */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(1, 2285, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_v_exc = __pyx_t_5; /*try:*/ { /* "uvloop/loop.pyx":2286 * signal_set_wakeup_fd(self._csock.fileno()) * except (ValueError, OSError) as exc: * raise RuntimeError(str(exc)) # <<<<<<<<<<<<<< * * h = new_Handle(self, callback, args or None) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2286, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_exc); __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2286, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2286, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2286, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 2286, __pyx_L21_error) } /* "uvloop/loop.pyx":2285 * # handler. * signal_set_wakeup_fd(self._csock.fileno()) * except (ValueError, OSError) as exc: # <<<<<<<<<<<<<< * raise RuntimeError(str(exc)) * */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L21_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L10_except_error; } } } goto __pyx_L10_except_error; __pyx_L10_except_error:; /* "uvloop/loop.pyx":2279 * self._check_closed() * * try: # <<<<<<<<<<<<<< * # set_wakeup_fd() raises ValueError if this is not the * # main thread. By calling it early we ensure that an */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L15_try_end:; } /* "uvloop/loop.pyx":2288 * raise RuntimeError(str(exc)) * * h = new_Handle(self, callback, args or None) # <<<<<<<<<<<<<< * self._signal_handlers[sig] = h * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2288, __pyx_L1_error) if (!__pyx_t_1) { } else { __Pyx_INCREF(__pyx_v_args); __pyx_t_10 = __pyx_v_args; goto __pyx_L27_bool_binop_done; } __Pyx_INCREF(Py_None); __pyx_t_10 = Py_None; __pyx_L27_bool_binop_done:; __pyx_t_5 = __pyx_f_6uvloop_4loop_new_Handle(__pyx_v_self, __pyx_v_callback, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(1, 2288, __pyx_L1_error) __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2289 * * h = new_Handle(self, callback, args or None) * self._signal_handlers[sig] = h # <<<<<<<<<<<<<< * * try: */ if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 2289, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_signal_handlers, __pyx_v_sig, ((PyObject *)__pyx_v_h)) < 0)) __PYX_ERR(1, 2289, __pyx_L1_error) /* "uvloop/loop.pyx":2291 * self._signal_handlers[sig] = h * * try: # <<<<<<<<<<<<<< * signal_signal(sig, _sighandler_noop) * except OSError as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/loop.pyx":2292 * * try: * signal_signal(sig, _sighandler_noop) # <<<<<<<<<<<<<< * except OSError as exc: * del self._signal_handlers[sig] */ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_sighandler_noop); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2292, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_signal); __pyx_t_3 = __pyx_v_6uvloop_4loop_signal_signal; __pyx_t_6 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_sig, __pyx_t_10}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2292, __pyx_L29_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_sig, __pyx_t_10}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2292, __pyx_L29_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2292, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_v_sig); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2292, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2291 * self._signal_handlers[sig] = h * * try: # <<<<<<<<<<<<<< * signal_signal(sig, _sighandler_noop) * except OSError as exc: */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L36_try_end; __pyx_L29_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2293 * try: * signal_signal(sig, _sighandler_noop) * except OSError as exc: # <<<<<<<<<<<<<< * del self._signal_handlers[sig] * if exc.errno == errno_EINVAL: */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_12) { __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(1, 2293, __pyx_L31_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_v_exc = __pyx_t_3; /*try:*/ { /* "uvloop/loop.pyx":2294 * signal_signal(sig, _sighandler_noop) * except OSError as exc: * del self._signal_handlers[sig] # <<<<<<<<<<<<<< * if exc.errno == errno_EINVAL: * raise RuntimeError('sig {} cannot be caught'.format(sig)) */ if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 2294, __pyx_L42_error) } if (unlikely(PyDict_DelItem(__pyx_v_self->_signal_handlers, __pyx_v_sig) < 0)) __PYX_ERR(1, 2294, __pyx_L42_error) /* "uvloop/loop.pyx":2295 * except OSError as exc: * del self._signal_handlers[sig] * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<< * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2295, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_v_6uvloop_4loop_errno_EINVAL, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2295, __pyx_L42_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2295, __pyx_L42_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":2296 * del self._signal_handlers[sig] * if exc.errno == errno_EINVAL: * raise RuntimeError('sig {} cannot be caught'.format(sig)) # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_cannot_be_caught, __pyx_n_s_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_20 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_20)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_20); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_20) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_sig); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_sig}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_20, __pyx_v_sig}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_21 = PyTuple_New(1+1); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_20); __pyx_t_20 = NULL; __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_21, 0+1, __pyx_v_sig); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2296, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(1, 2296, __pyx_L42_error) /* "uvloop/loop.pyx":2295 * except OSError as exc: * del self._signal_handlers[sig] * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<< * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: */ } /* "uvloop/loop.pyx":2298 * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: * raise # <<<<<<<<<<<<<< * * def remove_signal_handler(self, sig): */ /*else*/ { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_3, __pyx_t_4); __pyx_t_5 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __PYX_ERR(1, 2298, __pyx_L42_error) } } /* "uvloop/loop.pyx":2293 * try: * signal_signal(sig, _sighandler_noop) * except OSError as exc: # <<<<<<<<<<<<<< * del self._signal_handlers[sig] * if exc.errno == errno_EINVAL: */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L42_error:; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_12 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_22 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_18, __pyx_t_17); __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_22; goto __pyx_L31_except_error; } } } goto __pyx_L31_except_error; __pyx_L31_except_error:; /* "uvloop/loop.pyx":2291 * self._signal_handlers[sig] = h * * try: # <<<<<<<<<<<<<< * signal_signal(sig, _sighandler_noop) * except OSError as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L1_error; __pyx_L36_try_end:; } /* "uvloop/loop.pyx":2257 * return transp, proto * * def add_signal_handler(self, sig, callback, *args): # <<<<<<<<<<<<<< * """Add a handler for a signal. UNIX only. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_AddTraceback("uvloop.loop.Loop.add_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_h); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2300 * raise * * def remove_signal_handler(self, sig): # <<<<<<<<<<<<<< * """Remove a handler for a signal. UNIX only. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_112remove_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_sig); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_111remove_signal_handler[] = "Loop.remove_signal_handler(self, sig)\nRemove a handler for a signal. UNIX only.\n\n Return True if a signal handler was removed, False if not.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_112remove_signal_handler(PyObject *__pyx_v_self, PyObject *__pyx_v_sig) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_signal_handler (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_111remove_signal_handler(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_sig)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_111remove_signal_handler(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_sig) { PyObject *__pyx_v_handler = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("remove_signal_handler", 0); /* "uvloop/loop.pyx":2305 * Return True if a signal handler was removed, False if not. * """ * self._check_signal(sig) # <<<<<<<<<<<<<< * * if self._signal_handlers is None: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__check_signal(__pyx_v_self, __pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2307 * self._check_signal(sig) * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * return False * */ __pyx_t_2 = (__pyx_v_self->_signal_handlers == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":2308 * * if self._signal_handlers is None: * return False # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/loop.pyx":2307 * self._check_signal(sig) * * if self._signal_handlers is None: # <<<<<<<<<<<<<< * return False * */ } /* "uvloop/loop.pyx":2310 * return False * * try: # <<<<<<<<<<<<<< * del self._signal_handlers[sig] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/loop.pyx":2311 * * try: * del self._signal_handlers[sig] # <<<<<<<<<<<<<< * except KeyError: * return False */ if (unlikely(__pyx_v_self->_signal_handlers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 2311, __pyx_L4_error) } if (unlikely(PyDict_DelItem(__pyx_v_self->_signal_handlers, __pyx_v_sig) < 0)) __PYX_ERR(1, 2311, __pyx_L4_error) /* "uvloop/loop.pyx":2310 * return False * * try: # <<<<<<<<<<<<<< * del self._signal_handlers[sig] * except KeyError: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2312 * try: * del self._signal_handlers[sig] * except KeyError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(1, 2312, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/loop.pyx":2313 * del self._signal_handlers[sig] * except KeyError: * return False # <<<<<<<<<<<<<< * * if sig == uv.SIGINT: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/loop.pyx":2310 * return False * * try: # <<<<<<<<<<<<<< * del self._signal_handlers[sig] * except KeyError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L7_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L11_try_end:; } /* "uvloop/loop.pyx":2315 * return False * * if sig == uv.SIGINT: # <<<<<<<<<<<<<< * handler = signal_default_int_handler * else: */ __pyx_t_9 = __Pyx_PyInt_From_int(SIGINT); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = PyObject_RichCompare(__pyx_v_sig, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":2316 * * if sig == uv.SIGINT: * handler = signal_default_int_handler # <<<<<<<<<<<<<< * else: * handler = signal_SIG_DFL */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_default_int_handler); __pyx_v_handler = __pyx_v_6uvloop_4loop_signal_default_int_handler; /* "uvloop/loop.pyx":2315 * return False * * if sig == uv.SIGINT: # <<<<<<<<<<<<<< * handler = signal_default_int_handler * else: */ goto __pyx_L14; } /* "uvloop/loop.pyx":2318 * handler = signal_default_int_handler * else: * handler = signal_SIG_DFL # <<<<<<<<<<<<<< * * try: */ /*else*/ { __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_SIG_DFL); __pyx_v_handler = __pyx_v_6uvloop_4loop_signal_SIG_DFL; } __pyx_L14:; /* "uvloop/loop.pyx":2320 * handler = signal_SIG_DFL * * try: # <<<<<<<<<<<<<< * signal_signal(sig, handler) * except OSError as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/loop.pyx":2321 * * try: * signal_signal(sig, handler) # <<<<<<<<<<<<<< * except OSError as exc: * if exc.errno == errno_EINVAL: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_signal_signal); __pyx_t_9 = __pyx_v_6uvloop_4loop_signal_signal; __pyx_t_1 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_sig, __pyx_v_handler}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2321, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_sig, __pyx_v_handler}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2321, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2321, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_v_sig); __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_v_handler); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2321, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2320 * handler = signal_SIG_DFL * * try: # <<<<<<<<<<<<<< * signal_signal(sig, handler) * except OSError as exc: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2322 * try: * signal_signal(sig, handler) * except OSError as exc: # <<<<<<<<<<<<<< * if exc.errno == errno_EINVAL: * raise RuntimeError('sig {} cannot be caught'.format(sig)) */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(1, 2322, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_v_exc = __pyx_t_9; /*try:*/ { /* "uvloop/loop.pyx":2323 * signal_signal(sig, handler) * except OSError as exc: * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<< * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2323, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = PyObject_RichCompare(__pyx_t_1, __pyx_v_6uvloop_4loop_errno_EINVAL, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2323, __pyx_L28_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 2323, __pyx_L28_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_3) { /* "uvloop/loop.pyx":2324 * except OSError as exc: * if exc.errno == errno_EINVAL: * raise RuntimeError('sig {} cannot be caught'.format(sig)) # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sig_cannot_be_caught, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_12) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sig); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_sig}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_sig}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_sig); __Pyx_GIVEREF(__pyx_v_sig); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_sig); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 2324, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(1, 2324, __pyx_L28_error) /* "uvloop/loop.pyx":2323 * signal_signal(sig, handler) * except OSError as exc: * if exc.errno == errno_EINVAL: # <<<<<<<<<<<<<< * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: */ } /* "uvloop/loop.pyx":2326 * raise RuntimeError('sig {} cannot be caught'.format(sig)) * else: * raise # <<<<<<<<<<<<<< * * return True */ /*else*/ { __Pyx_GIVEREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __PYX_ERR(1, 2326, __pyx_L28_error) } } /* "uvloop/loop.pyx":2322 * try: * signal_signal(sig, handler) * except OSError as exc: # <<<<<<<<<<<<<< * if exc.errno == errno_EINVAL: * raise RuntimeError('sig {} cannot be caught'.format(sig)) */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L28_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_7 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L17_except_error; } } } goto __pyx_L17_except_error; __pyx_L17_except_error:; /* "uvloop/loop.pyx":2320 * handler = signal_SIG_DFL * * try: # <<<<<<<<<<<<<< * signal_signal(sig, handler) * except OSError as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L22_try_end:; } /* "uvloop/loop.pyx":2328 * raise * * return True # <<<<<<<<<<<<<< * * async def create_datagram_endpoint(self, protocol_factory, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/loop.pyx":2300 * raise * * def remove_signal_handler(self, sig): # <<<<<<<<<<<<<< * """Remove a handler for a signal. UNIX only. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.Loop.remove_signal_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_handler); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_115generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2330 * return True * * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<< * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_114create_datagram_endpoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_113create_datagram_endpoint[] = "Loop.create_datagram_endpoint(self, protocol_factory, local_addr=None, remote_addr=None, *, family=0, proto=0, flags=0, reuse_address=None, reuse_port=None, allow_broadcast=None, sock=None)\nA coroutine which creates a datagram endpoint.\n\n This method will try to establish the endpoint in the background.\n When successful, the coroutine returns a (transport, protocol) pair.\n\n protocol_factory must be a callable returning a protocol instance.\n\n socket family AF_INET or socket.AF_INET6 depending on host (or\n family if specified), socket type SOCK_DGRAM.\n\n reuse_address tells the kernel to reuse a local socket in\n TIME_WAIT state, without waiting for its natural timeout to\n expire. If not specified it will automatically be set to True on\n UNIX.\n\n reuse_port tells the kernel to allow this endpoint to be bound to\n the same port as other existing endpoints are bound to, so long as\n they all set this flag when being created. This option is not\n supported on Windows and some UNIX's. If the\n :py:data:`~socket.SO_REUSEPORT` constant is not defined then this\n capability is unsupported.\n\n allow_broadcast tells the kernel to allow this endpoint to send\n messages to the broadcast address.\n\n sock can optionally be specified in order to use a preexisting\n socket object.\n "; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_114create_datagram_endpoint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_protocol_factory = 0; PyObject *__pyx_v_local_addr = 0; PyObject *__pyx_v_remote_addr = 0; PyObject *__pyx_v_family = 0; PyObject *__pyx_v_proto = 0; PyObject *__pyx_v_flags = 0; PyObject *__pyx_v_reuse_address = 0; PyObject *__pyx_v_reuse_port = 0; PyObject *__pyx_v_allow_broadcast = 0; PyObject *__pyx_v_sock = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_datagram_endpoint (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol_factory,&__pyx_n_s_local_addr,&__pyx_n_s_remote_addr,&__pyx_n_s_family,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_reuse_address,&__pyx_n_s_reuse_port,&__pyx_n_s_allow_broadcast,&__pyx_n_s_sock,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; /* "uvloop/loop.pyx":2331 * * async def create_datagram_endpoint(self, protocol_factory, * local_addr=None, remote_addr=None, *, # <<<<<<<<<<<<<< * family=0, proto=0, flags=0, * reuse_address=None, reuse_port=None, */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)__pyx_int_0); values[4] = ((PyObject *)__pyx_int_0); values[5] = ((PyObject *)__pyx_int_0); /* "uvloop/loop.pyx":2333 * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, * reuse_address=None, reuse_port=None, # <<<<<<<<<<<<<< * allow_broadcast=None, sock=None): * """A coroutine which creates a datagram endpoint. */ values[6] = ((PyObject *)Py_None); values[7] = ((PyObject *)Py_None); /* "uvloop/loop.pyx":2334 * family=0, proto=0, flags=0, * reuse_address=None, reuse_port=None, * allow_broadcast=None, sock=None): # <<<<<<<<<<<<<< * """A coroutine which creates a datagram endpoint. * */ values[8] = ((PyObject *)Py_None); values[9] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_protocol_factory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_local_addr); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_remote_addr); if (value) { values[2] = value; kw_args--; } } } if (kw_args > 0 && likely(kw_args <= 7)) { Py_ssize_t index; for (index = 3; index < 10 && kw_args > 0; index++) { PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_datagram_endpoint") < 0)) __PYX_ERR(1, 2330, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_protocol_factory = values[0]; __pyx_v_local_addr = values[1]; __pyx_v_remote_addr = values[2]; __pyx_v_family = values[3]; __pyx_v_proto = values[4]; __pyx_v_flags = values[5]; __pyx_v_reuse_address = values[6]; __pyx_v_reuse_port = values[7]; __pyx_v_allow_broadcast = values[8]; __pyx_v_sock = values[9]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("create_datagram_endpoint", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2330, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_113create_datagram_endpoint(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), __pyx_v_protocol_factory, __pyx_v_local_addr, __pyx_v_remote_addr, __pyx_v_family, __pyx_v_proto, __pyx_v_flags, __pyx_v_reuse_address, __pyx_v_reuse_port, __pyx_v_allow_broadcast, __pyx_v_sock); /* "uvloop/loop.pyx":2330 * return True * * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<< * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator19(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2381 * allow_broadcast=allow_broadcast) * problems = ', '.join( * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<< * raise ValueError( * 'socket modifier keyword arguments can not be used ' */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(PyObject *__pyx_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_genexpr(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2381, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator19, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_create_datagram_endpoint_locals, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_24create_datagram_endpoint_2generator19(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2381, __pyx_L1_error) __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); __pyx_t_2 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts)) { __Pyx_RaiseClosureNameError("opts"); __PYX_ERR(1, 2381, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "items"); __PYX_ERR(1, 2381, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_opts, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_v); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 2381, __pyx_L1_error) if (__pyx_t_8) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__97, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_cur_scope->__pyx_v_k, __pyx_cur_scope->__pyx_v_v}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_cur_scope->__pyx_v_k, __pyx_cur_scope->__pyx_v_v}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_cur_scope->__pyx_v_k); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_k); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_k); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_cur_scope->__pyx_v_v); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2330 * return True * * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<< * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, */ static PyObject *__pyx_pf_6uvloop_4loop_4Loop_113create_datagram_endpoint(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_protocol_factory, PyObject *__pyx_v_local_addr, PyObject *__pyx_v_remote_addr, PyObject *__pyx_v_family, PyObject *__pyx_v_proto, PyObject *__pyx_v_flags, PyObject *__pyx_v_reuse_address, PyObject *__pyx_v_reuse_port, PyObject *__pyx_v_allow_broadcast, PyObject *__pyx_v_sock) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("create_datagram_endpoint", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2330, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_protocol_factory = __pyx_v_protocol_factory; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_cur_scope->__pyx_v_local_addr = __pyx_v_local_addr; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_local_addr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_local_addr); __pyx_cur_scope->__pyx_v_remote_addr = __pyx_v_remote_addr; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_remote_addr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_remote_addr); __pyx_cur_scope->__pyx_v_family = __pyx_v_family; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_family); __pyx_cur_scope->__pyx_v_proto = __pyx_v_proto; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_proto); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_proto); __pyx_cur_scope->__pyx_v_flags = __pyx_v_flags; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_flags); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_flags); __pyx_cur_scope->__pyx_v_reuse_address = __pyx_v_reuse_address; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_address); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_address); __pyx_cur_scope->__pyx_v_reuse_port = __pyx_v_reuse_port; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_reuse_port); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reuse_port); __pyx_cur_scope->__pyx_v_allow_broadcast = __pyx_v_allow_broadcast; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_allow_broadcast); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_allow_broadcast); __pyx_cur_scope->__pyx_v_sock = __pyx_v_sock; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_115generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_create_datagram_endpoint, __pyx_n_s_Loop_create_datagram_endpoint, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2330, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_115generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; struct addrinfo *__pyx_t_14; unsigned int __pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; char const *__pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L24_resume_from_yield; case 2: goto __pyx_L31_resume_from_yield; case 3: goto __pyx_L68_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2330, __pyx_L1_error) /* "uvloop/loop.pyx":2364 * """ * cdef: * UDPTransport udp = None # <<<<<<<<<<<<<< * system.addrinfo * lai * system.addrinfo * rai */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); /* "uvloop/loop.pyx":2368 * system.addrinfo * rai * * if sock is not None: # <<<<<<<<<<<<<< * if not _is_sock_dgram(sock.type): * raise ValueError( */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_sock != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2369 * * if sock is not None: * if not _is_sock_dgram(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_6uvloop_4loop__is_sock_dgram(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2371 * if not _is_sock_dgram(sock.type): * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) # <<<<<<<<<<<<<< * if (local_addr or remote_addr or * family or proto or flags or */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_A_UDP_Socket_was_expected_got_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_sock}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sock); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_cur_scope->__pyx_v_sock); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2370 * if sock is not None: * if not _is_sock_dgram(sock.type): * raise ValueError( # <<<<<<<<<<<<<< * 'A UDP Socket was expected, got {!r}'.format(sock)) * if (local_addr or remote_addr or */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2370, __pyx_L1_error) /* "uvloop/loop.pyx":2369 * * if sock is not None: * if not _is_sock_dgram(sock.type): # <<<<<<<<<<<<<< * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) */ } /* "uvloop/loop.pyx":2372 * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) * if (local_addr or remote_addr or # <<<<<<<<<<<<<< * family or proto or flags or * reuse_address or reuse_port or allow_broadcast): */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2372, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_remote_addr); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2372, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } /* "uvloop/loop.pyx":2373 * 'A UDP Socket was expected, got {!r}'.format(sock)) * if (local_addr or remote_addr or * family or proto or flags or # <<<<<<<<<<<<<< * reuse_address or reuse_port or allow_broadcast): * # show the problematic kwargs in exception msg */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_family); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2373, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_proto); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2373, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_flags); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2373, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } /* "uvloop/loop.pyx":2374 * if (local_addr or remote_addr or * family or proto or flags or * reuse_address or reuse_port or allow_broadcast): # <<<<<<<<<<<<<< * # show the problematic kwargs in exception msg * opts = dict(local_addr=local_addr, remote_addr=remote_addr, */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2374, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2374, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_allow_broadcast); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2374, __pyx_L1_error) __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; /* "uvloop/loop.pyx":2372 * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) * if (local_addr or remote_addr or # <<<<<<<<<<<<<< * family or proto or flags or * reuse_address or reuse_port or allow_broadcast): */ if (__pyx_t_1) { /* "uvloop/loop.pyx":2376 * reuse_address or reuse_port or allow_broadcast): * # show the problematic kwargs in exception msg * opts = dict(local_addr=local_addr, remote_addr=remote_addr, # <<<<<<<<<<<<<< * family=family, proto=proto, flags=flags, * reuse_address=reuse_address, reuse_port=reuse_port, */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_local_addr, __pyx_cur_scope->__pyx_v_local_addr) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_remote_addr, __pyx_cur_scope->__pyx_v_remote_addr) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) /* "uvloop/loop.pyx":2377 * # show the problematic kwargs in exception msg * opts = dict(local_addr=local_addr, remote_addr=remote_addr, * family=family, proto=proto, flags=flags, # <<<<<<<<<<<<<< * reuse_address=reuse_address, reuse_port=reuse_port, * allow_broadcast=allow_broadcast) */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_family, __pyx_cur_scope->__pyx_v_family) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_proto, __pyx_cur_scope->__pyx_v_proto) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_flags, __pyx_cur_scope->__pyx_v_flags) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) /* "uvloop/loop.pyx":2378 * opts = dict(local_addr=local_addr, remote_addr=remote_addr, * family=family, proto=proto, flags=flags, * reuse_address=reuse_address, reuse_port=reuse_port, # <<<<<<<<<<<<<< * allow_broadcast=allow_broadcast) * problems = ', '.join( */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_reuse_address, __pyx_cur_scope->__pyx_v_reuse_address) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_reuse_port, __pyx_cur_scope->__pyx_v_reuse_port) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) /* "uvloop/loop.pyx":2379 * family=family, proto=proto, flags=flags, * reuse_address=reuse_address, reuse_port=reuse_port, * allow_broadcast=allow_broadcast) # <<<<<<<<<<<<<< * problems = ', '.join( * '{}={}'.format(k, v) for k, v in opts.items() if v) */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_broadcast, __pyx_cur_scope->__pyx_v_allow_broadcast) < 0) __PYX_ERR(1, 2376, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_opts = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2381 * allow_broadcast=allow_broadcast) * problems = ', '.join( * '{}={}'.format(k, v) for k, v in opts.items() if v) # <<<<<<<<<<<<<< * raise ValueError( * 'socket modifier keyword arguments can not be used ' */ __pyx_t_4 = __pyx_pf_6uvloop_4loop_4Loop_24create_datagram_endpoint_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/loop.pyx":2380 * reuse_address=reuse_address, reuse_port=reuse_port, * allow_broadcast=allow_broadcast) * problems = ', '.join( # <<<<<<<<<<<<<< * '{}={}'.format(k, v) for k, v in opts.items() if v) * raise ValueError( */ __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__64, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_problems = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2384 * raise ValueError( * 'socket modifier keyword arguments can not be used ' * 'when sock is specified. ({})'.format(problems)) # <<<<<<<<<<<<<< * sock.setblocking(False) * udp = UDPTransport.__new__(UDPTransport) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_socket_modifier_keyword_argument, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_problems); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_problems}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_problems}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_problems); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_problems); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_problems); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2382 * problems = ', '.join( * '{}={}'.format(k, v) for k, v in opts.items() if v) * raise ValueError( # <<<<<<<<<<<<<< * 'socket modifier keyword arguments can not be used ' * 'when sock is specified. ({})'.format(problems)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(1, 2382, __pyx_L1_error) /* "uvloop/loop.pyx":2372 * raise ValueError( * 'A UDP Socket was expected, got {!r}'.format(sock)) * if (local_addr or remote_addr or # <<<<<<<<<<<<<< * family or proto or flags or * reuse_address or reuse_port or allow_broadcast): */ } /* "uvloop/loop.pyx":2385 * 'socket modifier keyword arguments can not be used ' * 'when sock is specified. ({})'.format(problems)) * sock.setblocking(False) # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, uv.AF_UNSPEC) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_setblocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2386 * 'when sock is specified. ({})'.format(problems)) * sock.setblocking(False) * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<< * udp._init(self, uv.AF_UNSPEC) * udp.open(sock.family, os_dup(sock.fileno())) */ __pyx_t_3 = __pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_UDPTransport)))) __PYX_ERR(1, 2386, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2387 * sock.setblocking(False) * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, uv.AF_UNSPEC) # <<<<<<<<<<<<<< * udp.open(sock.family, os_dup(sock.fileno())) * udp._attach_fileobj(sock) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, AF_UNSPEC); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2388 * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, uv.AF_UNSPEC) * udp.open(sock.family, os_dup(sock.fileno())) # <<<<<<<<<<<<<< * udp._attach_fileobj(sock) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_family); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_sock, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2388, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_5 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->open(__pyx_cur_scope->__pyx_v_udp, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2389 * udp._init(self, uv.AF_UNSPEC) * udp.open(sock.family, os_dup(sock.fileno())) * udp._attach_fileobj(sock) # <<<<<<<<<<<<<< * else: * reuse_address = bool(reuse_address) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._attach_fileobj(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_sock); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2368 * system.addrinfo * rai * * if sock is not None: # <<<<<<<<<<<<<< * if not _is_sock_dgram(sock.type): * raise ValueError( */ goto __pyx_L4; } /* "uvloop/loop.pyx":2391 * udp._attach_fileobj(sock) * else: * reuse_address = bool(reuse_address) # <<<<<<<<<<<<<< * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2391, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_address); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_address, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2392 * else: * reuse_address = bool(reuse_address) * reuse_port = bool(reuse_port) # <<<<<<<<<<<<<< * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2392, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_reuse_port); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_reuse_port, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2393 * reuse_address = bool(reuse_address) * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<< * raise ValueError( * 'reuse_port not supported by socket module') */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 2393, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L16_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_6uvloop_4loop_has_SO_REUSEPORT != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L16_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2394 * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( # <<<<<<<<<<<<<< * 'reuse_port not supported by socket module') * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2394, __pyx_L1_error) /* "uvloop/loop.pyx":2393 * reuse_address = bool(reuse_address) * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: # <<<<<<<<<<<<<< * raise ValueError( * 'reuse_port not supported by socket module') */ } /* "uvloop/loop.pyx":2397 * 'reuse_port not supported by socket module') * * lads = None # <<<<<<<<<<<<<< * if local_addr is not None: * if (not isinstance(local_addr, (tuple, list)) or */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_lads = Py_None; /* "uvloop/loop.pyx":2398 * * lads = None * if local_addr is not None: # <<<<<<<<<<<<<< * if (not isinstance(local_addr, (tuple, list)) or * len(local_addr) != 2): */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_local_addr != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2399 * lads = None * if local_addr is not None: * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(local_addr) != 2): * raise TypeError( */ __pyx_t_10 = PyTuple_Check(__pyx_cur_scope->__pyx_v_local_addr); __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_1 = __pyx_t_11; goto __pyx_L22_bool_binop_done; } __pyx_t_11 = PyList_Check(__pyx_cur_scope->__pyx_v_local_addr); __pyx_t_10 = (__pyx_t_11 != 0); __pyx_t_1 = __pyx_t_10; __pyx_L22_bool_binop_done:; __pyx_t_10 = ((!(__pyx_t_1 != 0)) != 0); if (!__pyx_t_10) { } else { __pyx_t_2 = __pyx_t_10; goto __pyx_L20_bool_binop_done; } /* "uvloop/loop.pyx":2400 * if local_addr is not None: * if (not isinstance(local_addr, (tuple, list)) or * len(local_addr) != 2): # <<<<<<<<<<<<<< * raise TypeError( * 'local_addr must be a tuple of (host, port)') */ __pyx_t_12 = PyObject_Length(__pyx_cur_scope->__pyx_v_local_addr); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(1, 2400, __pyx_L1_error) __pyx_t_10 = ((__pyx_t_12 != 2) != 0); __pyx_t_2 = __pyx_t_10; __pyx_L20_bool_binop_done:; /* "uvloop/loop.pyx":2399 * lads = None * if local_addr is not None: * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(local_addr) != 2): * raise TypeError( */ if (__pyx_t_2) { /* "uvloop/loop.pyx":2401 * if (not isinstance(local_addr, (tuple, list)) or * len(local_addr) != 2): * raise TypeError( # <<<<<<<<<<<<<< * 'local_addr must be a tuple of (host, port)') * lads = await self._getaddrinfo( */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2401, __pyx_L1_error) /* "uvloop/loop.pyx":2399 * lads = None * if local_addr is not None: * if (not isinstance(local_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(local_addr) != 2): * raise TypeError( */ } /* "uvloop/loop.pyx":2404 * 'local_addr must be a tuple of (host, port)') * lads = await self._getaddrinfo( * local_addr[0], local_addr[1], # <<<<<<<<<<<<<< * family, uv.SOCK_DGRAM, proto, flags, * 0) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_local_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":2405 * lads = await self._getaddrinfo( * local_addr[0], local_addr[1], * family, uv.SOCK_DGRAM, proto, flags, # <<<<<<<<<<<<<< * 0) * */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2405, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2405, __pyx_L1_error) __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2405, __pyx_L1_error) /* "uvloop/loop.pyx":2403 * raise TypeError( * 'local_addr must be a tuple of (host, port)') * lads = await self._getaddrinfo( # <<<<<<<<<<<<<< * local_addr[0], local_addr[1], * family, uv.SOCK_DGRAM, proto, flags, */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_3, __pyx_t_5, __pyx_t_9, SOCK_DGRAM, __pyx_t_7, __pyx_t_13, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L24_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2403, __pyx_L1_error) __pyx_t_8 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_8 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_8) < 0) __PYX_ERR(1, 2403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_lads); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_lads, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2398 * * lads = None * if local_addr is not None: # <<<<<<<<<<<<<< * if (not isinstance(local_addr, (tuple, list)) or * len(local_addr) != 2): */ } /* "uvloop/loop.pyx":2408 * 0) * * rads = None # <<<<<<<<<<<<<< * if remote_addr is not None: * if (not isinstance(remote_addr, (tuple, list)) or */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_rads = Py_None; /* "uvloop/loop.pyx":2409 * * rads = None * if remote_addr is not None: # <<<<<<<<<<<<<< * if (not isinstance(remote_addr, (tuple, list)) or * len(remote_addr) != 2): */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_remote_addr != Py_None); __pyx_t_10 = (__pyx_t_2 != 0); if (__pyx_t_10) { /* "uvloop/loop.pyx":2410 * rads = None * if remote_addr is not None: * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(remote_addr) != 2): * raise TypeError( */ __pyx_t_1 = PyTuple_Check(__pyx_cur_scope->__pyx_v_remote_addr); __pyx_t_11 = (__pyx_t_1 != 0); if (!__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L29_bool_binop_done; } __pyx_t_11 = PyList_Check(__pyx_cur_scope->__pyx_v_remote_addr); __pyx_t_1 = (__pyx_t_11 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L29_bool_binop_done:; __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (!__pyx_t_1) { } else { __pyx_t_10 = __pyx_t_1; goto __pyx_L27_bool_binop_done; } /* "uvloop/loop.pyx":2411 * if remote_addr is not None: * if (not isinstance(remote_addr, (tuple, list)) or * len(remote_addr) != 2): # <<<<<<<<<<<<<< * raise TypeError( * 'remote_addr must be a tuple of (host, port)') */ __pyx_t_12 = PyObject_Length(__pyx_cur_scope->__pyx_v_remote_addr); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(1, 2411, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_12 != 2) != 0); __pyx_t_10 = __pyx_t_1; __pyx_L27_bool_binop_done:; /* "uvloop/loop.pyx":2410 * rads = None * if remote_addr is not None: * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(remote_addr) != 2): * raise TypeError( */ if (__pyx_t_10) { /* "uvloop/loop.pyx":2412 * if (not isinstance(remote_addr, (tuple, list)) or * len(remote_addr) != 2): * raise TypeError( # <<<<<<<<<<<<<< * 'remote_addr must be a tuple of (host, port)') * rads = await self._getaddrinfo( */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(1, 2412, __pyx_L1_error) /* "uvloop/loop.pyx":2410 * rads = None * if remote_addr is not None: * if (not isinstance(remote_addr, (tuple, list)) or # <<<<<<<<<<<<<< * len(remote_addr) != 2): * raise TypeError( */ } /* "uvloop/loop.pyx":2415 * 'remote_addr must be a tuple of (host, port)') * rads = await self._getaddrinfo( * remote_addr[0], remote_addr[1], # <<<<<<<<<<<<<< * family, uv.SOCK_DGRAM, proto, flags, * 0) */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_remote_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_remote_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/loop.pyx":2416 * rads = await self._getaddrinfo( * remote_addr[0], remote_addr[1], * family, uv.SOCK_DGRAM, proto, flags, # <<<<<<<<<<<<<< * 0) * */ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2416, __pyx_L1_error) __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_proto); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2416, __pyx_L1_error) __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_flags); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2416, __pyx_L1_error) /* "uvloop/loop.pyx":2414 * raise TypeError( * 'remote_addr must be a tuple of (host, port)') * rads = await self._getaddrinfo( # <<<<<<<<<<<<<< * remote_addr[0], remote_addr[1], * family, uv.SOCK_DGRAM, proto, flags, */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_getaddrinfo(__pyx_cur_scope->__pyx_v_self, __pyx_t_8, __pyx_t_5, __pyx_t_13, SOCK_DGRAM, __pyx_t_7, __pyx_t_9, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L31_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2414, __pyx_L1_error) __pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_3 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(1, 2414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_rads); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_rads, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2409 * * rads = None * if remote_addr is not None: # <<<<<<<<<<<<<< * if (not isinstance(remote_addr, (tuple, list)) or * len(remote_addr) != 2): */ } /* "uvloop/loop.pyx":2419 * 0) * * excs = [] # <<<<<<<<<<<<<< * if lads is None: * if rads is not None: */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_excs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2420 * * excs = [] * if lads is None: # <<<<<<<<<<<<<< * if rads is not None: * udp = UDPTransport.__new__(UDPTransport) */ __pyx_t_10 = (__pyx_cur_scope->__pyx_v_lads == Py_None); __pyx_t_1 = (__pyx_t_10 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2421 * excs = [] * if lads is None: * if rads is not None: # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * rai = (rads).data */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_rads != Py_None); __pyx_t_10 = (__pyx_t_1 != 0); if (__pyx_t_10) { /* "uvloop/loop.pyx":2422 * if lads is None: * if rads is not None: * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<< * rai = (rads).data * udp._init(self, rai.ai_family) */ __pyx_t_3 = __pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_UDPTransport)))) __PYX_ERR(1, 2422, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2423 * if rads is not None: * udp = UDPTransport.__new__(UDPTransport) * rai = (rads).data # <<<<<<<<<<<<<< * udp._init(self, rai.ai_family) * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) */ __pyx_t_14 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_rads)->data; __pyx_cur_scope->__pyx_v_rai = __pyx_t_14; /* "uvloop/loop.pyx":2424 * udp = UDPTransport.__new__(UDPTransport) * rai = (rads).data * udp._init(self, rai.ai_family) # <<<<<<<<<<<<<< * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * else: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_rai->ai_family); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2425 * rai = (rads).data * udp._init(self, rai.ai_family) * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<< * else: * if family not in (uv.AF_INET, uv.AF_INET6): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_remote_address(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2421 * excs = [] * if lads is None: * if rads is not None: # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * rai = (rads).data */ goto __pyx_L33; } /* "uvloop/loop.pyx":2427 * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * else: * if family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise ValueError('unexpected address family') * udp = UDPTransport.__new__(UDPTransport) */ /*else*/ { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_family); __pyx_t_3 = __pyx_cur_scope->__pyx_v_family; __pyx_t_5 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { } else { __pyx_t_10 = __pyx_t_1; goto __pyx_L35_bool_binop_done; } __pyx_t_8 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_t_1; __pyx_L35_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_10 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2428 * else: * if family not in (uv.AF_INET, uv.AF_INET6): * raise ValueError('unexpected address family') # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, family) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 2428, __pyx_L1_error) /* "uvloop/loop.pyx":2427 * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * else: * if family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise ValueError('unexpected address family') * udp = UDPTransport.__new__(UDPTransport) */ } /* "uvloop/loop.pyx":2429 * if family not in (uv.AF_INET, uv.AF_INET6): * raise ValueError('unexpected address family') * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<< * udp._init(self, family) * */ __pyx_t_3 = __pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_UDPTransport)))) __PYX_ERR(1, 2429, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2430 * raise ValueError('unexpected address family') * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, family) # <<<<<<<<<<<<<< * * if reuse_port: */ __pyx_t_15 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_family); if (unlikely((__pyx_t_15 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2430, __pyx_L1_error) __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L33:; /* "uvloop/loop.pyx":2432 * udp._init(self, family) * * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(udp._fileno()) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2432, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":2433 * * if reuse_port: * self._sock_set_reuseport(udp._fileno()) # <<<<<<<<<<<<<< * * socket = udp._get_socket() */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_set_reuseport(__pyx_cur_scope->__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2432 * udp._init(self, family) * * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(udp._fileno()) * */ } /* "uvloop/loop.pyx":2435 * self._sock_set_reuseport(udp._fileno()) * * socket = udp._get_socket() # <<<<<<<<<<<<<< * if family == uv.AF_INET6: * socket.bind(('::', 0)) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_socket = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/loop.pyx":2436 * * socket = udp._get_socket() * if family == uv.AF_INET6: # <<<<<<<<<<<<<< * socket.bind(('::', 0)) * else: */ __pyx_t_3 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_family, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "uvloop/loop.pyx":2437 * socket = udp._get_socket() * if family == uv.AF_INET6: * socket.bind(('::', 0)) # <<<<<<<<<<<<<< * else: * socket.bind(('0.0.0.0', 0)) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_socket, __pyx_n_s_bind); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2436 * * socket = udp._get_socket() * if family == uv.AF_INET6: # <<<<<<<<<<<<<< * socket.bind(('::', 0)) * else: */ goto __pyx_L38; } /* "uvloop/loop.pyx":2439 * socket.bind(('::', 0)) * else: * socket.bind(('0.0.0.0', 0)) # <<<<<<<<<<<<<< * else: * lai = (lads).data */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_socket, __pyx_n_s_bind); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L38:; /* "uvloop/loop.pyx":2420 * * excs = [] * if lads is None: # <<<<<<<<<<<<<< * if rads is not None: * udp = UDPTransport.__new__(UDPTransport) */ goto __pyx_L32; } /* "uvloop/loop.pyx":2441 * socket.bind(('0.0.0.0', 0)) * else: * lai = (lads).data # <<<<<<<<<<<<<< * while lai is not NULL: * try: */ /*else*/ { __pyx_t_14 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_lads)->data; __pyx_cur_scope->__pyx_v_lai = __pyx_t_14; /* "uvloop/loop.pyx":2442 * else: * lai = (lads).data * while lai is not NULL: # <<<<<<<<<<<<<< * try: * udp = UDPTransport.__new__(UDPTransport) */ while (1) { __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_lai != NULL) != 0); if (!__pyx_t_1) break; /* "uvloop/loop.pyx":2443 * lai = (lads).data * while lai is not NULL: * try: # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); /*try:*/ { /* "uvloop/loop.pyx":2444 * while lai is not NULL: * try: * udp = UDPTransport.__new__(UDPTransport) # <<<<<<<<<<<<<< * udp._init(self, lai.ai_family) * if reuse_port: */ __pyx_t_5 = __pyx_tp_new_6uvloop_4loop_UDPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UDPTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2444, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); if (!(likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6uvloop_4loop_UDPTransport)))) __PYX_ERR(1, 2444, __pyx_L41_error) __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_udp, ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_5)); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2445 * try: * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) # <<<<<<<<<<<<<< * if reuse_port: * self._sock_set_reuseport(udp._fileno()) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_init(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_lai->ai_family); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2445, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2446 * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(udp._fileno()) * udp._bind(lai.ai_addr, reuse_address) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_port); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 2446, __pyx_L41_error) if (__pyx_t_1) { /* "uvloop/loop.pyx":2447 * udp._init(self, lai.ai_family) * if reuse_port: * self._sock_set_reuseport(udp._fileno()) # <<<<<<<<<<<<<< * udp._bind(lai.ai_addr, reuse_address) * except Exception as ex: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2447, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2447, __pyx_L41_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_sock_set_reuseport(__pyx_cur_scope->__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2447, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2446 * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) * if reuse_port: # <<<<<<<<<<<<<< * self._sock_set_reuseport(udp._fileno()) * udp._bind(lai.ai_addr, reuse_address) */ } /* "uvloop/loop.pyx":2448 * if reuse_port: * self._sock_set_reuseport(udp._fileno()) * udp._bind(lai.ai_addr, reuse_address) # <<<<<<<<<<<<<< * except Exception as ex: * lai = lai.ai_next */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_reuse_address); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 2448, __pyx_L41_error) __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_bind(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_lai->ai_addr, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2448, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2443 * lai = (lads).data * while lai is not NULL: * try: # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) */ } /* "uvloop/loop.pyx":2454 * continue * else: * break # <<<<<<<<<<<<<< * else: * ctx = None */ /*else:*/ { goto __pyx_L46_try_break; } __pyx_L41_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2449 * self._sock_set_reuseport(udp._fileno()) * udp._bind(lai.ai_addr, reuse_address) * except Exception as ex: # <<<<<<<<<<<<<< * lai = lai.ai_next * excs.append(ex) */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.Loop.create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(1, 2449, __pyx_L43_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_ex = __pyx_t_3; /*try:*/ { /* "uvloop/loop.pyx":2450 * udp._bind(lai.ai_addr, reuse_address) * except Exception as ex: * lai = lai.ai_next # <<<<<<<<<<<<<< * excs.append(ex) * continue */ __pyx_t_14 = __pyx_cur_scope->__pyx_v_lai->ai_next; __pyx_cur_scope->__pyx_v_lai = __pyx_t_14; /* "uvloop/loop.pyx":2451 * except Exception as ex: * lai = lai.ai_next * excs.append(ex) # <<<<<<<<<<<<<< * continue * else: */ __pyx_t_19 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_excs, __pyx_cur_scope->__pyx_v_ex); if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(1, 2451, __pyx_L55_error) /* "uvloop/loop.pyx":2452 * lai = lai.ai_next * excs.append(ex) * continue # <<<<<<<<<<<<<< * else: * break */ goto __pyx_L52_continue; } /* "uvloop/loop.pyx":2449 * self._sock_set_reuseport(udp._fileno()) * udp._bind(lai.ai_addr, reuse_address) * except Exception as ex: # <<<<<<<<<<<<<< * lai = lai.ai_next * excs.append(ex) */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L55_error:; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __pyx_t_9 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_20 = __pyx_filename; { __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ex); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_ex); __pyx_cur_scope->__pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26); } __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23); __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_20; goto __pyx_L43_except_error; } __pyx_L52_continue: { __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ex); __Pyx_DECREF(__pyx_cur_scope->__pyx_v_ex); __pyx_cur_scope->__pyx_v_ex = NULL; goto __pyx_L51_except_continue; } } __pyx_L51_except_continue:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L47_try_continue; } goto __pyx_L43_except_error; __pyx_L43_except_error:; /* "uvloop/loop.pyx":2443 * lai = (lads).data * while lai is not NULL: * try: # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, lai.ai_family) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L1_error; __pyx_L46_try_break:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L40_break; __pyx_L47_try_continue:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L39_continue; } __pyx_L39_continue:; } /* "uvloop/loop.pyx":2456 * break * else: * ctx = None # <<<<<<<<<<<<<< * if len(excs): * ctx = excs[0] */ /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_ctx = Py_None; /* "uvloop/loop.pyx":2457 * else: * ctx = None * if len(excs): # <<<<<<<<<<<<<< * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( */ __pyx_t_12 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_excs); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(1, 2457, __pyx_L1_error) __pyx_t_1 = (__pyx_t_12 != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2458 * ctx = None * if len(excs): * ctx = excs[0] # <<<<<<<<<<<<<< * raise OSError('could not bind to local_addr {}'.format( * local_addr)) from ctx */ __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_excs, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ctx); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ctx, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2457 * else: * ctx = None * if len(excs): # <<<<<<<<<<<<<< * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( */ } /* "uvloop/loop.pyx":2459 * if len(excs): * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( # <<<<<<<<<<<<<< * local_addr)) from ctx * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_bind_to_local_addr, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":2460 * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( * local_addr)) from ctx # <<<<<<<<<<<<<< * * if rads is not None: */ __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_local_addr); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_local_addr}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_local_addr}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_local_addr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_local_addr); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_local_addr); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2459 * if len(excs): * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( # <<<<<<<<<<<<<< * local_addr)) from ctx * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2460 * ctx = excs[0] * raise OSError('could not bind to local_addr {}'.format( * local_addr)) from ctx # <<<<<<<<<<<<<< * * if rads is not None: */ __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_cur_scope->__pyx_v_ctx); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(1, 2459, __pyx_L1_error) } __pyx_L40_break:; /* "uvloop/loop.pyx":2462 * local_addr)) from ctx * * if rads is not None: # <<<<<<<<<<<<<< * rai = (rads).data * sock = udp._get_socket() */ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_rads != Py_None); __pyx_t_10 = (__pyx_t_1 != 0); if (__pyx_t_10) { /* "uvloop/loop.pyx":2463 * * if rads is not None: * rai = (rads).data # <<<<<<<<<<<<<< * sock = udp._get_socket() * while rai is not NULL: */ __pyx_t_14 = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_cur_scope->__pyx_v_rads)->data; __pyx_cur_scope->__pyx_v_rai = __pyx_t_14; /* "uvloop/loop.pyx":2464 * if rads is not None: * rai = (rads).data * sock = udp._get_socket() # <<<<<<<<<<<<<< * while rai is not NULL: * if rai.ai_family != lai.ai_family: */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_sock); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_sock, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2465 * rai = (rads).data * sock = udp._get_socket() * while rai is not NULL: # <<<<<<<<<<<<<< * if rai.ai_family != lai.ai_family: * rai = rai.ai_next */ while (1) { __pyx_t_10 = ((__pyx_cur_scope->__pyx_v_rai != NULL) != 0); if (!__pyx_t_10) break; /* "uvloop/loop.pyx":2466 * sock = udp._get_socket() * while rai is not NULL: * if rai.ai_family != lai.ai_family: # <<<<<<<<<<<<<< * rai = rai.ai_next * continue */ __pyx_t_10 = ((__pyx_cur_scope->__pyx_v_rai->ai_family != __pyx_cur_scope->__pyx_v_lai->ai_family) != 0); if (__pyx_t_10) { /* "uvloop/loop.pyx":2467 * while rai is not NULL: * if rai.ai_family != lai.ai_family: * rai = rai.ai_next # <<<<<<<<<<<<<< * continue * if rai.ai_protocol != lai.ai_protocol: */ __pyx_t_14 = __pyx_cur_scope->__pyx_v_rai->ai_next; __pyx_cur_scope->__pyx_v_rai = __pyx_t_14; /* "uvloop/loop.pyx":2468 * if rai.ai_family != lai.ai_family: * rai = rai.ai_next * continue # <<<<<<<<<<<<<< * if rai.ai_protocol != lai.ai_protocol: * rai = rai.ai_next */ goto __pyx_L63_continue; /* "uvloop/loop.pyx":2466 * sock = udp._get_socket() * while rai is not NULL: * if rai.ai_family != lai.ai_family: # <<<<<<<<<<<<<< * rai = rai.ai_next * continue */ } /* "uvloop/loop.pyx":2469 * rai = rai.ai_next * continue * if rai.ai_protocol != lai.ai_protocol: # <<<<<<<<<<<<<< * rai = rai.ai_next * continue */ __pyx_t_10 = ((__pyx_cur_scope->__pyx_v_rai->ai_protocol != __pyx_cur_scope->__pyx_v_lai->ai_protocol) != 0); if (__pyx_t_10) { /* "uvloop/loop.pyx":2470 * continue * if rai.ai_protocol != lai.ai_protocol: * rai = rai.ai_next # <<<<<<<<<<<<<< * continue * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) */ __pyx_t_14 = __pyx_cur_scope->__pyx_v_rai->ai_next; __pyx_cur_scope->__pyx_v_rai = __pyx_t_14; /* "uvloop/loop.pyx":2471 * if rai.ai_protocol != lai.ai_protocol: * rai = rai.ai_next * continue # <<<<<<<<<<<<<< * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * break */ goto __pyx_L63_continue; /* "uvloop/loop.pyx":2469 * rai = rai.ai_next * continue * if rai.ai_protocol != lai.ai_protocol: # <<<<<<<<<<<<<< * rai = rai.ai_next * continue */ } /* "uvloop/loop.pyx":2472 * rai = rai.ai_next * continue * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<< * break * else: */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_remote_address(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2473 * continue * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * break # <<<<<<<<<<<<<< * else: * raise OSError( */ goto __pyx_L64_break; __pyx_L63_continue:; } /* "uvloop/loop.pyx":2475 * break * else: * raise OSError( # <<<<<<<<<<<<<< * 'could not bind to remote_addr {}'.format( * remote_addr)) */ /*else*/ { /* "uvloop/loop.pyx":2476 * else: * raise OSError( * 'could not bind to remote_addr {}'.format( # <<<<<<<<<<<<<< * remote_addr)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_bind_to_remote_addr, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/loop.pyx":2477 * raise OSError( * 'could not bind to remote_addr {}'.format( * remote_addr)) # <<<<<<<<<<<<<< * * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) */ __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_remote_addr); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_remote_addr}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_remote_addr}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_remote_addr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_remote_addr); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_remote_addr); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2475 * break * else: * raise OSError( # <<<<<<<<<<<<<< * 'could not bind to remote_addr {}'.format( * remote_addr)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(1, 2475, __pyx_L1_error) } __pyx_L64_break:; /* "uvloop/loop.pyx":2479 * remote_addr)) * * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) # <<<<<<<<<<<<<< * * if allow_broadcast: */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_remote_address(__pyx_cur_scope->__pyx_v_udp, __pyx_cur_scope->__pyx_v_rai->ai_addr, __pyx_cur_scope->__pyx_v_rai->ai_addrlen); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2462 * local_addr)) from ctx * * if rads is not None: # <<<<<<<<<<<<<< * rai = (rads).data * sock = udp._get_socket() */ } } __pyx_L32:; } __pyx_L4:; /* "uvloop/loop.pyx":2481 * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * * if allow_broadcast: # <<<<<<<<<<<<<< * udp._set_broadcast(1) * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_allow_broadcast); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 2481, __pyx_L1_error) if (__pyx_t_10) { /* "uvloop/loop.pyx":2482 * * if allow_broadcast: * udp._set_broadcast(1) # <<<<<<<<<<<<<< * * protocol = protocol_factory() */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_set_broadcast(__pyx_cur_scope->__pyx_v_udp, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2481 * udp._set_remote_address(rai.ai_addr, rai.ai_addrlen) * * if allow_broadcast: # <<<<<<<<<<<<<< * udp._set_broadcast(1) * */ } /* "uvloop/loop.pyx":2484 * udp._set_broadcast(1) * * protocol = protocol_factory() # <<<<<<<<<<<<<< * waiter = self._new_future() * assert udp is not None */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol_factory); __pyx_t_3 = __pyx_cur_scope->__pyx_v_protocol_factory; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2484, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_v_protocol = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/loop.pyx":2485 * * protocol = protocol_factory() * waiter = self._new_future() # <<<<<<<<<<<<<< * assert udp is not None * udp._set_protocol(protocol) */ __pyx_t_8 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/loop.pyx":2486 * protocol = protocol_factory() * waiter = self._new_future() * assert udp is not None # <<<<<<<<<<<<<< * udp._set_protocol(protocol) * udp._set_waiter(waiter) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_10 = (((PyObject *)__pyx_cur_scope->__pyx_v_udp) != Py_None); if (unlikely(!(__pyx_t_10 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(1, 2486, __pyx_L1_error) } } #endif /* "uvloop/loop.pyx":2487 * waiter = self._new_future() * assert udp is not None * udp._set_protocol(protocol) # <<<<<<<<<<<<<< * udp._set_waiter(waiter) * udp._init_protocol() */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_protocol); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2488 * assert udp is not None * udp._set_protocol(protocol) * udp._set_waiter(waiter) # <<<<<<<<<<<<<< * udp._init_protocol() * */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_waiter(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp), __pyx_cur_scope->__pyx_v_waiter); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2489 * udp._set_protocol(protocol) * udp._set_waiter(waiter) * udp._init_protocol() # <<<<<<<<<<<<<< * * await waiter */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_cur_scope->__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_cur_scope->__pyx_v_udp)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2491 * udp._init_protocol() * * await waiter # <<<<<<<<<<<<<< * return udp, protocol * */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L68_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2491, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2491, __pyx_L1_error) } } /* "uvloop/loop.pyx":2492 * * await waiter * return udp, protocol # <<<<<<<<<<<<<< * * def _asyncgen_finalizer_hook(self, agen): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_udp)); PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_udp)); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_protocol); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_cur_scope->__pyx_v_protocol); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2330 * return True * * async def create_datagram_endpoint(self, protocol_factory, # <<<<<<<<<<<<<< * local_addr=None, remote_addr=None, *, * family=0, proto=0, flags=0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("create_datagram_endpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2494 * return udp, protocol * * def _asyncgen_finalizer_hook(self, agen): # <<<<<<<<<<<<<< * self._asyncgens.discard(agen) * if not self.is_closed(): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_117_asyncgen_finalizer_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_116_asyncgen_finalizer_hook[] = "Loop._asyncgen_finalizer_hook(self, agen)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_117_asyncgen_finalizer_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_asyncgen_finalizer_hook (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_116_asyncgen_finalizer_hook(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_agen)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_116_asyncgen_finalizer_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_asyncgen_finalizer_hook", 0); /* "uvloop/loop.pyx":2495 * * def _asyncgen_finalizer_hook(self, agen): * self._asyncgens.discard(agen) # <<<<<<<<<<<<<< * if not self.is_closed(): * self.create_task(agen.aclose()) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_asyncgens, __pyx_n_s_discard); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_agen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_agen}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_agen}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_agen); __Pyx_GIVEREF(__pyx_v_agen); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_agen); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2496 * def _asyncgen_finalizer_hook(self, agen): * self._asyncgens.discard(agen) * if not self.is_closed(): # <<<<<<<<<<<<<< * self.create_task(agen.aclose()) * # Wake up the loop if the finalizer was called from */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2496, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 2496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((!__pyx_t_5) != 0); if (__pyx_t_6) { /* "uvloop/loop.pyx":2497 * self._asyncgens.discard(agen) * if not self.is_closed(): * self.create_task(agen.aclose()) # <<<<<<<<<<<<<< * # Wake up the loop if the finalizer was called from * # a different thread. */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_task); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_agen, __pyx_n_s_aclose); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2497, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2500 * # Wake up the loop if the finalizer was called from * # a different thread. * self.handler_async.send() # <<<<<<<<<<<<<< * * def _asyncgen_firstiter_hook(self, agen): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->handler_async->__pyx_base.__pyx_vtab)->send(__pyx_v_self->handler_async); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2496 * def _asyncgen_finalizer_hook(self, agen): * self._asyncgens.discard(agen) * if not self.is_closed(): # <<<<<<<<<<<<<< * self.create_task(agen.aclose()) * # Wake up the loop if the finalizer was called from */ } /* "uvloop/loop.pyx":2494 * return udp, protocol * * def _asyncgen_finalizer_hook(self, agen): # <<<<<<<<<<<<<< * self._asyncgens.discard(agen) * if not self.is_closed(): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.Loop._asyncgen_finalizer_hook", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2502 * self.handler_async.send() * * def _asyncgen_firstiter_hook(self, agen): # <<<<<<<<<<<<<< * if self._asyncgens_shutdown_called: * warnings_warn( */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_119_asyncgen_firstiter_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_118_asyncgen_firstiter_hook[] = "Loop._asyncgen_firstiter_hook(self, agen)"; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_119_asyncgen_firstiter_hook(PyObject *__pyx_v_self, PyObject *__pyx_v_agen) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_asyncgen_firstiter_hook (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_118_asyncgen_firstiter_hook(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_agen)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_118_asyncgen_firstiter_hook(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_agen) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_asyncgen_firstiter_hook", 0); /* "uvloop/loop.pyx":2503 * * def _asyncgen_firstiter_hook(self, agen): * if self._asyncgens_shutdown_called: # <<<<<<<<<<<<<< * warnings_warn( * "asynchronous generator {!r} was scheduled after " */ __pyx_t_1 = (__pyx_v_self->_asyncgens_shutdown_called != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2506 * warnings_warn( * "asynchronous generator {!r} was scheduled after " * "loop.shutdown_asyncgens() call".format(agen), # <<<<<<<<<<<<<< * ResourceWarning, source=self) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_asynchronous_generator_r_was_sch, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_agen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_agen}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_agen}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_agen); __Pyx_GIVEREF(__pyx_v_agen); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_agen); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/loop.pyx":2504 * def _asyncgen_firstiter_hook(self, agen): * if self._asyncgens_shutdown_called: * warnings_warn( # <<<<<<<<<<<<<< * "asynchronous generator {!r} was scheduled after " * "loop.shutdown_asyncgens() call".format(agen), */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 2504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_INCREF(__pyx_builtin_ResourceWarning); __Pyx_GIVEREF(__pyx_builtin_ResourceWarning); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_builtin_ResourceWarning); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2507 * "asynchronous generator {!r} was scheduled after " * "loop.shutdown_asyncgens() call".format(agen), * ResourceWarning, source=self) # <<<<<<<<<<<<<< * * self._asyncgens.add(agen) */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(1, 2507, __pyx_L1_error) /* "uvloop/loop.pyx":2504 * def _asyncgen_firstiter_hook(self, agen): * if self._asyncgens_shutdown_called: * warnings_warn( # <<<<<<<<<<<<<< * "asynchronous generator {!r} was scheduled after " * "loop.shutdown_asyncgens() call".format(agen), */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_warnings_warn, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2503 * * def _asyncgen_firstiter_hook(self, agen): * if self._asyncgens_shutdown_called: # <<<<<<<<<<<<<< * warnings_warn( * "asynchronous generator {!r} was scheduled after " */ } /* "uvloop/loop.pyx":2509 * ResourceWarning, source=self) * * self._asyncgens.add(agen) # <<<<<<<<<<<<<< * * async def shutdown_asyncgens(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_asyncgens, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_agen); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_agen}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_agen}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_agen); __Pyx_GIVEREF(__pyx_v_agen); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_agen); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2502 * self.handler_async.send() * * def _asyncgen_firstiter_hook(self, agen): # <<<<<<<<<<<<<< * if self._asyncgens_shutdown_called: * warnings_warn( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Loop._asyncgen_firstiter_hook", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_122generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2511 * self._asyncgens.add(agen) * * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<< * """Shutdown all active asynchronous generators.""" * self._asyncgens_shutdown_called = True */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_121shutdown_asyncgens(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4Loop_120shutdown_asyncgens[] = "Loop.shutdown_asyncgens(self)\nShutdown all active asynchronous generators."; static PyObject *__pyx_pw_6uvloop_4loop_4Loop_121shutdown_asyncgens(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown_asyncgens (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_120shutdown_asyncgens(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_120shutdown_asyncgens(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown_asyncgens", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2511, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_4Loop_122generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_shutdown_asyncgens, __pyx_n_s_Loop_shutdown_asyncgens, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2511, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Loop.shutdown_asyncgens", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_4Loop_122generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *(*__pyx_t_10)(PyObject *); PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L13_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2511, __pyx_L1_error) /* "uvloop/loop.pyx":2513 * async def shutdown_asyncgens(self): * """Shutdown all active asynchronous generators.""" * self._asyncgens_shutdown_called = True # <<<<<<<<<<<<<< * * if self._asyncgens is None or not len(self._asyncgens): */ __pyx_cur_scope->__pyx_v_self->_asyncgens_shutdown_called = 1; /* "uvloop/loop.pyx":2515 * self._asyncgens_shutdown_called = True * * if self._asyncgens is None or not len(self._asyncgens): # <<<<<<<<<<<<<< * # If Python version is <3.6 or we don't have any asynchronous * # generators alive. */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_asyncgens == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __pyx_cur_scope->__pyx_v_self->_asyncgens; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(1, 2515, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/loop.pyx":2518 * # If Python version is <3.6 or we don't have any asynchronous * # generators alive. * return # <<<<<<<<<<<<<< * * closing_agens = list(self._asyncgens) */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; goto __pyx_L0; /* "uvloop/loop.pyx":2515 * self._asyncgens_shutdown_called = True * * if self._asyncgens is None or not len(self._asyncgens): # <<<<<<<<<<<<<< * # If Python version is <3.6 or we don't have any asynchronous * # generators alive. */ } /* "uvloop/loop.pyx":2520 * return * * closing_agens = list(self._asyncgens) # <<<<<<<<<<<<<< * self._asyncgens.clear() * */ __pyx_t_4 = PySequence_List(__pyx_cur_scope->__pyx_v_self->_asyncgens); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_closing_agens = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2521 * * closing_agens = list(self._asyncgens) * self._asyncgens.clear() # <<<<<<<<<<<<<< * * shutdown_coro = aio_gather( */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->_asyncgens, __pyx_n_s_clear); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2521, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2523 * self._asyncgens.clear() * * shutdown_coro = aio_gather( # <<<<<<<<<<<<<< * *[ag.aclose() for ag in closing_agens], * return_exceptions=True, */ { /* enter inner scope */ PyObject *__pyx_8genexpr4__pyx_v_ag = NULL; /* "uvloop/loop.pyx":2524 * * shutdown_coro = aio_gather( * *[ag.aclose() for ag in closing_agens], # <<<<<<<<<<<<<< * return_exceptions=True, * loop=self) */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2524, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_v_closing_agens; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2524, __pyx_L9_error) #else __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2524, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_ag, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr4__pyx_v_ag, __pyx_n_s_aclose); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2524, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_9) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2524, __pyx_L9_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2524, __pyx_L9_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(1, 2524, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_ag); goto __pyx_L12_exit_scope; __pyx_L9_error:; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_ag); goto __pyx_L1_error; __pyx_L12_exit_scope:; } /* exit inner scope */ /* "uvloop/loop.pyx":2523 * self._asyncgens.clear() * * shutdown_coro = aio_gather( # <<<<<<<<<<<<<< * *[ag.aclose() for ag in closing_agens], * return_exceptions=True, */ __pyx_t_6 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2525 * shutdown_coro = aio_gather( * *[ag.aclose() for ag in closing_agens], * return_exceptions=True, # <<<<<<<<<<<<<< * loop=self) * */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_return_exceptions, Py_True) < 0) __PYX_ERR(1, 2525, __pyx_L1_error) /* "uvloop/loop.pyx":2526 * *[ag.aclose() for ag in closing_agens], * return_exceptions=True, * loop=self) # <<<<<<<<<<<<<< * * results = await shutdown_coro */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, ((PyObject *)__pyx_cur_scope->__pyx_v_self)) < 0) __PYX_ERR(1, 2525, __pyx_L1_error) /* "uvloop/loop.pyx":2523 * self._asyncgens.clear() * * shutdown_coro = aio_gather( # <<<<<<<<<<<<<< * *[ag.aclose() for ag in closing_agens], * return_exceptions=True, */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_shutdown_coro = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/loop.pyx":2528 * loop=self) * * results = await shutdown_coro # <<<<<<<<<<<<<< * for result, agen in zip(results, closing_agens): * if isinstance(result, Exception): */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_shutdown_coro); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L13_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2528, __pyx_L1_error) __pyx_t_7 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_7 = NULL; if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_7) < 0) __PYX_ERR(1, 2528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_results = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/loop.pyx":2529 * * results = await shutdown_coro * for result, agen in zip(results, closing_agens): # <<<<<<<<<<<<<< * if isinstance(result, Exception): * self.call_exception_handler({ */ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_results); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_results); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_results); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_closing_agens); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_closing_agens); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_closing_agens); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; __pyx_t_10 = NULL; } else { __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 2529, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2529, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 2529, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(1, 2529, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(1, 2529, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(1, 2529, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(1, 2529, __pyx_L1_error) __pyx_L17_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_result); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_result, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_agen); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_agen, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/loop.pyx":2530 * results = await shutdown_coro * for result, agen in zip(results, closing_agens): * if isinstance(result, Exception): # <<<<<<<<<<<<<< * self.call_exception_handler({ * 'message': 'an error occurred during closing of ' */ __pyx_t_1 = __Pyx_PyException_Check(__pyx_cur_scope->__pyx_v_result); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/loop.pyx":2531 * for result, agen in zip(results, closing_agens): * if isinstance(result, Exception): * self.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'an error occurred during closing of ' * 'asynchronous generator {!r}'.format(agen), */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "uvloop/loop.pyx":2532 * if isinstance(result, Exception): * self.call_exception_handler({ * 'message': 'an error occurred during closing of ' # <<<<<<<<<<<<<< * 'asynchronous generator {!r}'.format(agen), * 'exception': result, */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 2532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/loop.pyx":2533 * self.call_exception_handler({ * 'message': 'an error occurred during closing of ' * 'asynchronous generator {!r}'.format(agen), # <<<<<<<<<<<<<< * 'exception': result, * 'asyncgen': agen */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_an_error_occurred_during_closing, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_13) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_cur_scope->__pyx_v_agen); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_cur_scope->__pyx_v_agen}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_cur_scope->__pyx_v_agen}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_agen); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_agen); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_cur_scope->__pyx_v_agen); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 2533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_message, __pyx_t_9) < 0) __PYX_ERR(1, 2532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/loop.pyx":2534 * 'message': 'an error occurred during closing of ' * 'asynchronous generator {!r}'.format(agen), * 'exception': result, # <<<<<<<<<<<<<< * 'asyncgen': agen * }) */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_exception, __pyx_cur_scope->__pyx_v_result) < 0) __PYX_ERR(1, 2532, __pyx_L1_error) /* "uvloop/loop.pyx":2536 * 'exception': result, * 'asyncgen': agen * }) # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_asyncgen, __pyx_cur_scope->__pyx_v_agen) < 0) __PYX_ERR(1, 2532, __pyx_L1_error) __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2530 * results = await shutdown_coro * for result, agen in zip(results, closing_agens): * if isinstance(result, Exception): # <<<<<<<<<<<<<< * self.call_exception_handler({ * 'message': 'an error occurred during closing of ' */ } /* "uvloop/loop.pyx":2529 * * results = await shutdown_coro * for result, agen in zip(results, closing_agens): # <<<<<<<<<<<<<< * if isinstance(result, Exception): * self.call_exception_handler({ */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/loop.pyx":2511 * self._asyncgens.add(agen) * * async def shutdown_asyncgens(self): # <<<<<<<<<<<<<< * """Shutdown all active asynchronous generators.""" * self._asyncgens_shutdown_called = True */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("shutdown_asyncgens", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":38 * bint _coroutine_wrapper_set * * public slow_callback_duration # <<<<<<<<<<<<<< * * readonly bint _closed */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->slow_callback_duration); __pyx_r = __pyx_v_self->slow_callback_duration; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_2__set__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->slow_callback_duration); __Pyx_DECREF(__pyx_v_self->slow_callback_duration); __pyx_v_self->slow_callback_duration = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_4Loop_22slow_callback_duration_4__del__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->slow_callback_duration); __Pyx_DECREF(__pyx_v_self->slow_callback_duration); __pyx_v_self->slow_callback_duration = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":40 * public slow_callback_duration * * readonly bint _closed # <<<<<<<<<<<<<< * bint _debug * bint _running */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_7_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":81 * * # DEBUG fields * readonly bint _debug_cc # True when compiled with DEBUG. # <<<<<<<<<<<<<< * # Only for unittests. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_9_debug_cc___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_debug_cc); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_cc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":84 * # Only for unittests. * * readonly object _debug_handles_total # <<<<<<<<<<<<<< * readonly object _debug_handles_closed * readonly object _debug_handles_current */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_20_debug_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_debug_handles_total); __pyx_r = __pyx_v_self->_debug_handles_total; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":85 * * readonly object _debug_handles_total * readonly object _debug_handles_closed # <<<<<<<<<<<<<< * readonly object _debug_handles_current * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_debug_handles_closed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_debug_handles_closed); __pyx_r = __pyx_v_self->_debug_handles_closed; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":86 * readonly object _debug_handles_total * readonly object _debug_handles_closed * readonly object _debug_handles_current # <<<<<<<<<<<<<< * * readonly uint64_t _debug_uv_handles_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_22_debug_handles_current___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_debug_handles_current); __pyx_r = __pyx_v_self->_debug_handles_current; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":88 * readonly object _debug_handles_current * * readonly uint64_t _debug_uv_handles_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_uv_handles_freed * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_uv_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":89 * * readonly uint64_t _debug_uv_handles_total * readonly uint64_t _debug_uv_handles_freed # <<<<<<<<<<<<<< * * readonly uint64_t _debug_cb_handles_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_uv_handles_freed___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_uv_handles_freed); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_uv_handles_freed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":91 * readonly uint64_t _debug_uv_handles_freed * * readonly uint64_t _debug_cb_handles_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_cb_handles_count * readonly uint64_t _debug_cb_timer_handles_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":92 * * readonly uint64_t _debug_cb_handles_total * readonly uint64_t _debug_cb_handles_count # <<<<<<<<<<<<<< * readonly uint64_t _debug_cb_timer_handles_total * readonly uint64_t _debug_cb_timer_handles_count */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_debug_cb_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_handles_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_handles_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":93 * readonly uint64_t _debug_cb_handles_total * readonly uint64_t _debug_cb_handles_count * readonly uint64_t _debug_cb_timer_handles_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_cb_timer_handles_count * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_timer_handles_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":94 * readonly uint64_t _debug_cb_handles_count * readonly uint64_t _debug_cb_timer_handles_total * readonly uint64_t _debug_cb_timer_handles_count # <<<<<<<<<<<<<< * * readonly uint64_t _debug_stream_shutdown_errors_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_cb_timer_handles_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_cb_timer_handles_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":96 * readonly uint64_t _debug_cb_timer_handles_count * * readonly uint64_t _debug_stream_shutdown_errors_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_listen_errors_total * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_shutdown_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_shutdown_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":97 * * readonly uint64_t _debug_stream_shutdown_errors_total * readonly uint64_t _debug_stream_listen_errors_total # <<<<<<<<<<<<<< * * readonly uint64_t _debug_stream_read_cb_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_listen_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_listen_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":99 * readonly uint64_t _debug_stream_listen_errors_total * * readonly uint64_t _debug_stream_read_cb_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_read_cb_errors_total * readonly uint64_t _debug_stream_read_eof_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_cb_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":100 * * readonly uint64_t _debug_stream_read_cb_total * readonly uint64_t _debug_stream_read_cb_errors_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_read_eof_total * readonly uint64_t _debug_stream_read_eof_cb_errors_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":101 * readonly uint64_t _debug_stream_read_cb_total * readonly uint64_t _debug_stream_read_cb_errors_total * readonly uint64_t _debug_stream_read_eof_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_read_eof_cb_errors_total * readonly uint64_t _debug_stream_read_errors_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_eof_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":102 * readonly uint64_t _debug_stream_read_cb_errors_total * readonly uint64_t _debug_stream_read_eof_total * readonly uint64_t _debug_stream_read_eof_cb_errors_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_read_errors_total * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_eof_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_eof_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":103 * readonly uint64_t _debug_stream_read_eof_total * readonly uint64_t _debug_stream_read_eof_cb_errors_total * readonly uint64_t _debug_stream_read_errors_total # <<<<<<<<<<<<<< * * readonly uint64_t _debug_stream_write_tries */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_read_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_read_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":105 * readonly uint64_t _debug_stream_read_errors_total * * readonly uint64_t _debug_stream_write_tries # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_write_errors_total * readonly uint64_t _debug_stream_write_ctx_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_25_debug_stream_write_tries___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_tries); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_tries.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":106 * * readonly uint64_t _debug_stream_write_tries * readonly uint64_t _debug_stream_write_errors_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_write_ctx_total * readonly uint64_t _debug_stream_write_ctx_cnt */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":107 * readonly uint64_t _debug_stream_write_tries * readonly uint64_t _debug_stream_write_errors_total * readonly uint64_t _debug_stream_write_ctx_total # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_write_ctx_cnt * readonly uint64_t _debug_stream_write_cb_errors_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_ctx_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":108 * readonly uint64_t _debug_stream_write_errors_total * readonly uint64_t _debug_stream_write_ctx_total * readonly uint64_t _debug_stream_write_ctx_cnt # <<<<<<<<<<<<<< * readonly uint64_t _debug_stream_write_cb_errors_total * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_ctx_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_ctx_cnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":109 * readonly uint64_t _debug_stream_write_ctx_total * readonly uint64_t _debug_stream_write_ctx_cnt * readonly uint64_t _debug_stream_write_cb_errors_total # <<<<<<<<<<<<<< * * readonly uint64_t _poll_read_events_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_stream_write_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_stream_write_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":111 * readonly uint64_t _debug_stream_write_cb_errors_total * * readonly uint64_t _poll_read_events_total # <<<<<<<<<<<<<< * readonly uint64_t _poll_read_cb_errors_total * readonly uint64_t _poll_write_events_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_23_poll_read_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_events_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._poll_read_events_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":112 * * readonly uint64_t _poll_read_events_total * readonly uint64_t _poll_read_cb_errors_total # <<<<<<<<<<<<<< * readonly uint64_t _poll_write_events_total * readonly uint64_t _poll_write_cb_errors_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_read_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._poll_read_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":113 * readonly uint64_t _poll_read_events_total * readonly uint64_t _poll_read_cb_errors_total * readonly uint64_t _poll_write_events_total # <<<<<<<<<<<<<< * readonly uint64_t _poll_write_cb_errors_total * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_24_poll_write_events_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_events_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._poll_write_events_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":114 * readonly uint64_t _poll_read_cb_errors_total * readonly uint64_t _poll_write_events_total * readonly uint64_t _poll_write_cb_errors_total # <<<<<<<<<<<<<< * * readonly uint64_t _sock_try_write_total */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_poll_write_cb_errors_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._poll_write_cb_errors_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":116 * readonly uint64_t _poll_write_cb_errors_total * * readonly uint64_t _sock_try_write_total # <<<<<<<<<<<<<< * * readonly uint64_t _debug_exception_handler_cnt */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_21_sock_try_write_total___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_sock_try_write_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._sock_try_write_total.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pxd":118 * readonly uint64_t _sock_try_write_total * * readonly uint64_t _debug_exception_handler_cnt # <<<<<<<<<<<<<< * * cdef _init_debug_fields(self) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt___get__(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_debug_exception_handler_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Loop._debug_exception_handler_cnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2539 * * * cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle, # <<<<<<<<<<<<<< * size_t suggested_size, * uv.uv_buf_t* buf) with gil: */ static void __pyx_f_6uvloop_4loop___loop_alloc_buffer(uv_handle_t *__pyx_v_uvhandle, CYTHON_UNUSED size_t __pyx_v_suggested_size, uv_buf_t *__pyx_v_buf) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; char *__pyx_t_3; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__loop_alloc_buffer", 0); /* "uvloop/loop.pyx":2543 * uv.uv_buf_t* buf) with gil: * cdef: * Loop loop = (uvhandle.data)._loop # <<<<<<<<<<<<<< * * if loop._recv_buffer_in_use == 1: */ __pyx_t_1 = ((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_uvhandle->data)->_loop); __Pyx_INCREF(__pyx_t_1); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":2545 * Loop loop = (uvhandle.data)._loop * * if loop._recv_buffer_in_use == 1: # <<<<<<<<<<<<<< * buf.len = 0 * exc = RuntimeError('concurrent allocations') */ __pyx_t_2 = ((__pyx_v_loop->_recv_buffer_in_use == 1) != 0); if (__pyx_t_2) { /* "uvloop/loop.pyx":2546 * * if loop._recv_buffer_in_use == 1: * buf.len = 0 # <<<<<<<<<<<<<< * exc = RuntimeError('concurrent allocations') * loop._handle_exception(exc) */ __pyx_v_buf->len = 0; /* "uvloop/loop.pyx":2547 * if loop._recv_buffer_in_use == 1: * buf.len = 0 * exc = RuntimeError('concurrent allocations') # <<<<<<<<<<<<<< * loop._handle_exception(exc) * return */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/loop.pyx":2548 * buf.len = 0 * exc = RuntimeError('concurrent allocations') * loop._handle_exception(exc) # <<<<<<<<<<<<<< * return * */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_exc); /* "uvloop/loop.pyx":2549 * exc = RuntimeError('concurrent allocations') * loop._handle_exception(exc) * return # <<<<<<<<<<<<<< * * loop._recv_buffer_in_use = 1 */ goto __pyx_L0; /* "uvloop/loop.pyx":2545 * Loop loop = (uvhandle.data)._loop * * if loop._recv_buffer_in_use == 1: # <<<<<<<<<<<<<< * buf.len = 0 * exc = RuntimeError('concurrent allocations') */ } /* "uvloop/loop.pyx":2551 * return * * loop._recv_buffer_in_use = 1 # <<<<<<<<<<<<<< * buf.base = loop._recv_buffer * buf.len = sizeof(loop._recv_buffer) */ __pyx_v_loop->_recv_buffer_in_use = 1; /* "uvloop/loop.pyx":2552 * * loop._recv_buffer_in_use = 1 * buf.base = loop._recv_buffer # <<<<<<<<<<<<<< * buf.len = sizeof(loop._recv_buffer) * */ __pyx_t_3 = __pyx_v_loop->_recv_buffer; __pyx_v_buf->base = __pyx_t_3; /* "uvloop/loop.pyx":2553 * loop._recv_buffer_in_use = 1 * buf.base = loop._recv_buffer * buf.len = sizeof(loop._recv_buffer) # <<<<<<<<<<<<<< * * */ __pyx_v_buf->len = (sizeof(__pyx_v_loop->_recv_buffer)); /* "uvloop/loop.pyx":2539 * * * cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle, # <<<<<<<<<<<<<< * size_t suggested_size, * uv.uv_buf_t* buf) with gil: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_WriteUnraisable("uvloop.loop.__loop_alloc_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/loop.pyx":2556 * * * cdef inline void __loop_free_buffer(Loop loop): # <<<<<<<<<<<<<< * loop._recv_buffer_in_use = 0 * */ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___loop_free_buffer(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__loop_free_buffer", 0); /* "uvloop/loop.pyx":2557 * * cdef inline void __loop_free_buffer(Loop loop): * loop._recv_buffer_in_use = 0 # <<<<<<<<<<<<<< * * */ __pyx_v_loop->_recv_buffer_in_use = 0; /* "uvloop/loop.pyx":2556 * * * cdef inline void __loop_free_buffer(Loop loop): # <<<<<<<<<<<<<< * loop._recv_buffer_in_use = 0 * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "uvloop/cbhandles.pyx":4 * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class Handle: * def __cinit__(self): # <<<<<<<<<<<<<< * self.cancelled = 0 * self.cb_type = 0 */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_6Handle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_6Handle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_6Handle___cinit__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_6Handle___cinit__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/cbhandles.pyx":5 * cdef class Handle: * def __cinit__(self): * self.cancelled = 0 # <<<<<<<<<<<<<< * self.cb_type = 0 * self._source_traceback = None */ __pyx_v_self->cancelled = 0; /* "uvloop/cbhandles.pyx":6 * def __cinit__(self): * self.cancelled = 0 * self.cb_type = 0 # <<<<<<<<<<<<<< * self._source_traceback = None * */ __pyx_v_self->cb_type = 0; /* "uvloop/cbhandles.pyx":7 * self.cancelled = 0 * self.cb_type = 0 * self._source_traceback = None # <<<<<<<<<<<<<< * * cdef inline _set_loop(self, Loop loop): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = Py_None; /* "uvloop/cbhandles.pyx":4 * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class Handle: * def __cinit__(self): # <<<<<<<<<<<<<< * self.cancelled = 0 * self.cb_type = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":9 * self._source_traceback = None * * cdef inline _set_loop(self, Loop loop): # <<<<<<<<<<<<<< * self.loop = loop * if UVLOOP_DEBUG: */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__set_loop(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_set_loop", 0); /* "uvloop/cbhandles.pyx":10 * * cdef inline _set_loop(self, Loop loop): * self.loop = loop # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_cb_handles_total += 1 */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->loop)); __pyx_v_self->loop = __pyx_v_loop; /* "uvloop/cbhandles.pyx":11 * cdef inline _set_loop(self, Loop loop): * self.loop = loop * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_cb_handles_total += 1 * loop._debug_cb_handles_count += 1 */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":12 * self.loop = loop * if UVLOOP_DEBUG: * loop._debug_cb_handles_total += 1 # <<<<<<<<<<<<<< * loop._debug_cb_handles_count += 1 * if loop._debug: */ __pyx_v_loop->_debug_cb_handles_total = (__pyx_v_loop->_debug_cb_handles_total + 1); /* "uvloop/cbhandles.pyx":13 * if UVLOOP_DEBUG: * loop._debug_cb_handles_total += 1 * loop._debug_cb_handles_count += 1 # <<<<<<<<<<<<<< * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) */ __pyx_v_loop->_debug_cb_handles_count = (__pyx_v_loop->_debug_cb_handles_count + 1); /* "uvloop/cbhandles.pyx":11 * cdef inline _set_loop(self, Loop loop): * self.loop = loop * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_cb_handles_total += 1 * loop._debug_cb_handles_count += 1 */ } /* "uvloop/cbhandles.pyx":14 * loop._debug_cb_handles_total += 1 * loop._debug_cb_handles_count += 1 * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * */ __pyx_t_1 = (__pyx_v_loop->_debug != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":15 * loop._debug_cb_handles_count += 1 * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_extract_stack); __pyx_t_4 = __pyx_v_6uvloop_4loop_tb_extract_stack; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":14 * loop._debug_cb_handles_total += 1 * loop._debug_cb_handles_count += 1 * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * */ } /* "uvloop/cbhandles.pyx":9 * self._source_traceback = None * * cdef inline _set_loop(self, Loop loop): # <<<<<<<<<<<<<< * self.loop = loop * if UVLOOP_DEBUG: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.Handle._set_loop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":17 * self._source_traceback = tb_extract_stack(sys_getframe(0)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG and self.loop is not None: * self.loop._debug_cb_handles_count -= 1 */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_6Handle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/cbhandles.pyx":18 * * def __dealloc__(self): * if UVLOOP_DEBUG and self.loop is not None: # <<<<<<<<<<<<<< * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (((PyObject *)__pyx_v_self->loop) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":19 * def __dealloc__(self): * if UVLOOP_DEBUG and self.loop is not None: * self.loop._debug_cb_handles_count -= 1 # <<<<<<<<<<<<<< * if self.loop is None: * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') */ __Pyx_INCREF(((PyObject *)__pyx_v_self->loop)); __pyx_t_4 = __pyx_v_self->loop; __pyx_t_4->_debug_cb_handles_count = (__pyx_t_4->_debug_cb_handles_count - 1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "uvloop/cbhandles.pyx":18 * * def __dealloc__(self): * if UVLOOP_DEBUG and self.loop is not None: # <<<<<<<<<<<<<< * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: */ } /* "uvloop/cbhandles.pyx":20 * if UVLOOP_DEBUG and self.loop is not None: * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: # <<<<<<<<<<<<<< * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') * */ __pyx_t_1 = (((PyObject *)__pyx_v_self->loop) == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":21 * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(8, 21, __pyx_L1_error) /* "uvloop/cbhandles.pyx":20 * if UVLOOP_DEBUG and self.loop is not None: * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: # <<<<<<<<<<<<<< * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') * */ } /* "uvloop/cbhandles.pyx":17 * self._source_traceback = tb_extract_stack(sys_getframe(0)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG and self.loop is not None: * self.loop._debug_cb_handles_count -= 1 */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(((PyObject *)__pyx_t_4)); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("uvloop.loop.Handle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/cbhandles.pyx":23 * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') * * def __init__(self): # <<<<<<<<<<<<<< * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_6Handle_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_6Handle_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_4__init__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_6Handle_4__init__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "uvloop/cbhandles.pyx":25 * def __init__(self): * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/cbhandles.pyx":26 * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * cdef inline _run(self): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":24 * * def __init__(self): * raise TypeError( # <<<<<<<<<<<<<< * '{} is not supposed to be instantiated from Python'.format( * self.__class__.__name__)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(8, 24, __pyx_L1_error) /* "uvloop/cbhandles.pyx":23 * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') * * def __init__(self): # <<<<<<<<<<<<<< * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Handle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":28 * self.__class__.__name__)) * * cdef inline _run(self): # <<<<<<<<<<<<<< * cdef: * int cb_type */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6Handle__run(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { int __pyx_v_cb_type; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_context = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; char const *__pyx_t_22; __Pyx_RefNannySetupContext("_run", 0); /* "uvloop/cbhandles.pyx":33 * object callback * * if self.cancelled: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (__pyx_v_self->cancelled != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":34 * * if self.cancelled: * return # <<<<<<<<<<<<<< * * cb_type = self.cb_type */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/cbhandles.pyx":33 * object callback * * if self.cancelled: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/cbhandles.pyx":36 * return * * cb_type = self.cb_type # <<<<<<<<<<<<<< * * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, */ __pyx_t_2 = __pyx_v_self->cb_type; __pyx_v_cb_type = __pyx_t_2; /* "uvloop/cbhandles.pyx":38 * cb_type = self.cb_type * * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, # <<<<<<<<<<<<<< * # we guard 'self' manually (since the callback * # might cause GC of the handle.) */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/cbhandles.pyx":41 * # we guard 'self' manually (since the callback * # might cause GC of the handle.) * try: # <<<<<<<<<<<<<< * if cb_type == 1: * callback = self.arg1 */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/cbhandles.pyx":42 * # might cause GC of the handle.) * try: * if cb_type == 1: # <<<<<<<<<<<<<< * callback = self.arg1 * args = self.arg2 */ switch (__pyx_v_cb_type) { case 1: /* "uvloop/cbhandles.pyx":43 * try: * if cb_type == 1: * callback = self.arg1 # <<<<<<<<<<<<<< * args = self.arg2 * */ __pyx_t_6 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_6); __pyx_v_callback = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/cbhandles.pyx":44 * if cb_type == 1: * callback = self.arg1 * args = self.arg2 # <<<<<<<<<<<<<< * * if args is None: */ __pyx_t_6 = __pyx_v_self->arg2; __Pyx_INCREF(__pyx_t_6); __pyx_v_args = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/cbhandles.pyx":46 * args = self.arg2 * * if args is None: # <<<<<<<<<<<<<< * callback() * else: */ __pyx_t_1 = (__pyx_v_args == Py_None); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "uvloop/cbhandles.pyx":47 * * if args is None: * callback() # <<<<<<<<<<<<<< * else: * callback(*args) */ __Pyx_INCREF(__pyx_v_callback); __pyx_t_8 = __pyx_v_callback; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_9) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 47, __pyx_L7_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 47, __pyx_L7_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/cbhandles.pyx":46 * args = self.arg2 * * if args is None: # <<<<<<<<<<<<<< * callback() * else: */ goto __pyx_L15; } /* "uvloop/cbhandles.pyx":49 * callback() * else: * callback(*args) # <<<<<<<<<<<<<< * * elif cb_type == 2: */ /*else*/ { __pyx_t_6 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 49, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 49, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L15:; /* "uvloop/cbhandles.pyx":42 * # might cause GC of the handle.) * try: * if cb_type == 1: # <<<<<<<<<<<<<< * callback = self.arg1 * args = self.arg2 */ break; /* "uvloop/cbhandles.pyx":51 * callback(*args) * * elif cb_type == 2: # <<<<<<<<<<<<<< * (self.callback)(self.arg1) * */ case 2: /* "uvloop/cbhandles.pyx":52 * * elif cb_type == 2: * (self.callback)(self.arg1) # <<<<<<<<<<<<<< * * elif cb_type == 3: */ __pyx_t_8 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = ((__pyx_t_6uvloop_4loop_method_t)__pyx_v_self->callback)(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 52, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/cbhandles.pyx":51 * callback(*args) * * elif cb_type == 2: # <<<<<<<<<<<<<< * (self.callback)(self.arg1) * */ break; /* "uvloop/cbhandles.pyx":54 * (self.callback)(self.arg1) * * elif cb_type == 3: # <<<<<<<<<<<<<< * (self.callback)(self.arg1, self.arg2) * */ case 3: /* "uvloop/cbhandles.pyx":55 * * elif cb_type == 3: * (self.callback)(self.arg1, self.arg2) # <<<<<<<<<<<<<< * * elif cb_type == 4: */ __pyx_t_6 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = __pyx_v_self->arg2; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = ((__pyx_t_6uvloop_4loop_method1_t)__pyx_v_self->callback)(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 55, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/cbhandles.pyx":54 * (self.callback)(self.arg1) * * elif cb_type == 3: # <<<<<<<<<<<<<< * (self.callback)(self.arg1, self.arg2) * */ break; /* "uvloop/cbhandles.pyx":57 * (self.callback)(self.arg1, self.arg2) * * elif cb_type == 4: # <<<<<<<<<<<<<< * (self.callback)(self.arg1, self.arg2, self.arg3) * */ case 4: /* "uvloop/cbhandles.pyx":58 * * elif cb_type == 4: * (self.callback)(self.arg1, self.arg2, self.arg3) # <<<<<<<<<<<<<< * * elif cb_type == 5: */ __pyx_t_9 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_9); __pyx_t_8 = __pyx_v_self->arg2; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = __pyx_v_self->arg3; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = ((__pyx_t_6uvloop_4loop_method2_t)__pyx_v_self->callback)(__pyx_t_9, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 58, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/cbhandles.pyx":57 * (self.callback)(self.arg1, self.arg2) * * elif cb_type == 4: # <<<<<<<<<<<<<< * (self.callback)(self.arg1, self.arg2, self.arg3) * */ break; /* "uvloop/cbhandles.pyx":60 * (self.callback)(self.arg1, self.arg2, self.arg3) * * elif cb_type == 5: # <<<<<<<<<<<<<< * (self.callback)( * self.arg1, self.arg2, self.arg3, self.arg4) */ case 5: /* "uvloop/cbhandles.pyx":62 * elif cb_type == 5: * (self.callback)( * self.arg1, self.arg2, self.arg3, self.arg4) # <<<<<<<<<<<<<< * * else: */ __pyx_t_10 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_10); __pyx_t_6 = __pyx_v_self->arg2; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = __pyx_v_self->arg3; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = __pyx_v_self->arg4; __Pyx_INCREF(__pyx_t_9); /* "uvloop/cbhandles.pyx":61 * * elif cb_type == 5: * (self.callback)( # <<<<<<<<<<<<<< * self.arg1, self.arg2, self.arg3, self.arg4) * */ __pyx_t_11 = ((__pyx_t_6uvloop_4loop_method3_t)__pyx_v_self->callback)(__pyx_t_10, __pyx_t_6, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 61, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/cbhandles.pyx":60 * (self.callback)(self.arg1, self.arg2, self.arg3) * * elif cb_type == 5: # <<<<<<<<<<<<<< * (self.callback)( * self.arg1, self.arg2, self.arg3, self.arg4) */ break; default: /* "uvloop/cbhandles.pyx":65 * * else: * raise RuntimeError('invalid Handle.cb_type: {}'.format( # <<<<<<<<<<<<<< * cb_type)) * */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_Handle_cb_type, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); /* "uvloop/cbhandles.pyx":66 * else: * raise RuntimeError('invalid Handle.cb_type: {}'.format( * cb_type)) # <<<<<<<<<<<<<< * * except Exception as ex: */ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_cb_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 66, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (!__pyx_t_6) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/cbhandles.pyx":65 * * else: * raise RuntimeError('invalid Handle.cb_type: {}'.format( # <<<<<<<<<<<<<< * cb_type)) * */ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 65, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(8, 65, __pyx_L7_error) break; } /* "uvloop/cbhandles.pyx":41 * # we guard 'self' manually (since the callback * # might cause GC of the handle.) * try: # <<<<<<<<<<<<<< * if cb_type == 1: * callback = self.arg1 */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/cbhandles.pyx":68 * cb_type)) * * except Exception as ex: # <<<<<<<<<<<<<< * if cb_type == 1: * msg = 'Exception in callback {}'.format(callback) */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_2) { __Pyx_AddTraceback("uvloop.loop.Handle._run", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(8, 68, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_v_ex = __pyx_t_9; /*try:*/ { /* "uvloop/cbhandles.pyx":69 * * except Exception as ex: * if cb_type == 1: # <<<<<<<<<<<<<< * msg = 'Exception in callback {}'.format(callback) * else: */ __pyx_t_7 = ((__pyx_v_cb_type == 1) != 0); if (__pyx_t_7) { /* "uvloop/cbhandles.pyx":70 * except Exception as ex: * if cb_type == 1: * msg = 'Exception in callback {}'.format(callback) # <<<<<<<<<<<<<< * else: * msg = 'Exception in callback {}'.format(self.meth_name) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(!__pyx_v_callback)) { __Pyx_RaiseUnboundLocalError("callback"); __PYX_ERR(8, 70, __pyx_L21_error) } __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_12) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_callback); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_callback}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_callback}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_callback); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 70, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_msg = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/cbhandles.pyx":69 * * except Exception as ex: * if cb_type == 1: # <<<<<<<<<<<<<< * msg = 'Exception in callback {}'.format(callback) * else: */ goto __pyx_L23; } /* "uvloop/cbhandles.pyx":72 * msg = 'Exception in callback {}'.format(callback) * else: * msg = 'Exception in callback {}'.format(self.meth_name) # <<<<<<<<<<<<<< * * context = { */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_13) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->meth_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_self->meth_name}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_self->meth_name}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_v_self->meth_name); __Pyx_GIVEREF(__pyx_v_self->meth_name); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_self->meth_name); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 72, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_msg = __pyx_t_8; __pyx_t_8 = 0; } __pyx_L23:; /* "uvloop/cbhandles.pyx":75 * * context = { * 'message': msg, # <<<<<<<<<<<<<< * 'exception': ex, * 'handle': self, */ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 75, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(8, 75, __pyx_L21_error) /* "uvloop/cbhandles.pyx":76 * context = { * 'message': msg, * 'exception': ex, # <<<<<<<<<<<<<< * 'handle': self, * } */ if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(8, 75, __pyx_L21_error) /* "uvloop/cbhandles.pyx":77 * 'message': msg, * 'exception': ex, * 'handle': self, # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_handle, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(8, 75, __pyx_L21_error) __pyx_v_context = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/cbhandles.pyx":80 * } * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * context['source_traceback'] = self._source_traceback * */ __pyx_t_7 = (__pyx_v_self->_source_traceback != Py_None); __pyx_t_1 = (__pyx_t_7 != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":81 * * if self._source_traceback is not None: * context['source_traceback'] = self._source_traceback # <<<<<<<<<<<<<< * * self.loop.call_exception_handler(context) */ __pyx_t_8 = __pyx_v_self->_source_traceback; __Pyx_INCREF(__pyx_t_8); if (unlikely(PyDict_SetItem(__pyx_v_context, __pyx_n_u_source_traceback, __pyx_t_8) < 0)) __PYX_ERR(8, 81, __pyx_L21_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/cbhandles.pyx":80 * } * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * context['source_traceback'] = self._source_traceback * */ } /* "uvloop/cbhandles.pyx":83 * context['source_traceback'] = self._source_traceback * * self.loop.call_exception_handler(context) # <<<<<<<<<<<<<< * * finally: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_12) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_context); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_context}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_context}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_context); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 83, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } /* "uvloop/cbhandles.pyx":68 * cb_type)) * * except Exception as ex: # <<<<<<<<<<<<<< * if cb_type == 1: * msg = 'Exception in callback {}'.format(callback) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L22; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L21_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_2 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L9_except_error; } __pyx_L22:; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/cbhandles.pyx":41 * # we guard 'self' manually (since the callback * # might cause GC of the handle.) * try: # <<<<<<<<<<<<<< * if cb_type == 1: * callback = self.arg1 */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L5_error; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L14_try_end:; } } /* "uvloop/cbhandles.pyx":86 * * finally: * Py_DECREF(self) # <<<<<<<<<<<<<< * * cdef _cancel(self): */ /*finally:*/ { /*normal exit:*/{ Py_DECREF(((PyObject *)__pyx_v_self)); goto __pyx_L6; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L5_error:; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_14 = __pyx_lineno; __pyx_t_2 = __pyx_clineno; __pyx_t_22 = __pyx_filename; { Py_DECREF(((PyObject *)__pyx_v_self)); } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_2; __pyx_filename = __pyx_t_22; goto __pyx_L1_error; } __pyx_L6:; } /* "uvloop/cbhandles.pyx":28 * self.__class__.__name__)) * * cdef inline _run(self): # <<<<<<<<<<<<<< * cdef: * int cb_type */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.Handle._run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_context); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":88 * Py_DECREF(self) * * cdef _cancel(self): # <<<<<<<<<<<<<< * self.cancelled = 1 * self.callback = NULL */ static PyObject *__pyx_f_6uvloop_4loop_6Handle__cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cancel", 0); /* "uvloop/cbhandles.pyx":89 * * cdef _cancel(self): * self.cancelled = 1 # <<<<<<<<<<<<<< * self.callback = NULL * self.arg2 = self.arg3 = self.arg4 = None */ __pyx_v_self->cancelled = 1; /* "uvloop/cbhandles.pyx":90 * cdef _cancel(self): * self.cancelled = 1 * self.callback = NULL # <<<<<<<<<<<<<< * self.arg2 = self.arg3 = self.arg4 = None * */ __pyx_v_self->callback = NULL; /* "uvloop/cbhandles.pyx":91 * self.cancelled = 1 * self.callback = NULL * self.arg2 = self.arg3 = self.arg4 = None # <<<<<<<<<<<<<< * * # Public API */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arg2); __Pyx_DECREF(__pyx_v_self->arg2); __pyx_v_self->arg2 = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arg3); __Pyx_DECREF(__pyx_v_self->arg3); __pyx_v_self->arg3 = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->arg4); __Pyx_DECREF(__pyx_v_self->arg4); __pyx_v_self->arg4 = Py_None; /* "uvloop/cbhandles.pyx":88 * Py_DECREF(self) * * cdef _cancel(self): # <<<<<<<<<<<<<< * self.cancelled = 1 * self.callback = NULL */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":95 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * info = [self.__class__.__name__] * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Handle_7__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_6Handle_7__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_6__repr__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Handle_6__repr__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { PyObject *__pyx_v_info = NULL; PyObject *__pyx_v_func = NULL; PyObject *__pyx_v_cb_name = NULL; PyObject *__pyx_v_frame = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/cbhandles.pyx":96 * * def __repr__(self): * info = [self.__class__.__name__] # <<<<<<<<<<<<<< * * if self.cancelled: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_v_info = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":98 * info = [self.__class__.__name__] * * if self.cancelled: # <<<<<<<<<<<<<< * info.append('cancelled') * */ __pyx_t_3 = (__pyx_v_self->cancelled != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":99 * * if self.cancelled: * info.append('cancelled') # <<<<<<<<<<<<<< * * if self.cb_type == 1: */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_n_u_cancelled); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 99, __pyx_L1_error) /* "uvloop/cbhandles.pyx":98 * info = [self.__class__.__name__] * * if self.cancelled: # <<<<<<<<<<<<<< * info.append('cancelled') * */ } /* "uvloop/cbhandles.pyx":101 * info.append('cancelled') * * if self.cb_type == 1: # <<<<<<<<<<<<<< * func = self.arg1 * if hasattr(func, '__qualname__'): */ __pyx_t_3 = ((__pyx_v_self->cb_type == 1) != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":102 * * if self.cb_type == 1: * func = self.arg1 # <<<<<<<<<<<<<< * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') */ __pyx_t_1 = __pyx_v_self->arg1; __Pyx_INCREF(__pyx_t_1); __pyx_v_func = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":103 * if self.cb_type == 1: * func = self.arg1 * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): */ __pyx_t_3 = PyObject_HasAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(8, 103, __pyx_L1_error) __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "uvloop/cbhandles.pyx":104 * func = self.arg1 * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') # <<<<<<<<<<<<<< * elif hasattr(func, '__name__'): * cb_name = getattr(func, '__name__') */ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":103 * if self.cb_type == 1: * func = self.arg1 * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): */ goto __pyx_L5; } /* "uvloop/cbhandles.pyx":105 * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__name__') * else: */ __pyx_t_5 = PyObject_HasAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(8, 105, __pyx_L1_error) __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":106 * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): * cb_name = getattr(func, '__name__') # <<<<<<<<<<<<<< * else: * cb_name = repr(func) */ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":105 * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__name__') * else: */ goto __pyx_L5; } /* "uvloop/cbhandles.pyx":108 * cb_name = getattr(func, '__name__') * else: * cb_name = repr(func) # <<<<<<<<<<<<<< * * info.append(cb_name) */ /*else*/ { __pyx_t_1 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L5:; /* "uvloop/cbhandles.pyx":110 * cb_name = repr(func) * * info.append(cb_name) # <<<<<<<<<<<<<< * else: * info.append(self.meth_name) */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_v_cb_name); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 110, __pyx_L1_error) /* "uvloop/cbhandles.pyx":101 * info.append('cancelled') * * if self.cb_type == 1: # <<<<<<<<<<<<<< * func = self.arg1 * if hasattr(func, '__qualname__'): */ goto __pyx_L4; } /* "uvloop/cbhandles.pyx":112 * info.append(cb_name) * else: * info.append(self.meth_name) # <<<<<<<<<<<<<< * * if self._source_traceback is not None: */ /*else*/ { __pyx_t_1 = __pyx_v_self->meth_name; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; /* "uvloop/cbhandles.pyx":114 * info.append(self.meth_name) * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) */ __pyx_t_3 = (__pyx_v_self->_source_traceback != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "uvloop/cbhandles.pyx":115 * * if self._source_traceback is not None: * frame = self._source_traceback[-1] # <<<<<<<<<<<<<< * info.append('created at {}:{}'.format(frame[0], frame[1])) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->_source_traceback, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_frame = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":116 * if self._source_traceback is not None: * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) # <<<<<<<<<<<<<< * * return '<' + ' '.join(info) + '>' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_created_at, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_frame, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_frame, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":114 * info.append(self.meth_name) * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) */ } /* "uvloop/cbhandles.pyx":118 * info.append('created at {}:{}'.format(frame[0], frame[1])) * * return '<' + ' '.join(info) + '>' # <<<<<<<<<<<<<< * * def cancel(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__112, __pyx_v_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__111, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__113); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/cbhandles.pyx":95 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * info = [self.__class__.__name__] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.Handle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_info); __Pyx_XDECREF(__pyx_v_func); __Pyx_XDECREF(__pyx_v_cb_name); __Pyx_XDECREF(__pyx_v_frame); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":120 * return '<' + ' '.join(info) + '>' * * def cancel(self): # <<<<<<<<<<<<<< * self._cancel() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Handle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_6Handle_8cancel[] = "Handle.cancel(self)"; static PyObject *__pyx_pw_6uvloop_4loop_6Handle_9cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_8cancel(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Handle_8cancel(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("cancel", 0); /* "uvloop/cbhandles.pyx":121 * * def cancel(self): * self._cancel() # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":120 * return '<' + ' '.join(info) + '>' * * def cancel(self): # <<<<<<<<<<<<<< * self._cancel() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Handle.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pxd":13 * object __weakref__ * * readonly _source_traceback # <<<<<<<<<<<<<< * * cdef inline _set_loop(self, Loop loop) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Handle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_source_traceback); __pyx_r = __pyx_v_self->_source_traceback; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":127 * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class TimerHandle: * def __cinit__(self, Loop loop, object callback, object args, # <<<<<<<<<<<<<< * uint64_t delay): * */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_args = 0; uint64_t __pyx_v_delay; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_callback,&__pyx_n_s_args,&__pyx_n_s_delay,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); __PYX_ERR(8, 127, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); __PYX_ERR(8, 127, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delay)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); __PYX_ERR(8, 127, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(8, 127, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); __pyx_v_callback = values[1]; __pyx_v_args = values[2]; __pyx_v_delay = __Pyx_PyInt_As_uint64_t(values[3]); if (unlikely((__pyx_v_delay == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(8, 128, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 127, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.TimerHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(8, 127, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self), __pyx_v_loop, __pyx_v_callback, __pyx_v_args, __pyx_v_delay); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_11TimerHandle___cinit__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args, uint64_t __pyx_v_delay) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/cbhandles.pyx":130 * uint64_t delay): * * self.loop = loop # <<<<<<<<<<<<<< * self.callback = callback * self.args = args */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->loop)); __pyx_v_self->loop = __pyx_v_loop; /* "uvloop/cbhandles.pyx":131 * * self.loop = loop * self.callback = callback # <<<<<<<<<<<<<< * self.args = args * self.closed = 0 */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_self->callback); __Pyx_DECREF(__pyx_v_self->callback); __pyx_v_self->callback = __pyx_v_callback; /* "uvloop/cbhandles.pyx":132 * self.loop = loop * self.callback = callback * self.args = args # <<<<<<<<<<<<<< * self.closed = 0 * */ __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); __Pyx_GOTREF(__pyx_v_self->args); __Pyx_DECREF(__pyx_v_self->args); __pyx_v_self->args = __pyx_v_args; /* "uvloop/cbhandles.pyx":133 * self.callback = callback * self.args = args * self.closed = 0 # <<<<<<<<<<<<<< * * if loop._debug: */ __pyx_v_self->closed = 0; /* "uvloop/cbhandles.pyx":135 * self.closed = 0 * * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * */ __pyx_t_1 = (__pyx_v_loop->_debug != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":136 * * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * * self.timer = UVTimer.new( */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_extract_stack); __pyx_t_4 = __pyx_v_6uvloop_4loop_tb_extract_stack; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":135 * self.closed = 0 * * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * */ } /* "uvloop/cbhandles.pyx":138 * self._source_traceback = tb_extract_stack(sys_getframe(0)) * * self.timer = UVTimer.new( # <<<<<<<<<<<<<< * loop, self._run, self, delay) * */ __pyx_t_2 = ((PyObject *)__pyx_f_6uvloop_4loop_7UVTimer_new(__pyx_v_loop, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *)__pyx_v_self->__pyx_vtab)->_run), ((PyObject *)__pyx_v_self), __pyx_v_delay)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->timer); __Pyx_DECREF(((PyObject *)__pyx_v_self->timer)); __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":141 * loop, self._run, self, delay) * * self.timer.start() # <<<<<<<<<<<<<< * * # Only add to loop._timers when `self.timer` is successfully created */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->start(__pyx_v_self->timer); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":144 * * # Only add to loop._timers when `self.timer` is successfully created * loop._timers.add(self) # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ if (unlikely(__pyx_v_loop->_timers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); __PYX_ERR(8, 144, __pyx_L1_error) } __pyx_t_7 = PySet_Add(__pyx_v_loop->_timers, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(8, 144, __pyx_L1_error) /* "uvloop/cbhandles.pyx":146 * loop._timers.add(self) * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self.loop._debug_cb_timer_handles_total += 1 * self.loop._debug_cb_timer_handles_count += 1 */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":147 * * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_total += 1 # <<<<<<<<<<<<<< * self.loop._debug_cb_timer_handles_count += 1 * */ __Pyx_INCREF(((PyObject *)__pyx_v_self->loop)); __pyx_t_8 = __pyx_v_self->loop; __pyx_t_8->_debug_cb_timer_handles_total = (__pyx_t_8->_debug_cb_timer_handles_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/cbhandles.pyx":148 * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_total += 1 * self.loop._debug_cb_timer_handles_count += 1 # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_INCREF(((PyObject *)__pyx_v_self->loop)); __pyx_t_8 = __pyx_v_self->loop; __pyx_t_8->_debug_cb_timer_handles_count = (__pyx_t_8->_debug_cb_timer_handles_count + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/cbhandles.pyx":146 * loop._timers.add(self) * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self.loop._debug_cb_timer_handles_total += 1 * self.loop._debug_cb_timer_handles_count += 1 */ } /* "uvloop/cbhandles.pyx":127 * @cython.freelist(DEFAULT_FREELIST_SIZE) * cdef class TimerHandle: * def __cinit__(self, Loop loop, object callback, object args, # <<<<<<<<<<<<<< * uint64_t delay): * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __Pyx_AddTraceback("uvloop.loop.TimerHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":150 * self.loop._debug_cb_timer_handles_count += 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_count -= 1 */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_11TimerHandle_2__dealloc__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/cbhandles.pyx":151 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":152 * def __dealloc__(self): * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_count -= 1 # <<<<<<<<<<<<<< * if self.closed == 0: * raise RuntimeError('active TimerHandle is deallacating') */ __Pyx_INCREF(((PyObject *)__pyx_v_self->loop)); __pyx_t_2 = __pyx_v_self->loop; __pyx_t_2->_debug_cb_timer_handles_count = (__pyx_t_2->_debug_cb_timer_handles_count - 1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":151 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: */ } /* "uvloop/cbhandles.pyx":153 * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: # <<<<<<<<<<<<<< * raise RuntimeError('active TimerHandle is deallacating') * */ __pyx_t_1 = ((__pyx_v_self->closed == 0) != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":154 * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: * raise RuntimeError('active TimerHandle is deallacating') # <<<<<<<<<<<<<< * * cdef _cancel(self): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(8, 154, __pyx_L1_error) /* "uvloop/cbhandles.pyx":153 * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: # <<<<<<<<<<<<<< * raise RuntimeError('active TimerHandle is deallacating') * */ } /* "uvloop/cbhandles.pyx":150 * self.loop._debug_cb_timer_handles_count += 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * self.loop._debug_cb_timer_handles_count -= 1 */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(((PyObject *)__pyx_t_2)); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("uvloop.loop.TimerHandle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/cbhandles.pyx":156 * raise RuntimeError('active TimerHandle is deallacating') * * cdef _cancel(self): # <<<<<<<<<<<<<< * if self.closed == 1: * return */ static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_cancel", 0); /* "uvloop/cbhandles.pyx":157 * * cdef _cancel(self): * if self.closed == 1: # <<<<<<<<<<<<<< * return * self.closed = 1 */ __pyx_t_1 = ((__pyx_v_self->closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":158 * cdef _cancel(self): * if self.closed == 1: * return # <<<<<<<<<<<<<< * self.closed = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/cbhandles.pyx":157 * * cdef _cancel(self): * if self.closed == 1: # <<<<<<<<<<<<<< * return * self.closed = 1 */ } /* "uvloop/cbhandles.pyx":159 * if self.closed == 1: * return * self.closed = 1 # <<<<<<<<<<<<<< * * self.callback = None */ __pyx_v_self->closed = 1; /* "uvloop/cbhandles.pyx":161 * self.closed = 1 * * self.callback = None # <<<<<<<<<<<<<< * self.args = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->callback); __Pyx_DECREF(__pyx_v_self->callback); __pyx_v_self->callback = Py_None; /* "uvloop/cbhandles.pyx":162 * * self.callback = None * self.args = None # <<<<<<<<<<<<<< * * try: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->args); __Pyx_DECREF(__pyx_v_self->args); __pyx_v_self->args = Py_None; /* "uvloop/cbhandles.pyx":164 * self.args = None * * try: # <<<<<<<<<<<<<< * self.loop._timers.remove(self) * finally: */ /*try:*/ { /* "uvloop/cbhandles.pyx":165 * * try: * self.loop._timers.remove(self) # <<<<<<<<<<<<<< * finally: * self.timer._close() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->loop->_timers, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 165, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/cbhandles.pyx":167 * self.loop._timers.remove(self) * finally: * self.timer._close() # <<<<<<<<<<<<<< * self.timer = None # let it die asap * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->timer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":168 * finally: * self.timer._close() * self.timer = None # let it die asap # <<<<<<<<<<<<<< * * cdef _run(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->timer); __Pyx_DECREF(((PyObject *)__pyx_v_self->timer)); __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None); goto __pyx_L6; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L5_error:; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { /* "uvloop/cbhandles.pyx":167 * self.loop._timers.remove(self) * finally: * self.timer._close() # <<<<<<<<<<<<<< * self.timer = None # let it die asap * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->timer->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self->timer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 167, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":168 * finally: * self.timer._close() * self.timer = None # let it die asap # <<<<<<<<<<<<<< * * cdef _run(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->timer); __Pyx_DECREF(((PyObject *)__pyx_v_self->timer)); __pyx_v_self->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None); } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; __pyx_L8_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; goto __pyx_L1_error; } __pyx_L6:; } /* "uvloop/cbhandles.pyx":156 * raise RuntimeError('active TimerHandle is deallacating') * * cdef _cancel(self): # <<<<<<<<<<<<<< * if self.closed == 1: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.TimerHandle._cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":170 * self.timer = None # let it die asap * * cdef _run(self): # <<<<<<<<<<<<<< * if self.closed == 1: * return */ static PyObject *__pyx_f_6uvloop_4loop_11TimerHandle__run(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { PyObject *__pyx_v_callback = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_started = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_context = NULL; PyObject *__pyx_v_delta = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; char const *__pyx_t_23; __Pyx_RefNannySetupContext("_run", 0); /* "uvloop/cbhandles.pyx":171 * * cdef _run(self): * if self.closed == 1: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":172 * cdef _run(self): * if self.closed == 1: * return # <<<<<<<<<<<<<< * * callback = self.callback */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/cbhandles.pyx":171 * * cdef _run(self): * if self.closed == 1: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/cbhandles.pyx":174 * return * * callback = self.callback # <<<<<<<<<<<<<< * args = self.args * self._cancel() */ __pyx_t_2 = __pyx_v_self->callback; __Pyx_INCREF(__pyx_t_2); __pyx_v_callback = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":175 * * callback = self.callback * args = self.args # <<<<<<<<<<<<<< * self._cancel() * */ __pyx_t_2 = __pyx_v_self->args; __Pyx_INCREF(__pyx_t_2); __pyx_v_args = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":176 * callback = self.callback * args = self.args * self._cancel() # <<<<<<<<<<<<<< * * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":178 * self._cancel() * * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, # <<<<<<<<<<<<<< * # we guard 'self' manually. * if self.loop._debug: */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/cbhandles.pyx":180 * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, * # we guard 'self' manually. * if self.loop._debug: # <<<<<<<<<<<<<< * started = time_monotonic() * try: */ __pyx_t_1 = (__pyx_v_self->loop->_debug != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":181 * # we guard 'self' manually. * if self.loop._debug: * started = time_monotonic() # <<<<<<<<<<<<<< * try: * if args is not None: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic); __pyx_t_3 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 181, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_started = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":180 * Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, * # we guard 'self' manually. * if self.loop._debug: # <<<<<<<<<<<<<< * started = time_monotonic() * try: */ } /* "uvloop/cbhandles.pyx":182 * if self.loop._debug: * started = time_monotonic() * try: # <<<<<<<<<<<<<< * if args is not None: * callback(*args) */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/cbhandles.pyx":183 * started = time_monotonic() * try: * if args is not None: # <<<<<<<<<<<<<< * callback(*args) * else: */ __pyx_t_1 = (__pyx_v_args != Py_None); __pyx_t_8 = (__pyx_t_1 != 0); if (__pyx_t_8) { /* "uvloop/cbhandles.pyx":184 * try: * if args is not None: * callback(*args) # <<<<<<<<<<<<<< * else: * callback() */ __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 184, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 184, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/cbhandles.pyx":183 * started = time_monotonic() * try: * if args is not None: # <<<<<<<<<<<<<< * callback(*args) * else: */ goto __pyx_L16; } /* "uvloop/cbhandles.pyx":186 * callback(*args) * else: * callback() # <<<<<<<<<<<<<< * except Exception as ex: * context = { */ /*else*/ { __Pyx_INCREF(__pyx_v_callback); __pyx_t_2 = __pyx_v_callback; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 186, __pyx_L8_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 186, __pyx_L8_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L16:; /* "uvloop/cbhandles.pyx":182 * if self.loop._debug: * started = time_monotonic() * try: # <<<<<<<<<<<<<< * if args is not None: * callback(*args) */ } /* "uvloop/cbhandles.pyx":199 * self.loop.call_exception_handler(context) * else: * if self.loop._debug: # <<<<<<<<<<<<<< * delta = time_monotonic() - started * if delta > self.loop.slow_callback_duration: */ /*else:*/ { __pyx_t_8 = (__pyx_v_self->loop->_debug != 0); if (__pyx_t_8) { /* "uvloop/cbhandles.pyx":200 * else: * if self.loop._debug: * delta = time_monotonic() - started # <<<<<<<<<<<<<< * if delta > self.loop.slow_callback_duration: * aio_logger.warning( */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_time_monotonic); __pyx_t_2 = __pyx_v_6uvloop_4loop_time_monotonic; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 200, __pyx_L10_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 200, __pyx_L10_except_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_v_started)) { __Pyx_RaiseUnboundLocalError("started"); __PYX_ERR(8, 200, __pyx_L10_except_error) } __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_v_started); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 200, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_delta = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":201 * if self.loop._debug: * delta = time_monotonic() - started * if delta > self.loop.slow_callback_duration: # <<<<<<<<<<<<<< * aio_logger.warning( * 'Executing %r took %.3f seconds', */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_delta, __pyx_v_self->loop->slow_callback_duration, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 201, __pyx_L10_except_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(8, 201, __pyx_L10_except_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { /* "uvloop/cbhandles.pyx":202 * delta = time_monotonic() - started * if delta > self.loop.slow_callback_duration: * aio_logger.warning( # <<<<<<<<<<<<<< * 'Executing %r took %.3f seconds', * self, delta) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 202, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/cbhandles.pyx":204 * aio_logger.warning( * 'Executing %r took %.3f seconds', * self, delta) # <<<<<<<<<<<<<< * finally: * Py_DECREF(self) */ __pyx_t_4 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_self), __pyx_v_delta}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 202, __pyx_L10_except_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_Executing_r_took_3f_seconds, ((PyObject *)__pyx_v_self), __pyx_v_delta}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 202, __pyx_L10_except_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 202, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_u_Executing_r_took_3f_seconds); __Pyx_GIVEREF(__pyx_kp_u_Executing_r_took_3f_seconds); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_u_Executing_r_took_3f_seconds); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_delta); __Pyx_GIVEREF(__pyx_v_delta); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_delta); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 202, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/cbhandles.pyx":201 * if self.loop._debug: * delta = time_monotonic() - started * if delta > self.loop.slow_callback_duration: # <<<<<<<<<<<<<< * aio_logger.warning( * 'Executing %r took %.3f seconds', */ } /* "uvloop/cbhandles.pyx":199 * self.loop.call_exception_handler(context) * else: * if self.loop._debug: # <<<<<<<<<<<<<< * delta = time_monotonic() - started * if delta > self.loop.slow_callback_duration: */ } } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/cbhandles.pyx":187 * else: * callback() * except Exception as ex: # <<<<<<<<<<<<<< * context = { * 'message': 'Exception in callback {}'.format(callback), */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.TimerHandle._run", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(8, 187, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_v_ex = __pyx_t_3; /*try:*/ { /* "uvloop/cbhandles.pyx":189 * except Exception as ex: * context = { * 'message': 'Exception in callback {}'.format(callback), # <<<<<<<<<<<<<< * 'exception': ex, * 'handle': self, */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Exception_in_callback, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_13) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_callback); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_callback}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_callback}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_callback); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_t_11) < 0) __PYX_ERR(8, 189, __pyx_L24_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/cbhandles.pyx":190 * context = { * 'message': 'Exception in callback {}'.format(callback), * 'exception': ex, # <<<<<<<<<<<<<< * 'handle': self, * } */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_exception, __pyx_v_ex) < 0) __PYX_ERR(8, 189, __pyx_L24_error) /* "uvloop/cbhandles.pyx":191 * 'message': 'Exception in callback {}'.format(callback), * 'exception': ex, * 'handle': self, # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_handle, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(8, 189, __pyx_L24_error) __pyx_v_context = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/cbhandles.pyx":194 * } * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * context['source_traceback'] = self._source_traceback * */ __pyx_t_8 = (__pyx_v_self->_source_traceback != Py_None); __pyx_t_1 = (__pyx_t_8 != 0); if (__pyx_t_1) { /* "uvloop/cbhandles.pyx":195 * * if self._source_traceback is not None: * context['source_traceback'] = self._source_traceback # <<<<<<<<<<<<<< * * self.loop.call_exception_handler(context) */ __pyx_t_4 = __pyx_v_self->_source_traceback; __Pyx_INCREF(__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_v_context, __pyx_n_u_source_traceback, __pyx_t_4) < 0)) __PYX_ERR(8, 195, __pyx_L24_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/cbhandles.pyx":194 * } * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * context['source_traceback'] = self._source_traceback * */ } /* "uvloop/cbhandles.pyx":197 * context['source_traceback'] = self._source_traceback * * self.loop.call_exception_handler(context) # <<<<<<<<<<<<<< * else: * if self.loop._debug: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_12) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_context}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_context}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_context); __Pyx_GIVEREF(__pyx_v_context); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_context); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 197, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "uvloop/cbhandles.pyx":187 * else: * callback() * except Exception as ex: # <<<<<<<<<<<<<< * context = { * 'message': 'Exception in callback {}'.format(callback), */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L25; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L24_error:; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_9 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L10_except_error; } __pyx_L25:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; /* "uvloop/cbhandles.pyx":182 * if self.loop._debug: * started = time_monotonic() * try: # <<<<<<<<<<<<<< * if args is not None: * callback(*args) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L6_error; __pyx_L9_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L15_try_end:; } } /* "uvloop/cbhandles.pyx":206 * self, delta) * finally: * Py_DECREF(self) # <<<<<<<<<<<<<< * * # Public API */ /*finally:*/ { /*normal exit:*/{ Py_DECREF(((PyObject *)__pyx_v_self)); goto __pyx_L7; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L6_error:; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_15 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { Py_DECREF(((PyObject *)__pyx_v_self)); } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_23; goto __pyx_L1_error; } __pyx_L7:; } /* "uvloop/cbhandles.pyx":170 * self.timer = None # let it die asap * * cdef _run(self): # <<<<<<<<<<<<<< * if self.closed == 1: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("uvloop.loop.TimerHandle._run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_started); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_context); __Pyx_XDECREF(__pyx_v_delta); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":210 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * info = [self.__class__.__name__] * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_4__repr__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { PyObject *__pyx_v_info = NULL; PyObject *__pyx_v_func = NULL; PyObject *__pyx_v_cb_name = NULL; PyObject *__pyx_v_frame = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/cbhandles.pyx":211 * * def __repr__(self): * info = [self.__class__.__name__] # <<<<<<<<<<<<<< * * if self.closed: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_v_info = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":213 * info = [self.__class__.__name__] * * if self.closed: # <<<<<<<<<<<<<< * info.append('cancelled') * */ __pyx_t_3 = (__pyx_v_self->closed != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":214 * * if self.closed: * info.append('cancelled') # <<<<<<<<<<<<<< * * func = self.callback */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_n_u_cancelled); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 214, __pyx_L1_error) /* "uvloop/cbhandles.pyx":213 * info = [self.__class__.__name__] * * if self.closed: # <<<<<<<<<<<<<< * info.append('cancelled') * */ } /* "uvloop/cbhandles.pyx":216 * info.append('cancelled') * * func = self.callback # <<<<<<<<<<<<<< * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') */ __pyx_t_1 = __pyx_v_self->callback; __Pyx_INCREF(__pyx_t_1); __pyx_v_func = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":217 * * func = self.callback * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): */ __pyx_t_3 = PyObject_HasAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(8, 217, __pyx_L1_error) __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "uvloop/cbhandles.pyx":218 * func = self.callback * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') # <<<<<<<<<<<<<< * elif hasattr(func, '__name__'): * cb_name = getattr(func, '__name__') */ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_qualname); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":217 * * func = self.callback * if hasattr(func, '__qualname__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): */ goto __pyx_L4; } /* "uvloop/cbhandles.pyx":219 * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__name__') * else: */ __pyx_t_5 = PyObject_HasAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(8, 219, __pyx_L1_error) __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { /* "uvloop/cbhandles.pyx":220 * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): * cb_name = getattr(func, '__name__') # <<<<<<<<<<<<<< * else: * cb_name = repr(func) */ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_func, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":219 * if hasattr(func, '__qualname__'): * cb_name = getattr(func, '__qualname__') * elif hasattr(func, '__name__'): # <<<<<<<<<<<<<< * cb_name = getattr(func, '__name__') * else: */ goto __pyx_L4; } /* "uvloop/cbhandles.pyx":222 * cb_name = getattr(func, '__name__') * else: * cb_name = repr(func) # <<<<<<<<<<<<<< * * info.append(cb_name) */ /*else*/ { __pyx_t_1 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb_name = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "uvloop/cbhandles.pyx":224 * cb_name = repr(func) * * info.append(cb_name) # <<<<<<<<<<<<<< * * if self._source_traceback is not None: */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_v_cb_name); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 224, __pyx_L1_error) /* "uvloop/cbhandles.pyx":226 * info.append(cb_name) * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) */ __pyx_t_3 = (__pyx_v_self->_source_traceback != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "uvloop/cbhandles.pyx":227 * * if self._source_traceback is not None: * frame = self._source_traceback[-1] # <<<<<<<<<<<<<< * info.append('created at {}:{}'.format(frame[0], frame[1])) * */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->_source_traceback, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_frame = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":228 * if self._source_traceback is not None: * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) # <<<<<<<<<<<<<< * * return '<' + ' '.join(info) + '>' */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_created_at, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_frame, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_frame, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(8, 228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":226 * info.append(cb_name) * * if self._source_traceback is not None: # <<<<<<<<<<<<<< * frame = self._source_traceback[-1] * info.append('created at {}:{}'.format(frame[0], frame[1])) */ } /* "uvloop/cbhandles.pyx":230 * info.append('created at {}:{}'.format(frame[0], frame[1])) * * return '<' + ' '.join(info) + '>' # <<<<<<<<<<<<<< * * def cancel(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__112, __pyx_v_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u__111, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__113); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/cbhandles.pyx":210 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * info = [self.__class__.__name__] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.TimerHandle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_info); __Pyx_XDECREF(__pyx_v_func); __Pyx_XDECREF(__pyx_v_cb_name); __Pyx_XDECREF(__pyx_v_frame); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":232 * return '<' + ' '.join(info) + '>' * * def cancel(self): # <<<<<<<<<<<<<< * self._cancel() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_7cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_11TimerHandle_6cancel[] = "TimerHandle.cancel(self)"; static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_7cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_6cancel(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_6cancel(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("cancel", 0); /* "uvloop/cbhandles.pyx":233 * * def cancel(self): * self._cancel() # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":232 * return '<' + ' '.join(info) + '>' * * def cancel(self): # <<<<<<<<<<<<<< * self._cancel() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TimerHandle.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pxd":28 * object __weakref__ * * readonly _source_traceback # <<<<<<<<<<<<<< * * cdef _run(self) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_TimerHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_11TimerHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_source_traceback); __pyx_r = __pyx_v_self->_source_traceback; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":236 * * * cdef new_Handle(Loop loop, object callback, object args): # <<<<<<<<<<<<<< * cdef Handle handle * handle = Handle.__new__(Handle) */ static PyObject *__pyx_f_6uvloop_4loop_new_Handle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new_Handle", 0); /* "uvloop/cbhandles.pyx":238 * cdef new_Handle(Loop loop, object callback, object args): * cdef Handle handle * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<< * handle._set_loop(loop) * */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle)))) __PYX_ERR(8, 238, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":239 * cdef Handle handle * handle = Handle.__new__(Handle) * handle._set_loop(loop) # <<<<<<<<<<<<<< * * handle.cb_type = 1 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":241 * handle._set_loop(loop) * * handle.cb_type = 1 # <<<<<<<<<<<<<< * * handle.arg1 = callback */ __pyx_v_handle->cb_type = 1; /* "uvloop/cbhandles.pyx":243 * handle.cb_type = 1 * * handle.arg1 = callback # <<<<<<<<<<<<<< * handle.arg2 = args * */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_handle->arg1); __Pyx_DECREF(__pyx_v_handle->arg1); __pyx_v_handle->arg1 = __pyx_v_callback; /* "uvloop/cbhandles.pyx":244 * * handle.arg1 = callback * handle.arg2 = args # <<<<<<<<<<<<<< * * return handle */ __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); __Pyx_GOTREF(__pyx_v_handle->arg2); __Pyx_DECREF(__pyx_v_handle->arg2); __pyx_v_handle->arg2 = __pyx_v_args; /* "uvloop/cbhandles.pyx":246 * handle.arg2 = args * * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/cbhandles.pyx":236 * * * cdef new_Handle(Loop loop, object callback, object args): # <<<<<<<<<<<<<< * cdef Handle handle * handle = Handle.__new__(Handle) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.new_Handle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":249 * * * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef Handle handle * handle = Handle.__new__(Handle) */ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new_MethodHandle", 0); /* "uvloop/cbhandles.pyx":251 * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): * cdef Handle handle * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<< * handle._set_loop(loop) * */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle)))) __PYX_ERR(8, 251, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":252 * cdef Handle handle * handle = Handle.__new__(Handle) * handle._set_loop(loop) # <<<<<<<<<<<<<< * * handle.cb_type = 2 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":254 * handle._set_loop(loop) * * handle.cb_type = 2 # <<<<<<<<<<<<<< * handle.meth_name = name * */ __pyx_v_handle->cb_type = 2; /* "uvloop/cbhandles.pyx":255 * * handle.cb_type = 2 * handle.meth_name = name # <<<<<<<<<<<<<< * * handle.callback = callback */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_handle->meth_name); __Pyx_DECREF(__pyx_v_handle->meth_name); __pyx_v_handle->meth_name = __pyx_v_name; /* "uvloop/cbhandles.pyx":257 * handle.meth_name = name * * handle.callback = callback # <<<<<<<<<<<<<< * handle.arg1 = ctx * */ __pyx_v_handle->callback = ((void *)__pyx_v_callback); /* "uvloop/cbhandles.pyx":258 * * handle.callback = callback * handle.arg1 = ctx # <<<<<<<<<<<<<< * * return handle */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_handle->arg1); __Pyx_DECREF(__pyx_v_handle->arg1); __pyx_v_handle->arg1 = __pyx_v_ctx; /* "uvloop/cbhandles.pyx":260 * handle.arg1 = ctx * * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/cbhandles.pyx":249 * * * cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef Handle handle * handle = Handle.__new__(Handle) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.new_MethodHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":263 * * * cdef new_MethodHandle1(Loop loop, str name, method1_t callback, # <<<<<<<<<<<<<< * object ctx, object arg): * */ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle1(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method1_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new_MethodHandle1", 0); /* "uvloop/cbhandles.pyx":267 * * cdef Handle handle * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<< * handle._set_loop(loop) * */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle)))) __PYX_ERR(8, 267, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":268 * cdef Handle handle * handle = Handle.__new__(Handle) * handle._set_loop(loop) # <<<<<<<<<<<<<< * * handle.cb_type = 3 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":270 * handle._set_loop(loop) * * handle.cb_type = 3 # <<<<<<<<<<<<<< * handle.meth_name = name * */ __pyx_v_handle->cb_type = 3; /* "uvloop/cbhandles.pyx":271 * * handle.cb_type = 3 * handle.meth_name = name # <<<<<<<<<<<<<< * * handle.callback = callback */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_handle->meth_name); __Pyx_DECREF(__pyx_v_handle->meth_name); __pyx_v_handle->meth_name = __pyx_v_name; /* "uvloop/cbhandles.pyx":273 * handle.meth_name = name * * handle.callback = callback # <<<<<<<<<<<<<< * handle.arg1 = ctx * handle.arg2 = arg */ __pyx_v_handle->callback = ((void *)__pyx_v_callback); /* "uvloop/cbhandles.pyx":274 * * handle.callback = callback * handle.arg1 = ctx # <<<<<<<<<<<<<< * handle.arg2 = arg * */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_handle->arg1); __Pyx_DECREF(__pyx_v_handle->arg1); __pyx_v_handle->arg1 = __pyx_v_ctx; /* "uvloop/cbhandles.pyx":275 * handle.callback = callback * handle.arg1 = ctx * handle.arg2 = arg # <<<<<<<<<<<<<< * * return handle */ __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); __Pyx_GOTREF(__pyx_v_handle->arg2); __Pyx_DECREF(__pyx_v_handle->arg2); __pyx_v_handle->arg2 = __pyx_v_arg; /* "uvloop/cbhandles.pyx":277 * handle.arg2 = arg * * return handle # <<<<<<<<<<<<<< * * cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/cbhandles.pyx":263 * * * cdef new_MethodHandle1(Loop loop, str name, method1_t callback, # <<<<<<<<<<<<<< * object ctx, object arg): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.new_MethodHandle1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":279 * return handle * * cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, # <<<<<<<<<<<<<< * object arg1, object arg2): * */ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle2(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method2_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new_MethodHandle2", 0); /* "uvloop/cbhandles.pyx":283 * * cdef Handle handle * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<< * handle._set_loop(loop) * */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle)))) __PYX_ERR(8, 283, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":284 * cdef Handle handle * handle = Handle.__new__(Handle) * handle._set_loop(loop) # <<<<<<<<<<<<<< * * handle.cb_type = 4 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":286 * handle._set_loop(loop) * * handle.cb_type = 4 # <<<<<<<<<<<<<< * handle.meth_name = name * */ __pyx_v_handle->cb_type = 4; /* "uvloop/cbhandles.pyx":287 * * handle.cb_type = 4 * handle.meth_name = name # <<<<<<<<<<<<<< * * handle.callback = callback */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_handle->meth_name); __Pyx_DECREF(__pyx_v_handle->meth_name); __pyx_v_handle->meth_name = __pyx_v_name; /* "uvloop/cbhandles.pyx":289 * handle.meth_name = name * * handle.callback = callback # <<<<<<<<<<<<<< * handle.arg1 = ctx * handle.arg2 = arg1 */ __pyx_v_handle->callback = ((void *)__pyx_v_callback); /* "uvloop/cbhandles.pyx":290 * * handle.callback = callback * handle.arg1 = ctx # <<<<<<<<<<<<<< * handle.arg2 = arg1 * handle.arg3 = arg2 */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_handle->arg1); __Pyx_DECREF(__pyx_v_handle->arg1); __pyx_v_handle->arg1 = __pyx_v_ctx; /* "uvloop/cbhandles.pyx":291 * handle.callback = callback * handle.arg1 = ctx * handle.arg2 = arg1 # <<<<<<<<<<<<<< * handle.arg3 = arg2 * */ __Pyx_INCREF(__pyx_v_arg1); __Pyx_GIVEREF(__pyx_v_arg1); __Pyx_GOTREF(__pyx_v_handle->arg2); __Pyx_DECREF(__pyx_v_handle->arg2); __pyx_v_handle->arg2 = __pyx_v_arg1; /* "uvloop/cbhandles.pyx":292 * handle.arg1 = ctx * handle.arg2 = arg1 * handle.arg3 = arg2 # <<<<<<<<<<<<<< * * return handle */ __Pyx_INCREF(__pyx_v_arg2); __Pyx_GIVEREF(__pyx_v_arg2); __Pyx_GOTREF(__pyx_v_handle->arg3); __Pyx_DECREF(__pyx_v_handle->arg3); __pyx_v_handle->arg3 = __pyx_v_arg2; /* "uvloop/cbhandles.pyx":294 * handle.arg3 = arg2 * * return handle # <<<<<<<<<<<<<< * * cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/cbhandles.pyx":279 * return handle * * cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, # <<<<<<<<<<<<<< * object arg1, object arg2): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.new_MethodHandle2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/cbhandles.pyx":296 * return handle * * cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, # <<<<<<<<<<<<<< * object arg1, object arg2, object arg3): * */ static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle3(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method3_t __pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2, PyObject *__pyx_v_arg3) { struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_handle = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new_MethodHandle3", 0); /* "uvloop/cbhandles.pyx":300 * * cdef Handle handle * handle = Handle.__new__(Handle) # <<<<<<<<<<<<<< * handle._set_loop(loop) * */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_Handle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_Handle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_Handle)))) __PYX_ERR(8, 300, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":301 * cdef Handle handle * handle = Handle.__new__(Handle) * handle._set_loop(loop) # <<<<<<<<<<<<<< * * handle.cb_type = 5 */ __pyx_t_1 = __pyx_f_6uvloop_4loop_6Handle__set_loop(__pyx_v_handle, __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/cbhandles.pyx":303 * handle._set_loop(loop) * * handle.cb_type = 5 # <<<<<<<<<<<<<< * handle.meth_name = name * */ __pyx_v_handle->cb_type = 5; /* "uvloop/cbhandles.pyx":304 * * handle.cb_type = 5 * handle.meth_name = name # <<<<<<<<<<<<<< * * handle.callback = callback */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_handle->meth_name); __Pyx_DECREF(__pyx_v_handle->meth_name); __pyx_v_handle->meth_name = __pyx_v_name; /* "uvloop/cbhandles.pyx":306 * handle.meth_name = name * * handle.callback = callback # <<<<<<<<<<<<<< * handle.arg1 = ctx * handle.arg2 = arg1 */ __pyx_v_handle->callback = ((void *)__pyx_v_callback); /* "uvloop/cbhandles.pyx":307 * * handle.callback = callback * handle.arg1 = ctx # <<<<<<<<<<<<<< * handle.arg2 = arg1 * handle.arg3 = arg2 */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_handle->arg1); __Pyx_DECREF(__pyx_v_handle->arg1); __pyx_v_handle->arg1 = __pyx_v_ctx; /* "uvloop/cbhandles.pyx":308 * handle.callback = callback * handle.arg1 = ctx * handle.arg2 = arg1 # <<<<<<<<<<<<<< * handle.arg3 = arg2 * handle.arg4 = arg3 */ __Pyx_INCREF(__pyx_v_arg1); __Pyx_GIVEREF(__pyx_v_arg1); __Pyx_GOTREF(__pyx_v_handle->arg2); __Pyx_DECREF(__pyx_v_handle->arg2); __pyx_v_handle->arg2 = __pyx_v_arg1; /* "uvloop/cbhandles.pyx":309 * handle.arg1 = ctx * handle.arg2 = arg1 * handle.arg3 = arg2 # <<<<<<<<<<<<<< * handle.arg4 = arg3 * */ __Pyx_INCREF(__pyx_v_arg2); __Pyx_GIVEREF(__pyx_v_arg2); __Pyx_GOTREF(__pyx_v_handle->arg3); __Pyx_DECREF(__pyx_v_handle->arg3); __pyx_v_handle->arg3 = __pyx_v_arg2; /* "uvloop/cbhandles.pyx":310 * handle.arg2 = arg1 * handle.arg3 = arg2 * handle.arg4 = arg3 # <<<<<<<<<<<<<< * * return handle */ __Pyx_INCREF(__pyx_v_arg3); __Pyx_GIVEREF(__pyx_v_arg3); __Pyx_GOTREF(__pyx_v_handle->arg4); __Pyx_DECREF(__pyx_v_handle->arg4); __pyx_v_handle->arg4 = __pyx_v_arg3; /* "uvloop/cbhandles.pyx":312 * handle.arg4 = arg3 * * return handle # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = ((PyObject *)__pyx_v_handle); goto __pyx_L0; /* "uvloop/cbhandles.pyx":296 * return handle * * cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, # <<<<<<<<<<<<<< * object arg1, object arg2, object arg3): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.new_MethodHandle3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":15 * """ * * def __cinit__(self): # <<<<<<<<<<<<<< * self._closed = 0 * self._inited = 0 */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8UVHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/handle.pyx":16 * * def __cinit__(self): * self._closed = 0 # <<<<<<<<<<<<<< * self._inited = 0 * self._handle = NULL */ __pyx_v_self->_closed = 0; /* "uvloop/handles/handle.pyx":17 * def __cinit__(self): * self._closed = 0 * self._inited = 0 # <<<<<<<<<<<<<< * self._handle = NULL * self._loop = None */ __pyx_v_self->_inited = 0; /* "uvloop/handles/handle.pyx":18 * self._closed = 0 * self._inited = 0 * self._handle = NULL # <<<<<<<<<<<<<< * self._loop = None * self._source_traceback = None */ __pyx_v_self->_handle = NULL; /* "uvloop/handles/handle.pyx":19 * self._inited = 0 * self._handle = NULL * self._loop = None # <<<<<<<<<<<<<< * self._source_traceback = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop)); __pyx_v_self->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); /* "uvloop/handles/handle.pyx":20 * self._handle = NULL * self._loop = None * self._source_traceback = None # <<<<<<<<<<<<<< * * def __init__(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = Py_None; /* "uvloop/handles/handle.pyx":15 * """ * * def __cinit__(self): # <<<<<<<<<<<<<< * self._closed = 0 * self._inited = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":22 * self._source_traceback = None * * def __init__(self): # <<<<<<<<<<<<<< * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8UVHandle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_8UVHandle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8UVHandle_2__init__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "uvloop/handles/handle.pyx":24 * def __init__(self): * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/handle.pyx":25 * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":23 * * def __init__(self): * raise TypeError( # <<<<<<<<<<<<<< * '{} is not supposed to be instantiated from Python'.format( * self.__class__.__name__)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(2, 23, __pyx_L1_error) /* "uvloop/handles/handle.pyx":22 * self._source_traceback = None * * def __init__(self): # <<<<<<<<<<<<<< * raise TypeError( * '{} is not supposed to be instantiated from Python'.format( */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVHandle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":27 * self.__class__.__name__)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self._loop is not None: */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_8UVHandle_4__dealloc__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/handles/handle.pyx":28 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._loop is not None: * self._loop._debug_handles_current.subtract([ */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":29 * def __dealloc__(self): * if UVLOOP_DEBUG: * if self._loop is not None: # <<<<<<<<<<<<<< * self._loop._debug_handles_current.subtract([ * self.__class__.__name__]) */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":30 * if UVLOOP_DEBUG: * if self._loop is not None: * self._loop._debug_handles_current.subtract([ # <<<<<<<<<<<<<< * self.__class__.__name__]) * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_loop->_debug_handles_current, __pyx_n_s_subtract); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/handles/handle.pyx":31 * if self._loop is not None: * self._loop._debug_handles_current.subtract([ * self.__class__.__name__]) # <<<<<<<<<<<<<< * else: * # No "@cython.no_gc_clear" decorator on this UVHandle */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/handle.pyx":30 * if UVLOOP_DEBUG: * if self._loop is not None: * self._loop._debug_handles_current.subtract([ # <<<<<<<<<<<<<< * self.__class__.__name__]) * else: */ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":29 * def __dealloc__(self): * if UVLOOP_DEBUG: * if self._loop is not None: # <<<<<<<<<<<<<< * self._loop._debug_handles_current.subtract([ * self.__class__.__name__]) */ goto __pyx_L4; } /* "uvloop/handles/handle.pyx":34 * else: * # No "@cython.no_gc_clear" decorator on this UVHandle * raise RuntimeError( # <<<<<<<<<<<<<< * '{} without @no_gc_clear; loop was set to None by GC' * .format(self.__class__.__name__)) */ /*else*/ { /* "uvloop/handles/handle.pyx":36 * raise RuntimeError( * '{} without @no_gc_clear; loop was set to None by GC' * .format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * if self._handle is NULL: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_without_no_gc_clear_loop_was_se, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":34 * else: * # No "@cython.no_gc_clear" decorator on this UVHandle * raise RuntimeError( # <<<<<<<<<<<<<< * '{} without @no_gc_clear; loop was set to None by GC' * .format(self.__class__.__name__)) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 34, __pyx_L1_error) } __pyx_L4:; /* "uvloop/handles/handle.pyx":28 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._loop is not None: * self._loop._debug_handles_current.subtract([ */ } /* "uvloop/handles/handle.pyx":38 * .format(self.__class__.__name__)) * * if self._handle is NULL: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((__pyx_v_self->_handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":39 * * if self._handle is NULL: * return # <<<<<<<<<<<<<< * * # -> When we're at this point, something is wrong <- */ goto __pyx_L0; /* "uvloop/handles/handle.pyx":38 * .format(self.__class__.__name__)) * * if self._handle is NULL: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/handle.pyx":43 * # -> When we're at this point, something is wrong <- * * if self._handle.loop is NULL: # <<<<<<<<<<<<<< * # The handle wasn't initialized with "uv_{handle}_init" * self._closed = 1 */ __pyx_t_2 = ((__pyx_v_self->_handle->loop == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":45 * if self._handle.loop is NULL: * # The handle wasn't initialized with "uv_{handle}_init" * self._closed = 1 # <<<<<<<<<<<<<< * self._free() * raise RuntimeError( */ __pyx_v_self->_closed = 1; /* "uvloop/handles/handle.pyx":46 * # The handle wasn't initialized with "uv_{handle}_init" * self._closed = 1 * self._free() # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is open in __dealloc__ with loop set to NULL' */ __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__free(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":49 * raise RuntimeError( * '{} is open in __dealloc__ with loop set to NULL' * .format(self.__class__.__name__)) # <<<<<<<<<<<<<< * * if self._closed == 1: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_open_in___dealloc___with_loo, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":47 * self._closed = 1 * self._free() * raise RuntimeError( # <<<<<<<<<<<<<< * '{} is open in __dealloc__ with loop set to NULL' * .format(self.__class__.__name__)) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 47, __pyx_L1_error) /* "uvloop/handles/handle.pyx":43 * # -> When we're at this point, something is wrong <- * * if self._handle.loop is NULL: # <<<<<<<<<<<<<< * # The handle wasn't initialized with "uv_{handle}_init" * self._closed = 1 */ } /* "uvloop/handles/handle.pyx":51 * .format(self.__class__.__name__)) * * if self._closed == 1: # <<<<<<<<<<<<<< * # So _handle is not NULL and self._closed == 1? * raise RuntimeError( */ __pyx_t_2 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":54 * # So _handle is not NULL and self._closed == 1? * raise RuntimeError( * '{}.__dealloc__: _handle is NULL, _closed == 1'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_dealloc____handle_is_NULL__cl, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/handles/handle.pyx":55 * raise RuntimeError( * '{}.__dealloc__: _handle is NULL, _closed == 1'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * # The handle is dealloced while open. Let's try to close it. */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":53 * if self._closed == 1: * # So _handle is not NULL and self._closed == 1? * raise RuntimeError( # <<<<<<<<<<<<<< * '{}.__dealloc__: _handle is NULL, _closed == 1'.format( * self.__class__.__name__)) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 53, __pyx_L1_error) /* "uvloop/handles/handle.pyx":51 * .format(self.__class__.__name__)) * * if self._closed == 1: # <<<<<<<<<<<<<< * # So _handle is not NULL and self._closed == 1? * raise RuntimeError( */ } /* "uvloop/handles/handle.pyx":60 * # Situations when this is possible include unhandled exceptions, * # errors during Handle.__cinit__/__init__ etc. * if self._inited: # <<<<<<<<<<<<<< * self._handle.data = NULL * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors */ __pyx_t_2 = (__pyx_v_self->_inited != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":61 * # errors during Handle.__cinit__/__init__ etc. * if self._inited: * self._handle.data = NULL # <<<<<<<<<<<<<< * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * self._handle = NULL */ __pyx_v_self->_handle->data = NULL; /* "uvloop/handles/handle.pyx":62 * if self._inited: * self._handle.data = NULL * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors # <<<<<<<<<<<<<< * self._handle = NULL * self._warn_unclosed() */ uv_close(__pyx_v_self->_handle, __pyx_f_6uvloop_4loop___uv_close_handle_cb); /* "uvloop/handles/handle.pyx":63 * self._handle.data = NULL * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * self._handle = NULL # <<<<<<<<<<<<<< * self._warn_unclosed() * else: */ __pyx_v_self->_handle = NULL; /* "uvloop/handles/handle.pyx":64 * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * self._handle = NULL * self._warn_unclosed() # <<<<<<<<<<<<<< * else: * # The handle was allocated, but not initialized */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_warn_unclosed(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":60 * # Situations when this is possible include unhandled exceptions, * # errors during Handle.__cinit__/__init__ etc. * if self._inited: # <<<<<<<<<<<<<< * self._handle.data = NULL * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors */ goto __pyx_L8; } /* "uvloop/handles/handle.pyx":67 * else: * # The handle was allocated, but not initialized * self._closed = 1 # <<<<<<<<<<<<<< * self._free() * */ /*else*/ { __pyx_v_self->_closed = 1; /* "uvloop/handles/handle.pyx":68 * # The handle was allocated, but not initialized * self._closed = 1 * self._free() # <<<<<<<<<<<<<< * * cdef inline _free(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__free(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L8:; /* "uvloop/handles/handle.pyx":27 * self.__class__.__name__)) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self._loop is not None: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("uvloop.loop.UVHandle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/handle.pyx":70 * self._free() * * cdef inline _free(self): # <<<<<<<<<<<<<< * if self._handle == NULL: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__free(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_free", 0); /* "uvloop/handles/handle.pyx":71 * * cdef inline _free(self): * if self._handle == NULL: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":72 * cdef inline _free(self): * if self._handle == NULL: * return # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/handle.pyx":71 * * cdef inline _free(self): * if self._handle == NULL: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/handle.pyx":74 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_uv_handles_freed += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":75 * * if UVLOOP_DEBUG: * self._loop._debug_uv_handles_freed += 1 # <<<<<<<<<<<<<< * * PyMem_RawFree(self._handle) */ __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop)); __pyx_t_2 = __pyx_v_self->_loop; __pyx_t_2->_debug_uv_handles_freed = (__pyx_t_2->_debug_uv_handles_freed + 1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":74 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_uv_handles_freed += 1 * */ } /* "uvloop/handles/handle.pyx":77 * self._loop._debug_uv_handles_freed += 1 * * PyMem_RawFree(self._handle) # <<<<<<<<<<<<<< * self._handle = NULL * */ PyMem_RawFree(__pyx_v_self->_handle); /* "uvloop/handles/handle.pyx":78 * * PyMem_RawFree(self._handle) * self._handle = NULL # <<<<<<<<<<<<<< * * cdef _warn_unclosed(self): */ __pyx_v_self->_handle = NULL; /* "uvloop/handles/handle.pyx":70 * self._free() * * cdef inline _free(self): # <<<<<<<<<<<<<< * if self._handle == NULL: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":80 * self._handle = NULL * * cdef _warn_unclosed(self): # <<<<<<<<<<<<<< * if self._source_traceback is not None: * tb = ''.join(tb_format_list(self._source_traceback)) */ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_v_tb = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("_warn_unclosed", 0); /* "uvloop/handles/handle.pyx":81 * * cdef _warn_unclosed(self): * if self._source_traceback is not None: # <<<<<<<<<<<<<< * tb = ''.join(tb_format_list(self._source_traceback)) * tb = 'object created at (most recent call last):\n{}'.format( */ __pyx_t_1 = (__pyx_v_self->_source_traceback != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":82 * cdef _warn_unclosed(self): * if self._source_traceback is not None: * tb = ''.join(tb_format_list(self._source_traceback)) # <<<<<<<<<<<<<< * tb = 'object created at (most recent call last):\n{}'.format( * tb.rstrip()) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_format_list); __pyx_t_4 = __pyx_v_6uvloop_4loop_tb_format_list; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->_source_traceback); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->_source_traceback}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->_source_traceback}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_self->_source_traceback); __Pyx_GIVEREF(__pyx_v_self->_source_traceback); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->_source_traceback); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__30, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_tb = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":83 * if self._source_traceback is not None: * tb = ''.join(tb_format_list(self._source_traceback)) * tb = 'object created at (most recent call last):\n{}'.format( # <<<<<<<<<<<<<< * tb.rstrip()) * msg = 'unclosed resource {!r}; {}'.format(self, tb) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_object_created_at_most_recent_ca, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":84 * tb = ''.join(tb_format_list(self._source_traceback)) * tb = 'object created at (most recent call last):\n{}'.format( * tb.rstrip()) # <<<<<<<<<<<<<< * msg = 'unclosed resource {!r}; {}'.format(self, tb) * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_7) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 84, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tb, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":85 * tb = 'object created at (most recent call last):\n{}'.format( * tb.rstrip()) * msg = 'unclosed resource {!r}; {}'.format(self, tb) # <<<<<<<<<<<<<< * else: * msg = 'unclosed resource {!r}'.format(self) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unclosed_resource_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_tb}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_v_tb}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_tb); __Pyx_GIVEREF(__pyx_v_tb); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_tb); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_msg = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":81 * * cdef _warn_unclosed(self): * if self._source_traceback is not None: # <<<<<<<<<<<<<< * tb = ''.join(tb_format_list(self._source_traceback)) * tb = 'object created at (most recent call last):\n{}'.format( */ goto __pyx_L3; } /* "uvloop/handles/handle.pyx":87 * msg = 'unclosed resource {!r}; {}'.format(self, tb) * else: * msg = 'unclosed resource {!r}'.format(self) # <<<<<<<<<<<<<< * warnings_warn(msg, ResourceWarning) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unclosed_resource_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_msg = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L3:; /* "uvloop/handles/handle.pyx":88 * else: * msg = 'unclosed resource {!r}'.format(self) * warnings_warn(msg, ResourceWarning) # <<<<<<<<<<<<<< * * cdef inline _abort_init(self): */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_warnings_warn); __pyx_t_3 = __pyx_v_6uvloop_4loop_warnings_warn; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_msg, __pyx_builtin_ResourceWarning}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 88, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_msg, __pyx_builtin_ResourceWarning}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 88, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_msg); __Pyx_INCREF(__pyx_builtin_ResourceWarning); __Pyx_GIVEREF(__pyx_builtin_ResourceWarning); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_builtin_ResourceWarning); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":80 * self._handle = NULL * * cdef _warn_unclosed(self): # <<<<<<<<<<<<<< * if self._source_traceback is not None: * tb = ''.join(tb_format_list(self._source_traceback)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVHandle._warn_unclosed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tb); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":90 * warnings_warn(msg, ResourceWarning) * * cdef inline _abort_init(self): # <<<<<<<<<<<<<< * if self._handle is not NULL: * self._free() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__abort_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_v_name = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_abort_init", 0); /* "uvloop/handles/handle.pyx":91 * * cdef inline _abort_init(self): * if self._handle is not NULL: # <<<<<<<<<<<<<< * self._free() * */ __pyx_t_1 = ((__pyx_v_self->_handle != NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":92 * cdef inline _abort_init(self): * if self._handle is not NULL: * self._free() # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVHandle__free(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":91 * * cdef inline _abort_init(self): * if self._handle is not NULL: # <<<<<<<<<<<<<< * self._free() * */ } /* "uvloop/handles/handle.pyx":94 * self._free() * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * name = self.__class__.__name__ * if self._inited: */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":95 * * if UVLOOP_DEBUG: * name = self.__class__.__name__ # <<<<<<<<<<<<<< * if self._inited: * raise RuntimeError( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_name = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":96 * if UVLOOP_DEBUG: * name = self.__class__.__name__ * if self._inited: # <<<<<<<<<<<<<< * raise RuntimeError( * '_abort_init: {}._inited is set'.format(name)) */ __pyx_t_1 = (__pyx_v_self->_inited != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":98 * if self._inited: * raise RuntimeError( * '_abort_init: {}._inited is set'.format(name)) # <<<<<<<<<<<<<< * if self._closed: * raise RuntimeError( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_abort_init__inited_is_set, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_name}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_name}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_name); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":97 * name = self.__class__.__name__ * if self._inited: * raise RuntimeError( # <<<<<<<<<<<<<< * '_abort_init: {}._inited is set'.format(name)) * if self._closed: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 97, __pyx_L1_error) /* "uvloop/handles/handle.pyx":96 * if UVLOOP_DEBUG: * name = self.__class__.__name__ * if self._inited: # <<<<<<<<<<<<<< * raise RuntimeError( * '_abort_init: {}._inited is set'.format(name)) */ } /* "uvloop/handles/handle.pyx":99 * raise RuntimeError( * '_abort_init: {}._inited is set'.format(name)) * if self._closed: # <<<<<<<<<<<<<< * raise RuntimeError( * '_abort_init: {}._closed is set'.format(name)) */ __pyx_t_1 = (__pyx_v_self->_closed != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":101 * if self._closed: * raise RuntimeError( * '_abort_init: {}._closed is set'.format(name)) # <<<<<<<<<<<<<< * * self._closed = 1 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_abort_init__closed_is_set, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_name); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":100 * '_abort_init: {}._inited is set'.format(name)) * if self._closed: * raise RuntimeError( # <<<<<<<<<<<<<< * '_abort_init: {}._closed is set'.format(name)) * */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 100, __pyx_L1_error) /* "uvloop/handles/handle.pyx":99 * raise RuntimeError( * '_abort_init: {}._inited is set'.format(name)) * if self._closed: # <<<<<<<<<<<<<< * raise RuntimeError( * '_abort_init: {}._closed is set'.format(name)) */ } /* "uvloop/handles/handle.pyx":94 * self._free() * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * name = self.__class__.__name__ * if self._inited: */ } /* "uvloop/handles/handle.pyx":103 * '_abort_init: {}._closed is set'.format(name)) * * self._closed = 1 # <<<<<<<<<<<<<< * * cdef inline _finish_init(self): */ __pyx_v_self->_closed = 1; /* "uvloop/handles/handle.pyx":90 * warnings_warn(msg, ResourceWarning) * * cdef inline _abort_init(self): # <<<<<<<<<<<<<< * if self._handle is not NULL: * self._free() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVHandle._abort_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":105 * self._closed = 1 * * cdef inline _finish_init(self): # <<<<<<<<<<<<<< * self._inited = 1 * self._handle.data = self */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__finish_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_finish_init", 0); /* "uvloop/handles/handle.pyx":106 * * cdef inline _finish_init(self): * self._inited = 1 # <<<<<<<<<<<<<< * self._handle.data = self * if self._loop._debug: */ __pyx_v_self->_inited = 1; /* "uvloop/handles/handle.pyx":107 * cdef inline _finish_init(self): * self._inited = 1 * self._handle.data = self # <<<<<<<<<<<<<< * if self._loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) */ __pyx_v_self->_handle->data = ((void *)__pyx_v_self); /* "uvloop/handles/handle.pyx":108 * self._inited = 1 * self._handle.data = self * if self._loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * if UVLOOP_DEBUG: */ __pyx_t_1 = (__pyx_v_self->_loop->_debug != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":109 * self._handle.data = self * if self._loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * self._loop._debug_uv_handles_total += 1 */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_extract_stack); __pyx_t_4 = __pyx_v_6uvloop_4loop_tb_extract_stack; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":108 * self._inited = 1 * self._handle.data = self * if self._loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * if UVLOOP_DEBUG: */ } /* "uvloop/handles/handle.pyx":110 * if self._loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_uv_handles_total += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":111 * self._source_traceback = tb_extract_stack(sys_getframe(0)) * if UVLOOP_DEBUG: * self._loop._debug_uv_handles_total += 1 # <<<<<<<<<<<<<< * * cdef inline _start_init(self, Loop loop): */ __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop)); __pyx_t_7 = __pyx_v_self->_loop; __pyx_t_7->_debug_uv_handles_total = (__pyx_t_7->_debug_uv_handles_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "uvloop/handles/handle.pyx":110 * if self._loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_uv_handles_total += 1 * */ } /* "uvloop/handles/handle.pyx":105 * self._closed = 1 * * cdef inline _finish_init(self): # <<<<<<<<<<<<<< * self._inited = 1 * self._handle.data = self */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(((PyObject *)__pyx_t_7)); __Pyx_AddTraceback("uvloop.loop.UVHandle._finish_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":113 * self._loop._debug_uv_handles_total += 1 * * cdef inline _start_init(self, Loop loop): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self._loop is not None: */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__start_init(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { PyObject *__pyx_v_cls_name = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_start_init", 0); /* "uvloop/handles/handle.pyx":114 * * cdef inline _start_init(self, Loop loop): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._loop is not None: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":115 * cdef inline _start_init(self, Loop loop): * if UVLOOP_DEBUG: * if self._loop is not None: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._start_init can only be called once'.format( */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":117 * if self._loop is not None: * raise RuntimeError( * '{}._start_init can only be called once'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_start_init_can_only_be_called, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/handles/handle.pyx":118 * raise RuntimeError( * '{}._start_init can only be called once'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * cls_name = self.__class__.__name__ */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":116 * if UVLOOP_DEBUG: * if self._loop is not None: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}._start_init can only be called once'.format( * self.__class__.__name__)) */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 116, __pyx_L1_error) /* "uvloop/handles/handle.pyx":115 * cdef inline _start_init(self, Loop loop): * if UVLOOP_DEBUG: * if self._loop is not None: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._start_init can only be called once'.format( */ } /* "uvloop/handles/handle.pyx":120 * self.__class__.__name__)) * * cls_name = self.__class__.__name__ # <<<<<<<<<<<<<< * loop._debug_handles_total.update([cls_name]) * loop._debug_handles_current.update([cls_name]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_cls_name = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":121 * * cls_name = self.__class__.__name__ * loop._debug_handles_total.update([cls_name]) # <<<<<<<<<<<<<< * loop._debug_handles_current.update([cls_name]) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop->_debug_handles_total, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_cls_name); __Pyx_GIVEREF(__pyx_v_cls_name); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_cls_name); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":122 * cls_name = self.__class__.__name__ * loop._debug_handles_total.update([cls_name]) * loop._debug_handles_current.update([cls_name]) # <<<<<<<<<<<<<< * * self._loop = loop */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop->_debug_handles_current, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_cls_name); __Pyx_GIVEREF(__pyx_v_cls_name); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_cls_name); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":114 * * cdef inline _start_init(self, Loop loop): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._loop is not None: * raise RuntimeError( */ } /* "uvloop/handles/handle.pyx":124 * loop._debug_handles_current.update([cls_name]) * * self._loop = loop # <<<<<<<<<<<<<< * * cdef inline bint _is_alive(self): */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->_loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop)); __pyx_v_self->_loop = __pyx_v_loop; /* "uvloop/handles/handle.pyx":113 * self._loop._debug_uv_handles_total += 1 * * cdef inline _start_init(self, Loop loop): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self._loop is not None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVHandle._start_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cls_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":126 * self._loop = loop * * cdef inline bint _is_alive(self): # <<<<<<<<<<<<<< * cdef bint res * res = self._closed != 1 and self._inited == 1 */ static CYTHON_INLINE int __pyx_f_6uvloop_4loop_8UVHandle__is_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { int __pyx_v_res; PyObject *__pyx_v_name = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_is_alive", 0); /* "uvloop/handles/handle.pyx":128 * cdef inline bint _is_alive(self): * cdef bint res * res = self._closed != 1 and self._inited == 1 # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if res: */ __pyx_t_2 = ((__pyx_v_self->_closed != 1) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = ((__pyx_v_self->_inited == 1) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_v_res = __pyx_t_1; /* "uvloop/handles/handle.pyx":129 * cdef bint res * res = self._closed != 1 and self._inited == 1 * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if res: * name = self.__class__.__name__ */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":130 * res = self._closed != 1 and self._inited == 1 * if UVLOOP_DEBUG: * if res: # <<<<<<<<<<<<<< * name = self.__class__.__name__ * if self._handle is NULL: */ __pyx_t_1 = (__pyx_v_res != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":131 * if UVLOOP_DEBUG: * if res: * name = self.__class__.__name__ # <<<<<<<<<<<<<< * if self._handle is NULL: * raise RuntimeError( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_name = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":132 * if res: * name = self.__class__.__name__ * if self._handle is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle is NULL'.format(name)) */ __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":134 * if self._handle is NULL: * raise RuntimeError( * '{} is alive, but _handle is NULL'.format(name)) # <<<<<<<<<<<<<< * if self._loop is None: * raise RuntimeError( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":133 * name = self.__class__.__name__ * if self._handle is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '{} is alive, but _handle is NULL'.format(name)) * if self._loop is None: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 133, __pyx_L1_error) /* "uvloop/handles/handle.pyx":132 * if res: * name = self.__class__.__name__ * if self._handle is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle is NULL'.format(name)) */ } /* "uvloop/handles/handle.pyx":135 * raise RuntimeError( * '{} is alive, but _handle is NULL'.format(name)) * if self._loop is None: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _loop is None'.format(name)) */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_loop) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":137 * if self._loop is None: * raise RuntimeError( * '{} is alive, but _loop is None'.format(name)) # <<<<<<<<<<<<<< * if self._handle.loop is not self._loop.uvloop: * raise RuntimeError( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__loop_is_None, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_name}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_name}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_name); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":136 * '{} is alive, but _handle is NULL'.format(name)) * if self._loop is None: * raise RuntimeError( # <<<<<<<<<<<<<< * '{} is alive, but _loop is None'.format(name)) * if self._handle.loop is not self._loop.uvloop: */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 136, __pyx_L1_error) /* "uvloop/handles/handle.pyx":135 * raise RuntimeError( * '{} is alive, but _handle is NULL'.format(name)) * if self._loop is None: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _loop is None'.format(name)) */ } /* "uvloop/handles/handle.pyx":138 * raise RuntimeError( * '{} is alive, but _loop is None'.format(name)) * if self._handle.loop is not self._loop.uvloop: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle.loop is not ' */ __pyx_t_2 = ((__pyx_v_self->_handle->loop != __pyx_v_self->_loop->uvloop) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":141 * raise RuntimeError( * '{} is alive, but _handle.loop is not ' * 'initialized'.format(name)) # <<<<<<<<<<<<<< * if self._handle.data is not self: * raise RuntimeError( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_loop_is_no, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_name}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":139 * '{} is alive, but _loop is None'.format(name)) * if self._handle.loop is not self._loop.uvloop: * raise RuntimeError( # <<<<<<<<<<<<<< * '{} is alive, but _handle.loop is not ' * 'initialized'.format(name)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 139, __pyx_L1_error) /* "uvloop/handles/handle.pyx":138 * raise RuntimeError( * '{} is alive, but _loop is None'.format(name)) * if self._handle.loop is not self._loop.uvloop: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle.loop is not ' */ } /* "uvloop/handles/handle.pyx":142 * '{} is alive, but _handle.loop is not ' * 'initialized'.format(name)) * if self._handle.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle.data is not ' */ __pyx_t_2 = ((__pyx_v_self->_handle->data != ((void *)__pyx_v_self)) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":145 * raise RuntimeError( * '{} is alive, but _handle.data is not ' * 'initialized'.format(name)) # <<<<<<<<<<<<<< * return res * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_alive_but__handle_data_is_no, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_name}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_name}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_name); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":143 * 'initialized'.format(name)) * if self._handle.data is not self: * raise RuntimeError( # <<<<<<<<<<<<<< * '{} is alive, but _handle.data is not ' * 'initialized'.format(name)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 143, __pyx_L1_error) /* "uvloop/handles/handle.pyx":142 * '{} is alive, but _handle.loop is not ' * 'initialized'.format(name)) * if self._handle.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{} is alive, but _handle.data is not ' */ } /* "uvloop/handles/handle.pyx":130 * res = self._closed != 1 and self._inited == 1 * if UVLOOP_DEBUG: * if res: # <<<<<<<<<<<<<< * name = self.__class__.__name__ * if self._handle is NULL: */ } /* "uvloop/handles/handle.pyx":129 * cdef bint res * res = self._closed != 1 and self._inited == 1 * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if res: * name = self.__class__.__name__ */ } /* "uvloop/handles/handle.pyx":146 * '{} is alive, but _handle.data is not ' * 'initialized'.format(name)) * return res # <<<<<<<<<<<<<< * * cdef inline _ensure_alive(self): */ __pyx_r = __pyx_v_res; goto __pyx_L0; /* "uvloop/handles/handle.pyx":126 * self._loop = loop * * cdef inline bint _is_alive(self): # <<<<<<<<<<<<<< * cdef bint res * res = self._closed != 1 and self._inited == 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("uvloop.loop.UVHandle._is_alive", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":148 * return res * * cdef inline _ensure_alive(self): # <<<<<<<<<<<<<< * if not self._is_alive(): * raise RuntimeError( */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_ensure_alive", 0); /* "uvloop/handles/handle.pyx":149 * * cdef inline _ensure_alive(self): * if not self._is_alive(): # <<<<<<<<<<<<<< * raise RuntimeError( * 'unable to perform operation on {!r}; ' */ __pyx_t_1 = ((!(__pyx_f_6uvloop_4loop_8UVHandle__is_alive(__pyx_v_self) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":152 * raise RuntimeError( * 'unable to perform operation on {!r}; ' * 'the handler is closed'.format(self)) # <<<<<<<<<<<<<< * * cdef _fatal_error(self, exc, throw, reason=None): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unable_to_perform_operation_on_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":150 * cdef inline _ensure_alive(self): * if not self._is_alive(): * raise RuntimeError( # <<<<<<<<<<<<<< * 'unable to perform operation on {!r}; ' * 'the handler is closed'.format(self)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 150, __pyx_L1_error) /* "uvloop/handles/handle.pyx":149 * * cdef inline _ensure_alive(self): * if not self._is_alive(): # <<<<<<<<<<<<<< * raise RuntimeError( * 'unable to perform operation on {!r}; ' */ } /* "uvloop/handles/handle.pyx":148 * return res * * cdef inline _ensure_alive(self): # <<<<<<<<<<<<<< * if not self._is_alive(): * raise RuntimeError( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVHandle._ensure_alive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":154 * 'the handler is closed'.format(self)) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Fatal error means an error that was returned by the * # underlying libuv handle function. We usually can't */ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__fatal_error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("_fatal_error", 0); if (__pyx_optional_args) { } /* "uvloop/handles/handle.pyx":158 * # underlying libuv handle function. We usually can't * # recover from that, hence we just close the handle. * self._close() # <<<<<<<<<<<<<< * * if throw or self._loop is None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":160 * self._close() * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * else: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(2, 160, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (((PyObject *)__pyx_v_self->_loop) == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":161 * * if throw or self._loop is None: * raise exc # <<<<<<<<<<<<<< * else: * self._loop._handle_exception(exc) */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(2, 161, __pyx_L1_error) /* "uvloop/handles/handle.pyx":160 * self._close() * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * else: */ } /* "uvloop/handles/handle.pyx":163 * raise exc * else: * self._loop._handle_exception(exc) # <<<<<<<<<<<<<< * * cdef _error(self, exc, throw): */ /*else*/ { ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->_loop->__pyx_vtab)->_handle_exception(__pyx_v_self->_loop, __pyx_v_exc); } /* "uvloop/handles/handle.pyx":154 * 'the handler is closed'.format(self)) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Fatal error means an error that was returned by the * # underlying libuv handle function. We usually can't */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVHandle._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":165 * self._loop._handle_exception(exc) * * cdef _error(self, exc, throw): # <<<<<<<<<<<<<< * # A non-fatal error is usually an error that was caught * # by the handler, but was originated in the client code */ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__error(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_error", 0); /* "uvloop/handles/handle.pyx":170 * # (not in libuv). In this case we either want to simply * # raise or log it. * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * else: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 170, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (((PyObject *)__pyx_v_self->_loop) == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":171 * # raise or log it. * if throw or self._loop is None: * raise exc # <<<<<<<<<<<<<< * else: * self._loop._handle_exception(exc) */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(2, 171, __pyx_L1_error) /* "uvloop/handles/handle.pyx":170 * # (not in libuv). In this case we either want to simply * # raise or log it. * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * else: */ } /* "uvloop/handles/handle.pyx":173 * raise exc * else: * self._loop._handle_exception(exc) # <<<<<<<<<<<<<< * * cdef _close(self): */ /*else*/ { ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->_loop->__pyx_vtab)->_handle_exception(__pyx_v_self->_loop, __pyx_v_exc); } /* "uvloop/handles/handle.pyx":165 * self._loop._handle_exception(exc) * * cdef _error(self, exc, throw): # <<<<<<<<<<<<<< * # A non-fatal error is usually an error that was caught * # by the handler, but was originated in the client code */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVHandle._error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":175 * self._loop._handle_exception(exc) * * cdef _close(self): # <<<<<<<<<<<<<< * if self._closed == 1: * return */ static PyObject *__pyx_f_6uvloop_4loop_8UVHandle__close(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_close", 0); /* "uvloop/handles/handle.pyx":176 * * cdef _close(self): * if self._closed == 1: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->_closed == 1) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":177 * cdef _close(self): * if self._closed == 1: * return # <<<<<<<<<<<<<< * * self._closed = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/handle.pyx":176 * * cdef _close(self): * if self._closed == 1: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/handle.pyx":179 * return * * self._closed = 1 # <<<<<<<<<<<<<< * * if self._handle is NULL: */ __pyx_v_self->_closed = 1; /* "uvloop/handles/handle.pyx":181 * self._closed = 1 * * if self._handle is NULL: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->_handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":182 * * if self._handle is NULL: * return # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/handle.pyx":181 * self._closed = 1 * * if self._handle is NULL: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/handle.pyx":184 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._handle.data is NULL: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":185 * * if UVLOOP_DEBUG: * if self._handle.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: _handle.data is NULL'.format( */ __pyx_t_1 = ((__pyx_v_self->_handle->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":187 * if self._handle.data is NULL: * raise RuntimeError( * '{}._close: _handle.data is NULL'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close__handle_data_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":188 * raise RuntimeError( * '{}._close: _handle.data is NULL'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * if self._handle.data is not self: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":186 * if UVLOOP_DEBUG: * if self._handle.data is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}._close: _handle.data is NULL'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 186, __pyx_L1_error) /* "uvloop/handles/handle.pyx":185 * * if UVLOOP_DEBUG: * if self._handle.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: _handle.data is NULL'.format( */ } /* "uvloop/handles/handle.pyx":190 * self.__class__.__name__)) * * if self._handle.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: _handle.data is not UVHandle/self'.format( */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_handle->data) != ((PyObject *)__pyx_v_self)); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "uvloop/handles/handle.pyx":192 * if self._handle.data is not self: * raise RuntimeError( * '{}._close: _handle.data is not UVHandle/self'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close__handle_data_is_not_UVHa, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":193 * raise RuntimeError( * '{}._close: _handle.data is not UVHandle/self'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * if uv.uv_is_closing(self._handle): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":191 * * if self._handle.data is not self: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}._close: _handle.data is not UVHandle/self'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 191, __pyx_L1_error) /* "uvloop/handles/handle.pyx":190 * self.__class__.__name__)) * * if self._handle.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: _handle.data is not UVHandle/self'.format( */ } /* "uvloop/handles/handle.pyx":195 * self.__class__.__name__)) * * if uv.uv_is_closing(self._handle): # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: uv_is_closing() is true'.format( */ __pyx_t_7 = (uv_is_closing(__pyx_v_self->_handle) != 0); if (__pyx_t_7) { /* "uvloop/handles/handle.pyx":197 * if uv.uv_is_closing(self._handle): * raise RuntimeError( * '{}._close: uv_is_closing() is true'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_close_uv_is_closing_is_true, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":198 * raise RuntimeError( * '{}._close: uv_is_closing() is true'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * # We want the handle wrapper (UVHandle) to stay alive until */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":196 * * if uv.uv_is_closing(self._handle): * raise RuntimeError( # <<<<<<<<<<<<<< * '{}._close: uv_is_closing() is true'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 196, __pyx_L1_error) /* "uvloop/handles/handle.pyx":195 * self.__class__.__name__)) * * if uv.uv_is_closing(self._handle): # <<<<<<<<<<<<<< * raise RuntimeError( * '{}._close: uv_is_closing() is true'.format( */ } /* "uvloop/handles/handle.pyx":184 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._handle.data is NULL: * raise RuntimeError( */ } /* "uvloop/handles/handle.pyx":202 * # We want the handle wrapper (UVHandle) to stay alive until * # the closing callback fires. * Py_INCREF(self) # <<<<<<<<<<<<<< * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/handle.pyx":203 * # the closing callback fires. * Py_INCREF(self) * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors # <<<<<<<<<<<<<< * * def __repr__(self): */ uv_close(__pyx_v_self->_handle, __pyx_f_6uvloop_4loop___uv_close_handle_cb); /* "uvloop/handles/handle.pyx":175 * self._loop._handle_exception(exc) * * cdef _close(self): # <<<<<<<<<<<<<< * if self._closed == 1: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":205 * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{} closed={} {:#x}>'.format( * self.__class__.__name__, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_7__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_7__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_6__repr__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/handles/handle.pyx":206 * * def __repr__(self): * return '<{} closed={} {:#x}>'.format( # <<<<<<<<<<<<<< * self.__class__.__name__, * self._closed, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_closed_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/handle.pyx":207 * def __repr__(self): * return '<{} closed={} {:#x}>'.format( * self.__class__.__name__, # <<<<<<<<<<<<<< * self._closed, * id(self)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":208 * return '<{} closed={} {:#x}>'.format( * self.__class__.__name__, * self._closed, # <<<<<<<<<<<<<< * id(self)) * */ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->_closed); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":209 * self.__class__.__name__, * self._closed, * id(self)) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self)); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_4, __pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_4, __pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/handle.pyx":205 * uv.uv_close(self._handle, __uv_close_handle_cb) # void; no errors * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{} closed={} {:#x}>'.format( * self.__class__.__name__, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UVHandle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pxd":7 * bint _inited * Loop _loop * readonly _source_traceback # <<<<<<<<<<<<<< * * # All "inline" methods are final */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVHandle_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_source_traceback); __pyx_r = __pyx_v_self->_source_traceback; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":215 * cdef class UVSocketHandle(UVHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * self._fileobj = None * self.__cached_socket = None */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_14UVSocketHandle___cinit__(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/handle.pyx":216 * * def __cinit__(self): * self._fileobj = None # <<<<<<<<<<<<<< * self.__cached_socket = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fileobj); __Pyx_DECREF(__pyx_v_self->_fileobj); __pyx_v_self->_fileobj = Py_None; /* "uvloop/handles/handle.pyx":217 * def __cinit__(self): * self._fileobj = None * self.__cached_socket = None # <<<<<<<<<<<<<< * * cdef inline _fileno(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx___cached_socket); __Pyx_DECREF(__pyx_v_self->__pyx___cached_socket); __pyx_v_self->__pyx___cached_socket = Py_None; /* "uvloop/handles/handle.pyx":215 * cdef class UVSocketHandle(UVHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * self._fileobj = None * self.__cached_socket = None */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":219 * self.__cached_socket = None * * cdef inline _fileno(self): # <<<<<<<<<<<<<< * cdef: * int fd */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) { int __pyx_v_fd; int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_fileno", 0); /* "uvloop/handles/handle.pyx":224 * int err * * self._ensure_alive() # <<<<<<<<<<<<<< * err = uv.uv_fileno(self._handle, &fd) * if err < 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":225 * * self._ensure_alive() * err = uv.uv_fileno(self._handle, &fd) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_fileno(__pyx_v_self->__pyx_base._handle, ((uv_os_fd_t *)(&__pyx_v_fd))); /* "uvloop/handles/handle.pyx":226 * self._ensure_alive() * err = uv.uv_fileno(self._handle, &fd) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":227 * err = uv.uv_fileno(self._handle, &fd) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * return fd */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(2, 227, __pyx_L1_error) /* "uvloop/handles/handle.pyx":226 * self._ensure_alive() * err = uv.uv_fileno(self._handle, &fd) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/handles/handle.pyx":229 * raise convert_error(err) * * return fd # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/handle.pyx":219 * self.__cached_socket = None * * cdef inline _fileno(self): # <<<<<<<<<<<<<< * cdef: * int fd */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._fileno", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":231 * return fd * * cdef _new_socket(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/handle.pyx":232 * * cdef _new_socket(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef inline _get_socket(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 232, __pyx_L1_error) /* "uvloop/handles/handle.pyx":231 * return fd * * cdef _new_socket(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":234 * raise NotImplementedError * * cdef inline _get_socket(self): # <<<<<<<<<<<<<< * if self.__cached_socket is not None: * return self.__cached_socket */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_get_socket", 0); /* "uvloop/handles/handle.pyx":235 * * cdef inline _get_socket(self): * if self.__cached_socket is not None: # <<<<<<<<<<<<<< * return self.__cached_socket * */ __pyx_t_1 = (__pyx_v_self->__pyx___cached_socket != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":236 * cdef inline _get_socket(self): * if self.__cached_socket is not None: * return self.__cached_socket # <<<<<<<<<<<<<< * * if not self._is_alive(): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___cached_socket); __pyx_r = __pyx_v_self->__pyx___cached_socket; goto __pyx_L0; /* "uvloop/handles/handle.pyx":235 * * cdef inline _get_socket(self): * if self.__cached_socket is not None: # <<<<<<<<<<<<<< * return self.__cached_socket * */ } /* "uvloop/handles/handle.pyx":238 * return self.__cached_socket * * if not self._is_alive(): # <<<<<<<<<<<<<< * return None * */ __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":239 * * if not self._is_alive(): * return None # <<<<<<<<<<<<<< * * self.__cached_socket = self._new_socket() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "uvloop/handles/handle.pyx":238 * return self.__cached_socket * * if not self._is_alive(): # <<<<<<<<<<<<<< * return None * */ } /* "uvloop/handles/handle.pyx":241 * return None * * self.__cached_socket = self._new_socket() # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * # We don't "dup" for the "__cached_socket". */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->__pyx_base.__pyx_vtab)->_new_socket(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___cached_socket); __Pyx_DECREF(__pyx_v_self->__pyx___cached_socket); __pyx_v_self->__pyx___cached_socket = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":242 * * self.__cached_socket = self._new_socket() * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * # We don't "dup" for the "__cached_socket". * assert self.__cached_socket.fileno() == self._fileno() */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":244 * if UVLOOP_DEBUG: * # We don't "dup" for the "__cached_socket". * assert self.__cached_socket.fileno() == self._fileno() # <<<<<<<<<<<<<< * return self.__cached_socket * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___cached_socket, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 244, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(2, 244, __pyx_L1_error) } } #endif /* "uvloop/handles/handle.pyx":242 * * self.__cached_socket = self._new_socket() * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * # We don't "dup" for the "__cached_socket". * assert self.__cached_socket.fileno() == self._fileno() */ } /* "uvloop/handles/handle.pyx":245 * # We don't "dup" for the "__cached_socket". * assert self.__cached_socket.fileno() == self._fileno() * return self.__cached_socket # <<<<<<<<<<<<<< * * cdef inline _attach_fileobj(self, object file): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx___cached_socket); __pyx_r = __pyx_v_self->__pyx___cached_socket; goto __pyx_L0; /* "uvloop/handles/handle.pyx":234 * raise NotImplementedError * * cdef inline _get_socket(self): # <<<<<<<<<<<<<< * if self.__cached_socket is not None: * return self.__cached_socket */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":247 * return self.__cached_socket * * cdef inline _attach_fileobj(self, object file): # <<<<<<<<<<<<<< * # When we create a TCP/PIPE/etc connection/server based on * # a Python file object, we need to close the file object when */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, PyObject *__pyx_v_file) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_attach_fileobj", 0); /* "uvloop/handles/handle.pyx":251 * # a Python file object, we need to close the file object when * # the uv handle is closed. * self._fileobj = file # <<<<<<<<<<<<<< * * cdef _close(self): */ __Pyx_INCREF(__pyx_v_file); __Pyx_GIVEREF(__pyx_v_file); __Pyx_GOTREF(__pyx_v_self->_fileobj); __Pyx_DECREF(__pyx_v_self->_fileobj); __pyx_v_self->_fileobj = __pyx_v_file; /* "uvloop/handles/handle.pyx":247 * return self.__cached_socket * * cdef inline _attach_fileobj(self, object file): # <<<<<<<<<<<<<< * # When we create a TCP/PIPE/etc connection/server based on * # a Python file object, we need to close the file object when */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":253 * self._fileobj = file * * cdef _close(self): # <<<<<<<<<<<<<< * try: * if self.__cached_socket is not None: */ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__close(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; char const *__pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; char const *__pyx_t_25; char const *__pyx_t_26; __Pyx_RefNannySetupContext("_close", 0); /* "uvloop/handles/handle.pyx":254 * * cdef _close(self): * try: # <<<<<<<<<<<<<< * if self.__cached_socket is not None: * self.__cached_socket.detach() */ /*try:*/ { /* "uvloop/handles/handle.pyx":255 * cdef _close(self): * try: * if self.__cached_socket is not None: # <<<<<<<<<<<<<< * self.__cached_socket.detach() * self.__cached_socket = None */ __pyx_t_1 = (__pyx_v_self->__pyx___cached_socket != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":256 * try: * if self.__cached_socket is not None: * self.__cached_socket.detach() # <<<<<<<<<<<<<< * self.__cached_socket = None * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___cached_socket, __pyx_n_s_detach); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 256, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 256, __pyx_L4_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 256, __pyx_L4_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":257 * if self.__cached_socket is not None: * self.__cached_socket.detach() * self.__cached_socket = None # <<<<<<<<<<<<<< * * if self._fileobj is not None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx___cached_socket); __Pyx_DECREF(__pyx_v_self->__pyx___cached_socket); __pyx_v_self->__pyx___cached_socket = Py_None; /* "uvloop/handles/handle.pyx":255 * cdef _close(self): * try: * if self.__cached_socket is not None: # <<<<<<<<<<<<<< * self.__cached_socket.detach() * self.__cached_socket = None */ } /* "uvloop/handles/handle.pyx":259 * self.__cached_socket = None * * if self._fileobj is not None: # <<<<<<<<<<<<<< * try: * self._fileobj.close() */ __pyx_t_2 = (__pyx_v_self->_fileobj != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":260 * * if self._fileobj is not None: * try: # <<<<<<<<<<<<<< * self._fileobj.close() * except Exception as exc: */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "uvloop/handles/handle.pyx":261 * if self._fileobj is not None: * try: * self._fileobj.close() # <<<<<<<<<<<<<< * except Exception as exc: * self._loop.call_exception_handler({ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fileobj, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 261, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 261, __pyx_L11_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 261, __pyx_L11_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":260 * * if self._fileobj is not None: * try: # <<<<<<<<<<<<<< * self._fileobj.close() * except Exception as exc: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":262 * try: * self._fileobj.close() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'exception': exc, */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(2, 262, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "uvloop/handles/handle.pyx":263 * self._fileobj.close() * except Exception as exc: * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'exception': exc, * 'transport': self, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_11); /* "uvloop/handles/handle.pyx":264 * except Exception as exc: * self._loop.call_exception_handler({ * 'exception': exc, # <<<<<<<<<<<<<< * 'transport': self, * 'message': 'could not close attached file object {!r}'. */ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 264, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(2, 264, __pyx_L24_error) /* "uvloop/handles/handle.pyx":265 * self._loop.call_exception_handler({ * 'exception': exc, * 'transport': self, # <<<<<<<<<<<<<< * 'message': 'could not close attached file object {!r}'. * format(self._fileobj) */ if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(2, 264, __pyx_L24_error) /* "uvloop/handles/handle.pyx":266 * 'exception': exc, * 'transport': self, * 'message': 'could not close attached file object {!r}'. # <<<<<<<<<<<<<< * format(self._fileobj) * }) */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_could_not_close_attached_file_ob, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 266, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); /* "uvloop/handles/handle.pyx":267 * 'transport': self, * 'message': 'could not close attached file object {!r}'. * format(self._fileobj) # <<<<<<<<<<<<<< * }) * finally: */ __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } if (!__pyx_t_15) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_self->_fileobj); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 267, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_13); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_self->_fileobj}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 267, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_13); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_self->_fileobj}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 267, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_13); } else #endif { __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 267, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; __Pyx_INCREF(__pyx_v_self->_fileobj); __Pyx_GIVEREF(__pyx_v_self->_fileobj); PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_self->_fileobj); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 267, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_message, __pyx_t_13) < 0) __PYX_ERR(2, 264, __pyx_L24_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_13) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_10); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12}; __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12}; __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 263, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/handles/handle.pyx":262 * try: * self._fileobj.close() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'exception': exc, */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L25; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L24_error:; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_9 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; goto __pyx_L13_except_error; } __pyx_L25:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; __pyx_L13_except_error:; /* "uvloop/handles/handle.pyx":260 * * if self._fileobj is not None: * try: # <<<<<<<<<<<<<< * self._fileobj.close() * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L9_error; __pyx_L12_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L18_try_end:; } } /* "uvloop/handles/handle.pyx":270 * }) * finally: * self._fileobj = None # <<<<<<<<<<<<<< * finally: * UVHandle._close(self) */ /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fileobj); __Pyx_DECREF(__pyx_v_self->_fileobj); __pyx_v_self->_fileobj = Py_None; goto __pyx_L10; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L9_error:; __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_17 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_25 = __pyx_filename; { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fileobj); __Pyx_DECREF(__pyx_v_self->_fileobj); __pyx_v_self->_fileobj = Py_None; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_25; goto __pyx_L4_error; } __pyx_L10:; } /* "uvloop/handles/handle.pyx":259 * self.__cached_socket = None * * if self._fileobj is not None: # <<<<<<<<<<<<<< * try: * self._fileobj.close() */ } } /* "uvloop/handles/handle.pyx":272 * self._fileobj = None * finally: * UVHandle._close(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ /*finally:*/ { /*normal exit:*/{ __pyx_t_5 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L4_error:; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __pyx_t_9 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_26 = __pyx_filename; { __pyx_t_5 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 272, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24); __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_26; goto __pyx_L1_error; __pyx_L33_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); } __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "uvloop/handles/handle.pyx":253 * self._fileobj = file * * cdef _close(self): # <<<<<<<<<<<<<< * try: * if self.__cached_socket is not None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":274 * UVHandle._close(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6uvloop_4loop_14UVSocketHandle__open(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/handle.pyx":275 * * cdef _open(self, int sockfd): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(2, 275, __pyx_L1_error) /* "uvloop/handles/handle.pyx":274 * UVHandle._close(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVSocketHandle._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":278 * * * cdef inline bint __ensure_handle_data(uv.uv_handle_t* handle, # <<<<<<<<<<<<<< * const char* handle_ctx): * */ static CYTHON_INLINE int __pyx_f_6uvloop_4loop___ensure_handle_data(uv_handle_t *__pyx_v_handle, char const *__pyx_v_handle_ctx) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__ensure_handle_data", 0); /* "uvloop/handles/handle.pyx":283 * cdef Loop loop * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if handle.loop is NULL: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":284 * * if UVLOOP_DEBUG: * if handle.loop is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * 'handle.loop is NULL in __ensure_handle_data') */ __pyx_t_1 = ((__pyx_v_handle->loop == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":285 * if UVLOOP_DEBUG: * if handle.loop is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * 'handle.loop is NULL in __ensure_handle_data') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 285, __pyx_L1_error) /* "uvloop/handles/handle.pyx":284 * * if UVLOOP_DEBUG: * if handle.loop is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * 'handle.loop is NULL in __ensure_handle_data') */ } /* "uvloop/handles/handle.pyx":288 * 'handle.loop is NULL in __ensure_handle_data') * * if handle.loop.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * 'handle.loop.data is NULL in __ensure_handle_data') */ __pyx_t_1 = ((__pyx_v_handle->loop->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":289 * * if handle.loop.data is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * 'handle.loop.data is NULL in __ensure_handle_data') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 289, __pyx_L1_error) /* "uvloop/handles/handle.pyx":288 * 'handle.loop is NULL in __ensure_handle_data') * * if handle.loop.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * 'handle.loop.data is NULL in __ensure_handle_data') */ } /* "uvloop/handles/handle.pyx":283 * cdef Loop loop * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if handle.loop is NULL: * raise RuntimeError( */ } /* "uvloop/handles/handle.pyx":292 * 'handle.loop.data is NULL in __ensure_handle_data') * * if handle.data is NULL: # <<<<<<<<<<<<<< * loop = handle.loop.data * loop.call_exception_handler({ */ __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":293 * * if handle.data is NULL: * loop = handle.loop.data # <<<<<<<<<<<<<< * loop.call_exception_handler({ * 'message': '{} called with handle.data == NULL'.format( */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->loop->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":294 * if handle.data is NULL: * loop = handle.loop.data * loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': '{} called with handle.data == NULL'.format( * handle_ctx.decode('latin-1')) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":295 * loop = handle.loop.data * loop.call_exception_handler({ * 'message': '{} called with handle.data == NULL'.format( # <<<<<<<<<<<<<< * handle_ctx.decode('latin-1')) * }) */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_called_with_handle_data_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/handles/handle.pyx":296 * loop.call_exception_handler({ * 'message': '{} called with handle.data == NULL'.format( * handle_ctx.decode('latin-1')) # <<<<<<<<<<<<<< * }) * return 0 */ __pyx_t_7 = __Pyx_decode_c_string(__pyx_v_handle_ctx, 0, strlen(__pyx_v_handle_ctx), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_8) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_t_5) < 0) __PYX_ERR(2, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":298 * handle_ctx.decode('latin-1')) * }) * return 0 # <<<<<<<<<<<<<< * * if handle.data is NULL: */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/handles/handle.pyx":292 * 'handle.loop.data is NULL in __ensure_handle_data') * * if handle.data is NULL: # <<<<<<<<<<<<<< * loop = handle.loop.data * loop.call_exception_handler({ */ } /* "uvloop/handles/handle.pyx":300 * return 0 * * if handle.data is NULL: # <<<<<<<<<<<<<< * # The underlying UVHandle object was GCed with an open uv_handle_t. * loop = handle.loop.data */ __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":302 * if handle.data is NULL: * # The underlying UVHandle object was GCed with an open uv_handle_t. * loop = handle.loop.data # <<<<<<<<<<<<<< * loop.call_exception_handler({ * 'message': '{} called after destroying the UVHandle'.format( */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->loop->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":303 * # The underlying UVHandle object was GCed with an open uv_handle_t. * loop = handle.loop.data * loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': '{} called after destroying the UVHandle'.format( * handle_ctx.decode('latin-1')) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":304 * loop = handle.loop.data * loop.call_exception_handler({ * 'message': '{} called after destroying the UVHandle'.format( # <<<<<<<<<<<<<< * handle_ctx.decode('latin-1')) * }) */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_called_after_destroying_the_UVH, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/handle.pyx":305 * loop.call_exception_handler({ * 'message': '{} called after destroying the UVHandle'.format( * handle_ctx.decode('latin-1')) # <<<<<<<<<<<<<< * }) * return 0 */ __pyx_t_9 = __Pyx_decode_c_string(__pyx_v_handle_ctx, 0, strlen(__pyx_v_handle_ctx), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_message, __pyx_t_4) < 0) __PYX_ERR(2, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/handle.pyx":307 * handle_ctx.decode('latin-1')) * }) * return 0 # <<<<<<<<<<<<<< * * return 1 */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/handles/handle.pyx":300 * return 0 * * if handle.data is NULL: # <<<<<<<<<<<<<< * # The underlying UVHandle object was GCed with an open uv_handle_t. * loop = handle.loop.data */ } /* "uvloop/handles/handle.pyx":309 * return 0 * * return 1 # <<<<<<<<<<<<<< * * */ __pyx_r = 1; goto __pyx_L0; /* "uvloop/handles/handle.pyx":278 * * * cdef inline bint __ensure_handle_data(uv.uv_handle_t* handle, # <<<<<<<<<<<<<< * const char* handle_ctx): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__ensure_handle_data", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/handle.pyx":312 * * * cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<< * cdef UVHandle h * */ static void __pyx_f_6uvloop_4loop___uv_close_handle_cb(uv_handle_t *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_h = 0; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_close_handle_cb", 0); /* "uvloop/handles/handle.pyx":315 * cdef UVHandle h * * if handle.data is NULL: # <<<<<<<<<<<<<< * # The original UVHandle is long dead. Just free the mem of * # the uv_handle_t* handler. */ __pyx_t_1 = ((__pyx_v_handle->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":319 * # the uv_handle_t* handler. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if handle.loop == NULL or handle.loop.data == NULL: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":320 * * if UVLOOP_DEBUG: * if handle.loop == NULL or handle.loop.data == NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '__uv_close_handle_cb: handle.loop is invalid') */ __pyx_t_2 = ((__pyx_v_handle->loop == NULL) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = ((__pyx_v_handle->loop->data == NULL) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":321 * if UVLOOP_DEBUG: * if handle.loop == NULL or handle.loop.data == NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '__uv_close_handle_cb: handle.loop is invalid') * (handle.loop.data)._debug_uv_handles_freed += 1 */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 321, __pyx_L1_error) /* "uvloop/handles/handle.pyx":320 * * if UVLOOP_DEBUG: * if handle.loop == NULL or handle.loop.data == NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '__uv_close_handle_cb: handle.loop is invalid') */ } /* "uvloop/handles/handle.pyx":323 * raise RuntimeError( * '__uv_close_handle_cb: handle.loop is invalid') * (handle.loop.data)._debug_uv_handles_freed += 1 # <<<<<<<<<<<<<< * * PyMem_RawFree(handle) */ __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_handle->loop->data))); __pyx_t_4 = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_v_handle->loop->data); __pyx_t_4->_debug_uv_handles_freed = (__pyx_t_4->_debug_uv_handles_freed + 1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "uvloop/handles/handle.pyx":319 * # the uv_handle_t* handler. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if handle.loop == NULL or handle.loop.data == NULL: * raise RuntimeError( */ } /* "uvloop/handles/handle.pyx":325 * (handle.loop.data)._debug_uv_handles_freed += 1 * * PyMem_RawFree(handle) # <<<<<<<<<<<<<< * else: * h = handle.data */ PyMem_RawFree(__pyx_v_handle); /* "uvloop/handles/handle.pyx":315 * cdef UVHandle h * * if handle.data is NULL: # <<<<<<<<<<<<<< * # The original UVHandle is long dead. Just free the mem of * # the uv_handle_t* handler. */ goto __pyx_L3; } /* "uvloop/handles/handle.pyx":327 * PyMem_RawFree(handle) * else: * h = handle.data # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * h._loop._debug_handles_closed.update([ */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_3); __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":328 * else: * h = handle.data * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * h._loop._debug_handles_closed.update([ * h.__class__.__name__]) */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/handle.pyx":329 * h = handle.data * if UVLOOP_DEBUG: * h._loop._debug_handles_closed.update([ # <<<<<<<<<<<<<< * h.__class__.__name__]) * h._free() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_h->_loop->_debug_handles_closed, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/handle.pyx":330 * if UVLOOP_DEBUG: * h._loop._debug_handles_closed.update([ * h.__class__.__name__]) # <<<<<<<<<<<<<< * h._free() * Py_DECREF(h) # Was INCREFed in UVHandle._close */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_h), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/handle.pyx":329 * h = handle.data * if UVLOOP_DEBUG: * h._loop._debug_handles_closed.update([ # <<<<<<<<<<<<<< * h.__class__.__name__]) * h._free() */ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":328 * else: * h = handle.data * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * h._loop._debug_handles_closed.update([ * h.__class__.__name__]) */ } /* "uvloop/handles/handle.pyx":331 * h._loop._debug_handles_closed.update([ * h.__class__.__name__]) * h._free() # <<<<<<<<<<<<<< * Py_DECREF(h) # Was INCREFed in UVHandle._close * */ __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVHandle__free(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/handle.pyx":332 * h.__class__.__name__]) * h._free() * Py_DECREF(h) # Was INCREFed in UVHandle._close # <<<<<<<<<<<<<< * * */ Py_DECREF(((PyObject *)__pyx_v_h)); } __pyx_L3:; /* "uvloop/handles/handle.pyx":312 * * * cdef void __uv_close_handle_cb(uv.uv_handle_t* handle) with gil: # <<<<<<<<<<<<<< * cdef UVHandle h * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(((PyObject *)__pyx_t_4)); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("uvloop.loop.__uv_close_handle_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_h); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/handle.pyx":335 * * * cdef void __close_all_handles(Loop loop): # <<<<<<<<<<<<<< * uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void * */ static void __pyx_f_6uvloop_4loop___close_all_handles(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__close_all_handles", 0); /* "uvloop/handles/handle.pyx":336 * * cdef void __close_all_handles(Loop loop): * uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void # <<<<<<<<<<<<<< * * cdef void __uv_walk_close_all_handles_cb(uv.uv_handle_t* handle, void* arg) with gil: */ uv_walk(__pyx_v_loop->uvloop, __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb, ((void *)__pyx_v_loop)); /* "uvloop/handles/handle.pyx":335 * * * cdef void __close_all_handles(Loop loop): # <<<<<<<<<<<<<< * uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/handle.pyx":338 * uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void * * cdef void __uv_walk_close_all_handles_cb(uv.uv_handle_t* handle, void* arg) with gil: # <<<<<<<<<<<<<< * cdef: * Loop loop = arg */ static void __pyx_f_6uvloop_4loop___uv_walk_close_all_handles_cb(uv_handle_t *__pyx_v_handle, void *__pyx_v_arg) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; struct __pyx_obj_6uvloop_4loop_UVHandle *__pyx_v_h = 0; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_walk_close_all_handles_cb", 0); /* "uvloop/handles/handle.pyx":340 * cdef void __uv_walk_close_all_handles_cb(uv.uv_handle_t* handle, void* arg) with gil: * cdef: * Loop loop = arg # <<<<<<<<<<<<<< * UVHandle h * */ __pyx_t_1 = ((PyObject *)__pyx_v_arg); __Pyx_INCREF(__pyx_t_1); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":343 * UVHandle h * * if uv.uv_is_closing(handle): # <<<<<<<<<<<<<< * # The handle is closed or is closing. * return */ __pyx_t_2 = (uv_is_closing(__pyx_v_handle) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":345 * if uv.uv_is_closing(handle): * # The handle is closed or is closing. * return # <<<<<<<<<<<<<< * * if handle.data is NULL: */ goto __pyx_L0; /* "uvloop/handles/handle.pyx":343 * UVHandle h * * if uv.uv_is_closing(handle): # <<<<<<<<<<<<<< * # The handle is closed or is closing. * return */ } /* "uvloop/handles/handle.pyx":347 * return * * if handle.data is NULL: # <<<<<<<<<<<<<< * # This shouldn't happen. Ever. * loop.call_exception_handler({ */ __pyx_t_2 = ((__pyx_v_handle->data == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":349 * if handle.data is NULL: * # This shouldn't happen. Ever. * loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'handle.data is NULL in __close_all_handles_cb' * }) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/handle.pyx":350 * # This shouldn't happen. Ever. * loop.call_exception_handler({ * 'message': 'handle.data is NULL in __close_all_handles_cb' # <<<<<<<<<<<<<< * }) * return */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_message, __pyx_kp_u_handle_data_is_NULL_in___close_a) < 0) __PYX_ERR(2, 350, __pyx_L1_error) __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":352 * 'message': 'handle.data is NULL in __close_all_handles_cb' * }) * return # <<<<<<<<<<<<<< * * h = handle.data */ goto __pyx_L0; /* "uvloop/handles/handle.pyx":347 * return * * if handle.data is NULL: # <<<<<<<<<<<<<< * # This shouldn't happen. Ever. * loop.call_exception_handler({ */ } /* "uvloop/handles/handle.pyx":354 * return * * h = handle.data # <<<<<<<<<<<<<< * if not h._closed: * h._warn_unclosed() */ __pyx_t_1 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":355 * * h = handle.data * if not h._closed: # <<<<<<<<<<<<<< * h._warn_unclosed() * h._close() */ __pyx_t_2 = ((!(__pyx_v_h->_closed != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/handle.pyx":356 * h = handle.data * if not h._closed: * h._warn_unclosed() # <<<<<<<<<<<<<< * h._close() */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_h->__pyx_vtab)->_warn_unclosed(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":357 * if not h._closed: * h._warn_unclosed() * h._close() # <<<<<<<<<<<<<< */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVHandle *)__pyx_v_h->__pyx_vtab)->_close(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/handle.pyx":355 * * h = handle.data * if not h._closed: # <<<<<<<<<<<<<< * h._warn_unclosed() * h._close() */ } /* "uvloop/handles/handle.pyx":338 * uv.uv_walk(loop.uvloop, __uv_walk_close_all_handles_cb, loop) # void * * cdef void __uv_walk_close_all_handles_cb(uv.uv_handle_t* handle, void* arg) with gil: # <<<<<<<<<<<<<< * cdef: * Loop loop = arg */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("uvloop.loop.__uv_walk_close_all_handles_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF((PyObject *)__pyx_v_h); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/async_.pyx":3 * @cython.no_gc_clear * cdef class UVAsync(UVHandle): * cdef _init(self, Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_7UVAsync__init(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/async_.pyx":6 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":8 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_async_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_async_t)))); /* "uvloop/handles/async_.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_async_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/async_.pyx":11 * PyMem_RawMalloc(sizeof(uv.uv_async_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":12 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_async_init(self._loop.uvloop, */ PyErr_NoMemory(); __PYX_ERR(9, 12, __pyx_L1_error) /* "uvloop/handles/async_.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_async_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/async_.pyx":14 * raise MemoryError() * * err = uv.uv_async_init(self._loop.uvloop, # <<<<<<<<<<<<<< * self._handle, * __uvasync_callback) */ __pyx_v_err = uv_async_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_async_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop___uvasync_callback); /* "uvloop/handles/async_.pyx":17 * self._handle, * __uvasync_callback) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/async_.pyx":18 * __uvasync_callback) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":19 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(9, 19, __pyx_L1_error) /* "uvloop/handles/async_.pyx":17 * self._handle, * __uvasync_callback) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/async_.pyx":21 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * self.callback = callback */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":23 * self._finish_init() * * self.callback = callback # <<<<<<<<<<<<<< * self.ctx = ctx * */ __pyx_v_self->callback = __pyx_v_callback; /* "uvloop/handles/async_.pyx":24 * * self.callback = callback * self.ctx = ctx # <<<<<<<<<<<<<< * * cdef send(self): */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_self->ctx); __Pyx_DECREF(__pyx_v_self->ctx); __pyx_v_self->ctx = __pyx_v_ctx; /* "uvloop/handles/async_.pyx":3 * @cython.no_gc_clear * cdef class UVAsync(UVHandle): * cdef _init(self, Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVAsync._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/async_.pyx":26 * self.ctx = ctx * * cdef send(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_7UVAsync_send(struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("send", 0); /* "uvloop/handles/async_.pyx":29 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_async_send(self._handle) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":31 * self._ensure_alive() * * err = uv.uv_async_send(self._handle) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_async_send(((uv_async_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/async_.pyx":32 * * err = uv.uv_async_send(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/async_.pyx":33 * err = uv.uv_async_send(self._handle) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":34 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":35 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/async_.pyx":32 * * err = uv.uv_async_send(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/async_.pyx":26 * self.ctx = ctx * * cdef send(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVAsync.send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/async_.pyx":38 * * @staticmethod * cdef UVAsync new(Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef UVAsync handle * handle = UVAsync.__new__(UVAsync) */ static struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_f_6uvloop_4loop_7UVAsync_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx) { struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/async_.pyx":40 * cdef UVAsync new(Loop loop, method_t callback, object ctx): * cdef UVAsync handle * handle = UVAsync.__new__(UVAsync) # <<<<<<<<<<<<<< * handle._init(loop, callback, ctx) * return handle */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVAsync(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVAsync), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVAsync)))) __PYX_ERR(9, 40, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":41 * cdef UVAsync handle * handle = UVAsync.__new__(UVAsync) * handle._init(loop, callback, ctx) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_callback, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/async_.pyx":42 * handle = UVAsync.__new__(UVAsync) * handle._init(loop, callback, ctx) * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/async_.pyx":38 * * @staticmethod * cdef UVAsync new(Loop loop, method_t callback, object ctx): # <<<<<<<<<<<<<< * cdef UVAsync handle * handle = UVAsync.__new__(UVAsync) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVAsync.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/async_.pyx":45 * * * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVAsync callback") == 0: * return */ static void __pyx_f_6uvloop_4loop___uvasync_callback(uv_async_t *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVAsync *__pyx_v_async_ = 0; __pyx_t_6uvloop_4loop_method_t __pyx_v_cb; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __pyx_t_6uvloop_4loop_method_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uvasync_callback", 0); /* "uvloop/handles/async_.pyx":46 * * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: * if __ensure_handle_data(handle, "UVAsync callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVAsync callback")) == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/async_.pyx":47 * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: * if __ensure_handle_data(handle, "UVAsync callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/async_.pyx":46 * * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: * if __ensure_handle_data(handle, "UVAsync callback") == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/async_.pyx":50 * * cdef: * UVAsync async_ = handle.data # <<<<<<<<<<<<<< * method_t cb = async_.callback * try: */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_async_ = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/async_.pyx":51 * cdef: * UVAsync async_ = handle.data * method_t cb = async_.callback # <<<<<<<<<<<<<< * try: * cb(async_.ctx) */ __pyx_t_3 = __pyx_v_async_->callback; __pyx_v_cb = __pyx_t_3; /* "uvloop/handles/async_.pyx":52 * UVAsync async_ = handle.data * method_t cb = async_.callback * try: # <<<<<<<<<<<<<< * cb(async_.ctx) * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/handles/async_.pyx":53 * method_t cb = async_.callback * try: * cb(async_.ctx) # <<<<<<<<<<<<<< * except BaseException as ex: * async_._error(ex, False) */ __pyx_t_2 = __pyx_v_async_->ctx; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = __pyx_v_cb(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 53, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/async_.pyx":52 * UVAsync async_ = handle.data * method_t cb = async_.callback * try: # <<<<<<<<<<<<<< * cb(async_.ctx) * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/async_.pyx":54 * try: * cb(async_.ctx) * except BaseException as ex: # <<<<<<<<<<<<<< * async_._error(ex, False) */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.__uvasync_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(9, 54, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_v_ex = __pyx_t_2; /*try:*/ { /* "uvloop/handles/async_.pyx":55 * cb(async_.ctx) * except BaseException as ex: * async_._error(ex, False) # <<<<<<<<<<<<<< */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVAsync *)__pyx_v_async_->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_async_), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(9, 55, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/handles/async_.pyx":54 * try: * cb(async_.ctx) * except BaseException as ex: # <<<<<<<<<<<<<< * async_._error(ex, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/handles/async_.pyx":52 * UVAsync async_ = handle.data * method_t cb = async_.callback * try: # <<<<<<<<<<<<<< * cb(async_.ctx) * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } /* "uvloop/handles/async_.pyx":45 * * * cdef void __uvasync_callback(uv.uv_async_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVAsync callback") == 0: * return */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("uvloop.loop.__uvasync_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_async_); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/idle.pyx":3 * @cython.no_gc_clear * cdef class UVIdle(UVHandle): * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_6UVIdle__init(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/idle.pyx":6 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":8 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_idle_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_idle_t)))); /* "uvloop/handles/idle.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_idle_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/idle.pyx":11 * PyMem_RawMalloc(sizeof(uv.uv_idle_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":12 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_idle_init(self._loop.uvloop, self._handle) */ PyErr_NoMemory(); __PYX_ERR(10, 12, __pyx_L1_error) /* "uvloop/handles/idle.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_idle_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/idle.pyx":14 * raise MemoryError() * * err = uv.uv_idle_init(self._loop.uvloop, self._handle) # <<<<<<<<<<<<<< * if err < 0: * self._abort_init() */ __pyx_v_err = uv_idle_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_idle_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/idle.pyx":15 * * err = uv.uv_idle_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/idle.pyx":16 * err = uv.uv_idle_init(self._loop.uvloop, self._handle) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":17 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(10, 17, __pyx_L1_error) /* "uvloop/handles/idle.pyx":15 * * err = uv.uv_idle_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/idle.pyx":19 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * self.h = h */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":21 * self._finish_init() * * self.h = h # <<<<<<<<<<<<<< * self.running = 0 * */ __Pyx_INCREF(((PyObject *)__pyx_v_h)); __Pyx_GIVEREF(((PyObject *)__pyx_v_h)); __Pyx_GOTREF(__pyx_v_self->h); __Pyx_DECREF(((PyObject *)__pyx_v_self->h)); __pyx_v_self->h = __pyx_v_h; /* "uvloop/handles/idle.pyx":22 * * self.h = h * self.running = 0 # <<<<<<<<<<<<<< * * cdef inline stop(self): */ __pyx_v_self->running = 0; /* "uvloop/handles/idle.pyx":3 * @cython.no_gc_clear * cdef class UVIdle(UVHandle): * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVIdle._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/idle.pyx":24 * self.running = 0 * * cdef inline stop(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_stop(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("stop", 0); /* "uvloop/handles/idle.pyx":27 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/idle.pyx":28 * * if not self._is_alive(): * self.running = 0 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->running = 0; /* "uvloop/handles/idle.pyx":29 * if not self._is_alive(): * self.running = 0 * return # <<<<<<<<<<<<<< * * if self.running == 1: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/idle.pyx":27 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ } /* "uvloop/handles/idle.pyx":31 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_idle_stop(self._handle) * self.running = 0 */ __pyx_t_1 = ((__pyx_v_self->running == 1) != 0); if (__pyx_t_1) { /* "uvloop/handles/idle.pyx":32 * * if self.running == 1: * err = uv.uv_idle_stop(self._handle) # <<<<<<<<<<<<<< * self.running = 0 * if err < 0: */ __pyx_v_err = uv_idle_stop(((uv_idle_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/idle.pyx":33 * if self.running == 1: * err = uv.uv_idle_stop(self._handle) * self.running = 0 # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_self->running = 0; /* "uvloop/handles/idle.pyx":34 * err = uv.uv_idle_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/idle.pyx":35 * self.running = 0 * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":36 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":37 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef inline start(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/idle.pyx":34 * err = uv.uv_idle_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/idle.pyx":31 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_idle_stop(self._handle) * self.running = 0 */ } /* "uvloop/handles/idle.pyx":24 * self.running = 0 * * cdef inline stop(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVIdle.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/idle.pyx":39 * return * * cdef inline start(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVIdle_start(struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("start", 0); /* "uvloop/handles/idle.pyx":42 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * if self.running == 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":44 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * err = uv.uv_idle_start(self._handle, * cb_idle_callback) */ __pyx_t_2 = ((__pyx_v_self->running == 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/idle.pyx":45 * * if self.running == 0: * err = uv.uv_idle_start(self._handle, # <<<<<<<<<<<<<< * cb_idle_callback) * if err < 0: */ __pyx_v_err = uv_idle_start(((uv_idle_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop_cb_idle_callback); /* "uvloop/handles/idle.pyx":47 * err = uv.uv_idle_start(self._handle, * cb_idle_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/idle.pyx":48 * cb_idle_callback) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":49 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * self.running = 1 */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":50 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * self.running = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/idle.pyx":47 * err = uv.uv_idle_start(self._handle, * cb_idle_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/idle.pyx":51 * self._fatal_error(exc, True) * return * self.running = 1 # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->running = 1; /* "uvloop/handles/idle.pyx":44 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * err = uv.uv_idle_start(self._handle, * cb_idle_callback) */ } /* "uvloop/handles/idle.pyx":39 * return * * cdef inline start(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVIdle.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/idle.pyx":54 * * @staticmethod * cdef UVIdle new(Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef UVIdle handle * handle = UVIdle.__new__(UVIdle) */ static struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_f_6uvloop_4loop_6UVIdle_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) { struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/idle.pyx":56 * cdef UVIdle new(Loop loop, Handle h): * cdef UVIdle handle * handle = UVIdle.__new__(UVIdle) # <<<<<<<<<<<<<< * handle._init(loop, h) * return handle */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVIdle(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVIdle), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVIdle)))) __PYX_ERR(10, 56, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":57 * cdef UVIdle handle * handle = UVIdle.__new__(UVIdle) * handle._init(loop, h) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/idle.pyx":58 * handle = UVIdle.__new__(UVIdle) * handle._init(loop, h) * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/idle.pyx":54 * * @staticmethod * cdef UVIdle new(Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef UVIdle handle * handle = UVIdle.__new__(UVIdle) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVIdle.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/idle.pyx":61 * * * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVIdle callback") == 0: * return */ static void __pyx_f_6uvloop_4loop_cb_idle_callback(uv_idle_t *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVIdle *__pyx_v_idle = 0; struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("cb_idle_callback", 0); /* "uvloop/handles/idle.pyx":62 * * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: * if __ensure_handle_data(handle, "UVIdle callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVIdle callback")) == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/idle.pyx":63 * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: * if __ensure_handle_data(handle, "UVIdle callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/idle.pyx":62 * * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: * if __ensure_handle_data(handle, "UVIdle callback") == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/idle.pyx":66 * * cdef: * UVIdle idle = handle.data # <<<<<<<<<<<<<< * Handle h = idle.h * try: */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":67 * cdef: * UVIdle idle = handle.data * Handle h = idle.h # <<<<<<<<<<<<<< * try: * h._run() */ __pyx_t_2 = ((PyObject *)__pyx_v_idle->h); __Pyx_INCREF(__pyx_t_2); __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":68 * UVIdle idle = handle.data * Handle h = idle.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/idle.pyx":69 * Handle h = idle.h * try: * h._run() # <<<<<<<<<<<<<< * except BaseException as ex: * idle._error(ex, False) */ __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 69, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":68 * UVIdle idle = handle.data * Handle h = idle.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/idle.pyx":70 * try: * h._run() * except BaseException as ex: # <<<<<<<<<<<<<< * idle._error(ex, False) */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.cb_idle_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(10, 70, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/idle.pyx":71 * h._run() * except BaseException as ex: * idle._error(ex, False) # <<<<<<<<<<<<<< */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVIdle *)__pyx_v_idle->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_idle), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 71, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/idle.pyx":70 * try: * h._run() * except BaseException as ex: # <<<<<<<<<<<<<< * idle._error(ex, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/handles/idle.pyx":68 * UVIdle idle = handle.data * Handle h = idle.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "uvloop/handles/idle.pyx":61 * * * cdef void cb_idle_callback(uv.uv_idle_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVIdle callback") == 0: * return */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.cb_idle_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_idle); __Pyx_XDECREF((PyObject *)__pyx_v_h); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/check.pyx":3 * @cython.no_gc_clear * cdef class UVCheck(UVHandle): * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_7UVCheck__init(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/check.pyx":6 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":8 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_check_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_check_t)))); /* "uvloop/handles/check.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_check_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/check.pyx":11 * PyMem_RawMalloc(sizeof(uv.uv_check_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":12 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_check_init(self._loop.uvloop, self._handle) */ PyErr_NoMemory(); __PYX_ERR(11, 12, __pyx_L1_error) /* "uvloop/handles/check.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_check_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/check.pyx":14 * raise MemoryError() * * err = uv.uv_check_init(self._loop.uvloop, self._handle) # <<<<<<<<<<<<<< * if err < 0: * self._abort_init() */ __pyx_v_err = uv_check_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_check_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/check.pyx":15 * * err = uv.uv_check_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/check.pyx":16 * err = uv.uv_check_init(self._loop.uvloop, self._handle) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":17 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(11, 17, __pyx_L1_error) /* "uvloop/handles/check.pyx":15 * * err = uv.uv_check_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/check.pyx":19 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * self.h = h */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":21 * self._finish_init() * * self.h = h # <<<<<<<<<<<<<< * self.running = 0 * */ __Pyx_INCREF(((PyObject *)__pyx_v_h)); __Pyx_GIVEREF(((PyObject *)__pyx_v_h)); __Pyx_GOTREF(__pyx_v_self->h); __Pyx_DECREF(((PyObject *)__pyx_v_self->h)); __pyx_v_self->h = __pyx_v_h; /* "uvloop/handles/check.pyx":22 * * self.h = h * self.running = 0 # <<<<<<<<<<<<<< * * cdef inline stop(self): */ __pyx_v_self->running = 0; /* "uvloop/handles/check.pyx":3 * @cython.no_gc_clear * cdef class UVCheck(UVHandle): * cdef _init(self, Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVCheck._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/check.pyx":24 * self.running = 0 * * cdef inline stop(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_stop(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("stop", 0); /* "uvloop/handles/check.pyx":27 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/check.pyx":28 * * if not self._is_alive(): * self.running = 0 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->running = 0; /* "uvloop/handles/check.pyx":29 * if not self._is_alive(): * self.running = 0 * return # <<<<<<<<<<<<<< * * if self.running == 1: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/check.pyx":27 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ } /* "uvloop/handles/check.pyx":31 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_check_stop(self._handle) * self.running = 0 */ __pyx_t_1 = ((__pyx_v_self->running == 1) != 0); if (__pyx_t_1) { /* "uvloop/handles/check.pyx":32 * * if self.running == 1: * err = uv.uv_check_stop(self._handle) # <<<<<<<<<<<<<< * self.running = 0 * if err < 0: */ __pyx_v_err = uv_check_stop(((uv_check_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/check.pyx":33 * if self.running == 1: * err = uv.uv_check_stop(self._handle) * self.running = 0 # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_self->running = 0; /* "uvloop/handles/check.pyx":34 * err = uv.uv_check_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/check.pyx":35 * self.running = 0 * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":36 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":37 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef inline start(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/check.pyx":34 * err = uv.uv_check_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/check.pyx":31 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_check_stop(self._handle) * self.running = 0 */ } /* "uvloop/handles/check.pyx":24 * self.running = 0 * * cdef inline stop(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVCheck.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/check.pyx":39 * return * * cdef inline start(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_7UVCheck_start(struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("start", 0); /* "uvloop/handles/check.pyx":42 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * if self.running == 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":44 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * err = uv.uv_check_start(self._handle, * cb_check_callback) */ __pyx_t_2 = ((__pyx_v_self->running == 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/check.pyx":45 * * if self.running == 0: * err = uv.uv_check_start(self._handle, # <<<<<<<<<<<<<< * cb_check_callback) * if err < 0: */ __pyx_v_err = uv_check_start(((uv_check_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop_cb_check_callback); /* "uvloop/handles/check.pyx":47 * err = uv.uv_check_start(self._handle, * cb_check_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/check.pyx":48 * cb_check_callback) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":49 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * self.running = 1 */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":50 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * self.running = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/check.pyx":47 * err = uv.uv_check_start(self._handle, * cb_check_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/check.pyx":51 * self._fatal_error(exc, True) * return * self.running = 1 # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->running = 1; /* "uvloop/handles/check.pyx":44 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * err = uv.uv_check_start(self._handle, * cb_check_callback) */ } /* "uvloop/handles/check.pyx":39 * return * * cdef inline start(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVCheck.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/check.pyx":54 * * @staticmethod * cdef UVCheck new(Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef UVCheck handle * handle = UVCheck.__new__(UVCheck) */ static struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_f_6uvloop_4loop_7UVCheck_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h) { struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/check.pyx":56 * cdef UVCheck new(Loop loop, Handle h): * cdef UVCheck handle * handle = UVCheck.__new__(UVCheck) # <<<<<<<<<<<<<< * handle._init(loop, h) * return handle */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVCheck(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVCheck), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVCheck)))) __PYX_ERR(11, 56, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":57 * cdef UVCheck handle * handle = UVCheck.__new__(UVCheck) * handle._init(loop, h) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/check.pyx":58 * handle = UVCheck.__new__(UVCheck) * handle._init(loop, h) * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/check.pyx":54 * * @staticmethod * cdef UVCheck new(Loop loop, Handle h): # <<<<<<<<<<<<<< * cdef UVCheck handle * handle = UVCheck.__new__(UVCheck) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVCheck.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/check.pyx":61 * * * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVCheck callback") == 0: * return */ static void __pyx_f_6uvloop_4loop_cb_check_callback(uv_check_t *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVCheck *__pyx_v_check = 0; struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_h = 0; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("cb_check_callback", 0); /* "uvloop/handles/check.pyx":62 * * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: * if __ensure_handle_data(handle, "UVCheck callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVCheck callback")) == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/check.pyx":63 * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: * if __ensure_handle_data(handle, "UVCheck callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/check.pyx":62 * * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: * if __ensure_handle_data(handle, "UVCheck callback") == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/check.pyx":66 * * cdef: * UVCheck check = handle.data # <<<<<<<<<<<<<< * Handle h = check.h * try: */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_check = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":67 * cdef: * UVCheck check = handle.data * Handle h = check.h # <<<<<<<<<<<<<< * try: * h._run() */ __pyx_t_2 = ((PyObject *)__pyx_v_check->h); __Pyx_INCREF(__pyx_t_2); __pyx_v_h = ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":68 * UVCheck check = handle.data * Handle h = check.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/check.pyx":69 * Handle h = check.h * try: * h._run() # <<<<<<<<<<<<<< * except BaseException as ex: * check._error(ex, False) */ __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 69, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":68 * UVCheck check = handle.data * Handle h = check.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/check.pyx":70 * try: * h._run() * except BaseException as ex: # <<<<<<<<<<<<<< * check._error(ex, False) */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.cb_check_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(11, 70, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/check.pyx":71 * h._run() * except BaseException as ex: * check._error(ex, False) # <<<<<<<<<<<<<< */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVCheck *)__pyx_v_check->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_check), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 71, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/check.pyx":70 * try: * h._run() * except BaseException as ex: # <<<<<<<<<<<<<< * check._error(ex, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/handles/check.pyx":68 * UVCheck check = handle.data * Handle h = check.h * try: # <<<<<<<<<<<<<< * h._run() * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "uvloop/handles/check.pyx":61 * * * cdef void cb_check_callback(uv.uv_check_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVCheck callback") == 0: * return */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.cb_check_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_check); __Pyx_XDECREF((PyObject *)__pyx_v_h); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/timer.pyx":3 * @cython.no_gc_clear * cdef class UVTimer(UVHandle): * cdef _init(self, Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<< * uint64_t timeout): * */ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer__init(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/timer.pyx":8 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":10 * self._start_init(loop) * * self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) # <<<<<<<<<<<<<< * if self._handle is NULL: * self._abort_init() */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_timer_t)))); /* "uvloop/handles/timer.pyx":11 * * self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/timer.pyx":12 * self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":13 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_timer_init(self._loop.uvloop, self._handle) */ PyErr_NoMemory(); __PYX_ERR(12, 13, __pyx_L1_error) /* "uvloop/handles/timer.pyx":11 * * self._handle = PyMem_RawMalloc(sizeof(uv.uv_timer_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/timer.pyx":15 * raise MemoryError() * * err = uv.uv_timer_init(self._loop.uvloop, self._handle) # <<<<<<<<<<<<<< * if err < 0: * self._abort_init() */ __pyx_v_err = uv_timer_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_timer_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/timer.pyx":16 * * err = uv.uv_timer_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/timer.pyx":17 * err = uv.uv_timer_init(self._loop.uvloop, self._handle) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":18 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(12, 18, __pyx_L1_error) /* "uvloop/handles/timer.pyx":16 * * err = uv.uv_timer_init(self._loop.uvloop, self._handle) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/timer.pyx":20 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * self.callback = callback */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":22 * self._finish_init() * * self.callback = callback # <<<<<<<<<<<<<< * self.ctx = ctx * self.running = 0 */ __pyx_v_self->callback = __pyx_v_callback; /* "uvloop/handles/timer.pyx":23 * * self.callback = callback * self.ctx = ctx # <<<<<<<<<<<<<< * self.running = 0 * self.timeout = timeout */ __Pyx_INCREF(__pyx_v_ctx); __Pyx_GIVEREF(__pyx_v_ctx); __Pyx_GOTREF(__pyx_v_self->ctx); __Pyx_DECREF(__pyx_v_self->ctx); __pyx_v_self->ctx = __pyx_v_ctx; /* "uvloop/handles/timer.pyx":24 * self.callback = callback * self.ctx = ctx * self.running = 0 # <<<<<<<<<<<<<< * self.timeout = timeout * */ __pyx_v_self->running = 0; /* "uvloop/handles/timer.pyx":25 * self.ctx = ctx * self.running = 0 * self.timeout = timeout # <<<<<<<<<<<<<< * * cdef stop(self): */ __pyx_v_self->timeout = __pyx_v_timeout; /* "uvloop/handles/timer.pyx":3 * @cython.no_gc_clear * cdef class UVTimer(UVHandle): * cdef _init(self, Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<< * uint64_t timeout): * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVTimer._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/timer.pyx":27 * self.timeout = timeout * * cdef stop(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_stop(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("stop", 0); /* "uvloop/handles/timer.pyx":30 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/timer.pyx":31 * * if not self._is_alive(): * self.running = 0 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->running = 0; /* "uvloop/handles/timer.pyx":32 * if not self._is_alive(): * self.running = 0 * return # <<<<<<<<<<<<<< * * if self.running == 1: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/timer.pyx":30 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * self.running = 0 * return */ } /* "uvloop/handles/timer.pyx":34 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_timer_stop(self._handle) * self.running = 0 */ __pyx_t_1 = ((__pyx_v_self->running == 1) != 0); if (__pyx_t_1) { /* "uvloop/handles/timer.pyx":35 * * if self.running == 1: * err = uv.uv_timer_stop(self._handle) # <<<<<<<<<<<<<< * self.running = 0 * if err < 0: */ __pyx_v_err = uv_timer_stop(((uv_timer_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/timer.pyx":36 * if self.running == 1: * err = uv.uv_timer_stop(self._handle) * self.running = 0 # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_self->running = 0; /* "uvloop/handles/timer.pyx":37 * err = uv.uv_timer_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/timer.pyx":38 * self.running = 0 * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/timer.pyx":39 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/timer.pyx":40 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef start(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/timer.pyx":37 * err = uv.uv_timer_stop(self._handle) * self.running = 0 * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/timer.pyx":34 * return * * if self.running == 1: # <<<<<<<<<<<<<< * err = uv.uv_timer_stop(self._handle) * self.running = 0 */ } /* "uvloop/handles/timer.pyx":27 * self.timeout = timeout * * cdef stop(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVTimer.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/timer.pyx":42 * return * * cdef start(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_7UVTimer_start(struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("start", 0); /* "uvloop/handles/timer.pyx":45 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * if self.running == 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":47 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * # Update libuv internal time. * uv.uv_update_time(self._loop.uvloop) # void */ __pyx_t_2 = ((__pyx_v_self->running == 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/timer.pyx":49 * if self.running == 0: * # Update libuv internal time. * uv.uv_update_time(self._loop.uvloop) # void # <<<<<<<<<<<<<< * * err = uv.uv_timer_start(self._handle, */ uv_update_time(__pyx_v_self->__pyx_base._loop->uvloop); /* "uvloop/handles/timer.pyx":51 * uv.uv_update_time(self._loop.uvloop) # void * * err = uv.uv_timer_start(self._handle, # <<<<<<<<<<<<<< * __uvtimer_callback, * self.timeout, 0) */ __pyx_v_err = uv_timer_start(((uv_timer_t *)__pyx_v_self->__pyx_base._handle), __pyx_f_6uvloop_4loop___uvtimer_callback, __pyx_v_self->timeout, 0); /* "uvloop/handles/timer.pyx":54 * __uvtimer_callback, * self.timeout, 0) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/timer.pyx":55 * self.timeout, 0) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":56 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * self.running = 1 */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":57 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * self.running = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/timer.pyx":54 * __uvtimer_callback, * self.timeout, 0) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/timer.pyx":58 * self._fatal_error(exc, True) * return * self.running = 1 # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->running = 1; /* "uvloop/handles/timer.pyx":47 * self._ensure_alive() * * if self.running == 0: # <<<<<<<<<<<<<< * # Update libuv internal time. * uv.uv_update_time(self._loop.uvloop) # void */ } /* "uvloop/handles/timer.pyx":42 * return * * cdef start(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVTimer.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/timer.pyx":61 * * @staticmethod * cdef UVTimer new(Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<< * uint64_t timeout): * */ static struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_f_6uvloop_4loop_7UVTimer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, __pyx_t_6uvloop_4loop_method_t __pyx_v_callback, PyObject *__pyx_v_ctx, uint64_t __pyx_v_timeout) { struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/timer.pyx":65 * * cdef UVTimer handle * handle = UVTimer.__new__(UVTimer) # <<<<<<<<<<<<<< * handle._init(loop, callback, ctx, timeout) * return handle */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVTimer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVTimer), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVTimer)))) __PYX_ERR(12, 65, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":66 * cdef UVTimer handle * handle = UVTimer.__new__(UVTimer) * handle._init(loop, callback, ctx, timeout) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_callback, __pyx_v_ctx, __pyx_v_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/timer.pyx":67 * handle = UVTimer.__new__(UVTimer) * handle._init(loop, callback, ctx, timeout) * return handle # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/timer.pyx":61 * * @staticmethod * cdef UVTimer new(Loop loop, method_t callback, object ctx, # <<<<<<<<<<<<<< * uint64_t timeout): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVTimer.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/timer.pyx":70 * * * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVTimer callback") == 0: * return */ static void __pyx_f_6uvloop_4loop___uvtimer_callback(uv_timer_t *__pyx_v_handle) { struct __pyx_obj_6uvloop_4loop_UVTimer *__pyx_v_timer = 0; __pyx_t_6uvloop_4loop_method_t __pyx_v_cb; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __pyx_t_6uvloop_4loop_method_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uvtimer_callback", 0); /* "uvloop/handles/timer.pyx":71 * * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: * if __ensure_handle_data(handle, "UVTimer callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVTimer callback")) == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/timer.pyx":72 * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: * if __ensure_handle_data(handle, "UVTimer callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/timer.pyx":71 * * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: * if __ensure_handle_data(handle, "UVTimer callback") == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/timer.pyx":75 * * cdef: * UVTimer timer = handle.data # <<<<<<<<<<<<<< * method_t cb = timer.callback * */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/timer.pyx":76 * cdef: * UVTimer timer = handle.data * method_t cb = timer.callback # <<<<<<<<<<<<<< * * timer.running = 0 */ __pyx_t_3 = __pyx_v_timer->callback; __pyx_v_cb = __pyx_t_3; /* "uvloop/handles/timer.pyx":78 * method_t cb = timer.callback * * timer.running = 0 # <<<<<<<<<<<<<< * try: * cb(timer.ctx) */ __pyx_v_timer->running = 0; /* "uvloop/handles/timer.pyx":79 * * timer.running = 0 * try: # <<<<<<<<<<<<<< * cb(timer.ctx) * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/handles/timer.pyx":80 * timer.running = 0 * try: * cb(timer.ctx) # <<<<<<<<<<<<<< * except BaseException as ex: * timer._error(ex, False) */ __pyx_t_2 = __pyx_v_timer->ctx; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = __pyx_v_cb(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 80, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/timer.pyx":79 * * timer.running = 0 * try: # <<<<<<<<<<<<<< * cb(timer.ctx) * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/timer.pyx":81 * try: * cb(timer.ctx) * except BaseException as ex: # <<<<<<<<<<<<<< * timer._error(ex, False) */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.__uvtimer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(12, 81, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_v_ex = __pyx_t_2; /*try:*/ { /* "uvloop/handles/timer.pyx":82 * cb(timer.ctx) * except BaseException as ex: * timer._error(ex, False) # <<<<<<<<<<<<<< */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVTimer *)__pyx_v_timer->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_timer), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(12, 82, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/handles/timer.pyx":81 * try: * cb(timer.ctx) * except BaseException as ex: # <<<<<<<<<<<<<< * timer._error(ex, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/handles/timer.pyx":79 * * timer.running = 0 * try: # <<<<<<<<<<<<<< * cb(timer.ctx) * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L11_try_end:; } /* "uvloop/handles/timer.pyx":70 * * * cdef void __uvtimer_callback(uv.uv_timer_t* handle) with gil: # <<<<<<<<<<<<<< * if __ensure_handle_data(handle, "UVTimer callback") == 0: * return */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("uvloop.loop.__uvtimer_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_timer); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/poll.pyx":3 * @cython.no_gc_clear * cdef class UVPoll(UVHandle): * cdef _init(self, Loop loop, int fd): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__init(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/poll.pyx":6 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":8 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_poll_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_poll_t)))); /* "uvloop/handles/poll.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_poll_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":11 * PyMem_RawMalloc(sizeof(uv.uv_poll_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":12 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_poll_init(self._loop.uvloop, */ PyErr_NoMemory(); __PYX_ERR(13, 12, __pyx_L1_error) /* "uvloop/handles/poll.pyx":10 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_poll_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/poll.pyx":14 * raise MemoryError() * * err = uv.uv_poll_init(self._loop.uvloop, # <<<<<<<<<<<<<< * self._handle, fd) * if err < 0: */ __pyx_v_err = uv_poll_init(__pyx_v_self->__pyx_base._loop->uvloop, ((uv_poll_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_fd); /* "uvloop/handles/poll.pyx":16 * err = uv.uv_poll_init(self._loop.uvloop, * self._handle, fd) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":17 * self._handle, fd) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":18 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(13, 18, __pyx_L1_error) /* "uvloop/handles/poll.pyx":16 * err = uv.uv_poll_init(self._loop.uvloop, * self._handle, fd) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/poll.pyx":20 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * self.fd = fd */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":22 * self._finish_init() * * self.fd = fd # <<<<<<<<<<<<<< * self.reading_handle = None * self.writing_handle = None */ __pyx_v_self->fd = __pyx_v_fd; /* "uvloop/handles/poll.pyx":23 * * self.fd = fd * self.reading_handle = None # <<<<<<<<<<<<<< * self.writing_handle = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->reading_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle)); __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":24 * self.fd = fd * self.reading_handle = None * self.writing_handle = None # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->writing_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle)); __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":3 * @cython.no_gc_clear * cdef class UVPoll(UVHandle): * cdef _init(self, Loop loop, int fd): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVPoll._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":27 * * @staticmethod * cdef UVPoll new(Loop loop, int fd): # <<<<<<<<<<<<<< * cdef UVPoll handle * handle = UVPoll.__new__(UVPoll) */ static struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_f_6uvloop_4loop_6UVPoll_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, int __pyx_v_fd) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/poll.pyx":29 * cdef UVPoll new(Loop loop, int fd): * cdef UVPoll handle * handle = UVPoll.__new__(UVPoll) # <<<<<<<<<<<<<< * handle._init(loop, fd) * return handle */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVPoll(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVPoll), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVPoll)))) __PYX_ERR(13, 29, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":30 * cdef UVPoll handle * handle = UVPoll.__new__(UVPoll) * handle._init(loop, fd) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_handle->__pyx_base.__pyx_vtab)->_init(__pyx_v_handle, __pyx_v_loop, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":31 * handle = UVPoll.__new__(UVPoll) * handle._init(loop, fd) * return handle # <<<<<<<<<<<<<< * * cdef int is_active(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/poll.pyx":27 * * @staticmethod * cdef UVPoll new(Loop loop, int fd): # <<<<<<<<<<<<<< * cdef UVPoll handle * handle = UVPoll.__new__(UVPoll) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVPoll.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":33 * return handle * * cdef int is_active(self): # <<<<<<<<<<<<<< * return (self.reading_handle is not None or * self.writing_handle is not None) */ static int __pyx_f_6uvloop_4loop_6UVPoll_is_active(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("is_active", 0); /* "uvloop/handles/poll.pyx":34 * * cdef int is_active(self): * return (self.reading_handle is not None or # <<<<<<<<<<<<<< * self.writing_handle is not None) * */ __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } /* "uvloop/handles/poll.pyx":35 * cdef int is_active(self): * return (self.reading_handle is not None or * self.writing_handle is not None) # <<<<<<<<<<<<<< * * cdef inline _poll_start(self, int flags): */ __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; /* "uvloop/handles/poll.pyx":33 * return handle * * cdef int is_active(self): # <<<<<<<<<<<<<< * return (self.reading_handle is not None or * self.writing_handle is not None) */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":37 * self.writing_handle is not None) * * cdef inline _poll_start(self, int flags): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_start(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, int __pyx_v_flags) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_poll_start", 0); /* "uvloop/handles/poll.pyx":40 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_poll_start( */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":42 * self._ensure_alive() * * err = uv.uv_poll_start( # <<<<<<<<<<<<<< * self._handle, * flags, */ __pyx_v_err = uv_poll_start(((uv_poll_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_flags, __pyx_f_6uvloop_4loop___on_uvpoll_event); /* "uvloop/handles/poll.pyx":47 * __on_uvpoll_event) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":48 * * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":49 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/poll.pyx":50 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef inline _poll_stop(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/poll.pyx":47 * __on_uvpoll_event) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/poll.pyx":37 * self.writing_handle is not None) * * cdef inline _poll_start(self, int flags): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVPoll._poll_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":52 * return * * cdef inline _poll_stop(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_6UVPoll__poll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; int __pyx_v_backend_id; struct epoll_event __pyx_v_dummy_event; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_poll_stop", 0); /* "uvloop/handles/poll.pyx":55 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":56 * * if not self._is_alive(): * return # <<<<<<<<<<<<<< * * err = uv.uv_poll_stop(self._handle) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/poll.pyx":55 * cdef int err * * if not self._is_alive(): # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/poll.pyx":58 * return * * err = uv.uv_poll_stop(self._handle) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_poll_stop(((uv_poll_t *)__pyx_v_self->__pyx_base._handle)); /* "uvloop/handles/poll.pyx":59 * * err = uv.uv_poll_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":60 * err = uv.uv_poll_stop(self._handle) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":61 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":62 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/poll.pyx":59 * * err = uv.uv_poll_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/poll.pyx":68 * system.epoll_event dummy_event * * if system.PLATFORM_IS_LINUX: # <<<<<<<<<<<<<< * # libuv doesn't remove the FD from epoll immediately * # after uv_poll_stop or uv_poll_close, causing hard */ __pyx_t_1 = (PLATFORM_IS_LINUX != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":78 * # after calling uv_poll_stop. * * backend_id = uv.uv_backend_fd(self._loop.uvloop) # <<<<<<<<<<<<<< * if backend_id != -1: * memset(&dummy_event, 0, sizeof(dummy_event)) */ __pyx_v_backend_id = uv_backend_fd(__pyx_v_self->__pyx_base._loop->uvloop); /* "uvloop/handles/poll.pyx":79 * * backend_id = uv.uv_backend_fd(self._loop.uvloop) * if backend_id != -1: # <<<<<<<<<<<<<< * memset(&dummy_event, 0, sizeof(dummy_event)) * system.epoll_ctl( */ __pyx_t_1 = ((__pyx_v_backend_id != -1L) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":80 * backend_id = uv.uv_backend_fd(self._loop.uvloop) * if backend_id != -1: * memset(&dummy_event, 0, sizeof(dummy_event)) # <<<<<<<<<<<<<< * system.epoll_ctl( * backend_id, */ memset((&__pyx_v_dummy_event), 0, (sizeof(__pyx_v_dummy_event))); /* "uvloop/handles/poll.pyx":81 * if backend_id != -1: * memset(&dummy_event, 0, sizeof(dummy_event)) * system.epoll_ctl( # <<<<<<<<<<<<<< * backend_id, * system.EPOLL_CTL_DEL, */ epoll_ctl(__pyx_v_backend_id, EPOLL_CTL_DEL, __pyx_v_self->fd, (&__pyx_v_dummy_event)); /* "uvloop/handles/poll.pyx":79 * * backend_id = uv.uv_backend_fd(self._loop.uvloop) * if backend_id != -1: # <<<<<<<<<<<<<< * memset(&dummy_event, 0, sizeof(dummy_event)) * system.epoll_ctl( */ } /* "uvloop/handles/poll.pyx":68 * system.epoll_event dummy_event * * if system.PLATFORM_IS_LINUX: # <<<<<<<<<<<<<< * # libuv doesn't remove the FD from epoll immediately * # after uv_poll_stop or uv_poll_close, causing hard */ } /* "uvloop/handles/poll.pyx":52 * return * * cdef inline _poll_stop(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVPoll._poll_stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":87 * &dummy_event) # ignore errors * * cdef start_reading(self, Handle callback): # <<<<<<<<<<<<<< * cdef: * int mask = 0 */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback) { int __pyx_v_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("start_reading", 0); /* "uvloop/handles/poll.pyx":89 * cdef start_reading(self, Handle callback): * cdef: * int mask = 0 # <<<<<<<<<<<<<< * * if self.reading_handle is None: */ __pyx_v_mask = 0; /* "uvloop/handles/poll.pyx":91 * int mask = 0 * * if self.reading_handle is None: # <<<<<<<<<<<<<< * # not reading right now, setup the handle * */ __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":94 * # not reading right now, setup the handle * * mask = uv.UV_READABLE # <<<<<<<<<<<<<< * if self.writing_handle is not None: * # are we writing right now? */ __pyx_v_mask = UV_READABLE; /* "uvloop/handles/poll.pyx":95 * * mask = uv.UV_READABLE * if self.writing_handle is not None: # <<<<<<<<<<<<<< * # are we writing right now? * mask |= uv.UV_WRITABLE */ __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":97 * if self.writing_handle is not None: * # are we writing right now? * mask |= uv.UV_WRITABLE # <<<<<<<<<<<<<< * * self._poll_start(mask) */ __pyx_v_mask = (__pyx_v_mask | UV_WRITABLE); /* "uvloop/handles/poll.pyx":95 * * mask = uv.UV_READABLE * if self.writing_handle is not None: # <<<<<<<<<<<<<< * # are we writing right now? * mask |= uv.UV_WRITABLE */ } /* "uvloop/handles/poll.pyx":99 * mask |= uv.UV_WRITABLE * * self._poll_start(mask) # <<<<<<<<<<<<<< * else: * self.reading_handle._cancel() */ __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":91 * int mask = 0 * * if self.reading_handle is None: # <<<<<<<<<<<<<< * # not reading right now, setup the handle * */ goto __pyx_L3; } /* "uvloop/handles/poll.pyx":101 * self._poll_start(mask) * else: * self.reading_handle._cancel() # <<<<<<<<<<<<<< * * self.reading_handle = callback */ /*else*/ { __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/poll.pyx":103 * self.reading_handle._cancel() * * self.reading_handle = callback # <<<<<<<<<<<<<< * * cdef start_writing(self, Handle callback): */ __Pyx_INCREF(((PyObject *)__pyx_v_callback)); __Pyx_GIVEREF(((PyObject *)__pyx_v_callback)); __Pyx_GOTREF(__pyx_v_self->reading_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle)); __pyx_v_self->reading_handle = __pyx_v_callback; /* "uvloop/handles/poll.pyx":87 * &dummy_event) # ignore errors * * cdef start_reading(self, Handle callback): # <<<<<<<<<<<<<< * cdef: * int mask = 0 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVPoll.start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":105 * self.reading_handle = callback * * cdef start_writing(self, Handle callback): # <<<<<<<<<<<<<< * cdef: * int mask = 0 */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_start_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Handle *__pyx_v_callback) { int __pyx_v_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("start_writing", 0); /* "uvloop/handles/poll.pyx":107 * cdef start_writing(self, Handle callback): * cdef: * int mask = 0 # <<<<<<<<<<<<<< * * if self.writing_handle is None: */ __pyx_v_mask = 0; /* "uvloop/handles/poll.pyx":109 * int mask = 0 * * if self.writing_handle is None: # <<<<<<<<<<<<<< * # not writing right now, setup the handle * */ __pyx_t_1 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":112 * # not writing right now, setup the handle * * mask = uv.UV_WRITABLE # <<<<<<<<<<<<<< * if self.reading_handle is not None: * # are we reading right now? */ __pyx_v_mask = UV_WRITABLE; /* "uvloop/handles/poll.pyx":113 * * mask = uv.UV_WRITABLE * if self.reading_handle is not None: # <<<<<<<<<<<<<< * # are we reading right now? * mask |= uv.UV_READABLE */ __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":115 * if self.reading_handle is not None: * # are we reading right now? * mask |= uv.UV_READABLE # <<<<<<<<<<<<<< * * self._poll_start(mask) */ __pyx_v_mask = (__pyx_v_mask | UV_READABLE); /* "uvloop/handles/poll.pyx":113 * * mask = uv.UV_WRITABLE * if self.reading_handle is not None: # <<<<<<<<<<<<<< * # are we reading right now? * mask |= uv.UV_READABLE */ } /* "uvloop/handles/poll.pyx":117 * mask |= uv.UV_READABLE * * self._poll_start(mask) # <<<<<<<<<<<<<< * else: * self.writing_handle._cancel() */ __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, __pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":109 * int mask = 0 * * if self.writing_handle is None: # <<<<<<<<<<<<<< * # not writing right now, setup the handle * */ goto __pyx_L3; } /* "uvloop/handles/poll.pyx":119 * self._poll_start(mask) * else: * self.writing_handle._cancel() # <<<<<<<<<<<<<< * * self.writing_handle = callback */ /*else*/ { __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/poll.pyx":121 * self.writing_handle._cancel() * * self.writing_handle = callback # <<<<<<<<<<<<<< * * cdef stop_reading(self): */ __Pyx_INCREF(((PyObject *)__pyx_v_callback)); __Pyx_GIVEREF(((PyObject *)__pyx_v_callback)); __Pyx_GOTREF(__pyx_v_self->writing_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle)); __pyx_v_self->writing_handle = __pyx_v_callback; /* "uvloop/handles/poll.pyx":105 * self.reading_handle = callback * * cdef start_writing(self, Handle callback): # <<<<<<<<<<<<<< * cdef: * int mask = 0 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVPoll.start_writing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":123 * self.writing_handle = callback * * cdef stop_reading(self): # <<<<<<<<<<<<<< * if self.reading_handle is None: * return False */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_reading(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("stop_reading", 0); /* "uvloop/handles/poll.pyx":124 * * cdef stop_reading(self): * if self.reading_handle is None: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":125 * cdef stop_reading(self): * if self.reading_handle is None: * return False # <<<<<<<<<<<<<< * * self.reading_handle._cancel() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/handles/poll.pyx":124 * * cdef stop_reading(self): * if self.reading_handle is None: # <<<<<<<<<<<<<< * return False * */ } /* "uvloop/handles/poll.pyx":127 * return False * * self.reading_handle._cancel() # <<<<<<<<<<<<<< * self.reading_handle = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":128 * * self.reading_handle._cancel() * self.reading_handle = None # <<<<<<<<<<<<<< * * if self.writing_handle is None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->reading_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle)); __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":130 * self.reading_handle = None * * if self.writing_handle is None: # <<<<<<<<<<<<<< * self.stop() * else: */ __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":131 * * if self.writing_handle is None: * self.stop() # <<<<<<<<<<<<<< * else: * self._poll_start(uv.UV_WRITABLE) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":130 * self.reading_handle = None * * if self.writing_handle is None: # <<<<<<<<<<<<<< * self.stop() * else: */ goto __pyx_L4; } /* "uvloop/handles/poll.pyx":133 * self.stop() * else: * self._poll_start(uv.UV_WRITABLE) # <<<<<<<<<<<<<< * * return True */ /*else*/ { __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, UV_WRITABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "uvloop/handles/poll.pyx":135 * self._poll_start(uv.UV_WRITABLE) * * return True # <<<<<<<<<<<<<< * * cdef stop_writing(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/handles/poll.pyx":123 * self.writing_handle = callback * * cdef stop_reading(self): # <<<<<<<<<<<<<< * if self.reading_handle is None: * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVPoll.stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":137 * return True * * cdef stop_writing(self): # <<<<<<<<<<<<<< * if self.writing_handle is None: * return False */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop_writing(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("stop_writing", 0); /* "uvloop/handles/poll.pyx":138 * * cdef stop_writing(self): * if self.writing_handle is None: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = (((PyObject *)__pyx_v_self->writing_handle) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":139 * cdef stop_writing(self): * if self.writing_handle is None: * return False # <<<<<<<<<<<<<< * * self.writing_handle._cancel() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/handles/poll.pyx":138 * * cdef stop_writing(self): * if self.writing_handle is None: # <<<<<<<<<<<<<< * return False * */ } /* "uvloop/handles/poll.pyx":141 * return False * * self.writing_handle._cancel() # <<<<<<<<<<<<<< * self.writing_handle = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":142 * * self.writing_handle._cancel() * self.writing_handle = None # <<<<<<<<<<<<<< * * if self.reading_handle is None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->writing_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle)); __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":144 * self.writing_handle = None * * if self.reading_handle is None: # <<<<<<<<<<<<<< * self.stop() * else: */ __pyx_t_2 = (((PyObject *)__pyx_v_self->reading_handle) == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":145 * * if self.reading_handle is None: * self.stop() # <<<<<<<<<<<<<< * else: * self._poll_start(uv.UV_READABLE) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":144 * self.writing_handle = None * * if self.reading_handle is None: # <<<<<<<<<<<<<< * self.stop() * else: */ goto __pyx_L4; } /* "uvloop/handles/poll.pyx":147 * self.stop() * else: * self._poll_start(uv.UV_READABLE) # <<<<<<<<<<<<<< * * return True */ /*else*/ { __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_start(__pyx_v_self, UV_READABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "uvloop/handles/poll.pyx":149 * self._poll_start(uv.UV_READABLE) * * return True # <<<<<<<<<<<<<< * * cdef stop(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/handles/poll.pyx":137 * return True * * cdef stop_writing(self): # <<<<<<<<<<<<<< * if self.writing_handle is None: * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVPoll.stop_writing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":151 * return True * * cdef stop(self): # <<<<<<<<<<<<<< * if self.reading_handle is not None: * self.reading_handle._cancel() */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll_stop(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("stop", 0); /* "uvloop/handles/poll.pyx":152 * * cdef stop(self): * if self.reading_handle is not None: # <<<<<<<<<<<<<< * self.reading_handle._cancel() * self.reading_handle = None */ __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":153 * cdef stop(self): * if self.reading_handle is not None: * self.reading_handle._cancel() # <<<<<<<<<<<<<< * self.reading_handle = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->reading_handle->__pyx_vtab)->_cancel(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":154 * if self.reading_handle is not None: * self.reading_handle._cancel() * self.reading_handle = None # <<<<<<<<<<<<<< * * if self.writing_handle is not None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->reading_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle)); __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":152 * * cdef stop(self): * if self.reading_handle is not None: # <<<<<<<<<<<<<< * self.reading_handle._cancel() * self.reading_handle = None */ } /* "uvloop/handles/poll.pyx":156 * self.reading_handle = None * * if self.writing_handle is not None: # <<<<<<<<<<<<<< * self.writing_handle._cancel() * self.writing_handle = None */ __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":157 * * if self.writing_handle is not None: * self.writing_handle._cancel() # <<<<<<<<<<<<<< * self.writing_handle = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Handle *)__pyx_v_self->writing_handle->__pyx_vtab)->_cancel(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":158 * if self.writing_handle is not None: * self.writing_handle._cancel() * self.writing_handle = None # <<<<<<<<<<<<<< * * self._poll_stop() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->writing_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle)); __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":156 * self.reading_handle = None * * if self.writing_handle is not None: # <<<<<<<<<<<<<< * self.writing_handle._cancel() * self.writing_handle = None */ } /* "uvloop/handles/poll.pyx":160 * self.writing_handle = None * * self._poll_stop() # <<<<<<<<<<<<<< * * cdef _close(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_6UVPoll__poll_stop(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/poll.pyx":151 * return True * * cdef stop(self): # <<<<<<<<<<<<<< * if self.reading_handle is not None: * self.reading_handle._cancel() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVPoll.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":162 * self._poll_stop() * * cdef _close(self): # <<<<<<<<<<<<<< * if self.is_active(): * self.stop() */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__close(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_close", 0); /* "uvloop/handles/poll.pyx":163 * * cdef _close(self): * if self.is_active(): # <<<<<<<<<<<<<< * self.stop() * */ __pyx_t_1 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->is_active(__pyx_v_self) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":164 * cdef _close(self): * if self.is_active(): * self.stop() # <<<<<<<<<<<<<< * * UVHandle._close(self) */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->stop(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":163 * * cdef _close(self): * if self.is_active(): # <<<<<<<<<<<<<< * self.stop() * */ } /* "uvloop/handles/poll.pyx":166 * self.stop() * * UVHandle._close(self) # <<<<<<<<<<<<<< * * cdef _fatal_error(self, exc, throw, reason=None): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVHandle__close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":162 * self._poll_stop() * * cdef _close(self): # <<<<<<<<<<<<<< * if self.is_active(): * self.stop() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVPoll._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":168 * UVHandle._close(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * try: * if self.reading_handle is not None: */ static PyObject *__pyx_f_6uvloop_4loop_6UVPoll__fatal_error(struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_6UVPoll__fatal_error *__pyx_optional_args) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_fatal_error", 0); if (__pyx_optional_args) { } /* "uvloop/handles/poll.pyx":169 * * cdef _fatal_error(self, exc, throw, reason=None): * try: # <<<<<<<<<<<<<< * if self.reading_handle is not None: * try: */ /*try:*/ { /* "uvloop/handles/poll.pyx":170 * cdef _fatal_error(self, exc, throw, reason=None): * try: * if self.reading_handle is not None: # <<<<<<<<<<<<<< * try: * self.reading_handle._run() */ __pyx_t_1 = (((PyObject *)__pyx_v_self->reading_handle) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/poll.pyx":171 * try: * if self.reading_handle is not None: * try: # <<<<<<<<<<<<<< * self.reading_handle._run() * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/poll.pyx":172 * if self.reading_handle is not None: * try: * self.reading_handle._run() # <<<<<<<<<<<<<< * except BaseException as ex: * self._loop._handle_exception(ex) */ __pyx_t_6 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_self->reading_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 172, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/poll.pyx":171 * try: * if self.reading_handle is not None: * try: # <<<<<<<<<<<<<< * self.reading_handle._run() * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/poll.pyx":173 * try: * self.reading_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._loop._handle_exception(ex) * self.reading_handle = None */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(13, 173, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_v_ex = __pyx_t_8; /*try:*/ { /* "uvloop/handles/poll.pyx":174 * self.reading_handle._run() * except BaseException as ex: * self._loop._handle_exception(ex) # <<<<<<<<<<<<<< * self.reading_handle = None * */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_handle_exception(__pyx_v_self->__pyx_base._loop, __pyx_v_ex); } /* "uvloop/handles/poll.pyx":173 * try: * self.reading_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._loop._handle_exception(ex) * self.reading_handle = None */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L21; } __pyx_L21:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/handles/poll.pyx":171 * try: * if self.reading_handle is not None: * try: # <<<<<<<<<<<<<< * self.reading_handle._run() * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L4_error; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L14_try_end:; } /* "uvloop/handles/poll.pyx":175 * except BaseException as ex: * self._loop._handle_exception(ex) * self.reading_handle = None # <<<<<<<<<<<<<< * * if self.writing_handle is not None: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->reading_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->reading_handle)); __pyx_v_self->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":170 * cdef _fatal_error(self, exc, throw, reason=None): * try: * if self.reading_handle is not None: # <<<<<<<<<<<<<< * try: * self.reading_handle._run() */ } /* "uvloop/handles/poll.pyx":177 * self.reading_handle = None * * if self.writing_handle is not None: # <<<<<<<<<<<<<< * try: * self.writing_handle._run() */ __pyx_t_2 = (((PyObject *)__pyx_v_self->writing_handle) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":178 * * if self.writing_handle is not None: * try: # <<<<<<<<<<<<<< * self.writing_handle._run() * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/handles/poll.pyx":179 * if self.writing_handle is not None: * try: * self.writing_handle._run() # <<<<<<<<<<<<<< * except BaseException as ex: * self._loop._handle_exception(ex) */ __pyx_t_9 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_self->writing_handle); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 179, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/poll.pyx":178 * * if self.writing_handle is not None: * try: # <<<<<<<<<<<<<< * self.writing_handle._run() * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L30_try_end; __pyx_L23_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/poll.pyx":180 * try: * self.writing_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._loop._handle_exception(ex) * self.writing_handle = None */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(13, 180, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_v_ex = __pyx_t_8; /*try:*/ { /* "uvloop/handles/poll.pyx":181 * self.writing_handle._run() * except BaseException as ex: * self._loop._handle_exception(ex) # <<<<<<<<<<<<<< * self.writing_handle = None * */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base._loop->__pyx_vtab)->_handle_exception(__pyx_v_self->__pyx_base._loop, __pyx_v_ex); } /* "uvloop/handles/poll.pyx":180 * try: * self.writing_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * self._loop._handle_exception(ex) * self.writing_handle = None */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L37; } __pyx_L37:; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L24_exception_handled; } goto __pyx_L25_except_error; __pyx_L25_except_error:; /* "uvloop/handles/poll.pyx":178 * * if self.writing_handle is not None: * try: # <<<<<<<<<<<<<< * self.writing_handle._run() * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); goto __pyx_L4_error; __pyx_L24_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_L30_try_end:; } /* "uvloop/handles/poll.pyx":182 * except BaseException as ex: * self._loop._handle_exception(ex) * self.writing_handle = None # <<<<<<<<<<<<<< * * finally: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->writing_handle); __Pyx_DECREF(((PyObject *)__pyx_v_self->writing_handle)); __pyx_v_self->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); /* "uvloop/handles/poll.pyx":177 * self.reading_handle = None * * if self.writing_handle is not None: # <<<<<<<<<<<<<< * try: * self.writing_handle._run() */ } } /* "uvloop/handles/poll.pyx":185 * * finally: * self._close() # <<<<<<<<<<<<<< * * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L4_error:; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 185, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L1_error; __pyx_L39_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "uvloop/handles/poll.pyx":168 * UVHandle._close(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * try: * if self.reading_handle is not None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.UVPoll._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/poll.pyx":188 * * * cdef void __on_uvpoll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<< * int status, int events) with gil: * */ static void __pyx_f_6uvloop_4loop___on_uvpoll_event(uv_poll_t *__pyx_v_handle, int __pyx_v_status, int __pyx_v_events) { struct __pyx_obj_6uvloop_4loop_UVPoll *__pyx_v_poll = 0; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; char const *__pyx_t_21; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__on_uvpoll_event", 0); /* "uvloop/handles/poll.pyx":191 * int status, int events) with gil: * * if __ensure_handle_data(handle, "UVPoll callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVPoll callback")) == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":192 * * if __ensure_handle_data(handle, "UVPoll callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/poll.pyx":191 * int status, int events) with gil: * * if __ensure_handle_data(handle, "UVPoll callback") == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/poll.pyx":195 * * cdef: * UVPoll poll = handle.data # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_poll = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":197 * UVPoll poll = handle.data * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * poll._fatal_error(exc, False) */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":198 * * if status < 0: * exc = convert_error(status) # <<<<<<<<<<<<<< * poll._fatal_error(exc, False) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":199 * if status < 0: * exc = convert_error(status) * poll._fatal_error(exc, False) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_exc, Py_False, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":200 * exc = convert_error(status) * poll._fatal_error(exc, False) * return # <<<<<<<<<<<<<< * * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and */ goto __pyx_L0; /* "uvloop/handles/poll.pyx":197 * UVPoll poll = handle.data * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * poll._fatal_error(exc, False) */ } /* "uvloop/handles/poll.pyx":202 * return * * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.reading_handle is not None): * */ __pyx_t_3 = ((__pyx_v_events & (UV_READABLE | UV_DISCONNECT)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } /* "uvloop/handles/poll.pyx":203 * * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and * poll.reading_handle is not None): # <<<<<<<<<<<<<< * * try: */ __pyx_t_3 = (((PyObject *)__pyx_v_poll->reading_handle) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L6_bool_binop_done:; /* "uvloop/handles/poll.pyx":202 * return * * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.reading_handle is not None): * */ if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":205 * poll.reading_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_read_events_total += 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/handles/poll.pyx":206 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_read_events_total += 1 * poll.reading_handle._run() */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":207 * try: * if UVLOOP_DEBUG: * poll._loop._poll_read_events_total += 1 # <<<<<<<<<<<<<< * poll.reading_handle._run() * except BaseException as ex: */ __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop)); __pyx_t_8 = __pyx_v_poll->__pyx_base._loop; __pyx_t_8->_poll_read_events_total = (__pyx_t_8->_poll_read_events_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":206 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_read_events_total += 1 * poll.reading_handle._run() */ } /* "uvloop/handles/poll.pyx":208 * if UVLOOP_DEBUG: * poll._loop._poll_read_events_total += 1 * poll.reading_handle._run() # <<<<<<<<<<<<<< * except BaseException as ex: * if UVLOOP_DEBUG: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_poll->reading_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 208, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/poll.pyx":205 * poll.reading_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_read_events_total += 1 */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":209 * poll._loop._poll_read_events_total += 1 * poll.reading_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_read_cb_errors_total += 1 */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(13, 209, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_v_ex = __pyx_t_10; /*try:*/ { /* "uvloop/handles/poll.pyx":210 * poll.reading_handle._run() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_read_cb_errors_total += 1 * poll._error(ex, False) */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":211 * except BaseException as ex: * if UVLOOP_DEBUG: * poll._loop._poll_read_cb_errors_total += 1 # <<<<<<<<<<<<<< * poll._error(ex, False) * # continue code execution */ __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop)); __pyx_t_8 = __pyx_v_poll->__pyx_base._loop; __pyx_t_8->_poll_read_cb_errors_total = (__pyx_t_8->_poll_read_cb_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":210 * poll.reading_handle._run() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_read_cb_errors_total += 1 * poll._error(ex, False) */ } /* "uvloop/handles/poll.pyx":212 * if UVLOOP_DEBUG: * poll._loop._poll_read_cb_errors_total += 1 * poll._error(ex, False) # <<<<<<<<<<<<<< * # continue code execution * */ __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 212, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } /* "uvloop/handles/poll.pyx":209 * poll._loop._poll_read_events_total += 1 * poll.reading_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_read_cb_errors_total += 1 */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L23; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L22_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_9 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L10_except_error; } __pyx_L23:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; /* "uvloop/handles/poll.pyx":205 * poll.reading_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_read_events_total += 1 */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L15_try_end:; } /* "uvloop/handles/poll.pyx":202 * return * * if ((events & (uv.UV_READABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.reading_handle is not None): * */ } /* "uvloop/handles/poll.pyx":215 * # continue code execution * * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.writing_handle is not None): * */ __pyx_t_4 = ((__pyx_v_events & (UV_WRITABLE | UV_DISCONNECT)) != 0); if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L30_bool_binop_done; } /* "uvloop/handles/poll.pyx":216 * * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and * poll.writing_handle is not None): # <<<<<<<<<<<<<< * * try: */ __pyx_t_4 = (((PyObject *)__pyx_v_poll->writing_handle) != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L30_bool_binop_done:; /* "uvloop/handles/poll.pyx":215 * # continue code execution * * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.writing_handle is not None): * */ if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":218 * poll.writing_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_write_events_total += 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/poll.pyx":219 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_write_events_total += 1 * poll.writing_handle._run() */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":220 * try: * if UVLOOP_DEBUG: * poll._loop._poll_write_events_total += 1 # <<<<<<<<<<<<<< * poll.writing_handle._run() * except BaseException as ex: */ __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop)); __pyx_t_8 = __pyx_v_poll->__pyx_base._loop; __pyx_t_8->_poll_write_events_total = (__pyx_t_8->_poll_write_events_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":219 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_write_events_total += 1 * poll.writing_handle._run() */ } /* "uvloop/handles/poll.pyx":221 * if UVLOOP_DEBUG: * poll._loop._poll_write_events_total += 1 * poll.writing_handle._run() # <<<<<<<<<<<<<< * except BaseException as ex: * if UVLOOP_DEBUG: */ __pyx_t_11 = __pyx_f_6uvloop_4loop_6Handle__run(__pyx_v_poll->writing_handle); if (unlikely(!__pyx_t_11)) __PYX_ERR(13, 221, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/handles/poll.pyx":218 * poll.writing_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_write_events_total += 1 */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L39_try_end; __pyx_L32_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":222 * poll._loop._poll_write_events_total += 1 * poll.writing_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_write_cb_errors_total += 1 */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_13) { __Pyx_AddTraceback("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_2) < 0) __PYX_ERR(13, 222, __pyx_L34_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __pyx_v_ex = __pyx_t_10; /*try:*/ { /* "uvloop/handles/poll.pyx":223 * poll.writing_handle._run() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_write_cb_errors_total += 1 * poll._error(ex, False) */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/poll.pyx":224 * except BaseException as ex: * if UVLOOP_DEBUG: * poll._loop._poll_write_cb_errors_total += 1 # <<<<<<<<<<<<<< * poll._error(ex, False) */ __Pyx_INCREF(((PyObject *)__pyx_v_poll->__pyx_base._loop)); __pyx_t_8 = __pyx_v_poll->__pyx_base._loop; __pyx_t_8->_poll_write_cb_errors_total = (__pyx_t_8->_poll_write_cb_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "uvloop/handles/poll.pyx":223 * poll.writing_handle._run() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * poll._loop._poll_write_cb_errors_total += 1 * poll._error(ex, False) */ } /* "uvloop/handles/poll.pyx":225 * if UVLOOP_DEBUG: * poll._loop._poll_write_cb_errors_total += 1 * poll._error(ex, False) # <<<<<<<<<<<<<< */ __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVPoll *)__pyx_v_poll->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_poll), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_12)) __PYX_ERR(13, 225, __pyx_L46_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } /* "uvloop/handles/poll.pyx":222 * poll._loop._poll_write_events_total += 1 * poll.writing_handle._run() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_write_cb_errors_total += 1 */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L47; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L46_error:; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_13 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18); __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_21; goto __pyx_L34_except_error; } __pyx_L47:; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L33_exception_handled; } goto __pyx_L34_except_error; __pyx_L34_except_error:; /* "uvloop/handles/poll.pyx":218 * poll.writing_handle is not None): * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * poll._loop._poll_write_events_total += 1 */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L33_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L39_try_end:; } /* "uvloop/handles/poll.pyx":215 * # continue code execution * * if ((events & (uv.UV_WRITABLE | uv.UV_DISCONNECT)) and # <<<<<<<<<<<<<< * poll.writing_handle is not None): * */ } /* "uvloop/handles/poll.pyx":188 * * * cdef void __on_uvpoll_event(uv.uv_poll_t* handle, # <<<<<<<<<<<<<< * int status, int events) with gil: * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(((PyObject *)__pyx_t_8)); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_WriteUnraisable("uvloop.loop.__on_uvpoll_event", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_poll); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/basetransport.pyx":4 * cdef class UVBaseTransport(UVSocketHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * # Flow control * self._high_water = FLOW_CONTROL_HIGH_WATER */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_15UVBaseTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/basetransport.pyx":6 * def __cinit__(self): * # Flow control * self._high_water = FLOW_CONTROL_HIGH_WATER # <<<<<<<<<<<<<< * self._low_water = FLOW_CONTROL_LOW_WATER * */ __pyx_v_self->_high_water = 0x10000; /* "uvloop/handles/basetransport.pyx":7 * # Flow control * self._high_water = FLOW_CONTROL_HIGH_WATER * self._low_water = FLOW_CONTROL_LOW_WATER # <<<<<<<<<<<<<< * * self._protocol = None */ __pyx_v_self->_low_water = 0x4000; /* "uvloop/handles/basetransport.pyx":9 * self._low_water = FLOW_CONTROL_LOW_WATER * * self._protocol = None # <<<<<<<<<<<<<< * self._protocol_connected = 0 * self._protocol_paused = 0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = Py_None; /* "uvloop/handles/basetransport.pyx":10 * * self._protocol = None * self._protocol_connected = 0 # <<<<<<<<<<<<<< * self._protocol_paused = 0 * self._protocol_data_received = None */ __pyx_v_self->_protocol_connected = 0; /* "uvloop/handles/basetransport.pyx":11 * self._protocol = None * self._protocol_connected = 0 * self._protocol_paused = 0 # <<<<<<<<<<<<<< * self._protocol_data_received = None * */ __pyx_v_self->_protocol_paused = 0; /* "uvloop/handles/basetransport.pyx":12 * self._protocol_connected = 0 * self._protocol_paused = 0 * self._protocol_data_received = None # <<<<<<<<<<<<<< * * self._server = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol_data_received); __Pyx_DECREF(__pyx_v_self->_protocol_data_received); __pyx_v_self->_protocol_data_received = Py_None; /* "uvloop/handles/basetransport.pyx":14 * self._protocol_data_received = None * * self._server = None # <<<<<<<<<<<<<< * self._waiter = None * self._extra_info = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); /* "uvloop/handles/basetransport.pyx":15 * * self._server = None * self._waiter = None # <<<<<<<<<<<<<< * self._extra_info = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_waiter); __Pyx_DECREF(__pyx_v_self->_waiter); __pyx_v_self->_waiter = Py_None; /* "uvloop/handles/basetransport.pyx":16 * self._server = None * self._waiter = None * self._extra_info = None # <<<<<<<<<<<<<< * * self._conn_lost = 0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_extra_info); __Pyx_DECREF(__pyx_v_self->_extra_info); __pyx_v_self->_extra_info = ((PyObject*)Py_None); /* "uvloop/handles/basetransport.pyx":18 * self._extra_info = None * * self._conn_lost = 0 # <<<<<<<<<<<<<< * * self._closing = 0 */ __pyx_v_self->_conn_lost = 0; /* "uvloop/handles/basetransport.pyx":20 * self._conn_lost = 0 * * self._closing = 0 # <<<<<<<<<<<<<< * * cdef size_t _get_write_buffer_size(self): */ __pyx_v_self->_closing = 0; /* "uvloop/handles/basetransport.pyx":4 * cdef class UVBaseTransport(UVSocketHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * # Flow control * self._high_water = FLOW_CONTROL_HIGH_WATER */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":22 * self._closing = 0 * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * return 0 * */ static size_t __pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { size_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_write_buffer_size", 0); /* "uvloop/handles/basetransport.pyx":23 * * cdef size_t _get_write_buffer_size(self): * return 0 # <<<<<<<<<<<<<< * * cdef inline _schedule_call_connection_made(self): */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":22 * self._closing = 0 * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * return 0 * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":25 * return 0 * * cdef inline _schedule_call_connection_made(self): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle(self._loop, */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_schedule_call_connection_made", 0); /* "uvloop/handles/basetransport.pyx":27 * cdef inline _schedule_call_connection_made(self): * self._loop._call_soon_handle( * new_MethodHandle(self._loop, # <<<<<<<<<<<<<< * "UVTransport._call_connection_made", * self._call_connection_made, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/handles/basetransport.pyx":30 * "UVTransport._call_connection_made", * self._call_connection_made, * self)) # <<<<<<<<<<<<<< * * cdef inline _schedule_call_connection_lost(self, exc): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVTransport__call_connection_mad, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":27 * cdef inline _schedule_call_connection_made(self): * self._loop._call_soon_handle( * new_MethodHandle(self._loop, # <<<<<<<<<<<<<< * "UVTransport._call_connection_made", * self._call_connection_made, */ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(3, 27, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":26 * * cdef inline _schedule_call_connection_made(self): * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle(self._loop, * "UVTransport._call_connection_made", */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":25 * return 0 * * cdef inline _schedule_call_connection_made(self): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle(self._loop, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._schedule_call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":32 * self)) * * cdef inline _schedule_call_connection_lost(self, exc): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_schedule_call_connection_lost", 0); /* "uvloop/handles/basetransport.pyx":34 * cdef inline _schedule_call_connection_lost(self, exc): * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<< * "UVTransport._call_connection_lost", * self._call_connection_lost, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/handles/basetransport.pyx":37 * "UVTransport._call_connection_lost", * self._call_connection_lost, * self, exc)) # <<<<<<<<<<<<<< * * cdef _fatal_error(self, exc, throw, reason=None): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVTransport__call_connection_los, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_lost), ((PyObject *)__pyx_v_self), __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":34 * cdef inline _schedule_call_connection_lost(self, exc): * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<< * "UVTransport._call_connection_lost", * self._call_connection_lost, */ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(3, 34, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":33 * * cdef inline _schedule_call_connection_lost(self, exc): * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1(self._loop, * "UVTransport._call_connection_lost", */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":32 * self)) * * cdef inline _schedule_call_connection_lost(self, exc): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._schedule_call_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":39 * self, exc)) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Overload UVHandle._fatal_error * */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__fatal_error *__pyx_optional_args) { PyObject *__pyx_v_reason = ((PyObject *)Py_None); PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannySetupContext("_fatal_error", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_reason = __pyx_optional_args->reason; } } /* "uvloop/handles/basetransport.pyx":42 * # Overload UVHandle._fatal_error * * self._force_close(exc) # <<<<<<<<<<<<<< * * if not isinstance(exc, (BrokenPipeError, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_exc); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":44 * self._force_close(exc) * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __Pyx_INCREF(__pyx_builtin_BrokenPipeError); __pyx_t_1 = __pyx_builtin_BrokenPipeError; /* "uvloop/handles/basetransport.pyx":45 * * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, # <<<<<<<<<<<<<< * ConnectionAbortedError)): * */ __Pyx_INCREF(__pyx_builtin_ConnectionResetError); __pyx_t_2 = __pyx_builtin_ConnectionResetError; /* "uvloop/handles/basetransport.pyx":46 * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, * ConnectionAbortedError)): # <<<<<<<<<<<<<< * * if throw or self._loop is None: */ __Pyx_INCREF(__pyx_builtin_ConnectionAbortedError); __pyx_t_4 = __pyx_builtin_ConnectionAbortedError; /* "uvloop/handles/basetransport.pyx":44 * self._force_close(exc) * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __pyx_t_6 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_1); __pyx_t_7 = (__pyx_t_6 != 0); if (!__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } /* "uvloop/handles/basetransport.pyx":45 * * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, # <<<<<<<<<<<<<< * ConnectionAbortedError)): * */ __pyx_t_7 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_2); __pyx_t_6 = (__pyx_t_7 != 0); if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } /* "uvloop/handles/basetransport.pyx":46 * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, * ConnectionAbortedError)): # <<<<<<<<<<<<<< * * if throw or self._loop is None: */ __pyx_t_6 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_4); __pyx_t_7 = (__pyx_t_6 != 0); __pyx_t_5 = __pyx_t_7; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":44 * self._force_close(exc) * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __pyx_t_7 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_7) { /* "uvloop/handles/basetransport.pyx":48 * ConnectionAbortedError)): * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(3, 48, __pyx_L1_error) if (!__pyx_t_5) { } else { __pyx_t_7 = __pyx_t_5; goto __pyx_L8_bool_binop_done; } __pyx_t_5 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop) == Py_None); __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_7 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_7) { /* "uvloop/handles/basetransport.pyx":49 * * if throw or self._loop is None: * raise exc # <<<<<<<<<<<<<< * * msg = 'Fatal error on transport {}'.format( */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(3, 49, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":48 * ConnectionAbortedError)): * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * */ } /* "uvloop/handles/basetransport.pyx":51 * raise exc * * msg = 'Fatal error on transport {}'.format( # <<<<<<<<<<<<<< * self.__class__.__name__) * if reason is not None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fatal_error_on_transport, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/basetransport.pyx":52 * * msg = 'Fatal error on transport {}'.format( * self.__class__.__name__) # <<<<<<<<<<<<<< * if reason is not None: * msg = '{} ({})'.format(msg, reason) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":53 * msg = 'Fatal error on transport {}'.format( * self.__class__.__name__) * if reason is not None: # <<<<<<<<<<<<<< * msg = '{} ({})'.format(msg, reason) * */ __pyx_t_7 = (__pyx_v_reason != Py_None); __pyx_t_6 = (__pyx_t_7 != 0); if (__pyx_t_6) { /* "uvloop/handles/basetransport.pyx":54 * self.__class__.__name__) * if reason is not None: * msg = '{} ({})'.format(msg, reason) # <<<<<<<<<<<<<< * * self._loop.call_exception_handler({ */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_v_reason}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_v_reason}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_msg); __Pyx_INCREF(__pyx_v_reason); __Pyx_GIVEREF(__pyx_v_reason); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_v_reason); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":53 * msg = 'Fatal error on transport {}'.format( * self.__class__.__name__) * if reason is not None: # <<<<<<<<<<<<<< * msg = '{} ({})'.format(msg, reason) * */ } /* "uvloop/handles/basetransport.pyx":56 * msg = '{} ({})'.format(msg, reason) * * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': msg, * 'exception': exc, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/basetransport.pyx":57 * * self._loop.call_exception_handler({ * 'message': msg, # <<<<<<<<<<<<<< * 'exception': exc, * 'transport': self, */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(3, 57, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":58 * self._loop.call_exception_handler({ * 'message': msg, * 'exception': exc, # <<<<<<<<<<<<<< * 'transport': self, * 'protocol': self._protocol, */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(3, 57, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":59 * 'message': msg, * 'exception': exc, * 'transport': self, # <<<<<<<<<<<<<< * 'protocol': self._protocol, * }) */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 57, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":60 * 'exception': exc, * 'transport': self, * 'protocol': self._protocol, # <<<<<<<<<<<<<< * }) * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(3, 57, __pyx_L1_error) __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":44 * self._force_close(exc) * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ } /* "uvloop/handles/basetransport.pyx":39 * self, exc)) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Overload UVHandle._fatal_error * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":63 * }) * * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): # <<<<<<<<<<<<<< * if high == -1: * if low == -1: */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits *__pyx_optional_args) { int __pyx_v_high = ((int)-1); int __pyx_v_low = ((int)-1); PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_set_write_buffer_limits", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_high = __pyx_optional_args->high; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_low = __pyx_optional_args->low; } } } /* "uvloop/handles/basetransport.pyx":64 * * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): * if high == -1: # <<<<<<<<<<<<<< * if low == -1: * high = FLOW_CONTROL_HIGH_WATER */ __pyx_t_1 = ((__pyx_v_high == -1L) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":65 * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): * if high == -1: * if low == -1: # <<<<<<<<<<<<<< * high = FLOW_CONTROL_HIGH_WATER * else: */ __pyx_t_1 = ((__pyx_v_low == -1L) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":66 * if high == -1: * if low == -1: * high = FLOW_CONTROL_HIGH_WATER # <<<<<<<<<<<<<< * else: * high = FLOW_CONTROL_LOW_WATER */ __pyx_v_high = 0x10000; /* "uvloop/handles/basetransport.pyx":65 * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): * if high == -1: * if low == -1: # <<<<<<<<<<<<<< * high = FLOW_CONTROL_HIGH_WATER * else: */ goto __pyx_L4; } /* "uvloop/handles/basetransport.pyx":68 * high = FLOW_CONTROL_HIGH_WATER * else: * high = FLOW_CONTROL_LOW_WATER # <<<<<<<<<<<<<< * * if low == -1: */ /*else*/ { __pyx_v_high = 0x4000; } __pyx_L4:; /* "uvloop/handles/basetransport.pyx":64 * * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): * if high == -1: # <<<<<<<<<<<<<< * if low == -1: * high = FLOW_CONTROL_HIGH_WATER */ } /* "uvloop/handles/basetransport.pyx":70 * high = FLOW_CONTROL_LOW_WATER * * if low == -1: # <<<<<<<<<<<<<< * low = high // 4 * */ __pyx_t_1 = ((__pyx_v_low == -1L) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":71 * * if low == -1: * low = high // 4 # <<<<<<<<<<<<<< * * if not high >= low >= 0: */ __pyx_v_low = __Pyx_div_long(__pyx_v_high, 4); /* "uvloop/handles/basetransport.pyx":70 * high = FLOW_CONTROL_LOW_WATER * * if low == -1: # <<<<<<<<<<<<<< * low = high // 4 * */ } /* "uvloop/handles/basetransport.pyx":73 * low = high // 4 * * if not high >= low >= 0: # <<<<<<<<<<<<<< * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % * (high, low)) */ __pyx_t_1 = (__pyx_v_high >= __pyx_v_low); if (__pyx_t_1) { __pyx_t_1 = (__pyx_v_low >= 0); } __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":75 * if not high >= low >= 0: * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % * (high, low)) # <<<<<<<<<<<<<< * * self._high_water = high */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_high); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_low); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":74 * * if not high >= low >= 0: * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % # <<<<<<<<<<<<<< * (high, low)) * */ __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_high_r_must_be_low_r_must_be_0, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 74, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":73 * low = high // 4 * * if not high >= low >= 0: # <<<<<<<<<<<<<< * raise ValueError('high (%r) must be >= low (%r) must be >= 0' % * (high, low)) */ } /* "uvloop/handles/basetransport.pyx":77 * (high, low)) * * self._high_water = high # <<<<<<<<<<<<<< * self._low_water = low * */ __pyx_v_self->_high_water = __pyx_v_high; /* "uvloop/handles/basetransport.pyx":78 * * self._high_water = high * self._low_water = low # <<<<<<<<<<<<<< * * self._maybe_pause_protocol() */ __pyx_v_self->_low_water = __pyx_v_low; /* "uvloop/handles/basetransport.pyx":80 * self._low_water = low * * self._maybe_pause_protocol() # <<<<<<<<<<<<<< * * cdef inline _maybe_pause_protocol(self): */ __pyx_t_4 = __pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":63 * }) * * cdef inline _set_write_buffer_limits(self, int high=-1, int low=-1): # <<<<<<<<<<<<<< * if high == -1: * if low == -1: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":82 * self._maybe_pause_protocol() * * cdef inline _maybe_pause_protocol(self): # <<<<<<<<<<<<<< * cdef: * size_t size = self._get_write_buffer_size() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { size_t __pyx_v_size; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; __Pyx_RefNannySetupContext("_maybe_pause_protocol", 0); /* "uvloop/handles/basetransport.pyx":84 * cdef inline _maybe_pause_protocol(self): * cdef: * size_t size = self._get_write_buffer_size() # <<<<<<<<<<<<<< * * if size <= self._high_water: */ __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self); /* "uvloop/handles/basetransport.pyx":86 * size_t size = self._get_write_buffer_size() * * if size <= self._high_water: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_size <= __pyx_v_self->_high_water) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":87 * * if size <= self._high_water: * return # <<<<<<<<<<<<<< * * if not self._protocol_paused: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":86 * size_t size = self._get_write_buffer_size() * * if size <= self._high_water: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/basetransport.pyx":89 * return * * if not self._protocol_paused: # <<<<<<<<<<<<<< * self._protocol_paused = 1 * try: */ __pyx_t_1 = ((!(__pyx_v_self->_protocol_paused != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":90 * * if not self._protocol_paused: * self._protocol_paused = 1 # <<<<<<<<<<<<<< * try: * self._protocol.pause_writing() */ __pyx_v_self->_protocol_paused = 1; /* "uvloop/handles/basetransport.pyx":91 * if not self._protocol_paused: * self._protocol_paused = 1 * try: # <<<<<<<<<<<<<< * self._protocol.pause_writing() * except Exception as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/handles/basetransport.pyx":92 * self._protocol_paused = 1 * try: * self._protocol.pause_writing() # <<<<<<<<<<<<<< * except Exception as exc: * self._loop.call_exception_handler({ */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pause_writing); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 92, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 92, __pyx_L5_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 92, __pyx_L5_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/basetransport.pyx":91 * if not self._protocol_paused: * self._protocol_paused = 1 * try: # <<<<<<<<<<<<<< * self._protocol.pause_writing() * except Exception as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/basetransport.pyx":93 * try: * self._protocol.pause_writing() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'message': 'protocol.pause_writing() failed', */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_pause_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 93, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /*try:*/ { /* "uvloop/handles/basetransport.pyx":94 * self._protocol.pause_writing() * except Exception as exc: * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'protocol.pause_writing() failed', * 'exception': exc, */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); /* "uvloop/handles/basetransport.pyx":95 * except Exception as exc: * self._loop.call_exception_handler({ * 'message': 'protocol.pause_writing() failed', # <<<<<<<<<<<<<< * 'exception': exc, * 'transport': self, */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 95, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_message, __pyx_kp_u_protocol_pause_writing_failed) < 0) __PYX_ERR(3, 95, __pyx_L18_error) /* "uvloop/handles/basetransport.pyx":96 * self._loop.call_exception_handler({ * 'message': 'protocol.pause_writing() failed', * 'exception': exc, # <<<<<<<<<<<<<< * 'transport': self, * 'protocol': self._protocol, */ if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(3, 95, __pyx_L18_error) /* "uvloop/handles/basetransport.pyx":97 * 'message': 'protocol.pause_writing() failed', * 'exception': exc, * 'transport': self, # <<<<<<<<<<<<<< * 'protocol': self._protocol, * }) */ if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 95, __pyx_L18_error) /* "uvloop/handles/basetransport.pyx":98 * 'exception': exc, * 'transport': self, * 'protocol': self._protocol, # <<<<<<<<<<<<<< * }) * */ if (PyDict_SetItem(__pyx_t_11, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(3, 95, __pyx_L18_error) __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_12) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_11}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_11}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 94, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/basetransport.pyx":93 * try: * self._protocol.pause_writing() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'message': 'protocol.pause_writing() failed', */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L19; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L7_except_error; } __pyx_L19:; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/handles/basetransport.pyx":91 * if not self._protocol_paused: * self._protocol_paused = 1 * try: # <<<<<<<<<<<<<< * self._protocol.pause_writing() * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L12_try_end:; } /* "uvloop/handles/basetransport.pyx":89 * return * * if not self._protocol_paused: # <<<<<<<<<<<<<< * self._protocol_paused = 1 * try: */ } /* "uvloop/handles/basetransport.pyx":82 * self._maybe_pause_protocol() * * cdef inline _maybe_pause_protocol(self): # <<<<<<<<<<<<<< * cdef: * size_t size = self._get_write_buffer_size() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_pause_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":101 * }) * * cdef inline _maybe_resume_protocol(self): # <<<<<<<<<<<<<< * cdef: * size_t size = self._get_write_buffer_size() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { size_t __pyx_v_size; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; __Pyx_RefNannySetupContext("_maybe_resume_protocol", 0); /* "uvloop/handles/basetransport.pyx":103 * cdef inline _maybe_resume_protocol(self): * cdef: * size_t size = self._get_write_buffer_size() # <<<<<<<<<<<<<< * * if self._protocol_paused and size <= self._low_water: */ __pyx_v_size = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self); /* "uvloop/handles/basetransport.pyx":105 * size_t size = self._get_write_buffer_size() * * if self._protocol_paused and size <= self._low_water: # <<<<<<<<<<<<<< * self._protocol_paused = 0 * try: */ __pyx_t_2 = (__pyx_v_self->_protocol_paused != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = ((__pyx_v_size <= __pyx_v_self->_low_water) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":106 * * if self._protocol_paused and size <= self._low_water: * self._protocol_paused = 0 # <<<<<<<<<<<<<< * try: * self._protocol.resume_writing() */ __pyx_v_self->_protocol_paused = 0; /* "uvloop/handles/basetransport.pyx":107 * if self._protocol_paused and size <= self._low_water: * self._protocol_paused = 0 * try: # <<<<<<<<<<<<<< * self._protocol.resume_writing() * except Exception as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/basetransport.pyx":108 * self._protocol_paused = 0 * try: * self._protocol.resume_writing() # <<<<<<<<<<<<<< * except Exception as exc: * self._loop.call_exception_handler({ */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_resume_writing); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 108, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 108, __pyx_L6_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 108, __pyx_L6_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/basetransport.pyx":107 * if self._protocol_paused and size <= self._low_water: * self._protocol_paused = 0 * try: # <<<<<<<<<<<<<< * self._protocol.resume_writing() * except Exception as exc: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/basetransport.pyx":109 * try: * self._protocol.resume_writing() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'message': 'protocol.resume_writing() failed', */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_resume_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(3, 109, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_exc = __pyx_t_7; /*try:*/ { /* "uvloop/handles/basetransport.pyx":110 * self._protocol.resume_writing() * except Exception as exc: * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'protocol.resume_writing() failed', * 'exception': exc, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); /* "uvloop/handles/basetransport.pyx":111 * except Exception as exc: * self._loop.call_exception_handler({ * 'message': 'protocol.resume_writing() failed', # <<<<<<<<<<<<<< * 'exception': exc, * 'transport': self, */ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 111, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_message, __pyx_kp_u_protocol_resume_writing_failed) < 0) __PYX_ERR(3, 111, __pyx_L19_error) /* "uvloop/handles/basetransport.pyx":112 * self._loop.call_exception_handler({ * 'message': 'protocol.resume_writing() failed', * 'exception': exc, # <<<<<<<<<<<<<< * 'transport': self, * 'protocol': self._protocol, */ if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(3, 111, __pyx_L19_error) /* "uvloop/handles/basetransport.pyx":113 * 'message': 'protocol.resume_writing() failed', * 'exception': exc, * 'transport': self, # <<<<<<<<<<<<<< * 'protocol': self._protocol, * }) */ if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_transport, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 111, __pyx_L19_error) /* "uvloop/handles/basetransport.pyx":114 * 'exception': exc, * 'transport': self, * 'protocol': self._protocol, # <<<<<<<<<<<<<< * }) * */ if (PyDict_SetItem(__pyx_t_12, __pyx_n_u_protocol, __pyx_v_self->_protocol) < 0) __PYX_ERR(3, 111, __pyx_L19_error) __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_13) { __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_10); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12}; __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12}; __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 110, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/handles/basetransport.pyx":109 * try: * self._protocol.resume_writing() * except Exception as exc: # <<<<<<<<<<<<<< * self._loop.call_exception_handler({ * 'message': 'protocol.resume_writing() failed', */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_9 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L8_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; /* "uvloop/handles/basetransport.pyx":107 * if self._protocol_paused and size <= self._low_water: * self._protocol_paused = 0 * try: # <<<<<<<<<<<<<< * self._protocol.resume_writing() * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L13_try_end:; } /* "uvloop/handles/basetransport.pyx":105 * size_t size = self._get_write_buffer_size() * * if self._protocol_paused and size <= self._low_water: # <<<<<<<<<<<<<< * self._protocol_paused = 0 * try: */ } /* "uvloop/handles/basetransport.pyx":101 * }) * * cdef inline _maybe_resume_protocol(self): # <<<<<<<<<<<<<< * cdef: * size_t size = self._get_write_buffer_size() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._maybe_resume_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":117 * }) * * cdef _wakeup_waiter(self): # <<<<<<<<<<<<<< * if self._waiter is not None: * if not self._waiter.cancelled(): */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_wakeup_waiter", 0); /* "uvloop/handles/basetransport.pyx":118 * * cdef _wakeup_waiter(self): * if self._waiter is not None: # <<<<<<<<<<<<<< * if not self._waiter.cancelled(): * self._waiter.set_result(True) */ __pyx_t_1 = (__pyx_v_self->_waiter != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":119 * cdef _wakeup_waiter(self): * if self._waiter is not None: * if not self._waiter.cancelled(): # <<<<<<<<<<<<<< * self._waiter.set_result(True) * self._waiter = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 119, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":120 * if self._waiter is not None: * if not self._waiter.cancelled(): * self._waiter.set_result(True) # <<<<<<<<<<<<<< * self._waiter = None * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":119 * cdef _wakeup_waiter(self): * if self._waiter is not None: * if not self._waiter.cancelled(): # <<<<<<<<<<<<<< * self._waiter.set_result(True) * self._waiter = None */ } /* "uvloop/handles/basetransport.pyx":121 * if not self._waiter.cancelled(): * self._waiter.set_result(True) * self._waiter = None # <<<<<<<<<<<<<< * * cdef _call_connection_made(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_waiter); __Pyx_DECREF(__pyx_v_self->_waiter); __pyx_v_self->_waiter = Py_None; /* "uvloop/handles/basetransport.pyx":118 * * cdef _wakeup_waiter(self): * if self._waiter is not None: # <<<<<<<<<<<<<< * if not self._waiter.cancelled(): * self._waiter.set_result(True) */ } /* "uvloop/handles/basetransport.pyx":117 * }) * * cdef _wakeup_waiter(self): # <<<<<<<<<<<<<< * if self._waiter is not None: * if not self._waiter.cancelled(): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._wakeup_waiter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":123 * self._waiter = None * * cdef _call_connection_made(self): # <<<<<<<<<<<<<< * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { Py_ssize_t __pyx_v__loop_ready_len; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_call_connection_made", 0); /* "uvloop/handles/basetransport.pyx":125 * cdef _call_connection_made(self): * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: # <<<<<<<<<<<<<< * raise RuntimeError( * 'protocol is not set, cannot call connection_made()') */ __pyx_t_1 = (__pyx_v_self->_protocol == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":126 * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: * raise RuntimeError( # <<<<<<<<<<<<<< * 'protocol is not set, cannot call connection_made()') * */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 126, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":125 * cdef _call_connection_made(self): * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: # <<<<<<<<<<<<<< * raise RuntimeError( * 'protocol is not set, cannot call connection_made()') */ } /* "uvloop/handles/basetransport.pyx":129 * 'protocol is not set, cannot call connection_made()') * * _loop_ready_len = self._loop._ready_len # <<<<<<<<<<<<<< * * # Set _protocol_connected to 1 before calling "connection_made": */ __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._loop->_ready_len; __pyx_v__loop_ready_len = __pyx_t_4; /* "uvloop/handles/basetransport.pyx":134 * # if transport is aborted or closed, "connection_lost" will * # still be scheduled. * self._protocol_connected = 1 # <<<<<<<<<<<<<< * * try: */ __pyx_v_self->_protocol_connected = 1; /* "uvloop/handles/basetransport.pyx":136 * self._protocol_connected = 1 * * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/handles/basetransport.pyx":137 * * try: * self._protocol.connection_made(self) # <<<<<<<<<<<<<< * except: * self._wakeup_waiter() */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_made); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (!__pyx_t_9) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_10, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 137, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":136 * self._protocol_connected = 1 * * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":138 * try: * self._protocol.connection_made(self) * except: # <<<<<<<<<<<<<< * self._wakeup_waiter() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(3, 138, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_10); /* "uvloop/handles/basetransport.pyx":139 * self._protocol.connection_made(self) * except: * self._wakeup_waiter() # <<<<<<<<<<<<<< * raise * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 139, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/basetransport.pyx":140 * except: * self._wakeup_waiter() * raise # <<<<<<<<<<<<<< * * if self._closing: */ __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_8, __pyx_t_10); __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; __PYX_ERR(3, 140, __pyx_L6_except_error) } __pyx_L6_except_error:; /* "uvloop/handles/basetransport.pyx":136 * self._protocol_connected = 1 * * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L11_try_end:; } /* "uvloop/handles/basetransport.pyx":142 * raise * * if self._closing: # <<<<<<<<<<<<<< * # This might happen when "transport.abort()" is called * # from "Protocol.connection_made". */ __pyx_t_2 = (__pyx_v_self->_closing != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":145 * # This might happen when "transport.abort()" is called * # from "Protocol.connection_made". * self._wakeup_waiter() # <<<<<<<<<<<<<< * return * */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/basetransport.pyx":146 * # from "Protocol.connection_made". * self._wakeup_waiter() * return # <<<<<<<<<<<<<< * * if _loop_ready_len == self._loop._ready_len: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":142 * raise * * if self._closing: # <<<<<<<<<<<<<< * # This might happen when "transport.abort()" is called * # from "Protocol.connection_made". */ } /* "uvloop/handles/basetransport.pyx":148 * return * * if _loop_ready_len == self._loop._ready_len: # <<<<<<<<<<<<<< * # No new calls were scheduled by 'protocol.connection_made', * # so it's safe to start reading right now. */ __pyx_t_2 = ((__pyx_v__loop_ready_len == __pyx_v_self->__pyx_base.__pyx_base._loop->_ready_len) != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":151 * # No new calls were scheduled by 'protocol.connection_made', * # so it's safe to start reading right now. * self._start_reading() # <<<<<<<<<<<<<< * else: * # In asyncio we'd just call start_reading() right after we */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_start_reading(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/basetransport.pyx":148 * return * * if _loop_ready_len == self._loop._ready_len: # <<<<<<<<<<<<<< * # No new calls were scheduled by 'protocol.connection_made', * # so it's safe to start reading right now. */ goto __pyx_L15; } /* "uvloop/handles/basetransport.pyx":160 * # calls the handlers that connection_made set up. * # That's why we're using another call_soon here. * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle(self._loop, * "UVTransport._start_reading", */ /*else*/ { /* "uvloop/handles/basetransport.pyx":161 * # That's why we're using another call_soon here. * self._loop._call_soon_handle( * new_MethodHandle(self._loop, # <<<<<<<<<<<<<< * "UVTransport._start_reading", * self._start_reading, */ __pyx_t_10 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_10); /* "uvloop/handles/basetransport.pyx":164 * "UVTransport._start_reading", * self._start_reading, * self)) # <<<<<<<<<<<<<< * * self._wakeup_waiter() */ __pyx_t_8 = __pyx_f_6uvloop_4loop_new_MethodHandle(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_10), __pyx_kp_u_UVTransport__start_reading, ((__pyx_t_6uvloop_4loop_method_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_start_reading), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/basetransport.pyx":161 * # That's why we're using another call_soon here. * self._loop._call_soon_handle( * new_MethodHandle(self._loop, # <<<<<<<<<<<<<< * "UVTransport._start_reading", * self._start_reading, */ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(3, 161, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":160 * # calls the handlers that connection_made set up. * # That's why we're using another call_soon here. * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle(self._loop, * "UVTransport._start_reading", */ __pyx_t_10 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_8)); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L15:; /* "uvloop/handles/basetransport.pyx":166 * self)) * * self._wakeup_waiter() # <<<<<<<<<<<<<< * * cdef _call_connection_lost(self, exc): */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_wakeup_waiter(__pyx_v_self); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/basetransport.pyx":123 * self._waiter = None * * cdef _call_connection_made(self): # <<<<<<<<<<<<<< * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":168 * self._wakeup_waiter() * * cdef _call_connection_lost(self, exc): # <<<<<<<<<<<<<< * if self._waiter is not None: * # This shouldn't ever happen! */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) { struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; __Pyx_RefNannySetupContext("_call_connection_lost", 0); /* "uvloop/handles/basetransport.pyx":169 * * cdef _call_connection_lost(self, exc): * if self._waiter is not None: # <<<<<<<<<<<<<< * # This shouldn't ever happen! * self._loop.call_exception_handler({ */ __pyx_t_1 = (__pyx_v_self->_waiter != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":171 * if self._waiter is not None: * # This shouldn't ever happen! * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': 'waiter is not None in {}._call_connection_lost'. * format(self.__class__.__name__) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/handles/basetransport.pyx":172 * # This shouldn't ever happen! * self._loop.call_exception_handler({ * 'message': 'waiter is not None in {}._call_connection_lost'. # <<<<<<<<<<<<<< * format(self.__class__.__name__) * }) */ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/basetransport.pyx":173 * self._loop.call_exception_handler({ * 'message': 'waiter is not None in {}._call_connection_lost'. * format(self.__class__.__name__) # <<<<<<<<<<<<<< * }) * if not self._waiter.done(): */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_waiter_is_not_None_in__call_conn, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_message, __pyx_t_6) < 0) __PYX_ERR(3, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":175 * format(self.__class__.__name__) * }) * if not self._waiter.done(): # <<<<<<<<<<<<<< * self._waiter.set_exception(exc) * self._waiter = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 175, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":176 * }) * if not self._waiter.done(): * self._waiter.set_exception(exc) # <<<<<<<<<<<<<< * self._waiter = None * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":175 * format(self.__class__.__name__) * }) * if not self._waiter.done(): # <<<<<<<<<<<<<< * self._waiter.set_exception(exc) * self._waiter = None */ } /* "uvloop/handles/basetransport.pyx":177 * if not self._waiter.done(): * self._waiter.set_exception(exc) * self._waiter = None # <<<<<<<<<<<<<< * * if self._closed: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_waiter); __Pyx_DECREF(__pyx_v_self->_waiter); __pyx_v_self->_waiter = Py_None; /* "uvloop/handles/basetransport.pyx":169 * * cdef _call_connection_lost(self, exc): * if self._waiter is not None: # <<<<<<<<<<<<<< * # This shouldn't ever happen! * self._loop.call_exception_handler({ */ } /* "uvloop/handles/basetransport.pyx":179 * self._waiter = None * * if self._closed: # <<<<<<<<<<<<<< * # The handle is closed -- likely, _call_connection_lost * # was already called before. */ __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":182 * # The handle is closed -- likely, _call_connection_lost * # was already called before. * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":179 * self._waiter = None * * if self._closed: # <<<<<<<<<<<<<< * # The handle is closed -- likely, _call_connection_lost * # was already called before. */ } /* "uvloop/handles/basetransport.pyx":184 * return * * try: # <<<<<<<<<<<<<< * if self._protocol_connected: * self._protocol.connection_lost(exc) */ /*try:*/ { /* "uvloop/handles/basetransport.pyx":185 * * try: * if self._protocol_connected: # <<<<<<<<<<<<<< * self._protocol.connection_lost(exc) * finally: */ __pyx_t_1 = (__pyx_v_self->_protocol_connected != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":186 * try: * if self._protocol_connected: * self._protocol.connection_lost(exc) # <<<<<<<<<<<<<< * finally: * self._protocol = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 186, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":185 * * try: * if self._protocol_connected: # <<<<<<<<<<<<<< * self._protocol.connection_lost(exc) * finally: */ } } /* "uvloop/handles/basetransport.pyx":188 * self._protocol.connection_lost(exc) * finally: * self._protocol = None # <<<<<<<<<<<<<< * self._protocol_data_received = None * */ /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = Py_None; /* "uvloop/handles/basetransport.pyx":189 * finally: * self._protocol = None * self._protocol_data_received = None # <<<<<<<<<<<<<< * * self._close() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol_data_received); __Pyx_DECREF(__pyx_v_self->_protocol_data_received); __pyx_v_self->_protocol_data_received = Py_None; /* "uvloop/handles/basetransport.pyx":191 * self._protocol_data_received = None * * self._close() # <<<<<<<<<<<<<< * * server = self._server */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":193 * self._close() * * server = self._server # <<<<<<<<<<<<<< * if server is not None: * (server)._detach() */ __pyx_t_3 = ((PyObject *)__pyx_v_self->_server); __Pyx_INCREF(__pyx_t_3); __pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":194 * * server = self._server * if server is not None: # <<<<<<<<<<<<<< * (server)._detach() * self._server = None */ __pyx_t_1 = (((PyObject *)__pyx_v_server) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":195 * server = self._server * if server is not None: * (server)._detach() # <<<<<<<<<<<<<< * self._server = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_detach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":196 * if server is not None: * (server)._detach() * self._server = None # <<<<<<<<<<<<<< * * cdef inline _set_server(self, Server server): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); /* "uvloop/handles/basetransport.pyx":194 * * server = self._server * if server is not None: # <<<<<<<<<<<<<< * (server)._detach() * self._server = None */ } goto __pyx_L8; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L7_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { /* "uvloop/handles/basetransport.pyx":188 * self._protocol.connection_lost(exc) * finally: * self._protocol = None # <<<<<<<<<<<<<< * self._protocol_data_received = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = Py_None; /* "uvloop/handles/basetransport.pyx":189 * finally: * self._protocol = None * self._protocol_data_received = None # <<<<<<<<<<<<<< * * self._close() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol_data_received); __Pyx_DECREF(__pyx_v_self->_protocol_data_received); __pyx_v_self->_protocol_data_received = Py_None; /* "uvloop/handles/basetransport.pyx":191 * self._protocol_data_received = None * * self._close() # <<<<<<<<<<<<<< * * server = self._server */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 191, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":193 * self._close() * * server = self._server # <<<<<<<<<<<<<< * if server is not None: * (server)._detach() */ __pyx_t_3 = ((PyObject *)__pyx_v_self->_server); __Pyx_INCREF(__pyx_t_3); __pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":194 * * server = self._server * if server is not None: # <<<<<<<<<<<<<< * (server)._detach() * self._server = None */ __pyx_t_2 = (((PyObject *)__pyx_v_server) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":195 * server = self._server * if server is not None: * (server)._detach() # <<<<<<<<<<<<<< * self._server = None * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_detach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 195, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":196 * if server is not None: * (server)._detach() * self._server = None # <<<<<<<<<<<<<< * * cdef inline _set_server(self, Server server): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); /* "uvloop/handles/basetransport.pyx":194 * * server = self._server * if server is not None: # <<<<<<<<<<<<<< * (server)._detach() * self._server = None */ } } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L1_error; __pyx_L12_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; goto __pyx_L1_error; } __pyx_L8:; } /* "uvloop/handles/basetransport.pyx":168 * self._wakeup_waiter() * * cdef _call_connection_lost(self, exc): # <<<<<<<<<<<<<< * if self._waiter is not None: * # This shouldn't ever happen! */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._call_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_server); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":198 * self._server = None * * cdef inline _set_server(self, Server server): # <<<<<<<<<<<<<< * self._server = server * (server)._attach() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_set_server", 0); /* "uvloop/handles/basetransport.pyx":199 * * cdef inline _set_server(self, Server server): * self._server = server # <<<<<<<<<<<<<< * (server)._attach() * */ __Pyx_INCREF(((PyObject *)__pyx_v_server)); __Pyx_GIVEREF(((PyObject *)__pyx_v_server)); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = __pyx_v_server; /* "uvloop/handles/basetransport.pyx":200 * cdef inline _set_server(self, Server server): * self._server = server * (server)._attach() # <<<<<<<<<<<<<< * * cdef inline _set_waiter(self, object waiter): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)->__pyx_vtab)->_attach(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_server)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":198 * self._server = None * * cdef inline _set_server(self, Server server): # <<<<<<<<<<<<<< * self._server = server * (server)._attach() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":202 * (server)._attach() * * cdef inline _set_waiter(self, object waiter): # <<<<<<<<<<<<<< * if waiter is not None and not isfuture(waiter): * raise TypeError( */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_waiter) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_set_waiter", 0); /* "uvloop/handles/basetransport.pyx":203 * * cdef inline _set_waiter(self, object waiter): * if waiter is not None and not isfuture(waiter): # <<<<<<<<<<<<<< * raise TypeError( * 'invalid waiter object {!r}, expected asyncio.Future'. */ __pyx_t_2 = (__pyx_v_waiter != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_waiter); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = ((!__pyx_t_3) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":205 * if waiter is not None and not isfuture(waiter): * raise TypeError( * 'invalid waiter object {!r}, expected asyncio.Future'. # <<<<<<<<<<<<<< * format(waiter)) * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_waiter_object_r_expected, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/basetransport.pyx":206 * raise TypeError( * 'invalid waiter object {!r}, expected asyncio.Future'. * format(waiter)) # <<<<<<<<<<<<<< * * self._waiter = waiter */ __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_waiter); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_waiter}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_waiter}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_waiter); __Pyx_GIVEREF(__pyx_v_waiter); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_waiter); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/basetransport.pyx":204 * cdef inline _set_waiter(self, object waiter): * if waiter is not None and not isfuture(waiter): * raise TypeError( # <<<<<<<<<<<<<< * 'invalid waiter object {!r}, expected asyncio.Future'. * format(waiter)) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 204, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":203 * * cdef inline _set_waiter(self, object waiter): * if waiter is not None and not isfuture(waiter): # <<<<<<<<<<<<<< * raise TypeError( * 'invalid waiter object {!r}, expected asyncio.Future'. */ } /* "uvloop/handles/basetransport.pyx":208 * format(waiter)) * * self._waiter = waiter # <<<<<<<<<<<<<< * * cdef inline _set_protocol(self, object protocol): */ __Pyx_INCREF(__pyx_v_waiter); __Pyx_GIVEREF(__pyx_v_waiter); __Pyx_GOTREF(__pyx_v_self->_waiter); __Pyx_DECREF(__pyx_v_self->_waiter); __pyx_v_self->_waiter = __pyx_v_waiter; /* "uvloop/handles/basetransport.pyx":202 * (server)._attach() * * cdef inline _set_waiter(self, object waiter): # <<<<<<<<<<<<<< * if waiter is not None and not isfuture(waiter): * raise TypeError( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_waiter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":210 * self._waiter = waiter * * cdef inline _set_protocol(self, object protocol): # <<<<<<<<<<<<<< * self._protocol = protocol * # Store a reference to the bound method directly */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("_set_protocol", 0); /* "uvloop/handles/basetransport.pyx":211 * * cdef inline _set_protocol(self, object protocol): * self._protocol = protocol # <<<<<<<<<<<<<< * # Store a reference to the bound method directly * try: */ __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = __pyx_v_protocol; /* "uvloop/handles/basetransport.pyx":213 * self._protocol = protocol * # Store a reference to the bound method directly * try: # <<<<<<<<<<<<<< * self._protocol_data_received = protocol.data_received * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/handles/basetransport.pyx":214 * # Store a reference to the bound method directly * try: * self._protocol_data_received = protocol.data_received # <<<<<<<<<<<<<< * except AttributeError: * pass */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 214, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_protocol_data_received); __Pyx_DECREF(__pyx_v_self->_protocol_data_received); __pyx_v_self->_protocol_data_received = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":213 * self._protocol = protocol * # Store a reference to the bound method directly * try: # <<<<<<<<<<<<<< * self._protocol_data_received = protocol.data_received * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":215 * try: * self._protocol_data_received = protocol.data_received * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/handles/basetransport.pyx":213 * self._protocol = protocol * # Store a reference to the bound method directly * try: # <<<<<<<<<<<<<< * self._protocol_data_received = protocol.data_received * except AttributeError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/handles/basetransport.pyx":210 * self._waiter = waiter * * cdef inline _set_protocol(self, object protocol): # <<<<<<<<<<<<<< * self._protocol = protocol * # Store a reference to the bound method directly */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":218 * pass * * cdef inline _init_protocol(self): # <<<<<<<<<<<<<< * self._loop._track_transport(self) * if self._protocol is None: */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_init_protocol", 0); /* "uvloop/handles/basetransport.pyx":219 * * cdef inline _init_protocol(self): * self._loop._track_transport(self) # <<<<<<<<<<<<<< * if self._protocol is None: * raise RuntimeError('invalid _init_protocol call') */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->__pyx_base.__pyx_base._loop->__pyx_vtab)->_track_transport(__pyx_v_self->__pyx_base.__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":220 * cdef inline _init_protocol(self): * self._loop._track_transport(self) * if self._protocol is None: # <<<<<<<<<<<<<< * raise RuntimeError('invalid _init_protocol call') * self._schedule_call_connection_made() */ __pyx_t_2 = (__pyx_v_self->_protocol == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/basetransport.pyx":221 * self._loop._track_transport(self) * if self._protocol is None: * raise RuntimeError('invalid _init_protocol call') # <<<<<<<<<<<<<< * self._schedule_call_connection_made() * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(3, 221, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":220 * cdef inline _init_protocol(self): * self._loop._track_transport(self) * if self._protocol is None: # <<<<<<<<<<<<<< * raise RuntimeError('invalid _init_protocol call') * self._schedule_call_connection_made() */ } /* "uvloop/handles/basetransport.pyx":222 * if self._protocol is None: * raise RuntimeError('invalid _init_protocol call') * self._schedule_call_connection_made() # <<<<<<<<<<<<<< * * cdef inline _add_extra_info(self, str name, object obj): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":218 * pass * * cdef inline _init_protocol(self): # <<<<<<<<<<<<<< * self._loop._track_transport(self) * if self._protocol is None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._init_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":224 * self._schedule_call_connection_made() * * cdef inline _add_extra_info(self, str name, object obj): # <<<<<<<<<<<<<< * if self._extra_info is None: * self._extra_info = {} */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_add_extra_info", 0); /* "uvloop/handles/basetransport.pyx":225 * * cdef inline _add_extra_info(self, str name, object obj): * if self._extra_info is None: # <<<<<<<<<<<<<< * self._extra_info = {} * self._extra_info[name] = obj */ __pyx_t_1 = (__pyx_v_self->_extra_info == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":226 * cdef inline _add_extra_info(self, str name, object obj): * if self._extra_info is None: * self._extra_info = {} # <<<<<<<<<<<<<< * self._extra_info[name] = obj * */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_extra_info); __Pyx_DECREF(__pyx_v_self->_extra_info); __pyx_v_self->_extra_info = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":225 * * cdef inline _add_extra_info(self, str name, object obj): * if self._extra_info is None: # <<<<<<<<<<<<<< * self._extra_info = {} * self._extra_info[name] = obj */ } /* "uvloop/handles/basetransport.pyx":227 * if self._extra_info is None: * self._extra_info = {} * self._extra_info[name] = obj # <<<<<<<<<<<<<< * * cdef bint _is_reading(self): */ if (unlikely(__pyx_v_self->_extra_info == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 227, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_extra_info, __pyx_v_name, __pyx_v_obj) < 0)) __PYX_ERR(3, 227, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":224 * self._schedule_call_connection_made() * * cdef inline _add_extra_info(self, str name, object obj): # <<<<<<<<<<<<<< * if self._extra_info is None: * self._extra_info = {} */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._add_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":229 * self._extra_info[name] = obj * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static int __pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_reading", 0); /* "uvloop/handles/basetransport.pyx":230 * * cdef bint _is_reading(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _start_reading(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(3, 230, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":229 * self._extra_info[name] = obj * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("uvloop.loop.UVBaseTransport._is_reading", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":232 * raise NotImplementedError * * cdef _start_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_start_reading", 0); /* "uvloop/handles/basetransport.pyx":233 * * cdef _start_reading(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * cdef _stop_reading(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(3, 233, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":232 * raise NotImplementedError * * cdef _start_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":235 * raise NotImplementedError * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static PyObject *__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_stop_reading", 0); /* "uvloop/handles/basetransport.pyx":236 * * cdef _stop_reading(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * # === Public API === */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(3, 236, __pyx_L1_error) /* "uvloop/handles/basetransport.pyx":235 * raise NotImplementedError * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":242 * property _paused: * # Used by SSLProto. Might be removed in the future. * def __get__(self): # <<<<<<<<<<<<<< * return bool(not self._is_reading()) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_7_paused___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "uvloop/handles/basetransport.pyx":243 * # Used by SSLProto. Might be removed in the future. * def __get__(self): * return bool(not self._is_reading()) # <<<<<<<<<<<<<< * * def get_protocol(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_is_reading(__pyx_v_self) != 0)); __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":242 * property _paused: * # Used by SSLProto. Might be removed in the future. * def __get__(self): # <<<<<<<<<<<<<< * return bool(not self._is_reading()) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._paused.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":245 * return bool(not self._is_reading()) * * def get_protocol(self): # <<<<<<<<<<<<<< * return self._protocol * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_2get_protocol[] = "UVBaseTransport.get_protocol(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_protocol (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_2get_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_protocol", 0); /* "uvloop/handles/basetransport.pyx":246 * * def get_protocol(self): * return self._protocol # <<<<<<<<<<<<<< * * def set_protocol(self, protocol): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_protocol); __pyx_r = __pyx_v_self->_protocol; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":245 * return bool(not self._is_reading()) * * def get_protocol(self): # <<<<<<<<<<<<<< * return self._protocol * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":248 * return self._protocol * * def set_protocol(self, protocol): # <<<<<<<<<<<<<< * self._set_protocol(protocol) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_4set_protocol[] = "UVBaseTransport.set_protocol(self, protocol)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_protocol (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), ((PyObject *)__pyx_v_protocol)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_4set_protocol(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_protocol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_protocol", 0); /* "uvloop/handles/basetransport.pyx":249 * * def set_protocol(self, protocol): * self._set_protocol(protocol) # <<<<<<<<<<<<<< * * def _force_close(self, exc): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol(__pyx_v_self, __pyx_v_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":248 * return self._protocol * * def set_protocol(self, protocol): # <<<<<<<<<<<<<< * self._set_protocol(protocol) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_protocol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":251 * self._set_protocol(protocol) * * def _force_close(self, exc): # <<<<<<<<<<<<<< * # Used by SSLProto. Might be removed in the future. * if self._conn_lost or self._closed: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_6_force_close[] = "UVBaseTransport._force_close(self, exc)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close(PyObject *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_force_close (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), ((PyObject *)__pyx_v_exc)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_6_force_close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_force_close", 0); /* "uvloop/handles/basetransport.pyx":253 * def _force_close(self, exc): * # Used by SSLProto. Might be removed in the future. * if self._conn_lost or self._closed: # <<<<<<<<<<<<<< * return * if not self._closing: */ __pyx_t_2 = (__pyx_v_self->_conn_lost != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":254 * # Used by SSLProto. Might be removed in the future. * if self._conn_lost or self._closed: * return # <<<<<<<<<<<<<< * if not self._closing: * self._closing = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":253 * def _force_close(self, exc): * # Used by SSLProto. Might be removed in the future. * if self._conn_lost or self._closed: # <<<<<<<<<<<<<< * return * if not self._closing: */ } /* "uvloop/handles/basetransport.pyx":255 * if self._conn_lost or self._closed: * return * if not self._closing: # <<<<<<<<<<<<<< * self._closing = 1 * self._stop_reading() */ __pyx_t_1 = ((!(__pyx_v_self->_closing != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":256 * return * if not self._closing: * self._closing = 1 # <<<<<<<<<<<<<< * self._stop_reading() * self._conn_lost += 1 */ __pyx_v_self->_closing = 1; /* "uvloop/handles/basetransport.pyx":257 * if not self._closing: * self._closing = 1 * self._stop_reading() # <<<<<<<<<<<<<< * self._conn_lost += 1 * self._schedule_call_connection_lost(exc) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_stop_reading(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":255 * if self._conn_lost or self._closed: * return * if not self._closing: # <<<<<<<<<<<<<< * self._closing = 1 * self._stop_reading() */ } /* "uvloop/handles/basetransport.pyx":258 * self._closing = 1 * self._stop_reading() * self._conn_lost += 1 # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(exc) * */ __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1); /* "uvloop/handles/basetransport.pyx":259 * self._stop_reading() * self._conn_lost += 1 * self._schedule_call_connection_lost(exc) # <<<<<<<<<<<<<< * * def abort(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":251 * self._set_protocol(protocol) * * def _force_close(self, exc): # <<<<<<<<<<<<<< * # Used by SSLProto. Might be removed in the future. * if self._conn_lost or self._closed: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._force_close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":261 * self._schedule_call_connection_lost(exc) * * def abort(self): # <<<<<<<<<<<<<< * self._force_close(None) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_8abort[] = "UVBaseTransport.abort(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("abort (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8abort(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("abort", 0); /* "uvloop/handles/basetransport.pyx":262 * * def abort(self): * self._force_close(None) # <<<<<<<<<<<<<< * * def close(self): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_force_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/basetransport.pyx":261 * self._schedule_call_connection_lost(exc) * * def abort(self): # <<<<<<<<<<<<<< * self._force_close(None) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.abort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":264 * self._force_close(None) * * def close(self): # <<<<<<<<<<<<<< * if self._closing or self._closed: * return */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_10close[] = "UVBaseTransport.close(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_10close(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/handles/basetransport.pyx":265 * * def close(self): * if self._closing or self._closed: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (__pyx_v_self->_closing != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base._closed != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":266 * def close(self): * if self._closing or self._closed: * return # <<<<<<<<<<<<<< * * self._closing = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":265 * * def close(self): * if self._closing or self._closed: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/basetransport.pyx":268 * return * * self._closing = 1 # <<<<<<<<<<<<<< * self._stop_reading() * */ __pyx_v_self->_closing = 1; /* "uvloop/handles/basetransport.pyx":269 * * self._closing = 1 * self._stop_reading() # <<<<<<<<<<<<<< * * if not self._get_write_buffer_size(): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_stop_reading(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":271 * self._stop_reading() * * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * # The write buffer is empty * self._conn_lost += 1 */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":273 * if not self._get_write_buffer_size(): * # The write buffer is empty * self._conn_lost += 1 # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(None) * */ __pyx_v_self->_conn_lost = (__pyx_v_self->_conn_lost + 1); /* "uvloop/handles/basetransport.pyx":274 * # The write buffer is empty * self._conn_lost += 1 * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<< * * def is_closing(self): */ __pyx_t_3 = __pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/basetransport.pyx":271 * self._stop_reading() * * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * # The write buffer is empty * self._conn_lost += 1 */ } /* "uvloop/handles/basetransport.pyx":264 * self._force_close(None) * * def close(self): # <<<<<<<<<<<<<< * if self._closing or self._closed: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":276 * self._schedule_call_connection_lost(None) * * def is_closing(self): # <<<<<<<<<<<<<< * return self._closing * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_12is_closing[] = "UVBaseTransport.is_closing(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_closing (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_12is_closing(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_closing", 0); /* "uvloop/handles/basetransport.pyx":277 * * def is_closing(self): * return self._closing # <<<<<<<<<<<<<< * * def get_write_buffer_size(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closing); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":276 * self._schedule_call_connection_lost(None) * * def is_closing(self): # <<<<<<<<<<<<<< * return self._closing * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.is_closing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":279 * return self._closing * * def get_write_buffer_size(self): # <<<<<<<<<<<<<< * return self._get_write_buffer_size() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size[] = "UVBaseTransport.get_write_buffer_size(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_size (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("get_write_buffer_size", 0); /* "uvloop/handles/basetransport.pyx":280 * * def get_write_buffer_size(self): * return self._get_write_buffer_size() # <<<<<<<<<<<<<< * * def set_write_buffer_limits(self, high=None, low=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t(((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_get_write_buffer_size(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":279 * return self._closing * * def get_write_buffer_size(self): # <<<<<<<<<<<<<< * return self._get_write_buffer_size() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":282 * return self._get_write_buffer_size() * * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits[] = "UVBaseTransport.set_write_buffer_limits(self, high=None, low=None)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_high = 0; PyObject *__pyx_v_low = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_write_buffer_limits (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_high); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_low); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_write_buffer_limits") < 0)) __PYX_ERR(3, 282, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_high = values[0]; __pyx_v_low = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_write_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 282, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_high, PyObject *__pyx_v_low) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits __pyx_t_6; __Pyx_RefNannySetupContext("set_write_buffer_limits", 0); __Pyx_INCREF(__pyx_v_high); __Pyx_INCREF(__pyx_v_low); /* "uvloop/handles/basetransport.pyx":283 * * def set_write_buffer_limits(self, high=None, low=None): * self._ensure_alive() # <<<<<<<<<<<<<< * * if high is None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":285 * self._ensure_alive() * * if high is None: # <<<<<<<<<<<<<< * high = -1 * if low is None: */ __pyx_t_2 = (__pyx_v_high == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/basetransport.pyx":286 * * if high is None: * high = -1 # <<<<<<<<<<<<<< * if low is None: * low = -1 */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_DECREF_SET(__pyx_v_high, __pyx_int_neg_1); /* "uvloop/handles/basetransport.pyx":285 * self._ensure_alive() * * if high is None: # <<<<<<<<<<<<<< * high = -1 * if low is None: */ } /* "uvloop/handles/basetransport.pyx":287 * if high is None: * high = -1 * if low is None: # <<<<<<<<<<<<<< * low = -1 * */ __pyx_t_3 = (__pyx_v_low == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "uvloop/handles/basetransport.pyx":288 * high = -1 * if low is None: * low = -1 # <<<<<<<<<<<<<< * * self._set_write_buffer_limits(high, low) */ __Pyx_INCREF(__pyx_int_neg_1); __Pyx_DECREF_SET(__pyx_v_low, __pyx_int_neg_1); /* "uvloop/handles/basetransport.pyx":287 * if high is None: * high = -1 * if low is None: # <<<<<<<<<<<<<< * low = -1 * */ } /* "uvloop/handles/basetransport.pyx":290 * low = -1 * * self._set_write_buffer_limits(high, low) # <<<<<<<<<<<<<< * * def get_write_buffer_limits(self): */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_high); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 290, __pyx_L1_error) __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_low); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 290, __pyx_L1_error) __pyx_t_6.__pyx_n = 2; __pyx_t_6.high = __pyx_t_4; __pyx_t_6.low = __pyx_t_5; __pyx_t_1 = __pyx_f_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits(__pyx_v_self, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/basetransport.pyx":282 * return self._get_write_buffer_size() * * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_high); __Pyx_XDECREF(__pyx_v_low); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":292 * self._set_write_buffer_limits(high, low) * * def get_write_buffer_limits(self): # <<<<<<<<<<<<<< * return (self._low_water, self._high_water) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits[] = "UVBaseTransport.get_write_buffer_limits(self)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_limits (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_write_buffer_limits", 0); /* "uvloop/handles/basetransport.pyx":293 * * def get_write_buffer_limits(self): * return (self._low_water, self._high_water) # <<<<<<<<<<<<<< * * def get_extra_info(self, name, default=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_low_water); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_high_water); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":292 * self._set_write_buffer_limits(high, low) * * def get_write_buffer_limits(self): # <<<<<<<<<<<<<< * return (self._low_water, self._high_water) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pyx":295 * return (self._low_water, self._high_water) * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * if self._extra_info is not None and name in self._extra_info: * return self._extra_info[name] */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_15UVBaseTransport_20get_extra_info[] = "UVBaseTransport.get_extra_info(self, name, default=None)"; static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(3, 295, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_default = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 295, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_20get_extra_info(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; __Pyx_RefNannySetupContext("get_extra_info", 0); /* "uvloop/handles/basetransport.pyx":296 * * def get_extra_info(self, name, default=None): * if self._extra_info is not None and name in self._extra_info: # <<<<<<<<<<<<<< * return self._extra_info[name] * if name == 'socket': */ __pyx_t_2 = (__pyx_v_self->_extra_info != ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } if (unlikely(__pyx_v_self->_extra_info == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(3, 296, __pyx_L1_error) } __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->_extra_info, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(3, 296, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":297 * def get_extra_info(self, name, default=None): * if self._extra_info is not None and name in self._extra_info: * return self._extra_info[name] # <<<<<<<<<<<<<< * if name == 'socket': * return self._get_socket() */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_extra_info == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 297, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_extra_info, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":296 * * def get_extra_info(self, name, default=None): * if self._extra_info is not None and name in self._extra_info: # <<<<<<<<<<<<<< * return self._extra_info[name] * if name == 'socket': */ } /* "uvloop/handles/basetransport.pyx":298 * if self._extra_info is not None and name in self._extra_info: * return self._extra_info[name] * if name == 'socket': # <<<<<<<<<<<<<< * return self._get_socket() * if name == 'sockname': */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_socket, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 298, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":299 * return self._extra_info[name] * if name == 'socket': * return self._get_socket() # <<<<<<<<<<<<<< * if name == 'sockname': * return self._get_socket().getsockname() */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":298 * if self._extra_info is not None and name in self._extra_info: * return self._extra_info[name] * if name == 'socket': # <<<<<<<<<<<<<< * return self._get_socket() * if name == 'sockname': */ } /* "uvloop/handles/basetransport.pyx":300 * if name == 'socket': * return self._get_socket() * if name == 'sockname': # <<<<<<<<<<<<<< * return self._get_socket().getsockname() * if name == 'peername': */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_sockname, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 300, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":301 * return self._get_socket() * if name == 'sockname': * return self._get_socket().getsockname() # <<<<<<<<<<<<<< * if name == 'peername': * try: */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getsockname); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 301, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":300 * if name == 'socket': * return self._get_socket() * if name == 'sockname': # <<<<<<<<<<<<<< * return self._get_socket().getsockname() * if name == 'peername': */ } /* "uvloop/handles/basetransport.pyx":302 * if name == 'sockname': * return self._get_socket().getsockname() * if name == 'peername': # <<<<<<<<<<<<<< * try: * return self._get_socket().getpeername() */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_peername, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 302, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/handles/basetransport.pyx":303 * return self._get_socket().getsockname() * if name == 'peername': * try: # <<<<<<<<<<<<<< * return self._get_socket().getpeername() * except socket_error: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/handles/basetransport.pyx":304 * if name == 'peername': * try: * return self._get_socket().getpeername() # <<<<<<<<<<<<<< * except socket_error: * return default */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 304, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getpeername); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 304, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 304, __pyx_L9_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 304, __pyx_L9_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L13_try_return; /* "uvloop/handles/basetransport.pyx":303 * return self._get_socket().getsockname() * if name == 'peername': * try: # <<<<<<<<<<<<<< * return self._get_socket().getpeername() * except socket_error: */ } __pyx_L9_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/basetransport.pyx":305 * try: * return self._get_socket().getpeername() * except socket_error: # <<<<<<<<<<<<<< * return default * return default */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_socket_error); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(3, 305, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/handles/basetransport.pyx":306 * return self._get_socket().getpeername() * except socket_error: * return default # <<<<<<<<<<<<<< * return default */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_except_return; } goto __pyx_L11_except_error; __pyx_L11_except_error:; /* "uvloop/handles/basetransport.pyx":303 * return self._get_socket().getsockname() * if name == 'peername': * try: # <<<<<<<<<<<<<< * return self._get_socket().getpeername() * except socket_error: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L13_try_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L0; __pyx_L12_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L0; } /* "uvloop/handles/basetransport.pyx":302 * if name == 'sockname': * return self._get_socket().getsockname() * if name == 'peername': # <<<<<<<<<<<<<< * try: * return self._get_socket().getpeername() */ } /* "uvloop/handles/basetransport.pyx":307 * except socket_error: * return default * return default # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; /* "uvloop/handles/basetransport.pyx":295 * return (self._low_water, self._high_water) * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * if self._extra_info is not None and name in self._extra_info: * return self._extra_info[name] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/basetransport.pxd":4 * * cdef: * readonly bint _closing # <<<<<<<<<<<<<< * * bint _protocol_connected */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_15UVBaseTransport_8_closing___get__(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_closing); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVBaseTransport._closing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":28 * bint closed * * cdef free_bufs(self): # <<<<<<<<<<<<<< * cdef size_t i * */ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) { size_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; __Pyx_RefNannySetupContext("free_bufs", 0); /* "uvloop/handles/stream.pyx":31 * cdef size_t i * * if self.uv_bufs is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_bufs) * self.uv_bufs = NULL */ __pyx_t_1 = ((__pyx_v_self->uv_bufs != NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":32 * * if self.uv_bufs is not NULL: * PyMem_RawFree(self.uv_bufs) # <<<<<<<<<<<<<< * self.uv_bufs = NULL * if UVLOOP_DEBUG: */ PyMem_RawFree(__pyx_v_self->uv_bufs); /* "uvloop/handles/stream.pyx":33 * if self.uv_bufs is not NULL: * PyMem_RawFree(self.uv_bufs) * self.uv_bufs = NULL # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: */ __pyx_v_self->uv_bufs = NULL; /* "uvloop/handles/stream.pyx":34 * PyMem_RawFree(self.uv_bufs) * self.uv_bufs = NULL * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.py_bufs_sml_inuse: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":35 * self.uv_bufs = NULL * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * raise RuntimeError( * '_StreamWriteContext.close: uv_bufs != NULL and ' */ __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":36 * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: * raise RuntimeError( # <<<<<<<<<<<<<< * '_StreamWriteContext.close: uv_bufs != NULL and ' * 'py_bufs_sml_inuse is True') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 36, __pyx_L1_error) /* "uvloop/handles/stream.pyx":35 * self.uv_bufs = NULL * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * raise RuntimeError( * '_StreamWriteContext.close: uv_bufs != NULL and ' */ } /* "uvloop/handles/stream.pyx":34 * PyMem_RawFree(self.uv_bufs) * self.uv_bufs = NULL * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.py_bufs_sml_inuse: * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":31 * cdef size_t i * * if self.uv_bufs is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_bufs) * self.uv_bufs = NULL */ } /* "uvloop/handles/stream.pyx":40 * 'py_bufs_sml_inuse is True') * * if self.py_bufs is not NULL: # <<<<<<<<<<<<<< * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs[i]) */ __pyx_t_1 = ((__pyx_v_self->py_bufs != NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":41 * * if self.py_bufs is not NULL: * for i from 0 <= i < self.py_bufs_len: # <<<<<<<<<<<<<< * PyBuffer_Release(&self.py_bufs[i]) * PyMem_RawFree(self.py_bufs) */ __pyx_t_3 = __pyx_v_self->py_bufs_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "uvloop/handles/stream.pyx":42 * if self.py_bufs is not NULL: * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs[i]) # <<<<<<<<<<<<<< * PyMem_RawFree(self.py_bufs) * self.py_bufs = NULL */ PyBuffer_Release((&(__pyx_v_self->py_bufs[__pyx_v_i]))); } /* "uvloop/handles/stream.pyx":43 * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs[i]) * PyMem_RawFree(self.py_bufs) # <<<<<<<<<<<<<< * self.py_bufs = NULL * if UVLOOP_DEBUG: */ PyMem_RawFree(__pyx_v_self->py_bufs); /* "uvloop/handles/stream.pyx":44 * PyBuffer_Release(&self.py_bufs[i]) * PyMem_RawFree(self.py_bufs) * self.py_bufs = NULL # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: */ __pyx_v_self->py_bufs = NULL; /* "uvloop/handles/stream.pyx":45 * PyMem_RawFree(self.py_bufs) * self.py_bufs = NULL * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.py_bufs_sml_inuse: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":46 * self.py_bufs = NULL * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * raise RuntimeError( * '_StreamWriteContext.close: py_bufs != NULL and ' */ __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":47 * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: * raise RuntimeError( # <<<<<<<<<<<<<< * '_StreamWriteContext.close: py_bufs != NULL and ' * 'py_bufs_sml_inuse is True') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 47, __pyx_L1_error) /* "uvloop/handles/stream.pyx":46 * self.py_bufs = NULL * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * raise RuntimeError( * '_StreamWriteContext.close: py_bufs != NULL and ' */ } /* "uvloop/handles/stream.pyx":45 * PyMem_RawFree(self.py_bufs) * self.py_bufs = NULL * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.py_bufs_sml_inuse: * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":40 * 'py_bufs_sml_inuse is True') * * if self.py_bufs is not NULL: # <<<<<<<<<<<<<< * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs[i]) */ } /* "uvloop/handles/stream.pyx":51 * 'py_bufs_sml_inuse is True') * * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs_sml[i]) */ __pyx_t_1 = (__pyx_v_self->py_bufs_sml_inuse != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":52 * * if self.py_bufs_sml_inuse: * for i from 0 <= i < self.py_bufs_len: # <<<<<<<<<<<<<< * PyBuffer_Release(&self.py_bufs_sml[i]) * self.py_bufs_sml_inuse = 0 */ __pyx_t_3 = __pyx_v_self->py_bufs_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "uvloop/handles/stream.pyx":53 * if self.py_bufs_sml_inuse: * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs_sml[i]) # <<<<<<<<<<<<<< * self.py_bufs_sml_inuse = 0 * */ PyBuffer_Release((&(__pyx_v_self->py_bufs_sml[__pyx_v_i]))); } /* "uvloop/handles/stream.pyx":54 * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs_sml[i]) * self.py_bufs_sml_inuse = 0 # <<<<<<<<<<<<<< * * self.py_bufs_len = 0 */ __pyx_v_self->py_bufs_sml_inuse = 0; /* "uvloop/handles/stream.pyx":51 * 'py_bufs_sml_inuse is True') * * if self.py_bufs_sml_inuse: # <<<<<<<<<<<<<< * for i from 0 <= i < self.py_bufs_len: * PyBuffer_Release(&self.py_bufs_sml[i]) */ } /* "uvloop/handles/stream.pyx":56 * self.py_bufs_sml_inuse = 0 * * self.py_bufs_len = 0 # <<<<<<<<<<<<<< * self.buffers = None * */ __pyx_v_self->py_bufs_len = 0; /* "uvloop/handles/stream.pyx":57 * * self.py_bufs_len = 0 * self.buffers = None # <<<<<<<<<<<<<< * * cdef close(self): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->buffers); __Pyx_DECREF(__pyx_v_self->buffers); __pyx_v_self->buffers = ((PyObject*)Py_None); /* "uvloop/handles/stream.pyx":28 * bint closed * * cdef free_bufs(self): # <<<<<<<<<<<<<< * cdef size_t i * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.free_bufs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":59 * self.buffers = None * * cdef close(self): # <<<<<<<<<<<<<< * if self.closed: * return */ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_close(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/handles/stream.pyx":60 * * cdef close(self): * if self.closed: # <<<<<<<<<<<<<< * return * self.closed = 1 */ __pyx_t_1 = (__pyx_v_self->closed != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":61 * cdef close(self): * if self.closed: * return # <<<<<<<<<<<<<< * self.closed = 1 * self.free_bufs() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":60 * * cdef close(self): * if self.closed: # <<<<<<<<<<<<<< * return * self.closed = 1 */ } /* "uvloop/handles/stream.pyx":62 * if self.closed: * return * self.closed = 1 # <<<<<<<<<<<<<< * self.free_bufs() * Py_DECREF(self) */ __pyx_v_self->closed = 1; /* "uvloop/handles/stream.pyx":63 * return * self.closed = 1 * self.free_bufs() # <<<<<<<<<<<<<< * Py_DECREF(self) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_self->__pyx_vtab)->free_bufs(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":64 * self.closed = 1 * self.free_bufs() * Py_DECREF(self) # <<<<<<<<<<<<<< * * cdef advance_uv_buf(self, size_t sent): */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/stream.pyx":59 * self.buffers = None * * cdef close(self): # <<<<<<<<<<<<<< * if self.closed: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":66 * Py_DECREF(self) * * cdef advance_uv_buf(self, size_t sent): # <<<<<<<<<<<<<< * # Advance the pointer to first uv_buf and the * # pointer to first byte in that buffer. */ static PyObject *__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self, size_t __pyx_v_sent) { uv_buf_t *__pyx_v_buf; size_t __pyx_v_idx; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations size_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("advance_uv_buf", 0); /* "uvloop/handles/stream.pyx":79 * size_t idx * * for idx from 0 <= idx < self.uv_bufs_len: # <<<<<<<<<<<<<< * buf = &self.uv_bufs_start[idx] * if buf.len > sent: */ __pyx_t_1 = __pyx_v_self->uv_bufs_len; for (__pyx_v_idx = 0; __pyx_v_idx < __pyx_t_1; __pyx_v_idx++) { /* "uvloop/handles/stream.pyx":80 * * for idx from 0 <= idx < self.uv_bufs_len: * buf = &self.uv_bufs_start[idx] # <<<<<<<<<<<<<< * if buf.len > sent: * buf.len -= sent */ __pyx_v_buf = (&(__pyx_v_self->uv_bufs_start[__pyx_v_idx])); /* "uvloop/handles/stream.pyx":81 * for idx from 0 <= idx < self.uv_bufs_len: * buf = &self.uv_bufs_start[idx] * if buf.len > sent: # <<<<<<<<<<<<<< * buf.len -= sent * buf.base = buf.base + sent */ __pyx_t_2 = ((__pyx_v_buf->len > __pyx_v_sent) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":82 * buf = &self.uv_bufs_start[idx] * if buf.len > sent: * buf.len -= sent # <<<<<<<<<<<<<< * buf.base = buf.base + sent * self.uv_bufs_start = buf */ __pyx_v_buf->len = (__pyx_v_buf->len - __pyx_v_sent); /* "uvloop/handles/stream.pyx":83 * if buf.len > sent: * buf.len -= sent * buf.base = buf.base + sent # <<<<<<<<<<<<<< * self.uv_bufs_start = buf * self.uv_bufs_len -= idx */ __pyx_v_buf->base = (__pyx_v_buf->base + __pyx_v_sent); /* "uvloop/handles/stream.pyx":84 * buf.len -= sent * buf.base = buf.base + sent * self.uv_bufs_start = buf # <<<<<<<<<<<<<< * self.uv_bufs_len -= idx * return */ __pyx_v_self->uv_bufs_start = __pyx_v_buf; /* "uvloop/handles/stream.pyx":85 * buf.base = buf.base + sent * self.uv_bufs_start = buf * self.uv_bufs_len -= idx # <<<<<<<<<<<<<< * return * else: */ __pyx_v_self->uv_bufs_len = (__pyx_v_self->uv_bufs_len - __pyx_v_idx); /* "uvloop/handles/stream.pyx":86 * self.uv_bufs_start = buf * self.uv_bufs_len -= idx * return # <<<<<<<<<<<<<< * else: * sent -= self.uv_bufs_start[idx].len */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":81 * for idx from 0 <= idx < self.uv_bufs_len: * buf = &self.uv_bufs_start[idx] * if buf.len > sent: # <<<<<<<<<<<<<< * buf.len -= sent * buf.base = buf.base + sent */ } /* "uvloop/handles/stream.pyx":88 * return * else: * sent -= self.uv_bufs_start[idx].len # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ /*else*/ { __pyx_v_sent = (__pyx_v_sent - (__pyx_v_self->uv_bufs_start[__pyx_v_idx]).len); } /* "uvloop/handles/stream.pyx":90 * sent -= self.uv_bufs_start[idx].len * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if sent < 0: * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":91 * * if UVLOOP_DEBUG: * if sent < 0: # <<<<<<<<<<<<<< * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') * */ __pyx_t_2 = ((__pyx_v_sent < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":92 * if UVLOOP_DEBUG: * if sent < 0: * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') # <<<<<<<<<<<<<< * * raise RuntimeError('fatal: Could not advance _StreamWriteContext') */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(15, 92, __pyx_L1_error) /* "uvloop/handles/stream.pyx":91 * * if UVLOOP_DEBUG: * if sent < 0: # <<<<<<<<<<<<<< * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') * */ } /* "uvloop/handles/stream.pyx":90 * sent -= self.uv_bufs_start[idx].len * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if sent < 0: * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') */ } } /* "uvloop/handles/stream.pyx":94 * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') * * raise RuntimeError('fatal: Could not advance _StreamWriteContext') # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(15, 94, __pyx_L1_error) /* "uvloop/handles/stream.pyx":66 * Py_DECREF(self) * * cdef advance_uv_buf(self, size_t sent): # <<<<<<<<<<<<<< * # Advance the pointer to first uv_buf and the * # pointer to first byte in that buffer. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.advance_uv_buf", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":97 * * @staticmethod * cdef _StreamWriteContext new(UVStream stream, list buffers): # <<<<<<<<<<<<<< * cdef: * _StreamWriteContext ctx */ static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream, PyObject *__pyx_v_buffers) { struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0; int __pyx_v_uv_bufs_idx; size_t __pyx_v_py_bufs_len; Py_buffer *__pyx_v_p_pybufs; uv_buf_t *__pyx_v_p_uvbufs; PyObject *__pyx_v_buf = NULL; struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_buffer *__pyx_t_10; uv_buf_t *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; Py_ssize_t __pyx_t_16; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_17 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/stream.pyx":100 * cdef: * _StreamWriteContext ctx * int uv_bufs_idx = 0 # <<<<<<<<<<<<<< * size_t py_bufs_len = 0 * int i */ __pyx_v_uv_bufs_idx = 0; /* "uvloop/handles/stream.pyx":101 * _StreamWriteContext ctx * int uv_bufs_idx = 0 * size_t py_bufs_len = 0 # <<<<<<<<<<<<<< * int i * */ __pyx_v_py_bufs_len = 0; /* "uvloop/handles/stream.pyx":107 * uv.uv_buf_t* p_uvbufs * * ctx = _StreamWriteContext.__new__(_StreamWriteContext) # <<<<<<<<<<<<<< * ctx.stream = None * ctx.closed = 1 */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop__StreamWriteContext(((PyTypeObject *)__pyx_ptype_6uvloop_4loop__StreamWriteContext), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop__StreamWriteContext)))) __PYX_ERR(15, 107, __pyx_L1_error) __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":108 * * ctx = _StreamWriteContext.__new__(_StreamWriteContext) * ctx.stream = None # <<<<<<<<<<<<<< * ctx.closed = 1 * ctx.py_bufs_len = 0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_ctx->stream); __Pyx_DECREF(((PyObject *)__pyx_v_ctx->stream)); __pyx_v_ctx->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); /* "uvloop/handles/stream.pyx":109 * ctx = _StreamWriteContext.__new__(_StreamWriteContext) * ctx.stream = None * ctx.closed = 1 # <<<<<<<<<<<<<< * ctx.py_bufs_len = 0 * ctx.py_bufs_sml_inuse = 0 */ __pyx_v_ctx->closed = 1; /* "uvloop/handles/stream.pyx":110 * ctx.stream = None * ctx.closed = 1 * ctx.py_bufs_len = 0 # <<<<<<<<<<<<<< * ctx.py_bufs_sml_inuse = 0 * ctx.uv_bufs = NULL */ __pyx_v_ctx->py_bufs_len = 0; /* "uvloop/handles/stream.pyx":111 * ctx.closed = 1 * ctx.py_bufs_len = 0 * ctx.py_bufs_sml_inuse = 0 # <<<<<<<<<<<<<< * ctx.uv_bufs = NULL * ctx.py_bufs = NULL */ __pyx_v_ctx->py_bufs_sml_inuse = 0; /* "uvloop/handles/stream.pyx":112 * ctx.py_bufs_len = 0 * ctx.py_bufs_sml_inuse = 0 * ctx.uv_bufs = NULL # <<<<<<<<<<<<<< * ctx.py_bufs = NULL * ctx.buffers = buffers */ __pyx_v_ctx->uv_bufs = NULL; /* "uvloop/handles/stream.pyx":113 * ctx.py_bufs_sml_inuse = 0 * ctx.uv_bufs = NULL * ctx.py_bufs = NULL # <<<<<<<<<<<<<< * ctx.buffers = buffers * ctx.stream = stream */ __pyx_v_ctx->py_bufs = NULL; /* "uvloop/handles/stream.pyx":114 * ctx.uv_bufs = NULL * ctx.py_bufs = NULL * ctx.buffers = buffers # <<<<<<<<<<<<<< * ctx.stream = stream * */ __Pyx_INCREF(__pyx_v_buffers); __Pyx_GIVEREF(__pyx_v_buffers); __Pyx_GOTREF(__pyx_v_ctx->buffers); __Pyx_DECREF(__pyx_v_ctx->buffers); __pyx_v_ctx->buffers = __pyx_v_buffers; /* "uvloop/handles/stream.pyx":115 * ctx.py_bufs = NULL * ctx.buffers = buffers * ctx.stream = stream # <<<<<<<<<<<<<< * * if len(buffers) <= __PREALLOCED_BUFS: */ __Pyx_INCREF(((PyObject *)__pyx_v_stream)); __Pyx_GIVEREF(((PyObject *)__pyx_v_stream)); __Pyx_GOTREF(__pyx_v_ctx->stream); __Pyx_DECREF(((PyObject *)__pyx_v_ctx->stream)); __pyx_v_ctx->stream = __pyx_v_stream; /* "uvloop/handles/stream.pyx":117 * ctx.stream = stream * * if len(buffers) <= __PREALLOCED_BUFS: # <<<<<<<<<<<<<< * # We've got a small number of buffers to write, don't * # need to use malloc. */ if (unlikely(__pyx_v_buffers == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(15, 117, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_v_buffers); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 117, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 <= 4) != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":120 * # We've got a small number of buffers to write, don't * # need to use malloc. * ctx.py_bufs_sml_inuse = 1 # <<<<<<<<<<<<<< * p_pybufs = &ctx.py_bufs_sml * p_uvbufs = &ctx.uv_bufs_sml */ __pyx_v_ctx->py_bufs_sml_inuse = 1; /* "uvloop/handles/stream.pyx":121 * # need to use malloc. * ctx.py_bufs_sml_inuse = 1 * p_pybufs = &ctx.py_bufs_sml # <<<<<<<<<<<<<< * p_uvbufs = &ctx.uv_bufs_sml * */ __pyx_v_p_pybufs = ((Py_buffer *)(&__pyx_v_ctx->py_bufs_sml)); /* "uvloop/handles/stream.pyx":122 * ctx.py_bufs_sml_inuse = 1 * p_pybufs = &ctx.py_bufs_sml * p_uvbufs = &ctx.uv_bufs_sml # <<<<<<<<<<<<<< * * else: */ __pyx_v_p_uvbufs = ((uv_buf_t *)(&__pyx_v_ctx->uv_bufs_sml)); /* "uvloop/handles/stream.pyx":117 * ctx.stream = stream * * if len(buffers) <= __PREALLOCED_BUFS: # <<<<<<<<<<<<<< * # We've got a small number of buffers to write, don't * # need to use malloc. */ goto __pyx_L3; } /* "uvloop/handles/stream.pyx":125 * * else: * for buf in buffers: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if not isinstance(buf, (bytes, bytearray, memoryview)): */ /*else*/ { if (unlikely(__pyx_v_buffers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(15, 125, __pyx_L1_error) } __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(15, 125, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":126 * else: * for buf in buffers: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if not isinstance(buf, (bytes, bytearray, memoryview)): * raise RuntimeError( */ __pyx_t_3 = (UVLOOP_DEBUG != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":127 * for buf in buffers: * if UVLOOP_DEBUG: * if not isinstance(buf, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<< * raise RuntimeError( * 'invalid data in writebuf: an instance of ' */ __Pyx_INCREF(__pyx_builtin_memoryview); __pyx_t_4 = __pyx_builtin_memoryview; __pyx_t_5 = PyBytes_Check(__pyx_v_buf); __pyx_t_6 = (__pyx_t_5 != 0); if (!__pyx_t_6) { } else { __pyx_t_3 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } __pyx_t_6 = PyByteArray_Check(__pyx_v_buf); __pyx_t_5 = (__pyx_t_6 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L8_bool_binop_done; } __pyx_t_5 = PyObject_IsInstance(__pyx_v_buf, __pyx_t_4); __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L8_bool_binop_done:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":131 * 'invalid data in writebuf: an instance of ' * 'bytes, bytearray or memoryview was expected, ' * 'got {}'.format(type(buf))) # <<<<<<<<<<<<<< * * if not PyBytes_CheckExact(buf): */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_data_in_writebuf_an_inst, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)Py_TYPE(__pyx_v_buf))); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, ((PyObject *)Py_TYPE(__pyx_v_buf))}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, ((PyObject *)Py_TYPE(__pyx_v_buf))}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_buf))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_buf))); PyTuple_SET_ITEM(__pyx_t_9, 0+1, ((PyObject *)Py_TYPE(__pyx_v_buf))); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/stream.pyx":128 * if UVLOOP_DEBUG: * if not isinstance(buf, (bytes, bytearray, memoryview)): * raise RuntimeError( # <<<<<<<<<<<<<< * 'invalid data in writebuf: an instance of ' * 'bytes, bytearray or memoryview was expected, ' */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(15, 128, __pyx_L1_error) /* "uvloop/handles/stream.pyx":127 * for buf in buffers: * if UVLOOP_DEBUG: * if not isinstance(buf, (bytes, bytearray, memoryview)): # <<<<<<<<<<<<<< * raise RuntimeError( * 'invalid data in writebuf: an instance of ' */ } /* "uvloop/handles/stream.pyx":126 * else: * for buf in buffers: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if not isinstance(buf, (bytes, bytearray, memoryview)): * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":133 * 'got {}'.format(type(buf))) * * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * py_bufs_len += 1 * */ __pyx_t_6 = ((!(PyBytes_CheckExact(__pyx_v_buf) != 0)) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":134 * * if not PyBytes_CheckExact(buf): * py_bufs_len += 1 # <<<<<<<<<<<<<< * * if py_bufs_len > 0: */ __pyx_v_py_bufs_len = (__pyx_v_py_bufs_len + 1); /* "uvloop/handles/stream.pyx":133 * 'got {}'.format(type(buf))) * * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * py_bufs_len += 1 * */ } /* "uvloop/handles/stream.pyx":125 * * else: * for buf in buffers: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if not isinstance(buf, (bytes, bytearray, memoryview)): */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":136 * py_bufs_len += 1 * * if py_bufs_len > 0: # <<<<<<<<<<<<<< * ctx.py_bufs = PyMem_RawMalloc( * py_bufs_len * sizeof(Py_buffer)) */ __pyx_t_6 = ((__pyx_v_py_bufs_len > 0) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":137 * * if py_bufs_len > 0: * ctx.py_bufs = PyMem_RawMalloc( # <<<<<<<<<<<<<< * py_bufs_len * sizeof(Py_buffer)) * if ctx.py_bufs is NULL: */ __pyx_v_ctx->py_bufs = ((Py_buffer *)PyMem_RawMalloc((__pyx_v_py_bufs_len * (sizeof(Py_buffer))))); /* "uvloop/handles/stream.pyx":139 * ctx.py_bufs = PyMem_RawMalloc( * py_bufs_len * sizeof(Py_buffer)) * if ctx.py_bufs is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_6 = ((__pyx_v_ctx->py_bufs == NULL) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":140 * py_bufs_len * sizeof(Py_buffer)) * if ctx.py_bufs is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * * ctx.uv_bufs = PyMem_RawMalloc( */ PyErr_NoMemory(); __PYX_ERR(15, 140, __pyx_L1_error) /* "uvloop/handles/stream.pyx":139 * ctx.py_bufs = PyMem_RawMalloc( * py_bufs_len * sizeof(Py_buffer)) * if ctx.py_bufs is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ } /* "uvloop/handles/stream.pyx":136 * py_bufs_len += 1 * * if py_bufs_len > 0: # <<<<<<<<<<<<<< * ctx.py_bufs = PyMem_RawMalloc( * py_bufs_len * sizeof(Py_buffer)) */ } /* "uvloop/handles/stream.pyx":143 * * ctx.uv_bufs = PyMem_RawMalloc( * len(buffers) * sizeof(uv.uv_buf_t)) # <<<<<<<<<<<<<< * if ctx.uv_bufs is NULL: * raise MemoryError() */ if (unlikely(__pyx_v_buffers == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(15, 143, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_v_buffers); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 143, __pyx_L1_error) /* "uvloop/handles/stream.pyx":142 * raise MemoryError() * * ctx.uv_bufs = PyMem_RawMalloc( # <<<<<<<<<<<<<< * len(buffers) * sizeof(uv.uv_buf_t)) * if ctx.uv_bufs is NULL: */ __pyx_v_ctx->uv_bufs = ((uv_buf_t *)PyMem_RawMalloc((__pyx_t_2 * (sizeof(uv_buf_t))))); /* "uvloop/handles/stream.pyx":144 * ctx.uv_bufs = PyMem_RawMalloc( * len(buffers) * sizeof(uv.uv_buf_t)) * if ctx.uv_bufs is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_6 = ((__pyx_v_ctx->uv_bufs == NULL) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":145 * len(buffers) * sizeof(uv.uv_buf_t)) * if ctx.uv_bufs is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * * p_pybufs = ctx.py_bufs */ PyErr_NoMemory(); __PYX_ERR(15, 145, __pyx_L1_error) /* "uvloop/handles/stream.pyx":144 * ctx.uv_bufs = PyMem_RawMalloc( * len(buffers) * sizeof(uv.uv_buf_t)) * if ctx.uv_bufs is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ } /* "uvloop/handles/stream.pyx":147 * raise MemoryError() * * p_pybufs = ctx.py_bufs # <<<<<<<<<<<<<< * p_uvbufs = ctx.uv_bufs * */ __pyx_t_10 = __pyx_v_ctx->py_bufs; __pyx_v_p_pybufs = __pyx_t_10; /* "uvloop/handles/stream.pyx":148 * * p_pybufs = ctx.py_bufs * p_uvbufs = ctx.uv_bufs # <<<<<<<<<<<<<< * * py_bufs_len = 0 */ __pyx_t_11 = __pyx_v_ctx->uv_bufs; __pyx_v_p_uvbufs = __pyx_t_11; } __pyx_L3:; /* "uvloop/handles/stream.pyx":150 * p_uvbufs = ctx.uv_bufs * * py_bufs_len = 0 # <<<<<<<<<<<<<< * for buf in buffers: * if PyBytes_CheckExact(buf): */ __pyx_v_py_bufs_len = 0; /* "uvloop/handles/stream.pyx":151 * * py_bufs_len = 0 * for buf in buffers: # <<<<<<<<<<<<<< * if PyBytes_CheckExact(buf): * # We can only use this hack for bytes since it's */ if (unlikely(__pyx_v_buffers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(15, 151, __pyx_L1_error) } __pyx_t_1 = __pyx_v_buffers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(15, 151, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":152 * py_bufs_len = 0 * for buf in buffers: * if PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * # We can only use this hack for bytes since it's * # immutable. For everything else it is only safe to */ __pyx_t_6 = (PyBytes_CheckExact(__pyx_v_buf) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":156 * # immutable. For everything else it is only safe to * # use buffer protocol. * p_uvbufs[uv_bufs_idx].base = PyBytes_AS_STRING(buf) # <<<<<<<<<<<<<< * p_uvbufs[uv_bufs_idx].len = Py_SIZE(buf) * */ (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).base = PyBytes_AS_STRING(__pyx_v_buf); /* "uvloop/handles/stream.pyx":157 * # use buffer protocol. * p_uvbufs[uv_bufs_idx].base = PyBytes_AS_STRING(buf) * p_uvbufs[uv_bufs_idx].len = Py_SIZE(buf) # <<<<<<<<<<<<<< * * else: */ (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).len = Py_SIZE(__pyx_v_buf); /* "uvloop/handles/stream.pyx":152 * py_bufs_len = 0 * for buf in buffers: * if PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * # We can only use this hack for bytes since it's * # immutable. For everything else it is only safe to */ goto __pyx_L17; } /* "uvloop/handles/stream.pyx":160 * * else: * try: # <<<<<<<<<<<<<< * PyObject_GetBuffer( * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { /* "uvloop/handles/stream.pyx":161 * else: * try: * PyObject_GetBuffer( # <<<<<<<<<<<<<< * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) * except: */ __pyx_t_15 = PyObject_GetBuffer(__pyx_v_buf, (&(__pyx_v_p_pybufs[__pyx_v_py_bufs_len])), PyBUF_SIMPLE); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(15, 161, __pyx_L18_error) /* "uvloop/handles/stream.pyx":160 * * else: * try: # <<<<<<<<<<<<<< * PyObject_GetBuffer( * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) */ } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L25_try_end; __pyx_L18_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":163 * PyObject_GetBuffer( * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) * except: # <<<<<<<<<<<<<< * # This shouldn't ever happen, as `UVStream._write` * # casts non-bytes objects to `memoryviews`. */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(15, 163, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/handles/stream.pyx":166 * # This shouldn't ever happen, as `UVStream._write` * # casts non-bytes objects to `memoryviews`. * ctx.py_bufs_len = py_bufs_len # <<<<<<<<<<<<<< * ctx.free_bufs() * raise */ __pyx_v_ctx->py_bufs_len = __pyx_v_py_bufs_len; /* "uvloop/handles/stream.pyx":167 * # casts non-bytes objects to `memoryviews`. * ctx.py_bufs_len = py_bufs_len * ctx.free_bufs() # <<<<<<<<<<<<<< * raise * */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->free_bufs(__pyx_v_ctx); if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 167, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/stream.pyx":168 * ctx.py_bufs_len = py_bufs_len * ctx.free_bufs() * raise # <<<<<<<<<<<<<< * * p_uvbufs[uv_bufs_idx].base = p_pybufs[py_bufs_len].buf */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_7, __pyx_t_9); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; __PYX_ERR(15, 168, __pyx_L20_except_error) } __pyx_L20_except_error:; /* "uvloop/handles/stream.pyx":160 * * else: * try: # <<<<<<<<<<<<<< * PyObject_GetBuffer( * buf, &p_pybufs[py_bufs_len], PyBUF_SIMPLE) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); goto __pyx_L1_error; __pyx_L25_try_end:; } /* "uvloop/handles/stream.pyx":170 * raise * * p_uvbufs[uv_bufs_idx].base = p_pybufs[py_bufs_len].buf # <<<<<<<<<<<<<< * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len * */ (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).base = ((char *)(__pyx_v_p_pybufs[__pyx_v_py_bufs_len]).buf); /* "uvloop/handles/stream.pyx":171 * * p_uvbufs[uv_bufs_idx].base = p_pybufs[py_bufs_len].buf * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len # <<<<<<<<<<<<<< * * py_bufs_len += 1 */ __pyx_t_16 = (__pyx_v_p_pybufs[__pyx_v_py_bufs_len]).len; (__pyx_v_p_uvbufs[__pyx_v_uv_bufs_idx]).len = __pyx_t_16; /* "uvloop/handles/stream.pyx":173 * p_uvbufs[uv_bufs_idx].len = p_pybufs[py_bufs_len].len * * py_bufs_len += 1 # <<<<<<<<<<<<<< * * uv_bufs_idx += 1 */ __pyx_v_py_bufs_len = (__pyx_v_py_bufs_len + 1); } __pyx_L17:; /* "uvloop/handles/stream.pyx":175 * py_bufs_len += 1 * * uv_bufs_idx += 1 # <<<<<<<<<<<<<< * * ctx.uv_bufs_start = p_uvbufs */ __pyx_v_uv_bufs_idx = (__pyx_v_uv_bufs_idx + 1); /* "uvloop/handles/stream.pyx":151 * * py_bufs_len = 0 * for buf in buffers: # <<<<<<<<<<<<<< * if PyBytes_CheckExact(buf): * # We can only use this hack for bytes since it's */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":177 * uv_bufs_idx += 1 * * ctx.uv_bufs_start = p_uvbufs # <<<<<<<<<<<<<< * ctx.uv_bufs_len = uv_bufs_idx * */ __pyx_v_ctx->uv_bufs_start = __pyx_v_p_uvbufs; /* "uvloop/handles/stream.pyx":178 * * ctx.uv_bufs_start = p_uvbufs * ctx.uv_bufs_len = uv_bufs_idx # <<<<<<<<<<<<<< * * ctx.py_bufs_len = py_bufs_len */ __pyx_v_ctx->uv_bufs_len = __pyx_v_uv_bufs_idx; /* "uvloop/handles/stream.pyx":180 * ctx.uv_bufs_len = uv_bufs_idx * * ctx.py_bufs_len = py_bufs_len # <<<<<<<<<<<<<< * ctx.req.data = ctx * */ __pyx_v_ctx->py_bufs_len = __pyx_v_py_bufs_len; /* "uvloop/handles/stream.pyx":181 * * ctx.py_bufs_len = py_bufs_len * ctx.req.data = ctx # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __pyx_v_ctx->req.data = ((void *)__pyx_v_ctx); /* "uvloop/handles/stream.pyx":183 * ctx.req.data = ctx * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_ctx_total += 1 * stream._loop._debug_stream_write_ctx_cnt += 1 */ __pyx_t_6 = (UVLOOP_DEBUG != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":184 * * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_ctx_total += 1 # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_ctx_cnt += 1 * */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_17 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_17->_debug_stream_write_ctx_total = (__pyx_t_17->_debug_stream_write_ctx_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; /* "uvloop/handles/stream.pyx":185 * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_ctx_total += 1 * stream._loop._debug_stream_write_ctx_cnt += 1 # <<<<<<<<<<<<<< * * # Do incref after everything else is done. */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_17 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_17->_debug_stream_write_ctx_cnt = (__pyx_t_17->_debug_stream_write_ctx_cnt + 1); __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0; /* "uvloop/handles/stream.pyx":183 * ctx.req.data = ctx * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_ctx_total += 1 * stream._loop._debug_stream_write_ctx_cnt += 1 */ } /* "uvloop/handles/stream.pyx":190 * # Under no circumstances we want `ctx` to be GCed while * # libuv is still working with `ctx.uv_bufs`. * Py_INCREF(ctx) # <<<<<<<<<<<<<< * ctx.closed = 0 * return ctx */ Py_INCREF(((PyObject *)__pyx_v_ctx)); /* "uvloop/handles/stream.pyx":191 * # libuv is still working with `ctx.uv_bufs`. * Py_INCREF(ctx) * ctx.closed = 0 # <<<<<<<<<<<<<< * return ctx * */ __pyx_v_ctx->closed = 0; /* "uvloop/handles/stream.pyx":192 * Py_INCREF(ctx) * ctx.closed = 0 * return ctx # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_ctx)); __pyx_r = __pyx_v_ctx; goto __pyx_L0; /* "uvloop/handles/stream.pyx":97 * * @staticmethod * cdef _StreamWriteContext new(UVStream stream, list buffers): # <<<<<<<<<<<<<< * cdef: * _StreamWriteContext ctx */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(((PyObject *)__pyx_t_17)); __Pyx_AddTraceback("uvloop.loop._StreamWriteContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":194 * return ctx * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not self.closed: * # Because we do an INCREF in _StreamWriteContext.new, */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_19_StreamWriteContext___dealloc__(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/handles/stream.pyx":195 * * def __dealloc__(self): * if not self.closed: # <<<<<<<<<<<<<< * # Because we do an INCREF in _StreamWriteContext.new, * # __dealloc__ shouldn't ever happen with `self.closed == 1` */ __pyx_t_1 = ((!(__pyx_v_self->closed != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":198 * # Because we do an INCREF in _StreamWriteContext.new, * # __dealloc__ shouldn't ever happen with `self.closed == 1` * raise RuntimeError( # <<<<<<<<<<<<<< * 'open _StreamWriteContext is being deallocated') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 198, __pyx_L1_error) /* "uvloop/handles/stream.pyx":195 * * def __dealloc__(self): * if not self.closed: # <<<<<<<<<<<<<< * # Because we do an INCREF in _StreamWriteContext.new, * # __dealloc__ shouldn't ever happen with `self.closed == 1` */ } /* "uvloop/handles/stream.pyx":201 * 'open _StreamWriteContext is being deallocated') * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.stream is not None: * self.stream._loop._debug_stream_write_ctx_cnt -= 1 */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":202 * * if UVLOOP_DEBUG: * if self.stream is not None: # <<<<<<<<<<<<<< * self.stream._loop._debug_stream_write_ctx_cnt -= 1 * self.stream = None */ __pyx_t_1 = (((PyObject *)__pyx_v_self->stream) != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":203 * if UVLOOP_DEBUG: * if self.stream is not None: * self.stream._loop._debug_stream_write_ctx_cnt -= 1 # <<<<<<<<<<<<<< * self.stream = None * */ __Pyx_INCREF(((PyObject *)__pyx_v_self->stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_4 = __pyx_v_self->stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_4->_debug_stream_write_ctx_cnt = (__pyx_t_4->_debug_stream_write_ctx_cnt - 1); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":204 * if self.stream is not None: * self.stream._loop._debug_stream_write_ctx_cnt -= 1 * self.stream = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->stream); __Pyx_DECREF(((PyObject *)__pyx_v_self->stream)); __pyx_v_self->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); /* "uvloop/handles/stream.pyx":202 * * if UVLOOP_DEBUG: * if self.stream is not None: # <<<<<<<<<<<<<< * self.stream._loop._debug_stream_write_ctx_cnt -= 1 * self.stream = None */ } /* "uvloop/handles/stream.pyx":201 * 'open _StreamWriteContext is being deallocated') * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.stream is not None: * self.stream._loop._debug_stream_write_ctx_cnt -= 1 */ } /* "uvloop/handles/stream.pyx":194 * return ctx * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not self.closed: * # Because we do an INCREF in _StreamWriteContext.new, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(((PyObject *)__pyx_t_4)); __Pyx_WriteUnraisable("uvloop.loop._StreamWriteContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/stream.pyx":210 * cdef class UVStream(UVBaseTransport): * * def __cinit__(self): # <<<<<<<<<<<<<< * self.__shutting_down = 0 * self.__reading = 0 */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream___cinit__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8UVStream___cinit__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/stream.pyx":211 * * def __cinit__(self): * self.__shutting_down = 0 # <<<<<<<<<<<<<< * self.__reading = 0 * self.__read_error_close = 0 */ __pyx_v_self->__pyx___shutting_down = 0; /* "uvloop/handles/stream.pyx":212 * def __cinit__(self): * self.__shutting_down = 0 * self.__reading = 0 # <<<<<<<<<<<<<< * self.__read_error_close = 0 * self._eof = 0 */ __pyx_v_self->__pyx___reading = 0; /* "uvloop/handles/stream.pyx":213 * self.__shutting_down = 0 * self.__reading = 0 * self.__read_error_close = 0 # <<<<<<<<<<<<<< * self._eof = 0 * self._buffer = [] */ __pyx_v_self->__pyx___read_error_close = 0; /* "uvloop/handles/stream.pyx":214 * self.__reading = 0 * self.__read_error_close = 0 * self._eof = 0 # <<<<<<<<<<<<<< * self._buffer = [] * self._buffer_size = 0 */ __pyx_v_self->_eof = 0; /* "uvloop/handles/stream.pyx":215 * self.__read_error_close = 0 * self._eof = 0 * self._buffer = [] # <<<<<<<<<<<<<< * self._buffer_size = 0 * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_buffer); __Pyx_DECREF(__pyx_v_self->_buffer); __pyx_v_self->_buffer = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":216 * self._eof = 0 * self._buffer = [] * self._buffer_size = 0 # <<<<<<<<<<<<<< * * cdef inline _shutdown(self): */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":210 * cdef class UVStream(UVBaseTransport): * * def __cinit__(self): # <<<<<<<<<<<<<< * self.__shutting_down = 0 * self.__reading = 0 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":218 * self._buffer_size = 0 * * cdef inline _shutdown(self): # <<<<<<<<<<<<<< * cdef int err * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__shutdown(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_shutdown", 0); /* "uvloop/handles/stream.pyx":221 * cdef int err * * if self.__shutting_down: # <<<<<<<<<<<<<< * return * self.__shutting_down = 1 */ __pyx_t_1 = (__pyx_v_self->__pyx___shutting_down != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":222 * * if self.__shutting_down: * return # <<<<<<<<<<<<<< * self.__shutting_down = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":221 * cdef int err * * if self.__shutting_down: # <<<<<<<<<<<<<< * return * self.__shutting_down = 1 */ } /* "uvloop/handles/stream.pyx":223 * if self.__shutting_down: * return * self.__shutting_down = 1 # <<<<<<<<<<<<<< * * self._ensure_alive() */ __pyx_v_self->__pyx___shutting_down = 1; /* "uvloop/handles/stream.pyx":225 * self.__shutting_down = 1 * * self._ensure_alive() # <<<<<<<<<<<<<< * * self._shutdown_req.data = self */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":227 * self._ensure_alive() * * self._shutdown_req.data = self # <<<<<<<<<<<<<< * err = uv.uv_shutdown(&self._shutdown_req, * self._handle, */ __pyx_v_self->_shutdown_req.data = ((void *)__pyx_v_self); /* "uvloop/handles/stream.pyx":228 * * self._shutdown_req.data = self * err = uv.uv_shutdown(&self._shutdown_req, # <<<<<<<<<<<<<< * self._handle, * __uv_stream_on_shutdown) */ __pyx_v_err = uv_shutdown((&__pyx_v_self->_shutdown_req), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___uv_stream_on_shutdown); /* "uvloop/handles/stream.pyx":231 * self._handle, * __uv_stream_on_shutdown) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":232 * __uv_stream_on_shutdown) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":233 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":234 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef inline _accept(self, UVStream server): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":231 * self._handle, * __uv_stream_on_shutdown) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/stream.pyx":218 * self._buffer_size = 0 * * cdef inline _shutdown(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVStream._shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":236 * return * * cdef inline _accept(self, UVStream server): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_server) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_accept", 0); /* "uvloop/handles/stream.pyx":238 * cdef inline _accept(self, UVStream server): * cdef int err * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_accept(server._handle, */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":240 * self._ensure_alive() * * err = uv.uv_accept(server._handle, # <<<<<<<<<<<<<< * self._handle) * if err < 0: */ __pyx_v_err = uv_accept(((uv_stream_t *)__pyx_v_server->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)); /* "uvloop/handles/stream.pyx":242 * err = uv.uv_accept(server._handle, * self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":243 * self._handle) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":244 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":245 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * self._on_accept() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":242 * err = uv.uv_accept(server._handle, * self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/stream.pyx":247 * return * * self._on_accept() # <<<<<<<<<<<<<< * * cdef inline _close_on_read_error(self): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__on_accept(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":236 * return * * cdef inline _accept(self, UVStream server): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":249 * self._on_accept() * * cdef inline _close_on_read_error(self): # <<<<<<<<<<<<<< * self.__read_error_close = 1 * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_close_on_read_error", 0); /* "uvloop/handles/stream.pyx":250 * * cdef inline _close_on_read_error(self): * self.__read_error_close = 1 # <<<<<<<<<<<<<< * * cdef bint _is_reading(self): */ __pyx_v_self->__pyx___read_error_close = 1; /* "uvloop/handles/stream.pyx":249 * self._on_accept() * * cdef inline _close_on_read_error(self): # <<<<<<<<<<<<<< * self.__read_error_close = 1 * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":252 * self.__read_error_close = 1 * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * return self.__reading * */ static int __pyx_f_6uvloop_4loop_8UVStream__is_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_reading", 0); /* "uvloop/handles/stream.pyx":253 * * cdef bint _is_reading(self): * return self.__reading # <<<<<<<<<<<<<< * * cdef _start_reading(self): */ __pyx_r = __pyx_v_self->__pyx___reading; goto __pyx_L0; /* "uvloop/handles/stream.pyx":252 * self.__read_error_close = 1 * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * return self.__reading * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":255 * return self.__reading * * cdef _start_reading(self): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__start_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_start_reading", 0); /* "uvloop/handles/stream.pyx":257 * cdef _start_reading(self): * cdef int err * self._ensure_alive() # <<<<<<<<<<<<<< * * if self.__reading: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":259 * self._ensure_alive() * * if self.__reading: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (__pyx_v_self->__pyx___reading != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":260 * * if self.__reading: * return # <<<<<<<<<<<<<< * * err = uv.uv_read_start(self._handle, */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":259 * self._ensure_alive() * * if self.__reading: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/stream.pyx":262 * return * * err = uv.uv_read_start(self._handle, # <<<<<<<<<<<<<< * __loop_alloc_buffer, * __uv_stream_on_read) */ __pyx_v_err = uv_read_start(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___loop_alloc_buffer, __pyx_f_6uvloop_4loop___uv_stream_on_read); /* "uvloop/handles/stream.pyx":265 * __loop_alloc_buffer, * __uv_stream_on_read) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":266 * __uv_stream_on_read) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":267 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":268 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * else: * # UVStream must live until the read callback is called */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":265 * __loop_alloc_buffer, * __uv_stream_on_read) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/stream.pyx":271 * else: * # UVStream must live until the read callback is called * self.__reading_started() # <<<<<<<<<<<<<< * * cdef inline __reading_started(self): */ /*else*/ { __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream___reading_started(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/handles/stream.pyx":255 * return self.__reading * * cdef _start_reading(self): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":273 * self.__reading_started() * * cdef inline __reading_started(self): # <<<<<<<<<<<<<< * if self.__reading: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_started(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__reading_started", 0); /* "uvloop/handles/stream.pyx":274 * * cdef inline __reading_started(self): * if self.__reading: # <<<<<<<<<<<<<< * return * self.__reading = 1 */ __pyx_t_1 = (__pyx_v_self->__pyx___reading != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":275 * cdef inline __reading_started(self): * if self.__reading: * return # <<<<<<<<<<<<<< * self.__reading = 1 * Py_INCREF(self) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":274 * * cdef inline __reading_started(self): * if self.__reading: # <<<<<<<<<<<<<< * return * self.__reading = 1 */ } /* "uvloop/handles/stream.pyx":276 * if self.__reading: * return * self.__reading = 1 # <<<<<<<<<<<<<< * Py_INCREF(self) * */ __pyx_v_self->__pyx___reading = 1; /* "uvloop/handles/stream.pyx":277 * return * self.__reading = 1 * Py_INCREF(self) # <<<<<<<<<<<<<< * * cdef inline __reading_stopped(self): */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/stream.pyx":273 * self.__reading_started() * * cdef inline __reading_started(self): # <<<<<<<<<<<<<< * if self.__reading: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":279 * Py_INCREF(self) * * cdef inline __reading_stopped(self): # <<<<<<<<<<<<<< * if not self.__reading: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream___reading_stopped(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__reading_stopped", 0); /* "uvloop/handles/stream.pyx":280 * * cdef inline __reading_stopped(self): * if not self.__reading: # <<<<<<<<<<<<<< * return * self.__reading = 0 */ __pyx_t_1 = ((!(__pyx_v_self->__pyx___reading != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":281 * cdef inline __reading_stopped(self): * if not self.__reading: * return # <<<<<<<<<<<<<< * self.__reading = 0 * Py_DECREF(self) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":280 * * cdef inline __reading_stopped(self): * if not self.__reading: # <<<<<<<<<<<<<< * return * self.__reading = 0 */ } /* "uvloop/handles/stream.pyx":282 * if not self.__reading: * return * self.__reading = 0 # <<<<<<<<<<<<<< * Py_DECREF(self) * */ __pyx_v_self->__pyx___reading = 0; /* "uvloop/handles/stream.pyx":283 * return * self.__reading = 0 * Py_DECREF(self) # <<<<<<<<<<<<<< * * cdef _stop_reading(self): */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/stream.pyx":279 * Py_INCREF(self) * * cdef inline __reading_stopped(self): # <<<<<<<<<<<<<< * if not self.__reading: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":285 * Py_DECREF(self) * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__stop_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_stop_reading", 0); /* "uvloop/handles/stream.pyx":288 * cdef int err * * if not self.__reading: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((!(__pyx_v_self->__pyx___reading != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":289 * * if not self.__reading: * return # <<<<<<<<<<<<<< * * self._ensure_alive() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":288 * cdef int err * * if not self.__reading: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/stream.pyx":291 * return * * self._ensure_alive() # <<<<<<<<<<<<<< * * # From libuv docs: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":296 * # This function is idempotent and may be safely * # called on a stopped stream. * err = uv.uv_read_stop(self._handle) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_read_stop(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)); /* "uvloop/handles/stream.pyx":297 * # called on a stopped stream. * err = uv.uv_read_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":298 * err = uv.uv_read_stop(self._handle) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":299 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":300 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * else: * self.__reading_stopped() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":297 * # called on a stopped stream. * err = uv.uv_read_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/stream.pyx":302 * return * else: * self.__reading_stopped() # <<<<<<<<<<<<<< * * cdef inline _try_write(self, object data): */ /*else*/ { __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream___reading_stopped(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/handles/stream.pyx":285 * Py_DECREF(self) * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVStream._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":304 * self.__reading_stopped() * * cdef inline _try_write(self, object data): # <<<<<<<<<<<<<< * cdef: * ssize_t written */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__try_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data) { Py_ssize_t __pyx_v_written; int __pyx_v_used_buf; Py_buffer __pyx_v_py_buf; void *__pyx_v_buf; size_t __pyx_v_blen; int __pyx_v_saved_errno; int __pyx_v_fd; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; void *__pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_try_write", 0); /* "uvloop/handles/stream.pyx":307 * cdef: * ssize_t written * bint used_buf = 0 # <<<<<<<<<<<<<< * Py_buffer py_buf * void* buf */ __pyx_v_used_buf = 0; /* "uvloop/handles/stream.pyx":314 * int fd * * if (self._handle).write_queue_size != 0: # <<<<<<<<<<<<<< * raise RuntimeError( * 'UVStream._try_write called with data in uv buffers') */ __pyx_t_1 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size != 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":315 * * if (self._handle).write_queue_size != 0: * raise RuntimeError( # <<<<<<<<<<<<<< * 'UVStream._try_write called with data in uv buffers') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 315, __pyx_L1_error) /* "uvloop/handles/stream.pyx":314 * int fd * * if (self._handle).write_queue_size != 0: # <<<<<<<<<<<<<< * raise RuntimeError( * 'UVStream._try_write called with data in uv buffers') */ } /* "uvloop/handles/stream.pyx":318 * 'UVStream._try_write called with data in uv buffers') * * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * # We can only use this hack for bytes since it's * # immutable. For everything else it is only safe to */ __pyx_t_1 = (PyBytes_CheckExact(__pyx_v_data) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":322 * # immutable. For everything else it is only safe to * # use buffer protocol. * buf = PyBytes_AS_STRING(data) # <<<<<<<<<<<<<< * blen = Py_SIZE(data) * else: */ __pyx_v_buf = ((void *)PyBytes_AS_STRING(__pyx_v_data)); /* "uvloop/handles/stream.pyx":323 * # use buffer protocol. * buf = PyBytes_AS_STRING(data) * blen = Py_SIZE(data) # <<<<<<<<<<<<<< * else: * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) */ __pyx_v_blen = Py_SIZE(__pyx_v_data); /* "uvloop/handles/stream.pyx":318 * 'UVStream._try_write called with data in uv buffers') * * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * # We can only use this hack for bytes since it's * # immutable. For everything else it is only safe to */ goto __pyx_L4; } /* "uvloop/handles/stream.pyx":325 * blen = Py_SIZE(data) * else: * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<< * used_buf = 1 * buf = py_buf.buf */ /*else*/ { __pyx_t_3 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(15, 325, __pyx_L1_error) /* "uvloop/handles/stream.pyx":326 * else: * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) * used_buf = 1 # <<<<<<<<<<<<<< * buf = py_buf.buf * blen = py_buf.len */ __pyx_v_used_buf = 1; /* "uvloop/handles/stream.pyx":327 * PyObject_GetBuffer(data, &py_buf, PyBUF_SIMPLE) * used_buf = 1 * buf = py_buf.buf # <<<<<<<<<<<<<< * blen = py_buf.len * */ __pyx_t_4 = __pyx_v_py_buf.buf; __pyx_v_buf = __pyx_t_4; /* "uvloop/handles/stream.pyx":328 * used_buf = 1 * buf = py_buf.buf * blen = py_buf.len # <<<<<<<<<<<<<< * * if blen == 0: */ __pyx_t_5 = __pyx_v_py_buf.len; __pyx_v_blen = __pyx_t_5; } __pyx_L4:; /* "uvloop/handles/stream.pyx":330 * blen = py_buf.len * * if blen == 0: # <<<<<<<<<<<<<< * # Empty data, do nothing. * return 0 */ __pyx_t_1 = ((__pyx_v_blen == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":332 * if blen == 0: * # Empty data, do nothing. * return 0 # <<<<<<<<<<<<<< * * fd = self._fileno() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "uvloop/handles/stream.pyx":330 * blen = py_buf.len * * if blen == 0: # <<<<<<<<<<<<<< * # Empty data, do nothing. * return 0 */ } /* "uvloop/handles/stream.pyx":334 * return 0 * * fd = self._fileno() # <<<<<<<<<<<<<< * # Use `unistd.h/write` directly, it's faster than * # uv_try_write -- less layers of code. The error */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fd = __pyx_t_3; /* "uvloop/handles/stream.pyx":338 * # uv_try_write -- less layers of code. The error * # checking logic is copied from libuv. * written = system.write(fd, buf, blen) # <<<<<<<<<<<<<< * while written == -1 and (errno.errno == errno.EINTR or * (system.PLATFORM_IS_APPLE and */ __pyx_v_written = write(__pyx_v_fd, __pyx_v_buf, __pyx_v_blen); /* "uvloop/handles/stream.pyx":339 * # checking logic is copied from libuv. * written = system.write(fd, buf, blen) * while written == -1 and (errno.errno == errno.EINTR or # <<<<<<<<<<<<<< * (system.PLATFORM_IS_APPLE and * errno.errno == errno.EPROTOTYPE)): */ while (1) { __pyx_t_6 = ((__pyx_v_written == -1L) != 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } __pyx_t_6 = ((errno == EINTR) != 0); if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } /* "uvloop/handles/stream.pyx":340 * written = system.write(fd, buf, blen) * while written == -1 and (errno.errno == errno.EINTR or * (system.PLATFORM_IS_APPLE and # <<<<<<<<<<<<<< * errno.errno == errno.EPROTOTYPE)): * # From libuv code (unix/stream.c): */ __pyx_t_6 = (PLATFORM_IS_APPLE != 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } /* "uvloop/handles/stream.pyx":341 * while written == -1 and (errno.errno == errno.EINTR or * (system.PLATFORM_IS_APPLE and * errno.errno == errno.EPROTOTYPE)): # <<<<<<<<<<<<<< * # From libuv code (unix/stream.c): * # Due to a possible kernel bug at least in OS X 10.10 "Yosemite", */ __pyx_t_6 = ((errno == EPROTOTYPE) != 0); __pyx_t_1 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (!__pyx_t_1) break; /* "uvloop/handles/stream.pyx":347 * # that is shutting down. If we retry the write, we should get * # the expected EPIPE instead. * written = system.write(fd, buf, blen) # <<<<<<<<<<<<<< * saved_errno = errno.errno * */ __pyx_v_written = write(__pyx_v_fd, __pyx_v_buf, __pyx_v_blen); } /* "uvloop/handles/stream.pyx":348 * # the expected EPIPE instead. * written = system.write(fd, buf, blen) * saved_errno = errno.errno # <<<<<<<<<<<<<< * * if used_buf: */ __pyx_v_saved_errno = errno; /* "uvloop/handles/stream.pyx":350 * saved_errno = errno.errno * * if used_buf: # <<<<<<<<<<<<<< * PyBuffer_Release(&py_buf) * */ __pyx_t_1 = (__pyx_v_used_buf != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":351 * * if used_buf: * PyBuffer_Release(&py_buf) # <<<<<<<<<<<<<< * * if written < 0: */ PyBuffer_Release((&__pyx_v_py_buf)); /* "uvloop/handles/stream.pyx":350 * saved_errno = errno.errno * * if used_buf: # <<<<<<<<<<<<<< * PyBuffer_Release(&py_buf) * */ } /* "uvloop/handles/stream.pyx":353 * PyBuffer_Release(&py_buf) * * if written < 0: # <<<<<<<<<<<<<< * if saved_errno == errno.EAGAIN or \ * saved_errno == system.EWOULDBLOCK: */ __pyx_t_1 = ((__pyx_v_written < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":354 * * if written < 0: * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<< * saved_errno == system.EWOULDBLOCK: * return -1 */ __pyx_t_6 = ((__pyx_v_saved_errno == EAGAIN) != 0); if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L15_bool_binop_done; } /* "uvloop/handles/stream.pyx":355 * if written < 0: * if saved_errno == errno.EAGAIN or \ * saved_errno == system.EWOULDBLOCK: # <<<<<<<<<<<<<< * return -1 * else: */ __pyx_t_6 = ((__pyx_v_saved_errno == EWOULDBLOCK) != 0); __pyx_t_1 = __pyx_t_6; __pyx_L15_bool_binop_done:; /* "uvloop/handles/stream.pyx":354 * * if written < 0: * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<< * saved_errno == system.EWOULDBLOCK: * return -1 */ if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":356 * if saved_errno == errno.EAGAIN or \ * saved_errno == system.EWOULDBLOCK: * return -1 # <<<<<<<<<<<<<< * else: * exc = convert_error(-saved_errno) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* "uvloop/handles/stream.pyx":354 * * if written < 0: * if saved_errno == errno.EAGAIN or \ # <<<<<<<<<<<<<< * saved_errno == system.EWOULDBLOCK: * return -1 */ } /* "uvloop/handles/stream.pyx":358 * return -1 * else: * exc = convert_error(-saved_errno) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ /*else*/ { __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_saved_errno)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":359 * else: * exc = convert_error(-saved_errno) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":360 * exc = convert_error(-saved_errno) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "uvloop/handles/stream.pyx":353 * PyBuffer_Release(&py_buf) * * if written < 0: # <<<<<<<<<<<<<< * if saved_errno == errno.EAGAIN or \ * saved_errno == system.EWOULDBLOCK: */ } /* "uvloop/handles/stream.pyx":362 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_stream_write_tries += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":363 * * if UVLOOP_DEBUG: * self._loop._debug_stream_write_tries += 1 # <<<<<<<<<<<<<< * * if written == blen: */ __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_7 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_7->_debug_stream_write_tries = (__pyx_t_7->_debug_stream_write_tries + 1); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; /* "uvloop/handles/stream.pyx":362 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * self._loop._debug_stream_write_tries += 1 * */ } /* "uvloop/handles/stream.pyx":365 * self._loop._debug_stream_write_tries += 1 * * if written == blen: # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((((size_t)__pyx_v_written) == __pyx_v_blen) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":366 * * if written == blen: * return 0 # <<<<<<<<<<<<<< * * return written */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "uvloop/handles/stream.pyx":365 * self._loop._debug_stream_write_tries += 1 * * if written == blen: # <<<<<<<<<<<<<< * return 0 * */ } /* "uvloop/handles/stream.pyx":368 * return 0 * * return written # <<<<<<<<<<<<<< * * cdef inline _write(self, object data): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_written); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/handles/stream.pyx":304 * self.__reading_stopped() * * cdef inline _try_write(self, object data): # <<<<<<<<<<<<<< * cdef: * ssize_t written */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(((PyObject *)__pyx_t_7)); __Pyx_AddTraceback("uvloop.loop.UVStream._try_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":370 * return written * * cdef inline _write(self, object data): # <<<<<<<<<<<<<< * cdef int dlen * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_data) { int __pyx_v_dlen; PyObject *__pyx_v_all_sent = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("_write", 0); __Pyx_INCREF(__pyx_v_data); /* "uvloop/handles/stream.pyx":373 * cdef int dlen * * if not PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * data = memoryview(data).cast('b') * */ __pyx_t_1 = ((!(PyBytes_CheckExact(__pyx_v_data) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":374 * * if not PyBytes_CheckExact(data): * data = memoryview(data).cast('b') # <<<<<<<<<<<<<< * * dlen = len(data) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cast); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":373 * cdef int dlen * * if not PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * data = memoryview(data).cast('b') * */ } /* "uvloop/handles/stream.pyx":376 * data = memoryview(data).cast('b') * * dlen = len(data) # <<<<<<<<<<<<<< * if not dlen: * return */ __pyx_t_4 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 376, __pyx_L1_error) __pyx_v_dlen = __pyx_t_4; /* "uvloop/handles/stream.pyx":377 * * dlen = len(data) * if not dlen: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((!(__pyx_v_dlen != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":378 * dlen = len(data) * if not dlen: * return # <<<<<<<<<<<<<< * * self._buffer_size += dlen */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":377 * * dlen = len(data) * if not dlen: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/stream.pyx":380 * return * * self._buffer_size += dlen # <<<<<<<<<<<<<< * self._buffer.append(data) * */ __pyx_v_self->_buffer_size = (__pyx_v_self->_buffer_size + __pyx_v_dlen); /* "uvloop/handles/stream.pyx":381 * * self._buffer_size += dlen * self._buffer.append(data) # <<<<<<<<<<<<<< * * if (not self._protocol_paused and */ if (unlikely(__pyx_v_self->_buffer == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(15, 381, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->_buffer, __pyx_v_data); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(15, 381, __pyx_L1_error) /* "uvloop/handles/stream.pyx":383 * self._buffer.append(data) * * if (not self._protocol_paused and # <<<<<<<<<<<<<< * (self._handle).write_queue_size == 0 and * self._buffer_size > self._high_water): */ __pyx_t_6 = ((!(__pyx_v_self->__pyx_base._protocol_paused != 0)) != 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } /* "uvloop/handles/stream.pyx":384 * * if (not self._protocol_paused and * (self._handle).write_queue_size == 0 and # <<<<<<<<<<<<<< * self._buffer_size > self._high_water): * # Fast-path. If: */ __pyx_t_6 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size == 0) != 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } /* "uvloop/handles/stream.pyx":385 * if (not self._protocol_paused and * (self._handle).write_queue_size == 0 and * self._buffer_size > self._high_water): # <<<<<<<<<<<<<< * # Fast-path. If: * # - the protocol isn't yet paused, */ __pyx_t_6 = ((__pyx_v_self->_buffer_size > __pyx_v_self->__pyx_base._high_water) != 0); __pyx_t_1 = __pyx_t_6; __pyx_L6_bool_binop_done:; /* "uvloop/handles/stream.pyx":383 * self._buffer.append(data) * * if (not self._protocol_paused and # <<<<<<<<<<<<<< * (self._handle).write_queue_size == 0 and * self._buffer_size > self._high_water): */ if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":393 * # Then: * # - Try to write all buffered data right now. * all_sent = self._exec_write() # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if self._buffer_size != 0 or self._buffer != []: */ __pyx_t_3 = __pyx_f_6uvloop_4loop_8UVStream__exec_write(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_all_sent = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":394 * # - Try to write all buffered data right now. * all_sent = self._exec_write() * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._buffer_size != 0 or self._buffer != []: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":395 * all_sent = self._exec_write() * if UVLOOP_DEBUG: * if self._buffer_size != 0 or self._buffer != []: # <<<<<<<<<<<<<< * raise RuntimeError( * '_buffer_size is not 0 after a successful _exec_write') */ __pyx_t_6 = ((__pyx_v_self->_buffer_size != 0) != 0); if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L11_bool_binop_done; } __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->_buffer, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(15, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L11_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":396 * if UVLOOP_DEBUG: * if self._buffer_size != 0 or self._buffer != []: * raise RuntimeError( # <<<<<<<<<<<<<< * '_buffer_size is not 0 after a successful _exec_write') * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 396, __pyx_L1_error) /* "uvloop/handles/stream.pyx":395 * all_sent = self._exec_write() * if UVLOOP_DEBUG: * if self._buffer_size != 0 or self._buffer != []: # <<<<<<<<<<<<<< * raise RuntimeError( * '_buffer_size is not 0 after a successful _exec_write') */ } /* "uvloop/handles/stream.pyx":394 * # - Try to write all buffered data right now. * all_sent = self._exec_write() * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self._buffer_size != 0 or self._buffer != []: * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":402 * # as `uv_write` should be called already. * * if not all_sent: # <<<<<<<<<<<<<< * # If not all of the data was sent successfully, * # we might need to pause the protocol. */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_all_sent); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(15, 402, __pyx_L1_error) __pyx_t_6 = ((!__pyx_t_1) != 0); if (__pyx_t_6) { /* "uvloop/handles/stream.pyx":405 * # If not all of the data was sent successfully, * # we might need to pause the protocol. * self._maybe_pause_protocol() # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":402 * # as `uv_write` should be called already. * * if not all_sent: # <<<<<<<<<<<<<< * # If not all of the data was sent successfully, * # we might need to pause the protocol. */ } /* "uvloop/handles/stream.pyx":406 * # we might need to pause the protocol. * self._maybe_pause_protocol() * return # <<<<<<<<<<<<<< * * self._maybe_pause_protocol() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":383 * self._buffer.append(data) * * if (not self._protocol_paused and # <<<<<<<<<<<<<< * (self._handle).write_queue_size == 0 and * self._buffer_size > self._high_water): */ } /* "uvloop/handles/stream.pyx":408 * return * * self._maybe_pause_protocol() # <<<<<<<<<<<<<< * self._loop._queue_write(self) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":409 * * self._maybe_pause_protocol() * self._loop._queue_write(self) # <<<<<<<<<<<<<< * * cdef inline _exec_write(self): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_4Loop__queue_write(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":370 * return written * * cdef inline _write(self, object data): # <<<<<<<<<<<<<< * cdef int dlen * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVStream._write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_all_sent); __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":411 * self._loop._queue_write(self) * * cdef inline _exec_write(self): # <<<<<<<<<<<<<< * cdef: * int err */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__exec_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { int __pyx_v_err; int __pyx_v_buf_len; struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0; PyObject *__pyx_v_data = NULL; PyObject *__pyx_v_sent = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; __Pyx_RefNannySetupContext("_exec_write", 0); /* "uvloop/handles/stream.pyx":415 * int err * int buf_len * _StreamWriteContext ctx = None # <<<<<<<<<<<<<< * * if self._closed: */ __Pyx_INCREF(Py_None); __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)Py_None); /* "uvloop/handles/stream.pyx":417 * _StreamWriteContext ctx = None * * if self._closed: # <<<<<<<<<<<<<< * # If the handle is closed, just return, it's too * # late to do anything. */ __pyx_t_1 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._closed != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":420 * # If the handle is closed, just return, it's too * # late to do anything. * return # <<<<<<<<<<<<<< * * buf_len = len(self._buffer) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":417 * _StreamWriteContext ctx = None * * if self._closed: # <<<<<<<<<<<<<< * # If the handle is closed, just return, it's too * # late to do anything. */ } /* "uvloop/handles/stream.pyx":422 * return * * buf_len = len(self._buffer) # <<<<<<<<<<<<<< * if not buf_len: * return */ __pyx_t_2 = __pyx_v_self->_buffer; __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(15, 422, __pyx_L1_error) } __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(15, 422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_buf_len = __pyx_t_3; /* "uvloop/handles/stream.pyx":423 * * buf_len = len(self._buffer) * if not buf_len: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((!(__pyx_v_buf_len != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":424 * buf_len = len(self._buffer) * if not buf_len: * return # <<<<<<<<<<<<<< * * if (self._handle).write_queue_size == 0: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":423 * * buf_len = len(self._buffer) * if not buf_len: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/stream.pyx":426 * return * * if (self._handle).write_queue_size == 0: # <<<<<<<<<<<<<< * # libuv internal write buffers for this stream are empty. * if buf_len == 1: */ __pyx_t_1 = ((((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size == 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":428 * if (self._handle).write_queue_size == 0: * # libuv internal write buffers for this stream are empty. * if buf_len == 1: # <<<<<<<<<<<<<< * # If we only have one piece of data to send, let's * # use our fast implementation of try_write. */ __pyx_t_1 = ((__pyx_v_buf_len == 1) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":431 * # If we only have one piece of data to send, let's * # use our fast implementation of try_write. * data = self._buffer[0] # <<<<<<<<<<<<<< * sent = self._try_write(data) * */ if (unlikely(__pyx_v_self->_buffer == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(15, 431, __pyx_L1_error) } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->_buffer, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_data = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":432 * # use our fast implementation of try_write. * data = self._buffer[0] * sent = self._try_write(data) # <<<<<<<<<<<<<< * * if sent is None: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__try_write(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_sent = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":434 * sent = self._try_write(data) * * if sent is None: # <<<<<<<<<<<<<< * # A `self._fatal_error` was called. * # It might not raise an exception under some */ __pyx_t_1 = (__pyx_v_sent == Py_None); __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":438 * # It might not raise an exception under some * # conditions. * self._buffer_size = 0 # <<<<<<<<<<<<<< * self._buffer.clear() * if not self._closing: */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":439 * # conditions. * self._buffer_size = 0 * self._buffer.clear() # <<<<<<<<<<<<<< * if not self._closing: * # This should never happen. */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 439, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":440 * self._buffer_size = 0 * self._buffer.clear() * if not self._closing: # <<<<<<<<<<<<<< * # This should never happen. * raise RuntimeError( */ __pyx_t_4 = ((!(__pyx_v_self->__pyx_base._closing != 0)) != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":442 * if not self._closing: * # This should never happen. * raise RuntimeError( # <<<<<<<<<<<<<< * 'stream is open after UVStream._try_write ' * 'returned None') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(15, 442, __pyx_L1_error) /* "uvloop/handles/stream.pyx":440 * self._buffer_size = 0 * self._buffer.clear() * if not self._closing: # <<<<<<<<<<<<<< * # This should never happen. * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":445 * 'stream is open after UVStream._try_write ' * 'returned None') * return # <<<<<<<<<<<<<< * * if sent == 0: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":434 * sent = self._try_write(data) * * if sent is None: # <<<<<<<<<<<<<< * # A `self._fatal_error` was called. * # It might not raise an exception under some */ } /* "uvloop/handles/stream.pyx":447 * return * * if sent == 0: # <<<<<<<<<<<<<< * # All data was successfully written. * self._buffer_size = 0 */ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_sent, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(15, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":449 * if sent == 0: * # All data was successfully written. * self._buffer_size = 0 # <<<<<<<<<<<<<< * self._buffer.clear() * # on_write will call "maybe_resume_protocol". */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":450 * # All data was successfully written. * self._buffer_size = 0 * self._buffer.clear() # <<<<<<<<<<<<<< * # on_write will call "maybe_resume_protocol". * self._on_write() */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 450, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":452 * self._buffer.clear() * # on_write will call "maybe_resume_protocol". * self._on_write() # <<<<<<<<<<<<<< * return True * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":453 * # on_write will call "maybe_resume_protocol". * self._on_write() * return True # <<<<<<<<<<<<<< * * if sent > 0: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/handles/stream.pyx":447 * return * * if sent == 0: # <<<<<<<<<<<<<< * # All data was successfully written. * self._buffer_size = 0 */ } /* "uvloop/handles/stream.pyx":455 * return True * * if sent > 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if sent == len(data): */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_sent, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 455, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(15, 455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":456 * * if sent > 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if sent == len(data): * raise RuntimeError( */ __pyx_t_4 = (UVLOOP_DEBUG != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":457 * if sent > 0: * if UVLOOP_DEBUG: * if sent == len(data): # <<<<<<<<<<<<<< * raise RuntimeError( * '_try_write sent all data and returned ' */ __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(15, 457, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_RichCompare(__pyx_v_sent, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(15, 457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":458 * if UVLOOP_DEBUG: * if sent == len(data): * raise RuntimeError( # <<<<<<<<<<<<<< * '_try_write sent all data and returned ' * 'non-zero') */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(15, 458, __pyx_L1_error) /* "uvloop/handles/stream.pyx":457 * if sent > 0: * if UVLOOP_DEBUG: * if sent == len(data): # <<<<<<<<<<<<<< * raise RuntimeError( * '_try_write sent all data and returned ' */ } /* "uvloop/handles/stream.pyx":456 * * if sent > 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if sent == len(data): * raise RuntimeError( */ } /* "uvloop/handles/stream.pyx":462 * 'non-zero') * * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * # Cast bytes to memoryview to avoid copying * # data that wasn't sent. */ __pyx_t_4 = (PyBytes_CheckExact(__pyx_v_data) != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":465 * # Cast bytes to memoryview to avoid copying * # data that wasn't sent. * data = memoryview(data) # <<<<<<<<<<<<<< * data = data[sent:] * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":462 * 'non-zero') * * if PyBytes_CheckExact(data): # <<<<<<<<<<<<<< * # Cast bytes to memoryview to avoid copying * # data that wasn't sent. */ } /* "uvloop/handles/stream.pyx":466 * # data that wasn't sent. * data = memoryview(data) * data = data[sent:] # <<<<<<<<<<<<<< * * self._buffer_size -= sent */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_data, 0, 0, &__pyx_v_sent, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":468 * data = data[sent:] * * self._buffer_size -= sent # <<<<<<<<<<<<<< * self._buffer[0] = data * */ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_buffer_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_sent); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(15, 468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->_buffer_size = __pyx_t_7; /* "uvloop/handles/stream.pyx":469 * * self._buffer_size -= sent * self._buffer[0] = data # <<<<<<<<<<<<<< * * # At this point it's either data was sent partially, */ if (unlikely(__pyx_v_self->_buffer == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(15, 469, __pyx_L1_error) } if (unlikely(__Pyx_SetItemInt(__pyx_v_self->_buffer, 0, __pyx_v_data, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(15, 469, __pyx_L1_error) /* "uvloop/handles/stream.pyx":455 * return True * * if sent > 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if sent == len(data): */ } /* "uvloop/handles/stream.pyx":428 * if (self._handle).write_queue_size == 0: * # libuv internal write buffers for this stream are empty. * if buf_len == 1: # <<<<<<<<<<<<<< * # If we only have one piece of data to send, let's * # use our fast implementation of try_write. */ goto __pyx_L6; } /* "uvloop/handles/stream.pyx":475 * * else: * ctx = _StreamWriteContext.new(self, self._buffer) # <<<<<<<<<<<<<< * * err = uv.uv_try_write(self._handle, */ /*else*/ { __pyx_t_5 = __pyx_v_self->_buffer; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = ((PyObject *)__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(__pyx_v_self, ((PyObject*)__pyx_t_5))); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_ctx, ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_2)); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":477 * ctx = _StreamWriteContext.new(self, self._buffer) * * err = uv.uv_try_write(self._handle, # <<<<<<<<<<<<<< * ctx.uv_bufs_start, * ctx.uv_bufs_len) */ __pyx_v_err = uv_try_write(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_ctx->uv_bufs_start, __pyx_v_ctx->uv_bufs_len); /* "uvloop/handles/stream.pyx":481 * ctx.uv_bufs_len) * * if err > 0: # <<<<<<<<<<<<<< * # Some data was successfully sent. * */ __pyx_t_4 = ((__pyx_v_err > 0) != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":484 * # Some data was successfully sent. * * if err == self._buffer_size: # <<<<<<<<<<<<<< * # Everything was sent. * ctx.close() */ __pyx_t_4 = ((((size_t)__pyx_v_err) == __pyx_v_self->_buffer_size) != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":486 * if err == self._buffer_size: * # Everything was sent. * ctx.close() # <<<<<<<<<<<<<< * self._buffer.clear() * self._buffer_size = 0 */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":487 * # Everything was sent. * ctx.close() * self._buffer.clear() # <<<<<<<<<<<<<< * self._buffer_size = 0 * # on_write will call "maybe_resume_protocol". */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 487, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":488 * ctx.close() * self._buffer.clear() * self._buffer_size = 0 # <<<<<<<<<<<<<< * # on_write will call "maybe_resume_protocol". * self._on_write() */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":490 * self._buffer_size = 0 * # on_write will call "maybe_resume_protocol". * self._on_write() # <<<<<<<<<<<<<< * return True * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":491 * # on_write will call "maybe_resume_protocol". * self._on_write() * return True # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/handles/stream.pyx":484 * # Some data was successfully sent. * * if err == self._buffer_size: # <<<<<<<<<<<<<< * # Everything was sent. * ctx.close() */ } /* "uvloop/handles/stream.pyx":493 * return True * * try: # <<<<<<<<<<<<<< * # Advance pointers to uv_bufs in `ctx`, * # we will reuse it soon for a uv_write */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "uvloop/handles/stream.pyx":497 * # we will reuse it soon for a uv_write * # call. * ctx.advance_uv_buf(err) # <<<<<<<<<<<<<< * except Exception as ex: # This should never happen. * # Let's try to close the `ctx` anyways. */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->advance_uv_buf(__pyx_v_ctx, ((Py_ssize_t)__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 497, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":493 * return True * * try: # <<<<<<<<<<<<<< * # Advance pointers to uv_bufs in `ctx`, * # we will reuse it soon for a uv_write */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L23_try_end; __pyx_L16_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":498 * # call. * ctx.advance_uv_buf(err) * except Exception as ex: # This should never happen. # <<<<<<<<<<<<<< * # Let's try to close the `ctx` anyways. * ctx.close() */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.UVStream._exec_write", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(15, 498, __pyx_L18_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_ex = __pyx_t_5; /*try:*/ { /* "uvloop/handles/stream.pyx":500 * except Exception as ex: # This should never happen. * # Let's try to close the `ctx` anyways. * ctx.close() # <<<<<<<<<<<<<< * self._fatal_error(ex, True) * self._buffer.clear() */ __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 500, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "uvloop/handles/stream.pyx":501 * # Let's try to close the `ctx` anyways. * ctx.close() * self._fatal_error(ex, True) # <<<<<<<<<<<<<< * self._buffer.clear() * self._buffer_size = 0 */ __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_ex, Py_True, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 501, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "uvloop/handles/stream.pyx":502 * ctx.close() * self._fatal_error(ex, True) * self._buffer.clear() # <<<<<<<<<<<<<< * self._buffer_size = 0 * return */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_13)) __PYX_ERR(15, 502, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_14) { __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 502, __pyx_L29_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(15, 502, __pyx_L29_error) } __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "uvloop/handles/stream.pyx":503 * self._fatal_error(ex, True) * self._buffer.clear() * self._buffer_size = 0 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":504 * self._buffer.clear() * self._buffer_size = 0 * return # <<<<<<<<<<<<<< * * elif err != uv.UV_EAGAIN: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L28_return; } /* "uvloop/handles/stream.pyx":498 * # call. * ctx.advance_uv_buf(err) * except Exception as ex: # This should never happen. # <<<<<<<<<<<<<< * # Let's try to close the `ctx` anyways. * ctx.close() */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L29_error:; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L18_except_error; } __pyx_L28_return: { __pyx_t_22 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; __pyx_r = __pyx_t_22; __pyx_t_22 = 0; goto __pyx_L19_except_return; } } } goto __pyx_L18_except_error; __pyx_L18_except_error:; /* "uvloop/handles/stream.pyx":493 * return True * * try: # <<<<<<<<<<<<<< * # Advance pointers to uv_bufs in `ctx`, * # we will reuse it soon for a uv_write */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L19_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L0; __pyx_L23_try_end:; } /* "uvloop/handles/stream.pyx":481 * ctx.uv_bufs_len) * * if err > 0: # <<<<<<<<<<<<<< * # Some data was successfully sent. * */ goto __pyx_L14; } /* "uvloop/handles/stream.pyx":506 * return * * elif err != uv.UV_EAGAIN: # <<<<<<<<<<<<<< * ctx.close() * exc = convert_error(err) */ __pyx_t_4 = ((__pyx_v_err != UV_EAGAIN) != 0); if (__pyx_t_4) { /* "uvloop/handles/stream.pyx":507 * * elif err != uv.UV_EAGAIN: * ctx.close() # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/stream.pyx":508 * elif err != uv.UV_EAGAIN: * ctx.close() * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * self._buffer.clear() */ __pyx_t_6 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/handles/stream.pyx":509 * ctx.close() * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * self._buffer.clear() * self._buffer_size = 0 */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/stream.pyx":510 * exc = convert_error(err) * self._fatal_error(exc, True) * self._buffer.clear() # <<<<<<<<<<<<<< * self._buffer_size = 0 * return */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_buffer, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_2) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 510, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/stream.pyx":511 * self._fatal_error(exc, True) * self._buffer.clear() * self._buffer_size = 0 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":512 * self._buffer.clear() * self._buffer_size = 0 * return # <<<<<<<<<<<<<< * * # fall through */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":506 * return * * elif err != uv.UV_EAGAIN: # <<<<<<<<<<<<<< * ctx.close() * exc = convert_error(err) */ } __pyx_L14:; } __pyx_L6:; /* "uvloop/handles/stream.pyx":426 * return * * if (self._handle).write_queue_size == 0: # <<<<<<<<<<<<<< * # libuv internal write buffers for this stream are empty. * if buf_len == 1: */ } /* "uvloop/handles/stream.pyx":516 * # fall through * * if ctx is None: # <<<<<<<<<<<<<< * ctx = _StreamWriteContext.new(self, self._buffer) * */ __pyx_t_4 = (((PyObject *)__pyx_v_ctx) == Py_None); __pyx_t_1 = (__pyx_t_4 != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":517 * * if ctx is None: * ctx = _StreamWriteContext.new(self, self._buffer) # <<<<<<<<<<<<<< * * err = uv.uv_write(&ctx.req, */ __pyx_t_6 = __pyx_v_self->_buffer; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = ((PyObject *)__pyx_f_6uvloop_4loop_19_StreamWriteContext_new(__pyx_v_self, ((PyObject*)__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_ctx, ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_5)); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":516 * # fall through * * if ctx is None: # <<<<<<<<<<<<<< * ctx = _StreamWriteContext.new(self, self._buffer) * */ } /* "uvloop/handles/stream.pyx":519 * ctx = _StreamWriteContext.new(self, self._buffer) * * err = uv.uv_write(&ctx.req, # <<<<<<<<<<<<<< * self._handle, * ctx.uv_bufs_start, */ __pyx_v_err = uv_write((&__pyx_v_ctx->req), ((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_ctx->uv_bufs_start, __pyx_v_ctx->uv_bufs_len, __pyx_f_6uvloop_4loop___uv_stream_on_write); /* "uvloop/handles/stream.pyx":525 * __uv_stream_on_write) * * self._buffer_size = 0 # <<<<<<<<<<<<<< * # Can't use `_buffer.clear()` here: `ctx` holds a reference to * # the `_buffer`. */ __pyx_v_self->_buffer_size = 0; /* "uvloop/handles/stream.pyx":528 * # Can't use `_buffer.clear()` here: `ctx` holds a reference to * # the `_buffer`. * self._buffer = [] # <<<<<<<<<<<<<< * * if err < 0: */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_buffer); __Pyx_DECREF(__pyx_v_self->_buffer); __pyx_v_self->_buffer = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":530 * self._buffer = [] * * if err < 0: # <<<<<<<<<<<<<< * # close write context * ctx.close() */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":532 * if err < 0: * # close write context * ctx.close() # <<<<<<<<<<<<<< * * exc = convert_error(err) */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":534 * ctx.close() * * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_5 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_exc = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":535 * * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":536 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * self._maybe_resume_protocol() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":530 * self._buffer = [] * * if err < 0: # <<<<<<<<<<<<<< * # close write context * ctx.close() */ } /* "uvloop/handles/stream.pyx":538 * return * * self._maybe_resume_protocol() # <<<<<<<<<<<<<< * * cdef size_t _get_write_buffer_size(self): */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":411 * self._loop._queue_write(self) * * cdef inline _exec_write(self): # <<<<<<<<<<<<<< * cdef: * int err */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("uvloop.loop.UVStream._exec_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_sent); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":540 * self._maybe_resume_protocol() * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * if self._handle is NULL: * return 0 */ static size_t __pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { size_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_get_write_buffer_size", 0); /* "uvloop/handles/stream.pyx":541 * * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: # <<<<<<<<<<<<<< * return 0 * return ((self._handle).write_queue_size + */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":542 * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: * return 0 # <<<<<<<<<<<<<< * return ((self._handle).write_queue_size + * self._buffer_size) */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/handles/stream.pyx":541 * * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: # <<<<<<<<<<<<<< * return 0 * return ((self._handle).write_queue_size + */ } /* "uvloop/handles/stream.pyx":543 * if self._handle is NULL: * return 0 * return ((self._handle).write_queue_size + # <<<<<<<<<<<<<< * self._buffer_size) * */ __pyx_r = (((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->write_queue_size + __pyx_v_self->_buffer_size); goto __pyx_L0; /* "uvloop/handles/stream.pyx":540 * self._maybe_resume_protocol() * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * if self._handle is NULL: * return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":546 * self._buffer_size) * * cdef _close(self): # <<<<<<<<<<<<<< * try: * self._stop_reading() */ static PyObject *__pyx_f_6uvloop_4loop_8UVStream__close(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_close", 0); /* "uvloop/handles/stream.pyx":547 * * cdef _close(self): * try: # <<<<<<<<<<<<<< * self._stop_reading() * finally: */ /*try:*/ { /* "uvloop/handles/stream.pyx":548 * cdef _close(self): * try: * self._stop_reading() # <<<<<<<<<<<<<< * finally: * UVSocketHandle._close(self) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 548, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/handles/stream.pyx":550 * self._stop_reading() * finally: * UVSocketHandle._close(self) # <<<<<<<<<<<<<< * * cdef inline _on_accept(self): */ /*finally:*/ { /*normal exit:*/{ if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6uvloop_4loop_UVSocketHandle))))) __PYX_ERR(15, 550, __pyx_L1_error) __pyx_t_1 = __pyx_f_6uvloop_4loop_14UVSocketHandle__close(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L4_error:; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { if (!(likely(((((PyObject *)__pyx_v_self)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_6uvloop_4loop_UVSocketHandle))))) __PYX_ERR(15, 550, __pyx_L7_error) __pyx_t_1 = __pyx_f_6uvloop_4loop_14UVSocketHandle__close(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 550, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L7_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "uvloop/handles/stream.pyx":546 * self._buffer_size) * * cdef _close(self): # <<<<<<<<<<<<<< * try: * self._stop_reading() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":552 * UVSocketHandle._close(self) * * cdef inline _on_accept(self): # <<<<<<<<<<<<<< * # Ultimately called by __uv_stream_on_listen. * self._init_protocol() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_accept(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_on_accept", 0); /* "uvloop/handles/stream.pyx":554 * cdef inline _on_accept(self): * # Ultimately called by __uv_stream_on_listen. * self._init_protocol() # <<<<<<<<<<<<<< * * cdef inline _on_read(self, bytes buf): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":552 * UVSocketHandle._close(self) * * cdef inline _on_accept(self): # <<<<<<<<<<<<<< * # Ultimately called by __uv_stream_on_listen. * self._init_protocol() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._on_accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":556 * self._init_protocol() * * cdef inline _on_read(self, bytes buf): # <<<<<<<<<<<<<< * # Any exception raised here will be caught in * # __uv_stream_on_read. */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_read(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_on_read", 0); /* "uvloop/handles/stream.pyx":559 * # Any exception raised here will be caught in * # __uv_stream_on_read. * self._protocol_data_received(buf) # <<<<<<<<<<<<<< * * cdef inline _on_eof(self): */ __Pyx_INCREF(__pyx_v_self->__pyx_base._protocol_data_received); __pyx_t_2 = __pyx_v_self->__pyx_base._protocol_data_received; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_buf}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 559, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_buf}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 559, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_buf); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":556 * self._init_protocol() * * cdef inline _on_read(self, bytes buf): # <<<<<<<<<<<<<< * # Any exception raised here will be caught in * # __uv_stream_on_read. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.UVStream._on_read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":561 * self._protocol_data_received(buf) * * cdef inline _on_eof(self): # <<<<<<<<<<<<<< * # Any exception raised here will be caught in * # __uv_stream_on_read. */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_v_meth = NULL; PyObject *__pyx_v_keep_open = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; __Pyx_RefNannySetupContext("_on_eof", 0); /* "uvloop/handles/stream.pyx":565 * # __uv_stream_on_read. * * try: # <<<<<<<<<<<<<< * meth = self._protocol.eof_received * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/handles/stream.pyx":566 * * try: * meth = self._protocol.eof_received # <<<<<<<<<<<<<< * except AttributeError: * keep_open = False */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_eof_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 566, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_meth = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":565 * # __uv_stream_on_read. * * try: # <<<<<<<<<<<<<< * meth = self._protocol.eof_received * except AttributeError: */ } /* "uvloop/handles/stream.pyx":570 * keep_open = False * else: * keep_open = meth() # <<<<<<<<<<<<<< * * if keep_open: */ /*else:*/ { __Pyx_INCREF(__pyx_v_meth); __pyx_t_5 = __pyx_v_meth; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 570, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 570, __pyx_L5_except_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_keep_open = __pyx_t_4; __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/stream.pyx":567 * try: * meth = self._protocol.eof_received * except AttributeError: # <<<<<<<<<<<<<< * keep_open = False * else: */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.UVStream._on_eof", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(15, 567, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/handles/stream.pyx":568 * meth = self._protocol.eof_received * except AttributeError: * keep_open = False # <<<<<<<<<<<<<< * else: * keep_open = meth() */ __Pyx_INCREF(Py_False); __pyx_v_keep_open = Py_False; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/handles/stream.pyx":565 * # __uv_stream_on_read. * * try: # <<<<<<<<<<<<<< * meth = self._protocol.eof_received * except AttributeError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/handles/stream.pyx":572 * keep_open = meth() * * if keep_open: # <<<<<<<<<<<<<< * # We're keeping the connection open so the * # protocol can write more, but we still can't */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_keep_open); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(15, 572, __pyx_L1_error) if (__pyx_t_8) { /* "uvloop/handles/stream.pyx":576 * # protocol can write more, but we still can't * # receive more, so remove the reader callback. * self._stop_reading() # <<<<<<<<<<<<<< * else: * self.close() */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/stream.pyx":572 * keep_open = meth() * * if keep_open: # <<<<<<<<<<<<<< * # We're keeping the connection open so the * # protocol can write more, but we still can't */ goto __pyx_L13; } /* "uvloop/handles/stream.pyx":578 * self._stop_reading() * else: * self.close() # <<<<<<<<<<<<<< * * cdef inline _on_write(self): */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_4) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 578, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L13:; /* "uvloop/handles/stream.pyx":561 * self._protocol_data_received(buf) * * cdef inline _on_eof(self): # <<<<<<<<<<<<<< * # Any exception raised here will be caught in * # __uv_stream_on_read. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVStream._on_eof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_meth); __Pyx_XDECREF(__pyx_v_keep_open); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":580 * self.close() * * cdef inline _on_write(self): # <<<<<<<<<<<<<< * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_on_write", 0); /* "uvloop/handles/stream.pyx":581 * * cdef inline _on_write(self): * self._maybe_resume_protocol() # <<<<<<<<<<<<<< * if not self._get_write_buffer_size(): * if self._closing: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":582 * cdef inline _on_write(self): * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * if self._closing: * self._schedule_call_connection_lost(None) */ __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":583 * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): * if self._closing: # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(None) * elif self._eof: */ __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":584 * if not self._get_write_buffer_size(): * if self._closing: * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<< * elif self._eof: * self._shutdown() */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._schedule_call_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":583 * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): * if self._closing: # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(None) * elif self._eof: */ goto __pyx_L4; } /* "uvloop/handles/stream.pyx":585 * if self._closing: * self._schedule_call_connection_lost(None) * elif self._eof: # <<<<<<<<<<<<<< * self._shutdown() * */ __pyx_t_2 = (__pyx_v_self->_eof != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":586 * self._schedule_call_connection_lost(None) * elif self._eof: * self._shutdown() # <<<<<<<<<<<<<< * * cdef inline _init(self, Loop loop, object protocol, Server server, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__shutdown(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":585 * if self._closing: * self._schedule_call_connection_lost(None) * elif self._eof: # <<<<<<<<<<<<<< * self._shutdown() * */ } __pyx_L4:; /* "uvloop/handles/stream.pyx":582 * cdef inline _on_write(self): * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * if self._closing: * self._schedule_call_connection_lost(None) */ } /* "uvloop/handles/stream.pyx":580 * self.close() * * cdef inline _on_write(self): # <<<<<<<<<<<<<< * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._on_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":588 * self._shutdown() * * cdef inline _init(self, Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__init(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/stream.pyx":591 * object waiter): * * self._start_init(loop) # <<<<<<<<<<<<<< * * if protocol is None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":593 * self._start_init(loop) * * if protocol is None: # <<<<<<<<<<<<<< * raise TypeError('protocol is required') * */ __pyx_t_2 = (__pyx_v_protocol == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":594 * * if protocol is None: * raise TypeError('protocol is required') # <<<<<<<<<<<<<< * * self._set_protocol(protocol) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 594, __pyx_L1_error) /* "uvloop/handles/stream.pyx":593 * self._start_init(loop) * * if protocol is None: # <<<<<<<<<<<<<< * raise TypeError('protocol is required') * */ } /* "uvloop/handles/stream.pyx":596 * raise TypeError('protocol is required') * * self._set_protocol(protocol) # <<<<<<<<<<<<<< * * if server is not None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":598 * self._set_protocol(protocol) * * if server is not None: # <<<<<<<<<<<<<< * self._set_server(server) * */ __pyx_t_3 = (((PyObject *)__pyx_v_server) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":599 * * if server is not None: * self._set_server(server) # <<<<<<<<<<<<<< * * if waiter is not None: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_server(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_server); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":598 * self._set_protocol(protocol) * * if server is not None: # <<<<<<<<<<<<<< * self._set_server(server) * */ } /* "uvloop/handles/stream.pyx":601 * self._set_server(server) * * if waiter is not None: # <<<<<<<<<<<<<< * self._set_waiter(waiter) * */ __pyx_t_2 = (__pyx_v_waiter != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":602 * * if waiter is not None: * self._set_waiter(waiter) # <<<<<<<<<<<<<< * * cdef inline _on_connect(self, object exc): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._set_waiter(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":601 * self._set_server(server) * * if waiter is not None: # <<<<<<<<<<<<<< * self._set_waiter(waiter) * */ } /* "uvloop/handles/stream.pyx":588 * self._shutdown() * * cdef inline _init(self, Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":604 * self._set_waiter(waiter) * * cdef inline _on_connect(self, object exc): # <<<<<<<<<<<<<< * # Called from __tcp_connect_callback (tcp.pyx) and * # __pipe_connect_callback (pipe.pyx). */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_8UVStream__on_connect(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_on_connect", 0); /* "uvloop/handles/stream.pyx":607 * # Called from __tcp_connect_callback (tcp.pyx) and * # __pipe_connect_callback (pipe.pyx). * if exc is None: # <<<<<<<<<<<<<< * self._init_protocol() * else: */ __pyx_t_1 = (__pyx_v_exc == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":608 * # __pipe_connect_callback (pipe.pyx). * if exc is None: * self._init_protocol() # <<<<<<<<<<<<<< * else: * if self._waiter is None: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":607 * # Called from __tcp_connect_callback (tcp.pyx) and * # __pipe_connect_callback (pipe.pyx). * if exc is None: # <<<<<<<<<<<<<< * self._init_protocol() * else: */ goto __pyx_L3; } /* "uvloop/handles/stream.pyx":610 * self._init_protocol() * else: * if self._waiter is None: # <<<<<<<<<<<<<< * self._fatal_error(exc, False, "connect failed") * elif self._waiter.cancelled(): */ /*else*/ { __pyx_t_2 = (__pyx_v_self->__pyx_base._waiter == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":611 * else: * if self._waiter is None: * self._fatal_error(exc, False, "connect failed") # <<<<<<<<<<<<<< * elif self._waiter.cancelled(): * # Connect call was cancelled; just close the transport */ __pyx_t_4.__pyx_n = 1; __pyx_t_4.reason = __pyx_kp_u_connect_failed; __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":610 * self._init_protocol() * else: * if self._waiter is None: # <<<<<<<<<<<<<< * self._fatal_error(exc, False, "connect failed") * elif self._waiter.cancelled(): */ goto __pyx_L4; } /* "uvloop/handles/stream.pyx":612 * if self._waiter is None: * self._fatal_error(exc, False, "connect failed") * elif self._waiter.cancelled(): # <<<<<<<<<<<<<< * # Connect call was cancelled; just close the transport * # silently. */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 612, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(15, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":615 * # Connect call was cancelled; just close the transport * # silently. * self._close() # <<<<<<<<<<<<<< * elif self._waiter.done(): * self._fatal_error(exc, False, "connect failed") */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":612 * if self._waiter is None: * self._fatal_error(exc, False, "connect failed") * elif self._waiter.cancelled(): # <<<<<<<<<<<<<< * # Connect call was cancelled; just close the transport * # silently. */ goto __pyx_L4; } /* "uvloop/handles/stream.pyx":616 * # silently. * self._close() * elif self._waiter.done(): # <<<<<<<<<<<<<< * self._fatal_error(exc, False, "connect failed") * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 616, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(15, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":617 * self._close() * elif self._waiter.done(): * self._fatal_error(exc, False, "connect failed") # <<<<<<<<<<<<<< * else: * self._waiter.set_exception(exc) */ __pyx_t_4.__pyx_n = 1; __pyx_t_4.reason = __pyx_kp_u_connect_failed; __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":616 * # silently. * self._close() * elif self._waiter.done(): # <<<<<<<<<<<<<< * self._fatal_error(exc, False, "connect failed") * else: */ goto __pyx_L4; } /* "uvloop/handles/stream.pyx":619 * self._fatal_error(exc, False, "connect failed") * else: * self._waiter.set_exception(exc) # <<<<<<<<<<<<<< * self._close() * */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":620 * else: * self._waiter.set_exception(exc) * self._close() # <<<<<<<<<<<<<< * * # === Public API === */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; } __pyx_L3:; /* "uvloop/handles/stream.pyx":604 * self._set_waiter(waiter) * * cdef inline _on_connect(self, object exc): # <<<<<<<<<<<<<< * # Called from __tcp_connect_callback (tcp.pyx) and * # __pipe_connect_callback (pipe.pyx). */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVStream._on_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":624 * # === Public API === * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{} closed={} reading={} {:#x}>'.format( * self.__class__.__name__, */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_2__repr__(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_2__repr__(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/handles/stream.pyx":625 * * def __repr__(self): * return '<{} closed={} reading={} {:#x}>'.format( # <<<<<<<<<<<<<< * self.__class__.__name__, * self._closed, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_closed_reading_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/stream.pyx":626 * def __repr__(self): * return '<{} closed={} reading={} {:#x}>'.format( * self.__class__.__name__, # <<<<<<<<<<<<<< * self._closed, * self.__reading, */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":627 * return '<{} closed={} reading={} {:#x}>'.format( * self.__class__.__name__, * self._closed, # <<<<<<<<<<<<<< * self.__reading, * id(self)) */ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._closed); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/stream.pyx":628 * self.__class__.__name__, * self._closed, * self.__reading, # <<<<<<<<<<<<<< * id(self)) * */ __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx___reading); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/stream.pyx":629 * self._closed, * self.__reading, * id(self)) # <<<<<<<<<<<<<< * * def write(self, object buf): */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self)); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(15, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/stream.pyx":624 * # === Public API === * * def __repr__(self): # <<<<<<<<<<<<<< * return '<{} closed={} reading={} {:#x}>'.format( * self.__class__.__name__, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.UVStream.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":631 * id(self)) * * def write(self, object buf): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_5write(PyObject *__pyx_v_self, PyObject *__pyx_v_buf); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_4write[] = "UVStream.write(self, buf)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_5write(PyObject *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_4write(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), ((PyObject *)__pyx_v_buf)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_4write(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("write", 0); /* "uvloop/handles/stream.pyx":632 * * def write(self, object buf): * self._ensure_alive() # <<<<<<<<<<<<<< * * if self._eof: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":634 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot call write() after write_eof()') * if not buf: */ __pyx_t_2 = (__pyx_v_self->_eof != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":635 * * if self._eof: * raise RuntimeError('Cannot call write() after write_eof()') # <<<<<<<<<<<<<< * if not buf: * return */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 635, __pyx_L1_error) /* "uvloop/handles/stream.pyx":634 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot call write() after write_eof()') * if not buf: */ } /* "uvloop/handles/stream.pyx":636 * if self._eof: * raise RuntimeError('Cannot call write() after write_eof()') * if not buf: # <<<<<<<<<<<<<< * return * if self._conn_lost: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_buf); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(15, 636, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":637 * raise RuntimeError('Cannot call write() after write_eof()') * if not buf: * return # <<<<<<<<<<<<<< * if self._conn_lost: * self._conn_lost += 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":636 * if self._eof: * raise RuntimeError('Cannot call write() after write_eof()') * if not buf: # <<<<<<<<<<<<<< * return * if self._conn_lost: */ } /* "uvloop/handles/stream.pyx":638 * if not buf: * return * if self._conn_lost: # <<<<<<<<<<<<<< * self._conn_lost += 1 * return */ __pyx_t_3 = (__pyx_v_self->__pyx_base._conn_lost != 0); if (__pyx_t_3) { /* "uvloop/handles/stream.pyx":639 * return * if self._conn_lost: * self._conn_lost += 1 # <<<<<<<<<<<<<< * return * self._write(buf) */ __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1); /* "uvloop/handles/stream.pyx":640 * if self._conn_lost: * self._conn_lost += 1 * return # <<<<<<<<<<<<<< * self._write(buf) * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":638 * if not buf: * return * if self._conn_lost: # <<<<<<<<<<<<<< * self._conn_lost += 1 * return */ } /* "uvloop/handles/stream.pyx":641 * self._conn_lost += 1 * return * self._write(buf) # <<<<<<<<<<<<<< * * def writelines(self, bufs): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__write(__pyx_v_self, __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":631 * id(self)) * * def write(self, object buf): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":643 * self._write(buf) * * def writelines(self, bufs): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_7writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_bufs); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_6writelines[] = "UVStream.writelines(self, bufs)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_7writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_bufs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writelines (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_6writelines(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), ((PyObject *)__pyx_v_bufs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_6writelines(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self, PyObject *__pyx_v_bufs) { PyObject *__pyx_v_buf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("writelines", 0); /* "uvloop/handles/stream.pyx":644 * * def writelines(self, bufs): * self._ensure_alive() # <<<<<<<<<<<<<< * * if self._eof: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":646 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot call writelines() after write_eof()') * if self._conn_lost: */ __pyx_t_2 = (__pyx_v_self->_eof != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":647 * * if self._eof: * raise RuntimeError('Cannot call writelines() after write_eof()') # <<<<<<<<<<<<<< * if self._conn_lost: * self._conn_lost += 1 */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 647, __pyx_L1_error) /* "uvloop/handles/stream.pyx":646 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot call writelines() after write_eof()') * if self._conn_lost: */ } /* "uvloop/handles/stream.pyx":648 * if self._eof: * raise RuntimeError('Cannot call writelines() after write_eof()') * if self._conn_lost: # <<<<<<<<<<<<<< * self._conn_lost += 1 * return */ __pyx_t_2 = (__pyx_v_self->__pyx_base._conn_lost != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":649 * raise RuntimeError('Cannot call writelines() after write_eof()') * if self._conn_lost: * self._conn_lost += 1 # <<<<<<<<<<<<<< * return * for buf in bufs: */ __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1); /* "uvloop/handles/stream.pyx":650 * if self._conn_lost: * self._conn_lost += 1 * return # <<<<<<<<<<<<<< * for buf in bufs: * self._write(buf) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":648 * if self._eof: * raise RuntimeError('Cannot call writelines() after write_eof()') * if self._conn_lost: # <<<<<<<<<<<<<< * self._conn_lost += 1 * return */ } /* "uvloop/handles/stream.pyx":651 * self._conn_lost += 1 * return * for buf in bufs: # <<<<<<<<<<<<<< * self._write(buf) * */ if (likely(PyList_CheckExact(__pyx_v_bufs)) || PyTuple_CheckExact(__pyx_v_bufs)) { __pyx_t_1 = __pyx_v_bufs; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_bufs); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 651, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(15, 651, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(15, 651, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(15, 651, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":652 * return * for buf in bufs: * self._write(buf) # <<<<<<<<<<<<<< * * def write_eof(self): */ __pyx_t_5 = __pyx_f_6uvloop_4loop_8UVStream__write(__pyx_v_self, __pyx_v_buf); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/stream.pyx":651 * self._conn_lost += 1 * return * for buf in bufs: # <<<<<<<<<<<<<< * self._write(buf) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":643 * self._write(buf) * * def writelines(self, bufs): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVStream.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":654 * self._write(buf) * * def write_eof(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_9write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_8write_eof[] = "UVStream.write_eof(self)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_9write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_eof (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_8write_eof(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_8write_eof(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("write_eof", 0); /* "uvloop/handles/stream.pyx":655 * * def write_eof(self): * self._ensure_alive() # <<<<<<<<<<<<<< * * if self._eof: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":657 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (__pyx_v_self->_eof != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":658 * * if self._eof: * return # <<<<<<<<<<<<<< * * self._eof = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":657 * self._ensure_alive() * * if self._eof: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/stream.pyx":660 * return * * self._eof = 1 # <<<<<<<<<<<<<< * if not self._get_write_buffer_size(): * self._shutdown() */ __pyx_v_self->_eof = 1; /* "uvloop/handles/stream.pyx":661 * * self._eof = 1 * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * self._shutdown() * */ __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":662 * self._eof = 1 * if not self._get_write_buffer_size(): * self._shutdown() # <<<<<<<<<<<<<< * * def can_write_eof(self): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__shutdown(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":661 * * self._eof = 1 * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * self._shutdown() * */ } /* "uvloop/handles/stream.pyx":654 * self._write(buf) * * def write_eof(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream.write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":664 * self._shutdown() * * def can_write_eof(self): # <<<<<<<<<<<<<< * return True * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_10can_write_eof[] = "UVStream.can_write_eof(self)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("can_write_eof (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_10can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("can_write_eof", 0); /* "uvloop/handles/stream.pyx":665 * * def can_write_eof(self): * return True # <<<<<<<<<<<<<< * * def pause_reading(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/handles/stream.pyx":664 * self._shutdown() * * def can_write_eof(self): # <<<<<<<<<<<<<< * return True * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":667 * return True * * def pause_reading(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_13pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_12pause_reading[] = "UVStream.pause_reading(self)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_13pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pause_reading (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_12pause_reading(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_12pause_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("pause_reading", 0); /* "uvloop/handles/stream.pyx":668 * * def pause_reading(self): * self._ensure_alive() # <<<<<<<<<<<<<< * * if self._closing: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":670 * self._ensure_alive() * * if self._closing: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): */ __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":671 * * if self._closing: * raise RuntimeError('Cannot pause_reading() when closing') # <<<<<<<<<<<<<< * if not self._is_reading(): * raise RuntimeError('Already paused') */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 671, __pyx_L1_error) /* "uvloop/handles/stream.pyx":670 * self._ensure_alive() * * if self._closing: # <<<<<<<<<<<<<< * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): */ } /* "uvloop/handles/stream.pyx":672 * if self._closing: * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): # <<<<<<<<<<<<<< * raise RuntimeError('Already paused') * self._stop_reading() */ __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._is_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":673 * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): * raise RuntimeError('Already paused') # <<<<<<<<<<<<<< * self._stop_reading() * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 673, __pyx_L1_error) /* "uvloop/handles/stream.pyx":672 * if self._closing: * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): # <<<<<<<<<<<<<< * raise RuntimeError('Already paused') * self._stop_reading() */ } /* "uvloop/handles/stream.pyx":674 * if not self._is_reading(): * raise RuntimeError('Already paused') * self._stop_reading() # <<<<<<<<<<<<<< * * def resume_reading(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":667 * return True * * def pause_reading(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream.pause_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":676 * self._stop_reading() * * def resume_reading(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_15resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_8UVStream_14resume_reading[] = "UVStream.resume_reading(self)"; static PyObject *__pyx_pw_6uvloop_4loop_8UVStream_15resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resume_reading (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8UVStream_14resume_reading(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8UVStream_14resume_reading(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("resume_reading", 0); /* "uvloop/handles/stream.pyx":677 * * def resume_reading(self): * self._ensure_alive() # <<<<<<<<<<<<<< * * if self._is_reading(): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":679 * self._ensure_alive() * * if self._is_reading(): # <<<<<<<<<<<<<< * raise RuntimeError('Not paused') * if self._closing: */ __pyx_t_2 = (((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._is_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":680 * * if self._is_reading(): * raise RuntimeError('Not paused') # <<<<<<<<<<<<<< * if self._closing: * return */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(15, 680, __pyx_L1_error) /* "uvloop/handles/stream.pyx":679 * self._ensure_alive() * * if self._is_reading(): # <<<<<<<<<<<<<< * raise RuntimeError('Not paused') * if self._closing: */ } /* "uvloop/handles/stream.pyx":681 * if self._is_reading(): * raise RuntimeError('Not paused') * if self._closing: # <<<<<<<<<<<<<< * return * self._start_reading() */ __pyx_t_2 = (__pyx_v_self->__pyx_base._closing != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":682 * raise RuntimeError('Not paused') * if self._closing: * return # <<<<<<<<<<<<<< * self._start_reading() * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/stream.pyx":681 * if self._is_reading(): * raise RuntimeError('Not paused') * if self._closing: # <<<<<<<<<<<<<< * return * self._start_reading() */ } /* "uvloop/handles/stream.pyx":683 * if self._closing: * return * self._start_reading() # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._start_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":676 * self._stop_reading() * * def resume_reading(self): # <<<<<<<<<<<<<< * self._ensure_alive() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVStream.resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/stream.pyx":686 * * * cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req, # <<<<<<<<<<<<<< * int status) with gil: * */ static void __pyx_f_6uvloop_4loop___uv_stream_on_shutdown(uv_shutdown_t *__pyx_v_req, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_9 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_10; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_stream_on_shutdown", 0); /* "uvloop/handles/stream.pyx":691 * # callback for uv_shutdown * * if req.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'UVStream.shutdown callback called with NULL req.data, status=%r', */ __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":692 * * if req.data is NULL: * aio_logger.error( # <<<<<<<<<<<<<< * 'UVStream.shutdown callback called with NULL req.data, status=%r', * status) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/stream.pyx":694 * aio_logger.error( * 'UVStream.shutdown callback called with NULL req.data, status=%r', * status) # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 692, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 692, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_UVStream_shutdown_callback_calle); __Pyx_GIVEREF(__pyx_kp_u_UVStream_shutdown_callback_calle); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_shutdown_callback_calle); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":695 * 'UVStream.shutdown callback called with NULL req.data, status=%r', * status) * return # <<<<<<<<<<<<<< * * cdef UVStream stream = req.data */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":691 * # callback for uv_shutdown * * if req.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'UVStream.shutdown callback called with NULL req.data, status=%r', */ } /* "uvloop/handles/stream.pyx":697 * return * * cdef UVStream stream = req.data # <<<<<<<<<<<<<< * * if status < 0 and status != uv.UV_ECANCELED: */ __pyx_t_2 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":699 * cdef UVStream stream = req.data * * if status < 0 and status != uv.UV_ECANCELED: # <<<<<<<<<<<<<< * # From libuv source code: * # The ECANCELED error code is a lie, the shutdown(2) syscall is a */ __pyx_t_8 = ((__pyx_v_status < 0) != 0); if (__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L5_bool_binop_done; } __pyx_t_8 = ((__pyx_v_status != UV_ECANCELED) != 0); __pyx_t_1 = __pyx_t_8; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":706 * # informs the callee that the handle has been destroyed. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_shutdown_errors_total += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":707 * * if UVLOOP_DEBUG: * stream._loop._debug_stream_shutdown_errors_total += 1 # <<<<<<<<<<<<<< * * exc = convert_error(status) */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_9 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_9->_debug_stream_shutdown_errors_total = (__pyx_t_9->_debug_stream_shutdown_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "uvloop/handles/stream.pyx":706 * # informs the callee that the handle has been destroyed. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_shutdown_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":709 * stream._loop._debug_stream_shutdown_errors_total += 1 * * exc = convert_error(status) # <<<<<<<<<<<<<< * stream._fatal_error(exc, False, * "error status in uv_stream_t.shutdown callback") */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":710 * * exc = convert_error(status) * stream._fatal_error(exc, False, # <<<<<<<<<<<<<< * "error status in uv_stream_t.shutdown callback") * return */ __pyx_t_10.__pyx_n = 1; __pyx_t_10.reason = __pyx_kp_u_error_status_in_uv_stream_t_shut; __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":712 * stream._fatal_error(exc, False, * "error status in uv_stream_t.shutdown callback") * return # <<<<<<<<<<<<<< * * */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":699 * cdef UVStream stream = req.data * * if status < 0 and status != uv.UV_ECANCELED: # <<<<<<<<<<<<<< * # From libuv source code: * # The ECANCELED error code is a lie, the shutdown(2) syscall is a */ } /* "uvloop/handles/stream.pyx":686 * * * cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req, # <<<<<<<<<<<<<< * int status) with gil: * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(((PyObject *)__pyx_t_9)); __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_stream); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/stream.pyx":715 * * * cdef inline void __uv_stream_on_read_impl(uv.uv_stream_t* stream, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf): */ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(uv_stream_t *__pyx_v_stream, Py_ssize_t __pyx_v_nread, CYTHON_UNUSED uv_buf_t const *__pyx_v_buf) { struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_sc = 0; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_18; char const *__pyx_t_19; __Pyx_RefNannySetupContext("__uv_stream_on_read_impl", 0); /* "uvloop/handles/stream.pyx":719 * const uv.uv_buf_t* buf): * cdef: * UVStream sc = stream.data # <<<<<<<<<<<<<< * Loop loop = sc._loop * */ __pyx_t_1 = ((PyObject *)__pyx_v_stream->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_sc = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":720 * cdef: * UVStream sc = stream.data * Loop loop = sc._loop # <<<<<<<<<<<<<< * * # It's OK to free the buffer early, since nothing will */ __pyx_t_1 = ((PyObject *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":724 * # It's OK to free the buffer early, since nothing will * # be able to touch it until this method is done. * __loop_free_buffer(loop) # <<<<<<<<<<<<<< * * if sc._closed: */ __pyx_f_6uvloop_4loop___loop_free_buffer(__pyx_v_loop); /* "uvloop/handles/stream.pyx":726 * __loop_free_buffer(loop) * * if sc._closed: # <<<<<<<<<<<<<< * # The stream was closed, there is no reason to * # do any work now. */ __pyx_t_2 = (__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base._closed != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":729 * # The stream was closed, there is no reason to * # do any work now. * sc.__reading_stopped() # Just in case. # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream___reading_stopped(__pyx_v_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":730 * # do any work now. * sc.__reading_stopped() # Just in case. * return # <<<<<<<<<<<<<< * * if nread == uv.UV_EOF: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":726 * __loop_free_buffer(loop) * * if sc._closed: # <<<<<<<<<<<<<< * # The stream was closed, there is no reason to * # do any work now. */ } /* "uvloop/handles/stream.pyx":732 * return * * if nread == uv.UV_EOF: # <<<<<<<<<<<<<< * # From libuv docs: * # The callee is responsible for stopping closing the stream */ __pyx_t_2 = ((__pyx_v_nread == UV_EOF) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":737 * # when an error happens by calling uv_read_stop() or uv_close(). * # Trying to read from the stream again is undefined. * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_total += 1 */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/stream.pyx":738 * # Trying to read from the stream again is undefined. * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_eof_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":739 * try: * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_total += 1 # <<<<<<<<<<<<<< * * sc._stop_reading() */ __pyx_v_loop->_debug_stream_read_eof_total = (__pyx_v_loop->_debug_stream_read_eof_total + 1); /* "uvloop/handles/stream.pyx":738 * # Trying to read from the stream again is undefined. * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_eof_total += 1 * */ } /* "uvloop/handles/stream.pyx":741 * loop._debug_stream_read_eof_total += 1 * * sc._stop_reading() # <<<<<<<<<<<<<< * sc._on_eof() * except BaseException as ex: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._stop_reading(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_sc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 741, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":742 * * sc._stop_reading() * sc._on_eof() # <<<<<<<<<<<<<< * except BaseException as ex: * if UVLOOP_DEBUG: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__on_eof(__pyx_v_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 742, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":737 * # when an error happens by calling uv_read_stop() or uv_close(). * # Trying to read from the stream again is undefined. * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_total += 1 */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":743 * sc._stop_reading() * sc._on_eof() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_cb_errors_total += 1 */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_read_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(15, 743, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/stream.pyx":744 * sc._on_eof() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_eof_cb_errors_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":745 * except BaseException as ex: * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_cb_errors_total += 1 # <<<<<<<<<<<<<< * * sc._error(ex, False) */ __pyx_v_loop->_debug_stream_read_eof_cb_errors_total = (__pyx_v_loop->_debug_stream_read_eof_cb_errors_total + 1); /* "uvloop/handles/stream.pyx":744 * sc._on_eof() * except BaseException as ex: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_eof_cb_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":747 * loop._debug_stream_read_eof_cb_errors_total += 1 * * sc._error(ex, False) # <<<<<<<<<<<<<< * finally: * return */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(15, 747, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/stream.pyx":743 * sc._stop_reading() * sc._on_eof() * except BaseException as ex: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_cb_errors_total += 1 */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L23; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L22_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L10_except_error; } __pyx_L23:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_exception_handled; } goto __pyx_L10_except_error; __pyx_L10_except_error:; /* "uvloop/handles/stream.pyx":737 * # when an error happens by calling uv_read_stop() or uv_close(). * # Trying to read from the stream again is undefined. * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_eof_total += 1 */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L6_error; __pyx_L9_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L15_try_end:; } } /* "uvloop/handles/stream.pyx":749 * sc._error(ex, False) * finally: * return # <<<<<<<<<<<<<< * * if nread == 0: */ /*finally:*/ { /*normal exit:*/{ goto __pyx_L0; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L6_error:; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); { goto __pyx_L29_return; } __pyx_L29_return:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; goto __pyx_L0; } } /* "uvloop/handles/stream.pyx":732 * return * * if nread == uv.UV_EOF: # <<<<<<<<<<<<<< * # From libuv docs: * # The callee is responsible for stopping closing the stream */ } /* "uvloop/handles/stream.pyx":751 * return * * if nread == 0: # <<<<<<<<<<<<<< * # From libuv docs: * # nread might be 0, which does not indicate an error or EOF. */ __pyx_t_2 = ((__pyx_v_nread == 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":755 * # nread might be 0, which does not indicate an error or EOF. * # This is equivalent to EAGAIN or EWOULDBLOCK under read(2). * return # <<<<<<<<<<<<<< * * if nread < 0: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":751 * return * * if nread == 0: # <<<<<<<<<<<<<< * # From libuv docs: * # nread might be 0, which does not indicate an error or EOF. */ } /* "uvloop/handles/stream.pyx":757 * return * * if nread < 0: # <<<<<<<<<<<<<< * # From libuv docs: * # The callee is responsible for stopping closing the stream */ __pyx_t_2 = ((__pyx_v_nread < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":767 * # we don't need try...finally here. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_errors_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":768 * * if UVLOOP_DEBUG: * loop._debug_stream_read_errors_total += 1 # <<<<<<<<<<<<<< * * if sc.__read_error_close: */ __pyx_v_loop->_debug_stream_read_errors_total = (__pyx_v_loop->_debug_stream_read_errors_total + 1); /* "uvloop/handles/stream.pyx":767 * # we don't need try...finally here. * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":770 * loop._debug_stream_read_errors_total += 1 * * if sc.__read_error_close: # <<<<<<<<<<<<<< * # Used for getting notified when a pipe is closed. * # See WriteUnixTransport for the explanation. */ __pyx_t_2 = (__pyx_v_sc->__pyx___read_error_close != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":773 * # Used for getting notified when a pipe is closed. * # See WriteUnixTransport for the explanation. * sc._on_eof() # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = __pyx_f_6uvloop_4loop_8UVStream__on_eof(__pyx_v_sc); if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/stream.pyx":774 * # See WriteUnixTransport for the explanation. * sc._on_eof() * return # <<<<<<<<<<<<<< * * exc = convert_error(nread) */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":770 * loop._debug_stream_read_errors_total += 1 * * if sc.__read_error_close: # <<<<<<<<<<<<<< * # Used for getting notified when a pipe is closed. * # See WriteUnixTransport for the explanation. */ } /* "uvloop/handles/stream.pyx":776 * return * * exc = convert_error(nread) # <<<<<<<<<<<<<< * sc._fatal_error(exc, False, * "error status in uv_stream_t.read callback") */ __pyx_t_8 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_nread); if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_exc = __pyx_t_8; __pyx_t_8 = 0; /* "uvloop/handles/stream.pyx":777 * * exc = convert_error(nread) * sc._fatal_error(exc, False, # <<<<<<<<<<<<<< * "error status in uv_stream_t.read callback") * return */ __pyx_t_18.__pyx_n = 1; __pyx_t_18.reason = __pyx_kp_u_error_status_in_uv_stream_t_read; __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_exc, Py_False, &__pyx_t_18); if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/stream.pyx":779 * sc._fatal_error(exc, False, * "error status in uv_stream_t.read callback") * return # <<<<<<<<<<<<<< * * try: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":757 * return * * if nread < 0: # <<<<<<<<<<<<<< * # From libuv docs: * # The callee is responsible for stopping closing the stream */ } /* "uvloop/handles/stream.pyx":781 * return * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_total += 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { /* "uvloop/handles/stream.pyx":782 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_cb_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":783 * try: * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_total += 1 # <<<<<<<<<<<<<< * * sc._on_read(loop._recv_buffer[:nread]) */ __pyx_v_loop->_debug_stream_read_cb_total = (__pyx_v_loop->_debug_stream_read_cb_total + 1); /* "uvloop/handles/stream.pyx":782 * * try: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_cb_total += 1 * */ } /* "uvloop/handles/stream.pyx":785 * loop._debug_stream_read_cb_total += 1 * * sc._on_read(loop._recv_buffer[:nread]) # <<<<<<<<<<<<<< * except BaseException as exc: * if UVLOOP_DEBUG: */ __pyx_t_8 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_loop->_recv_buffer) + 0, __pyx_v_nread - 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(15, 785, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_f_6uvloop_4loop_8UVStream__on_read(__pyx_v_sc, ((PyObject*)__pyx_t_8)); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 785, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/stream.pyx":781 * return * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_total += 1 */ } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L42_try_end; __pyx_L35_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/stream.pyx":786 * * sc._on_read(loop._recv_buffer[:nread]) * except BaseException as exc: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_errors_total += 1 */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_read_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(15, 786, __pyx_L37_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __pyx_v_exc = __pyx_t_8; /*try:*/ { /* "uvloop/handles/stream.pyx":787 * sc._on_read(loop._recv_buffer[:nread]) * except BaseException as exc: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_cb_errors_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":788 * except BaseException as exc: * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_errors_total += 1 # <<<<<<<<<<<<<< * * sc._error(exc, False) */ __pyx_v_loop->_debug_stream_read_cb_errors_total = (__pyx_v_loop->_debug_stream_read_cb_errors_total + 1); /* "uvloop/handles/stream.pyx":787 * sc._on_read(loop._recv_buffer[:nread]) * except BaseException as exc: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * loop._debug_stream_read_cb_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":790 * loop._debug_stream_read_cb_errors_total += 1 * * sc._error(exc, False) # <<<<<<<<<<<<<< * * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_sc->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_sc), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(15, 790, __pyx_L49_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/stream.pyx":786 * * sc._on_read(loop._recv_buffer[:nread]) * except BaseException as exc: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_errors_total += 1 */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L50; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L49_error:; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_10 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_19 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12); } __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_19; goto __pyx_L37_except_error; } __pyx_L50:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L36_exception_handled; } goto __pyx_L37_except_error; __pyx_L37_except_error:; /* "uvloop/handles/stream.pyx":781 * return * * try: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * loop._debug_stream_read_cb_total += 1 */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); goto __pyx_L1_error; __pyx_L36_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_L42_try_end:; } /* "uvloop/handles/stream.pyx":715 * * * cdef inline void __uv_stream_on_read_impl(uv.uv_stream_t* stream, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_read_impl", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sc); __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/stream.pyx":793 * * * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): # <<<<<<<<<<<<<< * cdef: * _StreamWriteContext ctx = <_StreamWriteContext> req.data */ static CYTHON_INLINE void __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(uv_write_t *__pyx_v_req, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_v_ctx = 0; struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_stream = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; __Pyx_RefNannySetupContext("__uv_stream_on_write_impl", 0); /* "uvloop/handles/stream.pyx":795 * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): * cdef: * _StreamWriteContext ctx = <_StreamWriteContext> req.data # <<<<<<<<<<<<<< * UVStream stream = ctx.stream * */ __pyx_t_1 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":796 * cdef: * _StreamWriteContext ctx = <_StreamWriteContext> req.data * UVStream stream = ctx.stream # <<<<<<<<<<<<<< * * ctx.close() */ __pyx_t_1 = ((PyObject *)__pyx_v_ctx->stream); __Pyx_INCREF(__pyx_t_1); __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":798 * UVStream stream = ctx.stream * * ctx.close() # <<<<<<<<<<<<<< * * if stream._closed: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":800 * ctx.close() * * if stream._closed: # <<<<<<<<<<<<<< * # The stream was closed, there is nothing to do. * # Even if there is an error, like EPIPE, there */ __pyx_t_2 = (__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._closed != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":804 * # Even if there is an error, like EPIPE, there * # is no reason to report it. * return # <<<<<<<<<<<<<< * * if status < 0: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":800 * ctx.close() * * if stream._closed: # <<<<<<<<<<<<<< * # The stream was closed, there is nothing to do. * # Even if there is an error, like EPIPE, there */ } /* "uvloop/handles/stream.pyx":806 * return * * if status < 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_errors_total += 1 */ __pyx_t_2 = ((__pyx_v_status < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":807 * * if status < 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_errors_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":808 * if status < 0: * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_errors_total += 1 # <<<<<<<<<<<<<< * * exc = convert_error(status) */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_3->_debug_stream_write_errors_total = (__pyx_t_3->_debug_stream_write_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":807 * * if status < 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":810 * stream._loop._debug_stream_write_errors_total += 1 * * exc = convert_error(status) # <<<<<<<<<<<<<< * stream._fatal_error(exc, False, * "error status in uv_stream_t.write callback") */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":811 * * exc = convert_error(status) * stream._fatal_error(exc, False, # <<<<<<<<<<<<<< * "error status in uv_stream_t.write callback") * return */ __pyx_t_4.__pyx_n = 1; __pyx_t_4.reason = __pyx_kp_u_error_status_in_uv_stream_t_writ; __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":813 * stream._fatal_error(exc, False, * "error status in uv_stream_t.write callback") * return # <<<<<<<<<<<<<< * * try: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":806 * return * * if status < 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_errors_total += 1 */ } /* "uvloop/handles/stream.pyx":815 * return * * try: # <<<<<<<<<<<<<< * stream._on_write() * except BaseException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/handles/stream.pyx":816 * * try: * stream._on_write() # <<<<<<<<<<<<<< * except BaseException as exc: * if UVLOOP_DEBUG: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__on_write(__pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 816, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/stream.pyx":815 * return * * try: # <<<<<<<<<<<<<< * stream._on_write() * except BaseException as exc: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":817 * try: * stream._on_write() * except BaseException as exc: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_cb_errors_total += 1 */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.__uv_stream_on_write_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(15, 817, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_v_exc = __pyx_t_9; /*try:*/ { /* "uvloop/handles/stream.pyx":818 * stream._on_write() * except BaseException as exc: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_cb_errors_total += 1 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/stream.pyx":819 * except BaseException as exc: * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_cb_errors_total += 1 # <<<<<<<<<<<<<< * * stream._error(exc, False) */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop)); __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base.__pyx_base._loop; __pyx_t_3->_debug_stream_write_cb_errors_total = (__pyx_t_3->_debug_stream_write_cb_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/handles/stream.pyx":818 * stream._on_write() * except BaseException as exc: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_write_cb_errors_total += 1 * */ } /* "uvloop/handles/stream.pyx":821 * stream._loop._debug_stream_write_cb_errors_total += 1 * * stream._error(exc, False) # <<<<<<<<<<<<<< * * */ __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_11)) __PYX_ERR(15, 821, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } /* "uvloop/handles/stream.pyx":817 * try: * stream._on_write() * except BaseException as exc: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_write_cb_errors_total += 1 */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L8_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; /* "uvloop/handles/stream.pyx":815 * return * * try: # <<<<<<<<<<<<<< * stream._on_write() * except BaseException as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L13_try_end:; } /* "uvloop/handles/stream.pyx":793 * * * cdef inline void __uv_stream_on_write_impl(uv.uv_write_t* req, int status): # <<<<<<<<<<<<<< * cdef: * _StreamWriteContext ctx = <_StreamWriteContext> req.data */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_write_impl", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XDECREF((PyObject *)__pyx_v_stream); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/stream.pyx":824 * * * cdef void __uv_stream_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf) with gil: */ static void __pyx_f_6uvloop_4loop___uv_stream_on_read(uv_stream_t *__pyx_v_stream, Py_ssize_t __pyx_v_nread, uv_buf_t const *__pyx_v_buf) { CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_stream_on_read", 0); /* "uvloop/handles/stream.pyx":829 * * if __ensure_handle_data(stream, * "UVStream read callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_stream), ((char const *)"UVStream read callback")) == 0) != 0); /* "uvloop/handles/stream.pyx":828 * const uv.uv_buf_t* buf) with gil: * * if __ensure_handle_data(stream, # <<<<<<<<<<<<<< * "UVStream read callback") == 0: * return */ if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":830 * if __ensure_handle_data(stream, * "UVStream read callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":828 * const uv.uv_buf_t* buf) with gil: * * if __ensure_handle_data(stream, # <<<<<<<<<<<<<< * "UVStream read callback") == 0: * return */ } /* "uvloop/handles/stream.pyx":833 * * cdef: * Loop loop = stream.loop.data # <<<<<<<<<<<<<< * * # Don't need try-finally, __uv_stream_on_read_impl is void */ __pyx_t_2 = ((PyObject *)__pyx_v_stream->loop->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":836 * * # Don't need try-finally, __uv_stream_on_read_impl is void * __uv_stream_on_read_impl(stream, nread, buf) # <<<<<<<<<<<<<< * * */ __pyx_f_6uvloop_4loop___uv_stream_on_read_impl(__pyx_v_stream, __pyx_v_nread, __pyx_v_buf); /* "uvloop/handles/stream.pyx":824 * * * cdef void __uv_stream_on_read(uv.uv_stream_t* stream, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf) with gil: */ /* function exit code */ __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/stream.pyx":839 * * * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ static void __pyx_f_6uvloop_4loop___uv_stream_on_write(uv_write_t *__pyx_v_req, int __pyx_v_status) { CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_stream_on_write", 0); /* "uvloop/handles/stream.pyx":841 * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if req.data is NULL: * aio_logger.error( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":842 * * if UVLOOP_DEBUG: * if req.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'UVStream.write callback called with NULL req.data, status=%r', */ __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/stream.pyx":843 * if UVLOOP_DEBUG: * if req.data is NULL: * aio_logger.error( # <<<<<<<<<<<<<< * 'UVStream.write callback called with NULL req.data, status=%r', * status) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/stream.pyx":845 * aio_logger.error( * 'UVStream.write callback called with NULL req.data, status=%r', * status) # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 843, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_UVStream_write_callback_called_w); __Pyx_GIVEREF(__pyx_kp_u_UVStream_write_callback_called_w); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_write_callback_called_w); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":846 * 'UVStream.write callback called with NULL req.data, status=%r', * status) * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/stream.pyx":842 * * if UVLOOP_DEBUG: * if req.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'UVStream.write callback called with NULL req.data, status=%r', */ } /* "uvloop/handles/stream.pyx":841 * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if req.data is NULL: * aio_logger.error( */ } /* "uvloop/handles/stream.pyx":849 * * cdef: * Loop loop = (<_StreamWriteContext> req.data).stream._loop # <<<<<<<<<<<<<< * * # Don't need try-finally, __uv_stream_on_write_impl is void */ if (!(likely(((((PyObject *)((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_req->data)->stream->__pyx_base.__pyx_base.__pyx_base._loop)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_req->data)->stream->__pyx_base.__pyx_base.__pyx_base._loop), __pyx_ptype_6uvloop_4loop_Loop))))) __PYX_ERR(15, 849, __pyx_L1_error) __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVStream *)((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)__pyx_v_req->data)->stream->__pyx_base.__pyx_base.__pyx_base._loop)); __Pyx_INCREF(__pyx_t_2); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/stream.pyx":852 * * # Don't need try-finally, __uv_stream_on_write_impl is void * __uv_stream_on_write_impl(req, status) # <<<<<<<<<<<<<< */ __pyx_f_6uvloop_4loop___uv_stream_on_write_impl(__pyx_v_req, __pyx_v_status); /* "uvloop/handles/stream.pyx":839 * * * cdef void __uv_stream_on_write(uv.uv_write_t* req, int status) with gil: # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("uvloop.loop.__uv_stream_on_write", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/streamserver.pyx":4 * cdef class UVStreamServer(UVSocketHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * self.opened = 0 * self._server = None */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_14UVStreamServer___cinit__(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/streamserver.pyx":5 * * def __cinit__(self): * self.opened = 0 # <<<<<<<<<<<<<< * self._server = None * self.ssl = None */ __pyx_v_self->opened = 0; /* "uvloop/handles/streamserver.pyx":6 * def __cinit__(self): * self.opened = 0 * self._server = None # <<<<<<<<<<<<<< * self.ssl = None * self.protocol_factory = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); /* "uvloop/handles/streamserver.pyx":7 * self.opened = 0 * self._server = None * self.ssl = None # <<<<<<<<<<<<<< * self.protocol_factory = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ssl); __Pyx_DECREF(__pyx_v_self->ssl); __pyx_v_self->ssl = Py_None; /* "uvloop/handles/streamserver.pyx":8 * self._server = None * self.ssl = None * self.protocol_factory = None # <<<<<<<<<<<<<< * * cdef inline _init(self, Loop loop, object protocol_factory, */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->protocol_factory); __Pyx_DECREF(__pyx_v_self->protocol_factory); __pyx_v_self->protocol_factory = Py_None; /* "uvloop/handles/streamserver.pyx":4 * cdef class UVStreamServer(UVSocketHandle): * * def __cinit__(self): # <<<<<<<<<<<<<< * self.opened = 0 * self._server = None */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":10 * self.protocol_factory = None * * cdef inline _init(self, Loop loop, object protocol_factory, # <<<<<<<<<<<<<< * Server server, object ssl): * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__init(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/streamserver.pyx":13 * Server server, object ssl): * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError( * 'ssl is expected to be None or an instance of ' */ __pyx_t_2 = (__pyx_v_ssl != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __pyx_v_6uvloop_4loop_ssl_SSLContext; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = PyObject_IsInstance(__pyx_v_ssl, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(16, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/streamserver.pyx":16 * raise TypeError( * 'ssl is expected to be None or an instance of ' * 'ssl.SSLContext, got {!r}'.format(ssl)) # <<<<<<<<<<<<<< * self.ssl = ssl * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_ssl_is_expected_to_be_None_or_an, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_ssl); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ssl}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_ssl}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_ssl); __Pyx_GIVEREF(__pyx_v_ssl); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_ssl); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/streamserver.pyx":14 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError( # <<<<<<<<<<<<<< * 'ssl is expected to be None or an instance of ' * 'ssl.SSLContext, got {!r}'.format(ssl)) */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(16, 14, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":13 * Server server, object ssl): * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): # <<<<<<<<<<<<<< * raise TypeError( * 'ssl is expected to be None or an instance of ' */ } /* "uvloop/handles/streamserver.pyx":17 * 'ssl is expected to be None or an instance of ' * 'ssl.SSLContext, got {!r}'.format(ssl)) * self.ssl = ssl # <<<<<<<<<<<<<< * * self._start_init(loop) */ __Pyx_INCREF(__pyx_v_ssl); __Pyx_GIVEREF(__pyx_v_ssl); __Pyx_GOTREF(__pyx_v_self->ssl); __Pyx_DECREF(__pyx_v_self->ssl); __pyx_v_self->ssl = __pyx_v_ssl; /* "uvloop/handles/streamserver.pyx":19 * self.ssl = ssl * * self._start_init(loop) # <<<<<<<<<<<<<< * self.protocol_factory = protocol_factory * self._server = server */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/streamserver.pyx":20 * * self._start_init(loop) * self.protocol_factory = protocol_factory # <<<<<<<<<<<<<< * self._server = server * */ __Pyx_INCREF(__pyx_v_protocol_factory); __Pyx_GIVEREF(__pyx_v_protocol_factory); __Pyx_GOTREF(__pyx_v_self->protocol_factory); __Pyx_DECREF(__pyx_v_self->protocol_factory); __pyx_v_self->protocol_factory = __pyx_v_protocol_factory; /* "uvloop/handles/streamserver.pyx":21 * self._start_init(loop) * self.protocol_factory = protocol_factory * self._server = server # <<<<<<<<<<<<<< * * cdef inline listen(self, backlog): */ __Pyx_INCREF(((PyObject *)__pyx_v_server)); __Pyx_GIVEREF(((PyObject *)__pyx_v_server)); __Pyx_GOTREF(__pyx_v_self->_server); __Pyx_DECREF(((PyObject *)__pyx_v_self->_server)); __pyx_v_self->_server = __pyx_v_server; /* "uvloop/handles/streamserver.pyx":10 * self.protocol_factory = None * * cdef inline _init(self, Loop loop, object protocol_factory, # <<<<<<<<<<<<<< * Server server, object ssl): * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVStreamServer._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":23 * self._server = server * * cdef inline listen(self, backlog): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_backlog) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("listen", 0); /* "uvloop/handles/streamserver.pyx":25 * cdef inline listen(self, backlog): * cdef int err * self._ensure_alive() # <<<<<<<<<<<<<< * * if not isinstance(backlog, int): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":27 * self._ensure_alive() * * if not isinstance(backlog, int): # <<<<<<<<<<<<<< * # Don't allow floats * raise TypeError('integer argument expected, got {}'.format( */ __pyx_t_2 = PyInt_Check(__pyx_v_backlog); __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_3) { /* "uvloop/handles/streamserver.pyx":29 * if not isinstance(backlog, int): * # Don't allow floats * raise TypeError('integer argument expected, got {}'.format( # <<<<<<<<<<<<<< * type(backlog).__name__)) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_integer_argument_expected_got, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/handles/streamserver.pyx":30 * # Don't allow floats * raise TypeError('integer argument expected, got {}'.format( * type(backlog).__name__)) # <<<<<<<<<<<<<< * * if self.protocol_factory is None: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_backlog)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/streamserver.pyx":29 * if not isinstance(backlog, int): * # Don't allow floats * raise TypeError('integer argument expected, got {}'.format( # <<<<<<<<<<<<<< * type(backlog).__name__)) * */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(16, 29, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":27 * self._ensure_alive() * * if not isinstance(backlog, int): # <<<<<<<<<<<<<< * # Don't allow floats * raise TypeError('integer argument expected, got {}'.format( */ } /* "uvloop/handles/streamserver.pyx":32 * type(backlog).__name__)) * * if self.protocol_factory is None: # <<<<<<<<<<<<<< * raise RuntimeError('unable to listen(); no protocol_factory') * */ __pyx_t_3 = (__pyx_v_self->protocol_factory == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { /* "uvloop/handles/streamserver.pyx":33 * * if self.protocol_factory is None: * raise RuntimeError('unable to listen(); no protocol_factory') # <<<<<<<<<<<<<< * * if self.opened != 1: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(16, 33, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":32 * type(backlog).__name__)) * * if self.protocol_factory is None: # <<<<<<<<<<<<<< * raise RuntimeError('unable to listen(); no protocol_factory') * */ } /* "uvloop/handles/streamserver.pyx":35 * raise RuntimeError('unable to listen(); no protocol_factory') * * if self.opened != 1: # <<<<<<<<<<<<<< * raise RuntimeError('unopened TCPServer') * */ __pyx_t_2 = ((__pyx_v_self->opened != 1) != 0); if (__pyx_t_2) { /* "uvloop/handles/streamserver.pyx":36 * * if self.opened != 1: * raise RuntimeError('unopened TCPServer') # <<<<<<<<<<<<<< * * err = uv.uv_listen( self._handle, */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(16, 36, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":35 * raise RuntimeError('unable to listen(); no protocol_factory') * * if self.opened != 1: # <<<<<<<<<<<<<< * raise RuntimeError('unopened TCPServer') * */ } /* "uvloop/handles/streamserver.pyx":39 * * err = uv.uv_listen( self._handle, * backlog, # <<<<<<<<<<<<<< * __uv_streamserver_on_listen) * if err < 0: */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_backlog); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 39, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":38 * raise RuntimeError('unopened TCPServer') * * err = uv.uv_listen( self._handle, # <<<<<<<<<<<<<< * backlog, * __uv_streamserver_on_listen) */ __pyx_v_err = uv_listen(((uv_stream_t *)__pyx_v_self->__pyx_base.__pyx_base._handle), __pyx_t_8, __pyx_f_6uvloop_4loop___uv_streamserver_on_listen); /* "uvloop/handles/streamserver.pyx":41 * backlog, * __uv_streamserver_on_listen) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/streamserver.pyx":42 * __uv_streamserver_on_listen) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":43 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":44 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * cdef inline _on_listen(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/streamserver.pyx":41 * backlog, * __uv_streamserver_on_listen) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/streamserver.pyx":23 * self._server = server * * cdef inline listen(self, backlog): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UVStreamServer.listen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":46 * return * * cdef inline _on_listen(self): # <<<<<<<<<<<<<< * cdef UVStream slient * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) { PyObject *__pyx_v_protocol = NULL; struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_client = NULL; PyObject *__pyx_v_waiter = NULL; PyObject *__pyx_v_ssl_protocol = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_on_listen", 0); /* "uvloop/handles/streamserver.pyx":49 * cdef UVStream slient * * protocol = self.protocol_factory() # <<<<<<<<<<<<<< * * if self.ssl is None: */ __Pyx_INCREF(__pyx_v_self->protocol_factory); __pyx_t_2 = __pyx_v_self->protocol_factory; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 49, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_protocol = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":51 * protocol = self.protocol_factory() * * if self.ssl is None: # <<<<<<<<<<<<<< * client = self._make_new_transport(protocol, None) * */ __pyx_t_4 = (__pyx_v_self->ssl == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/handles/streamserver.pyx":52 * * if self.ssl is None: * client = self._make_new_transport(protocol, None) # <<<<<<<<<<<<<< * * else: */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_make_new_transport(__pyx_v_self, __pyx_v_protocol, Py_None)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_client = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":51 * protocol = self.protocol_factory() * * if self.ssl is None: # <<<<<<<<<<<<<< * client = self._make_new_transport(protocol, None) * */ goto __pyx_L3; } /* "uvloop/handles/streamserver.pyx":55 * * else: * waiter = self._loop._new_future() # <<<<<<<<<<<<<< * * ssl_protocol = aio_SSLProtocol( */ /*else*/ { __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_waiter = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":61 * waiter, * True, # server_side * None) # server_hostname # <<<<<<<<<<<<<< * * client = self._make_new_transport(ssl_protocol, None) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_SSLProtocol); __pyx_t_2 = __pyx_v_6uvloop_4loop_aio_SSLProtocol; __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_v_protocol, __pyx_v_self->ssl, __pyx_v_waiter, Py_True, Py_None}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_v_protocol, __pyx_v_self->ssl, __pyx_v_waiter, Py_True, Py_None}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop)); __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_protocol); __Pyx_INCREF(__pyx_v_self->ssl); __Pyx_GIVEREF(__pyx_v_self->ssl); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_self->ssl); __Pyx_INCREF(__pyx_v_waiter); __Pyx_GIVEREF(__pyx_v_waiter); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_waiter); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_6, Py_True); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_6, Py_None); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ssl_protocol = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":63 * None) # server_hostname * * client = self._make_new_transport(ssl_protocol, None) # <<<<<<<<<<<<<< * * waiter.add_done_callback( */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_make_new_transport(__pyx_v_self, __pyx_v_ssl_protocol, Py_None)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_client = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":65 * client = self._make_new_transport(ssl_protocol, None) * * waiter.add_done_callback( # <<<<<<<<<<<<<< * ft_partial(self.__on_ssl_connected, client)) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/streamserver.pyx":66 * * waiter.add_done_callback( * ft_partial(self.__on_ssl_connected, client)) # <<<<<<<<<<<<<< * * client._accept(self) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_ssl_connected); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_ft_partial); __pyx_t_8 = __pyx_v_6uvloop_4loop_ft_partial; __pyx_t_9 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, ((PyObject *)__pyx_v_client)}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, ((PyObject *)__pyx_v_client)}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_client)); __Pyx_GIVEREF(((PyObject *)__pyx_v_client)); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, ((PyObject *)__pyx_v_client)); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "uvloop/handles/streamserver.pyx":68 * ft_partial(self.__on_ssl_connected, client)) * * client._accept(self) # <<<<<<<<<<<<<< * * cdef _fatal_error(self, exc, throw, reason=None): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_8UVStream__accept(__pyx_v_client, ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":46 * return * * cdef inline _on_listen(self): # <<<<<<<<<<<<<< * cdef UVStream slient * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.UVStreamServer._on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_protocol); __Pyx_XDECREF((PyObject *)__pyx_v_client); __Pyx_XDECREF(__pyx_v_waiter); __Pyx_XDECREF(__pyx_v_ssl_protocol); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":70 * client._accept(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Overload UVHandle._fatal_error * */ static PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_exc, PyObject *__pyx_v_throw, struct __pyx_opt_args_6uvloop_4loop_14UVStreamServer__fatal_error *__pyx_optional_args) { PyObject *__pyx_v_reason = ((PyObject *)Py_None); PyObject *__pyx_v_msg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannySetupContext("_fatal_error", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_reason = __pyx_optional_args->reason; } } /* "uvloop/handles/streamserver.pyx":73 * # Overload UVHandle._fatal_error * * self._close() # <<<<<<<<<<<<<< * * if not isinstance(exc, (BrokenPipeError, */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":75 * self._close() * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __Pyx_INCREF(__pyx_builtin_BrokenPipeError); __pyx_t_1 = __pyx_builtin_BrokenPipeError; /* "uvloop/handles/streamserver.pyx":76 * * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, # <<<<<<<<<<<<<< * ConnectionAbortedError)): * */ __Pyx_INCREF(__pyx_builtin_ConnectionResetError); __pyx_t_2 = __pyx_builtin_ConnectionResetError; /* "uvloop/handles/streamserver.pyx":77 * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, * ConnectionAbortedError)): # <<<<<<<<<<<<<< * * if throw or self._loop is None: */ __Pyx_INCREF(__pyx_builtin_ConnectionAbortedError); __pyx_t_3 = __pyx_builtin_ConnectionAbortedError; /* "uvloop/handles/streamserver.pyx":75 * self._close() * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __pyx_t_5 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_1); __pyx_t_6 = (__pyx_t_5 != 0); if (!__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L4_bool_binop_done; } /* "uvloop/handles/streamserver.pyx":76 * * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, # <<<<<<<<<<<<<< * ConnectionAbortedError)): * */ __pyx_t_6 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_2); __pyx_t_5 = (__pyx_t_6 != 0); if (!__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } /* "uvloop/handles/streamserver.pyx":77 * if not isinstance(exc, (BrokenPipeError, * ConnectionResetError, * ConnectionAbortedError)): # <<<<<<<<<<<<<< * * if throw or self._loop is None: */ __pyx_t_5 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_3); __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_6; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":75 * self._close() * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ __pyx_t_6 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_6) { /* "uvloop/handles/streamserver.pyx":79 * ConnectionAbortedError)): * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_throw); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(16, 79, __pyx_L1_error) if (!__pyx_t_4) { } else { __pyx_t_6 = __pyx_t_4; goto __pyx_L8_bool_binop_done; } __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop) == Py_None); __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_6 = __pyx_t_5; __pyx_L8_bool_binop_done:; if (__pyx_t_6) { /* "uvloop/handles/streamserver.pyx":80 * * if throw or self._loop is None: * raise exc # <<<<<<<<<<<<<< * * msg = 'Fatal error on server {}'.format( */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(16, 80, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":79 * ConnectionAbortedError)): * * if throw or self._loop is None: # <<<<<<<<<<<<<< * raise exc * */ } /* "uvloop/handles/streamserver.pyx":82 * raise exc * * msg = 'Fatal error on server {}'.format( # <<<<<<<<<<<<<< * self.__class__.__name__) * if reason is not None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Fatal_error_on_server, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/streamserver.pyx":83 * * msg = 'Fatal error on server {}'.format( * self.__class__.__name__) # <<<<<<<<<<<<<< * if reason is not None: * msg = '{} ({})'.format(msg, reason) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":84 * msg = 'Fatal error on server {}'.format( * self.__class__.__name__) * if reason is not None: # <<<<<<<<<<<<<< * msg = '{} ({})'.format(msg, reason) * */ __pyx_t_6 = (__pyx_v_reason != Py_None); __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { /* "uvloop/handles/streamserver.pyx":85 * self.__class__.__name__) * if reason is not None: * msg = '{} ({})'.format(msg, reason) # <<<<<<<<<<<<<< * * self._loop.call_exception_handler({ */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_v_reason}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_msg, __pyx_v_reason}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_v_msg); __Pyx_INCREF(__pyx_v_reason); __Pyx_GIVEREF(__pyx_v_reason); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_reason); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":84 * msg = 'Fatal error on server {}'.format( * self.__class__.__name__) * if reason is not None: # <<<<<<<<<<<<<< * msg = '{} ({})'.format(msg, reason) * */ } /* "uvloop/handles/streamserver.pyx":87 * msg = '{} ({})'.format(msg, reason) * * self._loop.call_exception_handler({ # <<<<<<<<<<<<<< * 'message': msg, * 'exception': exc, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_exception_handler); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/streamserver.pyx":88 * * self._loop.call_exception_handler({ * 'message': msg, # <<<<<<<<<<<<<< * 'exception': exc, * }) */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_message, __pyx_v_msg) < 0) __PYX_ERR(16, 88, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":89 * self._loop.call_exception_handler({ * 'message': msg, * 'exception': exc, # <<<<<<<<<<<<<< * }) * */ if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_exception, __pyx_v_exc) < 0) __PYX_ERR(16, 88, __pyx_L1_error) __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":75 * self._close() * * if not isinstance(exc, (BrokenPipeError, # <<<<<<<<<<<<<< * ConnectionResetError, * ConnectionAbortedError)): */ } /* "uvloop/handles/streamserver.pyx":70 * client._accept(self) * * cdef _fatal_error(self, exc, throw, reason=None): # <<<<<<<<<<<<<< * # Overload UVHandle._fatal_error * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UVStreamServer._fatal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":92 * }) * * cdef inline _mark_as_open(self): # <<<<<<<<<<<<<< * self.opened = 1 * */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open(struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_mark_as_open", 0); /* "uvloop/handles/streamserver.pyx":93 * * cdef inline _mark_as_open(self): * self.opened = 1 # <<<<<<<<<<<<<< * * cdef UVStream _make_new_transport(self, object protocol, object waiter): */ __pyx_v_self->opened = 1; /* "uvloop/handles/streamserver.pyx":92 * }) * * cdef inline _mark_as_open(self): # <<<<<<<<<<<<<< * self.opened = 1 * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":95 * self.opened = 1 * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * raise NotImplementedError * */ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol, CYTHON_UNUSED PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_new_transport", 0); /* "uvloop/handles/streamserver.pyx":96 * * cdef UVStream _make_new_transport(self, object protocol, object waiter): * raise NotImplementedError # <<<<<<<<<<<<<< * * def __on_ssl_connected(self, transport, fut): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(16, 96, __pyx_L1_error) /* "uvloop/handles/streamserver.pyx":95 * self.opened = 1 * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.UVStreamServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":98 * raise NotImplementedError * * def __on_ssl_connected(self, transport, fut): # <<<<<<<<<<<<<< * exc = fut.exception() * if exc is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected[] = "UVStreamServer.__on_ssl_connected(self, transport, fut)"; static PyObject *__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_transport = 0; PyObject *__pyx_v_fut = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__on_ssl_connected (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_transport,&__pyx_n_s_fut,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fut)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__on_ssl_connected", 1, 2, 2, 1); __PYX_ERR(16, 98, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__on_ssl_connected") < 0)) __PYX_ERR(16, 98, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_transport = values[0]; __pyx_v_fut = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__on_ssl_connected", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 98, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__on_ssl_connected", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self), __pyx_v_transport, __pyx_v_fut); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_self, PyObject *__pyx_v_transport, PyObject *__pyx_v_fut) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__on_ssl_connected", 0); /* "uvloop/handles/streamserver.pyx":99 * * def __on_ssl_connected(self, transport, fut): * exc = fut.exception() # <<<<<<<<<<<<<< * if exc is not None: * transport._force_close(exc) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 99, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":100 * def __on_ssl_connected(self, transport, fut): * exc = fut.exception() * if exc is not None: # <<<<<<<<<<<<<< * transport._force_close(exc) * */ __pyx_t_4 = (__pyx_v_exc != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/handles/streamserver.pyx":101 * exc = fut.exception() * if exc is not None: * transport._force_close(exc) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_transport, __pyx_n_s_force_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exc); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/streamserver.pyx":100 * def __on_ssl_connected(self, transport, fut): * exc = fut.exception() * if exc is not None: # <<<<<<<<<<<<<< * transport._force_close(exc) * */ } /* "uvloop/handles/streamserver.pyx":98 * raise NotImplementedError * * def __on_ssl_connected(self, transport, fut): # <<<<<<<<<<<<<< * exc = fut.exception() * if exc is not None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVStreamServer.__on_ssl_connected", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/streamserver.pyx":104 * * * cdef void __uv_streamserver_on_listen(uv.uv_stream_t* handle, # <<<<<<<<<<<<<< * int status) with gil: * */ static void __pyx_f_6uvloop_4loop___uv_streamserver_on_listen(uv_stream_t *__pyx_v_handle, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_stream = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_t_3 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; char const *__pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_streamserver_on_listen", 0); /* "uvloop/handles/streamserver.pyx":110 * * if __ensure_handle_data(handle, * "UVStream listen callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVStream listen callback")) == 0) != 0); /* "uvloop/handles/streamserver.pyx":109 * # callback for uv_listen * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UVStream listen callback") == 0: * return */ if (__pyx_t_1) { /* "uvloop/handles/streamserver.pyx":111 * if __ensure_handle_data(handle, * "UVStream listen callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/streamserver.pyx":109 * # callback for uv_listen * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UVStream listen callback") == 0: * return */ } /* "uvloop/handles/streamserver.pyx":114 * * cdef: * UVStreamServer stream = handle.data # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_stream = ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/streamserver.pyx":116 * UVStreamServer stream = handle.data * * if status < 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_listen_errors_total += 1 */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/streamserver.pyx":117 * * if status < 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_listen_errors_total += 1 * */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/streamserver.pyx":118 * if status < 0: * if UVLOOP_DEBUG: * stream._loop._debug_stream_listen_errors_total += 1 # <<<<<<<<<<<<<< * * exc = convert_error(status) */ __Pyx_INCREF(((PyObject *)__pyx_v_stream->__pyx_base.__pyx_base._loop)); __pyx_t_3 = __pyx_v_stream->__pyx_base.__pyx_base._loop; __pyx_t_3->_debug_stream_listen_errors_total = (__pyx_t_3->_debug_stream_listen_errors_total + 1); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/handles/streamserver.pyx":117 * * if status < 0: * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * stream._loop._debug_stream_listen_errors_total += 1 * */ } /* "uvloop/handles/streamserver.pyx":120 * stream._loop._debug_stream_listen_errors_total += 1 * * exc = convert_error(status) # <<<<<<<<<<<<<< * stream._fatal_error(exc, False, * "error status in uv_stream_t.listen callback") */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/streamserver.pyx":121 * * exc = convert_error(status) * stream._fatal_error(exc, False, # <<<<<<<<<<<<<< * "error status in uv_stream_t.listen callback") * return */ __pyx_t_4.__pyx_n = 1; __pyx_t_4.reason = __pyx_kp_u_error_status_in_uv_stream_t_list; __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/streamserver.pyx":123 * stream._fatal_error(exc, False, * "error status in uv_stream_t.listen callback") * return # <<<<<<<<<<<<<< * * try: */ goto __pyx_L0; /* "uvloop/handles/streamserver.pyx":116 * UVStreamServer stream = handle.data * * if status < 0: # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * stream._loop._debug_stream_listen_errors_total += 1 */ } /* "uvloop/handles/streamserver.pyx":125 * return * * try: # <<<<<<<<<<<<<< * stream._on_listen() * except BaseException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "uvloop/handles/streamserver.pyx":126 * * try: * stream._on_listen() # <<<<<<<<<<<<<< * except BaseException as exc: * stream._error(exc, False) */ __pyx_t_2 = __pyx_f_6uvloop_4loop_14UVStreamServer__on_listen(__pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 126, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/streamserver.pyx":125 * return * * try: # <<<<<<<<<<<<<< * stream._on_listen() * except BaseException as exc: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/handles/streamserver.pyx":127 * try: * stream._on_listen() * except BaseException as exc: # <<<<<<<<<<<<<< * stream._error(exc, False) */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_8) { __Pyx_AddTraceback("uvloop.loop.__uv_streamserver_on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(16, 127, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_v_exc = __pyx_t_9; /*try:*/ { /* "uvloop/handles/streamserver.pyx":128 * stream._on_listen() * except BaseException as exc: * stream._error(exc, False) # <<<<<<<<<<<<<< */ __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)__pyx_v_stream->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_stream), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_11)) __PYX_ERR(16, 128, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } /* "uvloop/handles/streamserver.pyx":127 * try: * stream._on_listen() * except BaseException as exc: # <<<<<<<<<<<<<< * stream._error(exc, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L8_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; /* "uvloop/handles/streamserver.pyx":125 * return * * try: # <<<<<<<<<<<<<< * stream._on_listen() * except BaseException as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L13_try_end:; } /* "uvloop/handles/streamserver.pyx":104 * * * cdef void __uv_streamserver_on_listen(uv.uv_stream_t* handle, # <<<<<<<<<<<<<< * int status) with gil: * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(((PyObject *)__pyx_t_3)); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_WriteUnraisable("uvloop.loop.__uv_streamserver_on_listen", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_stream); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/tcp.pyx":1 * cdef __tcp_init_uv_handle(UVStream handle, Loop loop, unsigned int flags): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop___tcp_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_flags) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__tcp_init_uv_handle", 0); /* "uvloop/handles/tcp.pyx":4 * cdef int err * * handle._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) * if handle._handle is NULL: */ __pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_tcp_t)))); /* "uvloop/handles/tcp.pyx":6 * handle._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) * if handle._handle is NULL: # <<<<<<<<<<<<<< * handle._abort_init() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":7 * PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) * if handle._handle is NULL: * handle._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":8 * if handle._handle is NULL: * handle._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_tcp_init_ex(handle._loop.uvloop, */ PyErr_NoMemory(); __PYX_ERR(4, 8, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":6 * handle._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_tcp_t)) * if handle._handle is NULL: # <<<<<<<<<<<<<< * handle._abort_init() * raise MemoryError() */ } /* "uvloop/handles/tcp.pyx":10 * raise MemoryError() * * err = uv.uv_tcp_init_ex(handle._loop.uvloop, # <<<<<<<<<<<<<< * handle._handle, * flags) */ __pyx_v_err = uv_tcp_init_ex(__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._loop->uvloop, ((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_flags); /* "uvloop/handles/tcp.pyx":13 * handle._handle, * flags) * if err < 0: # <<<<<<<<<<<<<< * handle._abort_init() * raise convert_error(err) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":14 * flags) * if err < 0: * handle._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":15 * if err < 0: * handle._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * handle._finish_init() */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 15, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":13 * handle._handle, * flags) * if err < 0: # <<<<<<<<<<<<<< * handle._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/tcp.pyx":17 * raise convert_error(err) * * handle._finish_init() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":1 * cdef __tcp_init_uv_handle(UVStream handle, Loop loop, unsigned int flags): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__tcp_init_uv_handle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":20 * * * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_bind(handle._handle, */ static PyObject *__pyx_f_6uvloop_4loop___tcp_bind(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, struct sockaddr *__pyx_v_addr, unsigned int __pyx_v_flags) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__tcp_bind", 0); /* "uvloop/handles/tcp.pyx":22 * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): * cdef int err * err = uv.uv_tcp_bind(handle._handle, # <<<<<<<<<<<<<< * addr, flags) * if err < 0: */ __pyx_v_err = uv_tcp_bind(((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_v_flags); /* "uvloop/handles/tcp.pyx":24 * err = uv.uv_tcp_bind(handle._handle, * addr, flags) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":25 * addr, flags) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":26 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(4, 26, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":24 * err = uv.uv_tcp_bind(handle._handle, * addr, flags) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/tcp.pyx":20 * * * cdef __tcp_bind(UVStream handle, system.sockaddr* addr, unsigned int flags): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_bind(handle._handle, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__tcp_bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":29 * * * cdef __tcp_open(UVStream handle, int sockfd): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_open(handle._handle, */ static PyObject *__pyx_f_6uvloop_4loop___tcp_open(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, int __pyx_v_sockfd) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__tcp_open", 0); /* "uvloop/handles/tcp.pyx":31 * cdef __tcp_open(UVStream handle, int sockfd): * cdef int err * err = uv.uv_tcp_open(handle._handle, # <<<<<<<<<<<<<< * sockfd) * if err < 0: */ __pyx_v_err = uv_tcp_open(((uv_tcp_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_os_sock_t)__pyx_v_sockfd)); /* "uvloop/handles/tcp.pyx":33 * err = uv.uv_tcp_open(handle._handle, * sockfd) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":34 * sockfd) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":35 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(4, 35, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":33 * err = uv.uv_tcp_open(handle._handle, * sockfd) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/tcp.pyx":29 * * * cdef __tcp_open(UVStream handle, int sockfd): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_open(handle._handle, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__tcp_open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":38 * * * cdef __tcp_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<< * cdef: * int buf_len = sizeof(system.sockaddr_storage) */ static PyObject *__pyx_f_6uvloop_4loop___tcp_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_handle) { int __pyx_v_buf_len; int __pyx_v_fileno; int __pyx_v_err; struct sockaddr_storage __pyx_v_buf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__tcp_get_socket", 0); /* "uvloop/handles/tcp.pyx":40 * cdef __tcp_get_socket(UVSocketHandle handle): * cdef: * int buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<< * int fileno * int err */ __pyx_v_buf_len = (sizeof(struct sockaddr_storage)); /* "uvloop/handles/tcp.pyx":45 * system.sockaddr_storage buf * * fileno = handle._fileno() # <<<<<<<<<<<<<< * * err = uv.uv_tcp_getsockname(handle._handle, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fileno = __pyx_t_2; /* "uvloop/handles/tcp.pyx":47 * fileno = handle._fileno() * * err = uv.uv_tcp_getsockname(handle._handle, # <<<<<<<<<<<<<< * &buf, * &buf_len) */ __pyx_v_err = uv_tcp_getsockname(((uv_tcp_t *)__pyx_v_handle->__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_buf)), (&__pyx_v_buf_len)); /* "uvloop/handles/tcp.pyx":50 * &buf, * &buf_len) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_3 = ((__pyx_v_err < 0) != 0); if (__pyx_t_3) { /* "uvloop/handles/tcp.pyx":51 * &buf_len) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * return socket_socket(buf.ss_family, uv.SOCK_STREAM, 0, fileno) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(4, 51, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":50 * &buf, * &buf_len) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/handles/tcp.pyx":53 * raise convert_error(err) * * return socket_socket(buf.ss_family, uv.SOCK_STREAM, 0, fileno) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_buf.ss_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket); __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_8 = NULL; __pyx_t_2 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_2 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_int_0, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_4, __pyx_t_5, __pyx_int_0, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_2, 4+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_2, __pyx_int_0); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_2, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":38 * * * cdef __tcp_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<< * cdef: * int buf_len = sizeof(system.sockaddr_storage) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.__tcp_get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":60 * * @staticmethod * cdef TCPServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<< * object ssl, unsigned int flags): * */ static struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_f_6uvloop_4loop_9TCPServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl, unsigned int __pyx_v_flags) { struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/tcp.pyx":64 * * cdef TCPServer handle * handle = TCPServer.__new__(TCPServer) # <<<<<<<<<<<<<< * handle._init(loop, protocol_factory, server, ssl) * __tcp_init_uv_handle(handle, loop, flags) */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_TCPServer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_TCPServer), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_TCPServer)))) __PYX_ERR(4, 64, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":65 * cdef TCPServer handle * handle = TCPServer.__new__(TCPServer) * handle._init(loop, protocol_factory, server, ssl) # <<<<<<<<<<<<<< * __tcp_init_uv_handle(handle, loop, flags) * return handle */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol_factory, __pyx_v_server, __pyx_v_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":66 * handle = TCPServer.__new__(TCPServer) * handle._init(loop, protocol_factory, server, ssl) * __tcp_init_uv_handle(handle, loop, flags) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":67 * handle._init(loop, protocol_factory, server, ssl) * __tcp_init_uv_handle(handle, loop, flags) * return handle # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":60 * * @staticmethod * cdef TCPServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<< * object ssl, unsigned int flags): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPServer.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":69 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __tcp_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__new_socket(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/tcp.pyx":70 * * cdef _new_socket(self): * return __tcp_get_socket(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":69 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __tcp_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPServer._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":72 * return __tcp_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * try: */ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer__open(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/tcp.pyx":73 * * cdef _open(self, int sockfd): * self._ensure_alive() # <<<<<<<<<<<<<< * try: * __tcp_open(self, sockfd) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":74 * cdef _open(self, int sockfd): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_open(self, sockfd) * except Exception as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/handles/tcp.pyx":75 * self._ensure_alive() * try: * __tcp_open(self, sockfd) # <<<<<<<<<<<<<< * except Exception as exc: * self._fatal_error(exc, True) */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 75, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":74 * cdef _open(self, int sockfd): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_open(self, sockfd) * except Exception as exc: */ } /* "uvloop/handles/tcp.pyx":79 * self._fatal_error(exc, True) * else: * self._mark_as_open() # <<<<<<<<<<<<<< * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): */ /*else:*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 79, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":76 * try: * __tcp_open(self, sockfd) * except Exception as exc: # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * else: */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop.TCPServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 76, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /*try:*/ { /* "uvloop/handles/tcp.pyx":77 * __tcp_open(self, sockfd) * except Exception as exc: * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * else: * self._mark_as_open() */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 77, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } /* "uvloop/handles/tcp.pyx":76 * try: * __tcp_open(self, sockfd) * except Exception as exc: # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * else: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L17; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L16_error:; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L5_except_error; } __pyx_L17:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/handles/tcp.pyx":74 * cdef _open(self, int sockfd): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_open(self, sockfd) * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "uvloop/handles/tcp.pyx":72 * return __tcp_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.TCPServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":81 * self._mark_as_open() * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<< * self._ensure_alive() * try: */ static PyObject *__pyx_f_6uvloop_4loop_9TCPServer_bind(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args) { unsigned int __pyx_v_flags = ((unsigned int)0); PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("bind", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_flags = __pyx_optional_args->flags; } } /* "uvloop/handles/tcp.pyx":82 * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() # <<<<<<<<<<<<<< * try: * __tcp_bind(self, addr, flags) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":83 * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_bind(self, addr, flags) * except Exception as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/handles/tcp.pyx":84 * self._ensure_alive() * try: * __tcp_bind(self, addr, flags) # <<<<<<<<<<<<<< * except Exception as exc: * self._fatal_error(exc, True) */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_bind(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 84, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":83 * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_bind(self, addr, flags) * except Exception as exc: */ } /* "uvloop/handles/tcp.pyx":88 * self._fatal_error(exc, True) * else: * self._mark_as_open() # <<<<<<<<<<<<<< * * cdef UVStream _make_new_transport(self, object protocol, object waiter): */ /*else:*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 88, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":85 * try: * __tcp_bind(self, addr, flags) * except Exception as exc: # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * else: */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop.TCPServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 85, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /*try:*/ { /* "uvloop/handles/tcp.pyx":86 * __tcp_bind(self, addr, flags) * except Exception as exc: * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * else: * self._mark_as_open() */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 86, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } /* "uvloop/handles/tcp.pyx":85 * try: * __tcp_bind(self, addr, flags) * except Exception as exc: # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * else: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L17; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L16_error:; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L5_except_error; } __pyx_L17:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/handles/tcp.pyx":83 * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() * try: # <<<<<<<<<<<<<< * __tcp_bind(self, addr, flags) * except Exception as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L10_try_end:; } /* "uvloop/handles/tcp.pyx":81 * self._mark_as_open() * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<< * self._ensure_alive() * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.TCPServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":90 * self._mark_as_open() * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * cdef TCPTransport tr * tr = TCPTransport.new(self._loop, protocol, self._server, waiter) */ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_TCPServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_tr = 0; struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_make_new_transport", 0); /* "uvloop/handles/tcp.pyx":92 * cdef UVStream _make_new_transport(self, object protocol, object waiter): * cdef TCPTransport tr * tr = TCPTransport.new(self._loop, protocol, self._server, waiter) # <<<<<<<<<<<<<< * return tr * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base._server); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_12TCPTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_2), __pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/tcp.pyx":93 * cdef TCPTransport tr * tr = TCPTransport.new(self._loop, protocol, self._server, waiter) * return tr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr))); __pyx_r = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr); goto __pyx_L0; /* "uvloop/handles/tcp.pyx":90 * self._mark_as_open() * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * cdef TCPTransport tr * tr = TCPTransport.new(self._loop, protocol, self._server, waiter) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.TCPServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_tr); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":100 * * @staticmethod * cdef TCPTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ static struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_f_6uvloop_4loop_12TCPTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/tcp.pyx":104 * * cdef TCPTransport handle * handle = TCPTransport.__new__(TCPTransport) # <<<<<<<<<<<<<< * handle._init(loop, protocol, server, waiter) * __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_TCPTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_TCPTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_TCPTransport)))) __PYX_ERR(4, 104, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":105 * cdef TCPTransport handle * handle = TCPTransport.__new__(TCPTransport) * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<< * __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) * handle.__peername_set = 0 */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":106 * handle = TCPTransport.__new__(TCPTransport) * handle._init(loop, protocol, server, waiter) * __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) # <<<<<<<<<<<<<< * handle.__peername_set = 0 * handle.__sockname_set = 0 */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, AF_UNSPEC); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":107 * handle._init(loop, protocol, server, waiter) * __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) * handle.__peername_set = 0 # <<<<<<<<<<<<<< * handle.__sockname_set = 0 * return handle */ __pyx_v_handle->__pyx___peername_set = 0; /* "uvloop/handles/tcp.pyx":108 * __tcp_init_uv_handle(handle, loop, uv.AF_UNSPEC) * handle.__peername_set = 0 * handle.__sockname_set = 0 # <<<<<<<<<<<<<< * return handle * */ __pyx_v_handle->__pyx___sockname_set = 0; /* "uvloop/handles/tcp.pyx":109 * handle.__peername_set = 0 * handle.__sockname_set = 0 * return handle # <<<<<<<<<<<<<< * * cdef _call_connection_made(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":100 * * @staticmethod * cdef TCPTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":111 * return handle * * cdef _call_connection_made(self): # <<<<<<<<<<<<<< * # asyncio saves peername & sockname when transports are instantiated, * # so that they're accessible even after the transport is closed. */ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) { int __pyx_v_err; int __pyx_v_buf_len; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_call_connection_made", 0); /* "uvloop/handles/tcp.pyx":121 * int buf_len * * buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<< * err = uv.uv_tcp_getsockname(self._handle, * &self.__sockname, */ __pyx_v_buf_len = (sizeof(struct sockaddr_storage)); /* "uvloop/handles/tcp.pyx":122 * * buf_len = sizeof(system.sockaddr_storage) * err = uv.uv_tcp_getsockname(self._handle, # <<<<<<<<<<<<<< * &self.__sockname, * &buf_len) */ __pyx_v_err = uv_tcp_getsockname(((uv_tcp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_self->__pyx___sockname)), (&__pyx_v_buf_len)); /* "uvloop/handles/tcp.pyx":125 * &self.__sockname, * &buf_len) * if err >= 0: # <<<<<<<<<<<<<< * # Ignore errors, this is an optional thing. * # If something serious is going on, the transport */ __pyx_t_1 = ((__pyx_v_err >= 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":130 * # will crash later (in roughly the same way how * # an asyncio transport would.) * self.__sockname_set = 1 # <<<<<<<<<<<<<< * * buf_len = sizeof(system.sockaddr_storage) */ __pyx_v_self->__pyx___sockname_set = 1; /* "uvloop/handles/tcp.pyx":125 * &self.__sockname, * &buf_len) * if err >= 0: # <<<<<<<<<<<<<< * # Ignore errors, this is an optional thing. * # If something serious is going on, the transport */ } /* "uvloop/handles/tcp.pyx":132 * self.__sockname_set = 1 * * buf_len = sizeof(system.sockaddr_storage) # <<<<<<<<<<<<<< * err = uv.uv_tcp_getpeername(self._handle, * &self.__peername, */ __pyx_v_buf_len = (sizeof(struct sockaddr_storage)); /* "uvloop/handles/tcp.pyx":133 * * buf_len = sizeof(system.sockaddr_storage) * err = uv.uv_tcp_getpeername(self._handle, # <<<<<<<<<<<<<< * &self.__peername, * &buf_len) */ __pyx_v_err = uv_tcp_getpeername(((uv_tcp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), ((struct sockaddr *)(&__pyx_v_self->__pyx___peername)), (&__pyx_v_buf_len)); /* "uvloop/handles/tcp.pyx":136 * &self.__peername, * &buf_len) * if err >= 0: # <<<<<<<<<<<<<< * # Same as few lines above -- we don't really care * # about error case here. */ __pyx_t_1 = ((__pyx_v_err >= 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":139 * # Same as few lines above -- we don't really care * # about error case here. * self.__peername_set = 1 # <<<<<<<<<<<<<< * * UVBaseTransport._call_connection_made(self) */ __pyx_v_self->__pyx___peername_set = 1; /* "uvloop/handles/tcp.pyx":136 * &self.__peername, * &buf_len) * if err >= 0: # <<<<<<<<<<<<<< * # Same as few lines above -- we don't really care * # about error case here. */ } /* "uvloop/handles/tcp.pyx":141 * self.__peername_set = 1 * * UVBaseTransport._call_connection_made(self) # <<<<<<<<<<<<<< * * def get_extra_info(self, name, default=None): */ __pyx_t_2 = __pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":111 * return handle * * cdef _call_connection_made(self): # <<<<<<<<<<<<<< * # asyncio saves peername & sockname when transports are instantiated, * # so that they're accessible even after the transport is closed. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.TCPTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":143 * UVBaseTransport._call_connection_made(self) * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * if name == 'sockname': * if self.__sockname_set: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_12TCPTransport_get_extra_info[] = "TCPTransport.get_extra_info(self, name, default=None)"; static PyObject *__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(4, 143, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_default = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 143, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.TCPTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_12TCPTransport_get_extra_info(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_extra_info", 0); /* "uvloop/handles/tcp.pyx":144 * * def get_extra_info(self, name, default=None): * if name == 'sockname': # <<<<<<<<<<<<<< * if self.__sockname_set: * return __convert_sockaddr_to_pyaddr( */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_sockname, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(4, 144, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":145 * def get_extra_info(self, name, default=None): * if name == 'sockname': * if self.__sockname_set: # <<<<<<<<<<<<<< * return __convert_sockaddr_to_pyaddr( * &self.__sockname) */ __pyx_t_1 = (__pyx_v_self->__pyx___sockname_set != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":146 * if name == 'sockname': * if self.__sockname_set: * return __convert_sockaddr_to_pyaddr( # <<<<<<<<<<<<<< * &self.__sockname) * elif name == 'peername': */ __Pyx_XDECREF(__pyx_r); /* "uvloop/handles/tcp.pyx":147 * if self.__sockname_set: * return __convert_sockaddr_to_pyaddr( * &self.__sockname) # <<<<<<<<<<<<<< * elif name == 'peername': * if self.__peername_set: */ __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_self->__pyx___sockname))); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":145 * def get_extra_info(self, name, default=None): * if name == 'sockname': * if self.__sockname_set: # <<<<<<<<<<<<<< * return __convert_sockaddr_to_pyaddr( * &self.__sockname) */ } /* "uvloop/handles/tcp.pyx":144 * * def get_extra_info(self, name, default=None): * if name == 'sockname': # <<<<<<<<<<<<<< * if self.__sockname_set: * return __convert_sockaddr_to_pyaddr( */ goto __pyx_L3; } /* "uvloop/handles/tcp.pyx":148 * return __convert_sockaddr_to_pyaddr( * &self.__sockname) * elif name == 'peername': # <<<<<<<<<<<<<< * if self.__peername_set: * return __convert_sockaddr_to_pyaddr( */ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_peername, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(4, 148, __pyx_L1_error) if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":149 * &self.__sockname) * elif name == 'peername': * if self.__peername_set: # <<<<<<<<<<<<<< * return __convert_sockaddr_to_pyaddr( * &self.__peername) */ __pyx_t_1 = (__pyx_v_self->__pyx___peername_set != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":150 * elif name == 'peername': * if self.__peername_set: * return __convert_sockaddr_to_pyaddr( # <<<<<<<<<<<<<< * &self.__peername) * return super().get_extra_info(name, default) */ __Pyx_XDECREF(__pyx_r); /* "uvloop/handles/tcp.pyx":151 * if self.__peername_set: * return __convert_sockaddr_to_pyaddr( * &self.__peername) # <<<<<<<<<<<<<< * return super().get_extra_info(name, default) * */ __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_self->__pyx___peername))); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":149 * &self.__sockname) * elif name == 'peername': * if self.__peername_set: # <<<<<<<<<<<<<< * return __convert_sockaddr_to_pyaddr( * &self.__peername) */ } /* "uvloop/handles/tcp.pyx":148 * return __convert_sockaddr_to_pyaddr( * &self.__sockname) * elif name == 'peername': # <<<<<<<<<<<<<< * if self.__peername_set: * return __convert_sockaddr_to_pyaddr( */ } __pyx_L3:; /* "uvloop/handles/tcp.pyx":152 * return __convert_sockaddr_to_pyaddr( * &self.__peername) * return super().get_extra_info(name, default) # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6uvloop_4loop_TCPTransport)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_extra_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_default}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_default}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_name); __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_default); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":143 * UVBaseTransport._call_connection_made(self) * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * if name == 'sockname': * if self.__sockname_set: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.TCPTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":154 * return super().get_extra_info(name, default) * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __tcp_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/tcp.pyx":155 * * cdef _new_socket(self): * return __tcp_get_socket(self) # <<<<<<<<<<<<<< * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/tcp.pyx":154 * return super().get_extra_info(name, default) * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __tcp_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":157 * return __tcp_get_socket(self) * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<< * self._ensure_alive() * __tcp_bind(self, addr, flags) */ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_bind(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args) { unsigned int __pyx_v_flags = ((unsigned int)0); PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("bind", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_flags = __pyx_optional_args->flags; } } /* "uvloop/handles/tcp.pyx":158 * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() # <<<<<<<<<<<<<< * __tcp_bind(self, addr, flags) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":159 * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): * self._ensure_alive() * __tcp_bind(self, addr, flags) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_bind(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_addr, __pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":157 * return __tcp_get_socket(self) * * cdef bind(self, system.sockaddr* addr, unsigned int flags=0): # <<<<<<<<<<<<<< * self._ensure_alive() * __tcp_bind(self, addr, flags) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPTransport.bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":161 * __tcp_bind(self, addr, flags) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * __tcp_open(self, sockfd) */ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport__open(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/tcp.pyx":162 * * cdef _open(self, int sockfd): * self._ensure_alive() # <<<<<<<<<<<<<< * __tcp_open(self, sockfd) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":163 * cdef _open(self, int sockfd): * self._ensure_alive() * __tcp_open(self, sockfd) # <<<<<<<<<<<<<< * * cdef connect(self, system.sockaddr* addr): */ __pyx_t_1 = __pyx_f_6uvloop_4loop___tcp_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":161 * __tcp_bind(self, addr, flags) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * __tcp_open(self, sockfd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.TCPTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":165 * __tcp_open(self, sockfd) * * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<< * cdef _TCPConnectRequest req * req = _TCPConnectRequest(self._loop, self) */ static PyObject *__pyx_f_6uvloop_4loop_12TCPTransport_connect(struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr) { struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_req = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("connect", 0); /* "uvloop/handles/tcp.pyx":167 * cdef connect(self, system.sockaddr* addr): * cdef _TCPConnectRequest req * req = _TCPConnectRequest(self._loop, self) # <<<<<<<<<<<<<< * req.connect(addr) * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop__TCPConnectRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_req = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":168 * cdef _TCPConnectRequest req * req = _TCPConnectRequest(self._loop, self) * req.connect(addr) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_req->__pyx_base.__pyx_vtab)->connect(__pyx_v_req, __pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":165 * __tcp_open(self, sockfd) * * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<< * cdef _TCPConnectRequest req * req = _TCPConnectRequest(self._loop, self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.TCPTransport.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_req); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":175 * TCPTransport transport * * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_loop = 0; PyObject *__pyx_v_transport = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_transport,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(4, 175, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(4, 175, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_loop = values[0]; __pyx_v_transport = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_transport); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_18_TCPConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/tcp.pyx":176 * * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) # <<<<<<<<<<<<<< * if self.request is NULL: * self.on_done() */ __pyx_v_self->__pyx_base.request = ((uv_req_t *)PyMem_RawMalloc((sizeof(uv_connect_t)))); /* "uvloop/handles/tcp.pyx":177 * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.request == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":178 * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: * self.on_done() # <<<<<<<<<<<<<< * raise MemoryError() * self.request.data = self */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":179 * if self.request is NULL: * self.on_done() * raise MemoryError() # <<<<<<<<<<<<<< * self.request.data = self * self.transport = transport */ PyErr_NoMemory(); __PYX_ERR(4, 179, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":177 * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ } /* "uvloop/handles/tcp.pyx":180 * self.on_done() * raise MemoryError() * self.request.data = self # <<<<<<<<<<<<<< * self.transport = transport * */ __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self); /* "uvloop/handles/tcp.pyx":181 * raise MemoryError() * self.request.data = self * self.transport = transport # <<<<<<<<<<<<<< * * cdef connect(self, system.sockaddr* addr): */ if (!(likely(((__pyx_v_transport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_transport, __pyx_ptype_6uvloop_4loop_TCPTransport))))) __PYX_ERR(4, 181, __pyx_L1_error) __pyx_t_2 = __pyx_v_transport; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->transport); __Pyx_DECREF(((PyObject *)__pyx_v_self->transport)); __pyx_v_self->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":175 * TCPTransport transport * * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":183 * self.transport = transport * * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_connect(self.request, */ static PyObject *__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("connect", 0); /* "uvloop/handles/tcp.pyx":185 * cdef connect(self, system.sockaddr* addr): * cdef int err * err = uv.uv_tcp_connect(self.request, # <<<<<<<<<<<<<< * self.transport._handle, * addr, */ __pyx_v_err = uv_tcp_connect(((uv_connect_t *)__pyx_v_self->__pyx_base.request), ((uv_tcp_t *)__pyx_v_self->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_f_6uvloop_4loop___tcp_connect_callback); /* "uvloop/handles/tcp.pyx":189 * addr, * __tcp_connect_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self.on_done() */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/tcp.pyx":190 * __tcp_connect_callback) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self.on_done() * raise exc */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":191 * if err < 0: * exc = convert_error(err) * self.on_done() # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/tcp.pyx":192 * exc = convert_error(err) * self.on_done() * raise exc # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(4, 192, __pyx_L1_error) /* "uvloop/handles/tcp.pyx":189 * addr, * __tcp_connect_callback) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self.on_done() */ } /* "uvloop/handles/tcp.pyx":183 * self.transport = transport * * cdef connect(self, system.sockaddr* addr): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_tcp_connect(self.request, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop._TCPConnectRequest.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/tcp.pyx":195 * * * cdef void __tcp_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<< * cdef: * _TCPConnectRequest wrapper */ static void __pyx_f_6uvloop_4loop___tcp_connect_callback(uv_connect_t *__pyx_v_req, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *__pyx_v_wrapper = 0; struct __pyx_obj_6uvloop_4loop_TCPTransport *__pyx_v_transport = 0; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; char const *__pyx_t_18; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__tcp_connect_callback", 0); /* "uvloop/handles/tcp.pyx":200 * TCPTransport transport * * wrapper = <_TCPConnectRequest> req.data # <<<<<<<<<<<<<< * transport = wrapper.transport * */ __pyx_t_1 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_wrapper = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":201 * * wrapper = <_TCPConnectRequest> req.data * transport = wrapper.transport # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_t_1 = ((PyObject *)__pyx_v_wrapper->transport); __Pyx_INCREF(__pyx_t_1); __pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":203 * transport = wrapper.transport * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * else: */ __pyx_t_2 = ((__pyx_v_status < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/tcp.pyx":204 * * if status < 0: * exc = convert_error(status) # <<<<<<<<<<<<<< * else: * exc = None */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":203 * transport = wrapper.transport * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * else: */ goto __pyx_L3; } /* "uvloop/handles/tcp.pyx":206 * exc = convert_error(status) * else: * exc = None # <<<<<<<<<<<<<< * * try: */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_exc = Py_None; } __pyx_L3:; /* "uvloop/handles/tcp.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/tcp.pyx":209 * * try: * transport._on_connect(exc) # <<<<<<<<<<<<<< * except BaseException as ex: * wrapper.transport._error(ex, False) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._on_connect(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_transport), __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 209, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/tcp.pyx":210 * try: * transport._on_connect(exc) * except BaseException as ex: # <<<<<<<<<<<<<< * wrapper.transport._error(ex, False) * finally: */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.__tcp_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(4, 210, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/tcp.pyx":211 * transport._on_connect(exc) * except BaseException as ex: * wrapper.transport._error(ex, False) # <<<<<<<<<<<<<< * finally: * wrapper.on_done() */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport *)__pyx_v_wrapper->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_wrapper->transport), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 211, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/tcp.pyx":210 * try: * transport._on_connect(exc) * except BaseException as ex: # <<<<<<<<<<<<<< * wrapper.transport._error(ex, False) * finally: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L21; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L20_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L9_except_error; } __pyx_L21:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/handles/tcp.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L5_error; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L14_try_end:; } } /* "uvloop/handles/tcp.pyx":213 * wrapper.transport._error(ex, False) * finally: * wrapper.on_done() # <<<<<<<<<<<<<< * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L5_error:; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_10 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 213, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_18; goto __pyx_L1_error; __pyx_L27_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; goto __pyx_L1_error; } __pyx_L6:; } /* "uvloop/handles/tcp.pyx":195 * * * cdef void __tcp_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<< * cdef: * _TCPConnectRequest wrapper */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__tcp_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_wrapper); __Pyx_XDECREF((PyObject *)__pyx_v_transport); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/pipe.pyx":1 * cdef __pipe_init_uv_handle(UVStream handle, Loop loop): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop___pipe_init_uv_handle(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__pipe_init_uv_handle", 0); /* "uvloop/handles/pipe.pyx":4 * cdef int err * * handle._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) * if handle._handle is NULL: */ __pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_pipe_t)))); /* "uvloop/handles/pipe.pyx":6 * handle._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) * if handle._handle is NULL: # <<<<<<<<<<<<<< * handle._abort_init() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/pipe.pyx":7 * PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) * if handle._handle is NULL: * handle._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":8 * if handle._handle is NULL: * handle._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * # Initialize pipe handle with ipc=0. */ PyErr_NoMemory(); __PYX_ERR(17, 8, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":6 * handle._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_pipe_t)) * if handle._handle is NULL: # <<<<<<<<<<<<<< * handle._abort_init() * raise MemoryError() */ } /* "uvloop/handles/pipe.pyx":13 * # ipc=1 means that libuv will use recvmsg/sendmsg * # instead of recv/send. * err = uv.uv_pipe_init(handle._loop.uvloop, # <<<<<<<<<<<<<< * handle._handle, * 0) */ __pyx_v_err = uv_pipe_init(__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._loop->uvloop, ((uv_pipe_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), 0); /* "uvloop/handles/pipe.pyx":16 * handle._handle, * 0) * if err < 0: # <<<<<<<<<<<<<< * handle._abort_init() * raise convert_error(err) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/pipe.pyx":17 * 0) * if err < 0: * handle._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":18 * if err < 0: * handle._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * handle._finish_init() */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(17, 18, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":16 * handle._handle, * 0) * if err < 0: # <<<<<<<<<<<<<< * handle._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/pipe.pyx":20 * raise convert_error(err) * * handle._finish_init() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStream *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":1 * cdef __pipe_init_uv_handle(UVStream handle, Loop loop): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__pipe_init_uv_handle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":23 * * * cdef __pipe_open(UVStream handle, int fd): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_pipe_open(handle._handle, */ static PyObject *__pyx_f_6uvloop_4loop___pipe_open(struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_v_handle, int __pyx_v_fd) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__pipe_open", 0); /* "uvloop/handles/pipe.pyx":25 * cdef __pipe_open(UVStream handle, int fd): * cdef int err * err = uv.uv_pipe_open(handle._handle, # <<<<<<<<<<<<<< * fd) * if err < 0: */ __pyx_v_err = uv_pipe_open(((uv_pipe_t *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_file)__pyx_v_fd)); /* "uvloop/handles/pipe.pyx":27 * err = uv.uv_pipe_open(handle._handle, * fd) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/pipe.pyx":28 * fd) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":29 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(17, 29, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":27 * err = uv.uv_pipe_open(handle._handle, * fd) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/pipe.pyx":23 * * * cdef __pipe_open(UVStream handle, int fd): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_pipe_open(handle._handle, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__pipe_open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":32 * * * cdef __pipe_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<< * fileno = handle._fileno() * return socket_socket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) */ static PyObject *__pyx_f_6uvloop_4loop___pipe_get_socket(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *__pyx_v_handle) { PyObject *__pyx_v_fileno = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__pipe_get_socket", 0); /* "uvloop/handles/pipe.pyx":33 * * cdef __pipe_get_socket(UVSocketHandle handle): * fileno = handle._fileno() # <<<<<<<<<<<<<< * return socket_socket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_14UVSocketHandle__fileno(__pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fileno = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":34 * cdef __pipe_get_socket(UVSocketHandle handle): * fileno = handle._fileno() * return socket_socket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(AF_UNIX); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket); __pyx_t_4 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, __pyx_int_0, __pyx_v_fileno}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_2, __pyx_t_3, __pyx_int_0, __pyx_v_fileno}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_int_0); __Pyx_INCREF(__pyx_v_fileno); __Pyx_GIVEREF(__pyx_v_fileno); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_fileno); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":32 * * * cdef __pipe_get_socket(UVSocketHandle handle): # <<<<<<<<<<<<<< * fileno = handle._fileno() * return socket_socket(uv.AF_UNIX, uv.SOCK_STREAM, 0, fileno) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.__pipe_get_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fileno); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":41 * * @staticmethod * cdef UnixServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<< * object ssl): * */ static struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_f_6uvloop_4loop_10UnixServer_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol_factory, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_ssl) { struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/pipe.pyx":45 * * cdef UnixServer handle * handle = UnixServer.__new__(UnixServer) # <<<<<<<<<<<<<< * handle._init(loop, protocol_factory, server, ssl) * __pipe_init_uv_handle(handle, loop) */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UnixServer(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UnixServer), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UnixServer)))) __PYX_ERR(17, 45, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":46 * cdef UnixServer handle * handle = UnixServer.__new__(UnixServer) * handle._init(loop, protocol_factory, server, ssl) # <<<<<<<<<<<<<< * __pipe_init_uv_handle(handle, loop) * return handle */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol_factory, __pyx_v_server, __pyx_v_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":47 * handle = UnixServer.__new__(UnixServer) * handle._init(loop, protocol_factory, server, ssl) * __pipe_init_uv_handle(handle, loop) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":48 * handle._init(loop, protocol_factory, server, ssl) * __pipe_init_uv_handle(handle, loop) * return handle # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":41 * * @staticmethod * cdef UnixServer new(Loop loop, object protocol_factory, Server server, # <<<<<<<<<<<<<< * object ssl): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixServer.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":50 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__new_socket(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/pipe.pyx":51 * * cdef _new_socket(self): * return __pipe_get_socket(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":50 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixServer._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":53 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * __pipe_open(self, sockfd) */ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer__open(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/pipe.pyx":54 * * cdef _open(self, int sockfd): * self._ensure_alive() # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * self._mark_as_open() */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":55 * cdef _open(self, int sockfd): * self._ensure_alive() * __pipe_open(self, sockfd) # <<<<<<<<<<<<<< * self._mark_as_open() * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":56 * self._ensure_alive() * __pipe_open(self, sockfd) * self._mark_as_open() # <<<<<<<<<<<<<< * * cdef bind(self, str path): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":53 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * self._ensure_alive() * __pipe_open(self, sockfd) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixServer._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":58 * self._mark_as_open() * * cdef bind(self, str path): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ static PyObject *__pyx_f_6uvloop_4loop_10UnixServer_bind(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_path) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char const *__pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("bind", 0); /* "uvloop/handles/pipe.pyx":60 * cdef bind(self, str path): * cdef int err * self._ensure_alive() # <<<<<<<<<<<<<< * err = uv.uv_pipe_bind(self._handle, * path.encode()) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":62 * self._ensure_alive() * err = uv.uv_pipe_bind(self._handle, * path.encode()) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ if (unlikely(__pyx_v_path == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode"); __PYX_ERR(17, 62, __pyx_L1_error) } __pyx_t_1 = PyUnicode_AsEncodedString(__pyx_v_path, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(17, 62, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":61 * cdef int err * self._ensure_alive() * err = uv.uv_pipe_bind(self._handle, # <<<<<<<<<<<<<< * path.encode()) * if err < 0: */ __pyx_v_err = uv_pipe_bind(((uv_pipe_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":63 * err = uv.uv_pipe_bind(self._handle, * path.encode()) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_3 = ((__pyx_v_err < 0) != 0); if (__pyx_t_3) { /* "uvloop/handles/pipe.pyx":64 * path.encode()) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":65 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":66 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * * self._mark_as_open() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/pipe.pyx":63 * err = uv.uv_pipe_bind(self._handle, * path.encode()) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/pipe.pyx":68 * return * * self._mark_as_open() # <<<<<<<<<<<<<< * * cdef UVStream _make_new_transport(self, object protocol, object waiter): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixServer *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._mark_as_open(((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":58 * self._mark_as_open() * * cdef bind(self, str path): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixServer.bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":70 * self._mark_as_open() * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * cdef UnixTransport tr * tr = UnixTransport.new(self._loop, protocol, self._server, waiter) */ static struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport(struct __pyx_obj_6uvloop_4loop_UnixServer *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_tr = 0; struct __pyx_obj_6uvloop_4loop_UVStream *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_make_new_transport", 0); /* "uvloop/handles/pipe.pyx":72 * cdef UVStream _make_new_transport(self, object protocol, object waiter): * cdef UnixTransport tr * tr = UnixTransport.new(self._loop, protocol, self._server, waiter) # <<<<<<<<<<<<<< * return tr * */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base._server); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = ((PyObject *)__pyx_f_6uvloop_4loop_13UnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_v_protocol, ((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_t_2), __pyx_v_waiter)); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/pipe.pyx":73 * cdef UnixTransport tr * tr = UnixTransport.new(self._loop, protocol, self._server, waiter) * return tr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr))); __pyx_r = ((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_tr); goto __pyx_L0; /* "uvloop/handles/pipe.pyx":70 * self._mark_as_open() * * cdef UVStream _make_new_transport(self, object protocol, object waiter): # <<<<<<<<<<<<<< * cdef UnixTransport tr * tr = UnixTransport.new(self._loop, protocol, self._server, waiter) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UnixServer._make_new_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_tr); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":80 * * @staticmethod * cdef UnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ static struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_f_6uvloop_4loop_13UnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/pipe.pyx":84 * * cdef UnixTransport handle * handle = UnixTransport.__new__(UnixTransport) # <<<<<<<<<<<<<< * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UnixTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UnixTransport)))) __PYX_ERR(17, 84, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":85 * cdef UnixTransport handle * handle = UnixTransport.__new__(UnixTransport) * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<< * __pipe_init_uv_handle(handle, loop) * return handle */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":86 * handle = UnixTransport.__new__(UnixTransport) * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":87 * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) * return handle # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":80 * * @staticmethod * cdef UnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":89 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/pipe.pyx":90 * * cdef _new_socket(self): * return __pipe_get_socket(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":89 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":92 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport__open(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/pipe.pyx":93 * * cdef _open(self, int sockfd): * __pipe_open(self, sockfd) # <<<<<<<<<<<<<< * * cdef connect(self, char* addr): */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":92 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":95 * __pipe_open(self, sockfd) * * cdef connect(self, char* addr): # <<<<<<<<<<<<<< * cdef _PipeConnectRequest req * req = _PipeConnectRequest(self._loop, self) */ static PyObject *__pyx_f_6uvloop_4loop_13UnixTransport_connect(struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_self, char *__pyx_v_addr) { struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_req = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("connect", 0); /* "uvloop/handles/pipe.pyx":97 * cdef connect(self, char* addr): * cdef _PipeConnectRequest req * req = _PipeConnectRequest(self._loop, self) # <<<<<<<<<<<<<< * req.connect(addr) * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._loop)); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop__PipeConnectRequest), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_req = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":98 * cdef _PipeConnectRequest req * req = _PipeConnectRequest(self._loop, self) * req.connect(addr) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_req->__pyx_base.__pyx_vtab)->connect(__pyx_v_req, __pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":95 * __pipe_open(self, sockfd) * * cdef connect(self, char* addr): # <<<<<<<<<<<<<< * cdef _PipeConnectRequest req * req = _PipeConnectRequest(self._loop, self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UnixTransport.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_req); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":105 * * @staticmethod * cdef ReadUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * cdef ReadUnixTransport handle */ static struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/pipe.pyx":108 * object waiter): * cdef ReadUnixTransport handle * handle = ReadUnixTransport.__new__(ReadUnixTransport) # <<<<<<<<<<<<<< * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_ReadUnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_ReadUnixTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_ReadUnixTransport)))) __PYX_ERR(17, 108, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":109 * cdef ReadUnixTransport handle * handle = ReadUnixTransport.__new__(ReadUnixTransport) * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<< * __pipe_init_uv_handle(handle, loop) * return handle */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":110 * handle = ReadUnixTransport.__new__(ReadUnixTransport) * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":111 * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) * return handle # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":105 * * @staticmethod * cdef ReadUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * cdef ReadUnixTransport handle */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":113 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/pipe.pyx":114 * * cdef _new_socket(self): * return __pipe_get_socket(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":113 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":116 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ static PyObject *__pyx_f_6uvloop_4loop_17ReadUnixTransport__open(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/pipe.pyx":117 * * cdef _open(self, int sockfd): * __pipe_open(self, sockfd) # <<<<<<<<<<<<<< * * def get_write_buffer_limits(self): */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":116 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":119 * __pipe_open(self, sockfd) * * def get_write_buffer_limits(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits[] = "ReadUnixTransport.get_write_buffer_limits(self)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_limits (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_limits", 0); /* "uvloop/handles/pipe.pyx":120 * * def get_write_buffer_limits(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * def set_write_buffer_limits(self, high=None, low=None): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 120, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":119 * __pipe_open(self, sockfd) * * def get_write_buffer_limits(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.get_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":122 * raise NotImplementedError * * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits[] = "ReadUnixTransport.set_write_buffer_limits(self, high=None, low=None)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_high = 0; CYTHON_UNUSED PyObject *__pyx_v_low = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_write_buffer_limits (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,&__pyx_n_s_low,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_high); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_low); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_write_buffer_limits") < 0)) __PYX_ERR(17, 122, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_high = values[0]; __pyx_v_low = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_write_buffer_limits", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 122, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), __pyx_v_high, __pyx_v_low); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_high, CYTHON_UNUSED PyObject *__pyx_v_low) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_write_buffer_limits", 0); /* "uvloop/handles/pipe.pyx":123 * * def set_write_buffer_limits(self, high=None, low=None): * raise NotImplementedError # <<<<<<<<<<<<<< * * def get_write_buffer_size(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 123, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":122 * raise NotImplementedError * * def set_write_buffer_limits(self, high=None, low=None): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.set_write_buffer_limits", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":125 * raise NotImplementedError * * def get_write_buffer_size(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size[] = "ReadUnixTransport.get_write_buffer_size(self)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_size (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_write_buffer_size", 0); /* "uvloop/handles/pipe.pyx":126 * * def get_write_buffer_size(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * def write(self, data): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 126, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":125 * raise NotImplementedError * * def get_write_buffer_size(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.get_write_buffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":128 * raise NotImplementedError * * def write(self, data): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_6write[] = "ReadUnixTransport.write(self, data)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_6write(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); /* "uvloop/handles/pipe.pyx":129 * * def write(self, data): * raise NotImplementedError # <<<<<<<<<<<<<< * * def writelines(self, list_of_data): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 129, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":128 * raise NotImplementedError * * def write(self, data): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":131 * raise NotImplementedError * * def writelines(self, list_of_data): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_8writelines[] = "ReadUnixTransport.writelines(self, list_of_data)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines(PyObject *__pyx_v_self, PyObject *__pyx_v_list_of_data) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writelines (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self), ((PyObject *)__pyx_v_list_of_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_8writelines(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_list_of_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("writelines", 0); /* "uvloop/handles/pipe.pyx":132 * * def writelines(self, list_of_data): * raise NotImplementedError # <<<<<<<<<<<<<< * * def write_eof(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 132, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":131 * raise NotImplementedError * * def writelines(self, list_of_data): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.writelines", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":134 * raise NotImplementedError * * def write_eof(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_10write_eof[] = "ReadUnixTransport.write_eof(self)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_eof (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_10write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_eof", 0); /* "uvloop/handles/pipe.pyx":135 * * def write_eof(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * def can_write_eof(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 135, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":134 * raise NotImplementedError * * def write_eof(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":137 * raise NotImplementedError * * def can_write_eof(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_12can_write_eof[] = "ReadUnixTransport.can_write_eof(self)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("can_write_eof (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_12can_write_eof(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("can_write_eof", 0); /* "uvloop/handles/pipe.pyx":138 * * def can_write_eof(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * def abort(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 138, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":137 * raise NotImplementedError * * def can_write_eof(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.can_write_eof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":140 * raise NotImplementedError * * def abort(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_17ReadUnixTransport_14abort[] = "ReadUnixTransport.abort(self)"; static PyObject *__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("abort (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_17ReadUnixTransport_14abort(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("abort", 0); /* "uvloop/handles/pipe.pyx":141 * * def abort(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 141, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":140 * raise NotImplementedError * * def abort(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.ReadUnixTransport.abort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":148 * * @staticmethod * cdef WriteUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * cdef WriteUnixTransport handle */ static struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_server, PyObject *__pyx_v_waiter) { struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_handle = 0; struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/pipe.pyx":151 * object waiter): * cdef WriteUnixTransport handle * handle = WriteUnixTransport.__new__(WriteUnixTransport) # <<<<<<<<<<<<<< * * # We listen for read events on write-end of the pipe. When */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_WriteUnixTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_WriteUnixTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_WriteUnixTransport)))) __PYX_ERR(17, 151, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":157 * # receive an error -- we want to silence that error, and just * # close the transport. * handle._close_on_read_error() # <<<<<<<<<<<<<< * * handle._init(loop, protocol, server, waiter) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_on_read_error(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":159 * handle._close_on_read_error() * * handle._init(loop, protocol, server, waiter) # <<<<<<<<<<<<<< * __pipe_init_uv_handle(handle, loop) * return handle */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop, __pyx_v_protocol, __pyx_v_server, __pyx_v_waiter); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":160 * * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) # <<<<<<<<<<<<<< * return handle * */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_init_uv_handle(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_handle), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":161 * handle._init(loop, protocol, server, waiter) * __pipe_init_uv_handle(handle, loop) * return handle # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":148 * * @staticmethod * cdef WriteUnixTransport new(Loop loop, object protocol, Server server, # <<<<<<<<<<<<<< * object waiter): * cdef WriteUnixTransport handle */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":163 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/pipe.pyx":164 * * cdef _new_socket(self): * return __pipe_get_socket(self) # <<<<<<<<<<<<<< * * cdef _open(self, int sockfd): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/pipe.pyx":163 * return handle * * cdef _new_socket(self): # <<<<<<<<<<<<<< * return __pipe_get_socket(self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":166 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ static PyObject *__pyx_f_6uvloop_4loop_18WriteUnixTransport__open(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self, int __pyx_v_sockfd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_open", 0); /* "uvloop/handles/pipe.pyx":167 * * cdef _open(self, int sockfd): * __pipe_open(self, sockfd) # <<<<<<<<<<<<<< * * def pause_reading(self): */ __pyx_t_1 = __pyx_f_6uvloop_4loop___pipe_open(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_self), __pyx_v_sockfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":166 * return __pipe_get_socket(self) * * cdef _open(self, int sockfd): # <<<<<<<<<<<<<< * __pipe_open(self, sockfd) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport._open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":169 * __pipe_open(self, sockfd) * * def pause_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_1pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_pause_reading[] = "WriteUnixTransport.pause_reading(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_1pause_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pause_reading (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_pause_reading(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_pause_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pause_reading", 0); /* "uvloop/handles/pipe.pyx":170 * * def pause_reading(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * def resume_reading(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 170, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":169 * __pipe_open(self, sockfd) * * def pause_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.pause_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":172 * raise NotImplementedError * * def resume_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18WriteUnixTransport_2resume_reading[] = "WriteUnixTransport.resume_reading(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3resume_reading(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resume_reading (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18WriteUnixTransport_2resume_reading(((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18WriteUnixTransport_2resume_reading(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resume_reading", 0); /* "uvloop/handles/pipe.pyx":173 * * def resume_reading(self): * raise NotImplementedError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(17, 173, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":172 * raise NotImplementedError * * def resume_reading(self): # <<<<<<<<<<<<<< * raise NotImplementedError * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.WriteUnixTransport.resume_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":180 * UnixTransport transport * * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_loop = 0; PyObject *__pyx_v_transport = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_transport,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(17, 180, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(17, 180, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_loop = values[0]; __pyx_v_transport = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 180, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_transport); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_19_PipeConnectRequest___cinit__(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_loop, PyObject *__pyx_v_transport) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/pipe.pyx":181 * * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) # <<<<<<<<<<<<<< * if self.request is NULL: * self.on_done() */ __pyx_v_self->__pyx_base.request = ((uv_req_t *)PyMem_RawMalloc((sizeof(uv_connect_t)))); /* "uvloop/handles/pipe.pyx":182 * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.request == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/pipe.pyx":183 * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: * self.on_done() # <<<<<<<<<<<<<< * raise MemoryError() * self.request.data = self */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":184 * if self.request is NULL: * self.on_done() * raise MemoryError() # <<<<<<<<<<<<<< * self.request.data = self * self.transport = transport */ PyErr_NoMemory(); __PYX_ERR(17, 184, __pyx_L1_error) /* "uvloop/handles/pipe.pyx":182 * def __cinit__(self, loop, transport): * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ } /* "uvloop/handles/pipe.pyx":185 * self.on_done() * raise MemoryError() * self.request.data = self # <<<<<<<<<<<<<< * self.transport = transport * */ __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self); /* "uvloop/handles/pipe.pyx":186 * raise MemoryError() * self.request.data = self * self.transport = transport # <<<<<<<<<<<<<< * * cdef connect(self, char* addr): */ if (!(likely(((__pyx_v_transport) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_transport, __pyx_ptype_6uvloop_4loop_UnixTransport))))) __PYX_ERR(17, 186, __pyx_L1_error) __pyx_t_2 = __pyx_v_transport; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->transport); __Pyx_DECREF(((PyObject *)__pyx_v_self->transport)); __pyx_v_self->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/pipe.pyx":180 * UnixTransport transport * * def __cinit__(self, loop, transport): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc(sizeof(uv.uv_connect_t)) * if self.request is NULL: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop._PipeConnectRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":188 * self.transport = transport * * cdef connect(self, char* addr): # <<<<<<<<<<<<<< * # uv_pipe_connect returns void * uv.uv_pipe_connect(self.request, */ static PyObject *__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_self, char *__pyx_v_addr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect", 0); /* "uvloop/handles/pipe.pyx":190 * cdef connect(self, char* addr): * # uv_pipe_connect returns void * uv.uv_pipe_connect(self.request, # <<<<<<<<<<<<<< * self.transport._handle, * addr, */ uv_pipe_connect(((uv_connect_t *)__pyx_v_self->__pyx_base.request), ((uv_pipe_t *)__pyx_v_self->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_f_6uvloop_4loop___pipe_connect_callback); /* "uvloop/handles/pipe.pyx":188 * self.transport = transport * * cdef connect(self, char* addr): # <<<<<<<<<<<<<< * # uv_pipe_connect returns void * uv.uv_pipe_connect(self.request, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/pipe.pyx":195 * __pipe_connect_callback) * * cdef void __pipe_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<< * cdef: * _PipeConnectRequest wrapper */ static void __pyx_f_6uvloop_4loop___pipe_connect_callback(uv_connect_t *__pyx_v_req, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *__pyx_v_wrapper = 0; struct __pyx_obj_6uvloop_4loop_UnixTransport *__pyx_v_transport = 0; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; char const *__pyx_t_18; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pipe_connect_callback", 0); /* "uvloop/handles/pipe.pyx":200 * UnixTransport transport * * wrapper = <_PipeConnectRequest> req.data # <<<<<<<<<<<<<< * transport = wrapper.transport * */ __pyx_t_1 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_wrapper = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":201 * * wrapper = <_PipeConnectRequest> req.data * transport = wrapper.transport # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_t_1 = ((PyObject *)__pyx_v_wrapper->transport); __Pyx_INCREF(__pyx_t_1); __pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":203 * transport = wrapper.transport * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * else: */ __pyx_t_2 = ((__pyx_v_status < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/pipe.pyx":204 * * if status < 0: * exc = convert_error(status) # <<<<<<<<<<<<<< * else: * exc = None */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":203 * transport = wrapper.transport * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * else: */ goto __pyx_L3; } /* "uvloop/handles/pipe.pyx":206 * exc = convert_error(status) * else: * exc = None # <<<<<<<<<<<<<< * * try: */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_exc = Py_None; } __pyx_L3:; /* "uvloop/handles/pipe.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/pipe.pyx":209 * * try: * transport._on_connect(exc) # <<<<<<<<<<<<<< * except BaseException as ex: * wrapper.transport._error(ex, False) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._on_connect(((struct __pyx_obj_6uvloop_4loop_UVStream *)__pyx_v_transport), __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 209, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/pipe.pyx":210 * try: * transport._on_connect(exc) * except BaseException as ex: # <<<<<<<<<<<<<< * wrapper.transport._error(ex, False) * finally: */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.__pipe_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(17, 210, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/pipe.pyx":211 * transport._on_connect(exc) * except BaseException as ex: * wrapper.transport._error(ex, False) # <<<<<<<<<<<<<< * finally: * wrapper.on_done() */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport *)__pyx_v_wrapper->transport->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_wrapper->transport), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(17, 211, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/pipe.pyx":210 * try: * transport._on_connect(exc) * except BaseException as ex: # <<<<<<<<<<<<<< * wrapper.transport._error(ex, False) * finally: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L21; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L20_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L9_except_error; } __pyx_L21:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/handles/pipe.pyx":208 * exc = None * * try: # <<<<<<<<<<<<<< * transport._on_connect(exc) * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L5_error; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L14_try_end:; } } /* "uvloop/handles/pipe.pyx":213 * wrapper.transport._error(ex, False) * finally: * wrapper.on_done() # <<<<<<<<<<<<<< * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L5_error:; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_10 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest *)__pyx_v_wrapper->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_wrapper)); if (unlikely(!__pyx_t_8)) __PYX_ERR(17, 213, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_18; goto __pyx_L1_error; __pyx_L27_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; goto __pyx_L1_error; } __pyx_L6:; } /* "uvloop/handles/pipe.pyx":195 * __pipe_connect_callback) * * cdef void __pipe_connect_callback(uv.uv_connect_t* req, int status) with gil: # <<<<<<<<<<<<<< * cdef: * _PipeConnectRequest wrapper */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__pipe_connect_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_wrapper); __Pyx_XDECREF((PyObject *)__pyx_v_transport); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/process.pyx":5 * """Abstract class; wrapper over uv_process_t handle.""" * * def __cinit__(self): # <<<<<<<<<<<<<< * self.uv_opt_env = NULL * self.uv_opt_args = NULL */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_9UVProcess___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/process.pyx":6 * * def __cinit__(self): * self.uv_opt_env = NULL # <<<<<<<<<<<<<< * self.uv_opt_args = NULL * self._returncode = None */ __pyx_v_self->uv_opt_env = NULL; /* "uvloop/handles/process.pyx":7 * def __cinit__(self): * self.uv_opt_env = NULL * self.uv_opt_args = NULL # <<<<<<<<<<<<<< * self._returncode = None * self._pid = None */ __pyx_v_self->uv_opt_args = NULL; /* "uvloop/handles/process.pyx":8 * self.uv_opt_env = NULL * self.uv_opt_args = NULL * self._returncode = None # <<<<<<<<<<<<<< * self._pid = None * self._fds_to_close = set() */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_returncode); __Pyx_DECREF(__pyx_v_self->_returncode); __pyx_v_self->_returncode = Py_None; /* "uvloop/handles/process.pyx":9 * self.uv_opt_args = NULL * self._returncode = None * self._pid = None # <<<<<<<<<<<<<< * self._fds_to_close = set() * self._preexec_fn = None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_pid); __Pyx_DECREF(__pyx_v_self->_pid); __pyx_v_self->_pid = Py_None; /* "uvloop/handles/process.pyx":10 * self._returncode = None * self._pid = None * self._fds_to_close = set() # <<<<<<<<<<<<<< * self._preexec_fn = None * self._restore_signals = True */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_fds_to_close); __Pyx_DECREF(__pyx_v_self->_fds_to_close); __pyx_v_self->_fds_to_close = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":11 * self._pid = None * self._fds_to_close = set() * self._preexec_fn = None # <<<<<<<<<<<<<< * self._restore_signals = True * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_preexec_fn); __Pyx_DECREF(__pyx_v_self->_preexec_fn); __pyx_v_self->_preexec_fn = Py_None; /* "uvloop/handles/process.pyx":12 * self._fds_to_close = set() * self._preexec_fn = None * self._restore_signals = True # <<<<<<<<<<<<<< * * cdef _init(self, Loop loop, list args, dict env, */ __pyx_v_self->_restore_signals = 1; /* "uvloop/handles/process.pyx":5 * """Abstract class; wrapper over uv_process_t handle.""" * * def __cinit__(self): # <<<<<<<<<<<<<< * self.uv_opt_env = NULL * self.uv_opt_args = NULL */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcess.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":14 * self._restore_signals = True * * cdef _init(self, Loop loop, list args, dict env, # <<<<<<<<<<<<<< * cwd, start_new_session, * _stdin, _stdout, _stderr, # std* can be defined as macros in C */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals) { int __pyx_v_err; PyObject *__pyx_v_restore_inheritable = NULL; PyObject *__pyx_v_fd = NULL; PyObject *__pyx_v_errpipe_data = NULL; PyObject *__pyx_v_part = NULL; PyObject *__pyx_v_fds_to_close = NULL; PyObject *__pyx_v_exc_name = NULL; PyObject *__pyx_v_exc_msg = NULL; PyObject *__pyx_v_exc_cls = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); int __pyx_t_17; char const *__pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; int __pyx_t_25; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/process.pyx":24 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":26 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_process_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_process_t)))); /* "uvloop/handles/process.pyx":28 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_process_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":29 * PyMem_RawMalloc(sizeof(uv.uv_process_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":30 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * # Too early to call _finish_init, but still a lot of work to do. */ PyErr_NoMemory(); __PYX_ERR(5, 30, __pyx_L1_error) /* "uvloop/handles/process.pyx":28 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_process_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/process.pyx":35 * # Let's set handle.data to NULL, so in case something goes wrong, * # callbacks have a chance to avoid casting *something* into UVHandle. * self._handle.data = NULL # <<<<<<<<<<<<<< * * try: */ __pyx_v_self->__pyx_base._handle->data = NULL; /* "uvloop/handles/process.pyx":37 * self._handle.data = NULL * * try: # <<<<<<<<<<<<<< * self._init_options(args, env, cwd, start_new_session, * _stdin, _stdout, _stderr) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/process.pyx":38 * * try: * self._init_options(args, env, cwd, start_new_session, # <<<<<<<<<<<<<< * _stdin, _stdout, _stderr) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_options(__pyx_v_self, __pyx_v_args, __pyx_v_env, __pyx_v_cwd, __pyx_v_start_new_session, __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 38, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":41 * _stdin, _stdout, _stderr) * * restore_inheritable = set() # <<<<<<<<<<<<<< * if pass_fds: * for fd in pass_fds: */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 41, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_restore_inheritable = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":42 * * restore_inheritable = set() * if pass_fds: # <<<<<<<<<<<<<< * for fd in pass_fds: * if not os_get_inheritable(fd): */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pass_fds); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 42, __pyx_L4_error) if (__pyx_t_2) { /* "uvloop/handles/process.pyx":43 * restore_inheritable = set() * if pass_fds: * for fd in pass_fds: # <<<<<<<<<<<<<< * if not os_get_inheritable(fd): * restore_inheritable.add(fd) */ if (likely(PyList_CheckExact(__pyx_v_pass_fds)) || PyTuple_CheckExact(__pyx_v_pass_fds)) { __pyx_t_1 = __pyx_v_pass_fds; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pass_fds); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 43, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 43, __pyx_L4_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(5, 43, __pyx_L4_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 43, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(5, 43, __pyx_L4_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 43, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); #endif } } else { __pyx_t_8 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(5, 43, __pyx_L4_error) } break; } __Pyx_GOTREF(__pyx_t_8); } __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":44 * if pass_fds: * for fd in pass_fds: * if not os_get_inheritable(fd): # <<<<<<<<<<<<<< * restore_inheritable.add(fd) * os_set_inheritable(fd, True) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_get_inheritable); __pyx_t_9 = __pyx_v_6uvloop_4loop_os_get_inheritable; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (!__pyx_t_10) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_fd); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_fd}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_fd}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_fd); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 44, __pyx_L4_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = ((!__pyx_t_2) != 0); if (__pyx_t_12) { /* "uvloop/handles/process.pyx":45 * for fd in pass_fds: * if not os_get_inheritable(fd): * restore_inheritable.add(fd) # <<<<<<<<<<<<<< * os_set_inheritable(fd, True) * except: */ __pyx_t_13 = PySet_Add(__pyx_v_restore_inheritable, __pyx_v_fd); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(5, 45, __pyx_L4_error) /* "uvloop/handles/process.pyx":46 * if not os_get_inheritable(fd): * restore_inheritable.add(fd) * os_set_inheritable(fd, True) # <<<<<<<<<<<<<< * except: * self._abort_init() */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_9 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_11 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_14 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_fd, Py_True}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 46, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_fd, Py_True}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 46, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 46, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_v_fd); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, Py_True); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 46, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":44 * if pass_fds: * for fd in pass_fds: * if not os_get_inheritable(fd): # <<<<<<<<<<<<<< * restore_inheritable.add(fd) * os_set_inheritable(fd, True) */ } /* "uvloop/handles/process.pyx":43 * restore_inheritable = set() * if pass_fds: * for fd in pass_fds: # <<<<<<<<<<<<<< * if not os_get_inheritable(fd): * restore_inheritable.add(fd) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":42 * * restore_inheritable = set() * if pass_fds: # <<<<<<<<<<<<<< * for fd in pass_fds: * if not os_get_inheritable(fd): */ } /* "uvloop/handles/process.pyx":37 * self._handle.data = NULL * * try: # <<<<<<<<<<<<<< * self._init_options(args, env, cwd, start_new_session, * _stdin, _stdout, _stderr) */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":47 * restore_inheritable.add(fd) * os_set_inheritable(fd, True) * except: # <<<<<<<<<<<<<< * self._abort_init() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(5, 47, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/handles/process.pyx":48 * os_set_inheritable(fd, True) * except: * self._abort_init() # <<<<<<<<<<<<<< * raise * */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 48, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/process.pyx":49 * except: * self._abort_init() * raise # <<<<<<<<<<<<<< * * if __forking or loop.active_process_handler is not None: */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_9); __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __PYX_ERR(5, 49, __pyx_L6_except_error) } __pyx_L6_except_error:; /* "uvloop/handles/process.pyx":37 * self._handle.data = NULL * * try: # <<<<<<<<<<<<<< * self._init_options(args, env, cwd, start_new_session, * _stdin, _stdout, _stderr) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L11_try_end:; } /* "uvloop/handles/process.pyx":51 * raise * * if __forking or loop.active_process_handler is not None: # <<<<<<<<<<<<<< * # Our pthread_atfork handlers won't work correctly when * # another loop is forking in another thread (even though */ __pyx_t_2 = (__pyx_v_6uvloop_4loop___forking != 0); if (!__pyx_t_2) { } else { __pyx_t_12 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } __pyx_t_2 = (((PyObject *)__pyx_v_loop->active_process_handler) != Py_None); __pyx_t_15 = (__pyx_t_2 != 0); __pyx_t_12 = __pyx_t_15; __pyx_L19_bool_binop_done:; if (__pyx_t_12) { /* "uvloop/handles/process.pyx":55 * # another loop is forking in another thread (even though * # GIL should help us to avoid that.) * self._abort_init() # <<<<<<<<<<<<<< * raise RuntimeError( * 'Racing with another loop to spawn a process.') */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":56 * # GIL should help us to avoid that.) * self._abort_init() * raise RuntimeError( # <<<<<<<<<<<<<< * 'Racing with another loop to spawn a process.') * */ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(5, 56, __pyx_L1_error) /* "uvloop/handles/process.pyx":51 * raise * * if __forking or loop.active_process_handler is not None: # <<<<<<<<<<<<<< * # Our pthread_atfork handlers won't work correctly when * # another loop is forking in another thread (even though */ } /* "uvloop/handles/process.pyx":59 * 'Racing with another loop to spawn a process.') * * self._errpipe_read, self._errpipe_write = os_pipe() # <<<<<<<<<<<<<< * try: * os_set_inheritable(self._errpipe_write, True) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_pipe); __pyx_t_8 = __pyx_v_6uvloop_4loop_os_pipe; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); } } if (__pyx_t_1) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 59, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 59, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_8 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_1 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_10), 2) < 0) __PYX_ERR(5, 59, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 59, __pyx_L1_error) __pyx_L22_unpacking_done:; } __Pyx_GIVEREF(__pyx_t_8); __Pyx_GOTREF(__pyx_v_self->_errpipe_read); __Pyx_DECREF(__pyx_v_self->_errpipe_read); __pyx_v_self->_errpipe_read = __pyx_t_8; __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_errpipe_write); __Pyx_DECREF(__pyx_v_self->_errpipe_write); __pyx_v_self->_errpipe_write = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":60 * * self._errpipe_read, self._errpipe_write = os_pipe() * try: # <<<<<<<<<<<<<< * os_set_inheritable(self._errpipe_write, True) * */ /*try:*/ { /* "uvloop/handles/process.pyx":61 * self._errpipe_read, self._errpipe_write = os_pipe() * try: * os_set_inheritable(self._errpipe_write, True) # <<<<<<<<<<<<<< * * self._preexec_fn = preexec_fn */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_14 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_write, Py_True}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 61, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_write, Py_True}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 61, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 61, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_v_self->_errpipe_write); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, Py_True); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 61, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":63 * os_set_inheritable(self._errpipe_write, True) * * self._preexec_fn = preexec_fn # <<<<<<<<<<<<<< * self._restore_signals = restore_signals * */ __Pyx_INCREF(__pyx_v_preexec_fn); __Pyx_GIVEREF(__pyx_v_preexec_fn); __Pyx_GOTREF(__pyx_v_self->_preexec_fn); __Pyx_DECREF(__pyx_v_self->_preexec_fn); __pyx_v_self->_preexec_fn = __pyx_v_preexec_fn; /* "uvloop/handles/process.pyx":64 * * self._preexec_fn = preexec_fn * self._restore_signals = restore_signals # <<<<<<<<<<<<<< * * loop.active_process_handler = self */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_restore_signals); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 64, __pyx_L24_error) __pyx_v_self->_restore_signals = __pyx_t_12; /* "uvloop/handles/process.pyx":66 * self._restore_signals = restore_signals * * loop.active_process_handler = self # <<<<<<<<<<<<<< * __forking = 1 * __forking_loop = loop */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_loop->active_process_handler); __Pyx_DECREF(((PyObject *)__pyx_v_loop->active_process_handler)); __pyx_v_loop->active_process_handler = __pyx_v_self; /* "uvloop/handles/process.pyx":67 * * loop.active_process_handler = self * __forking = 1 # <<<<<<<<<<<<<< * __forking_loop = loop * */ __pyx_v_6uvloop_4loop___forking = 1; /* "uvloop/handles/process.pyx":68 * loop.active_process_handler = self * __forking = 1 * __forking_loop = loop # <<<<<<<<<<<<<< * * _PyImport_AcquireLock() */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop)); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, __pyx_v_loop); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); /* "uvloop/handles/process.pyx":70 * __forking_loop = loop * * _PyImport_AcquireLock() # <<<<<<<<<<<<<< * * err = uv.uv_spawn(loop.uvloop, */ _PyImport_AcquireLock(); /* "uvloop/handles/process.pyx":72 * _PyImport_AcquireLock() * * err = uv.uv_spawn(loop.uvloop, # <<<<<<<<<<<<<< * self._handle, * &self.options) */ __pyx_v_err = uv_spawn(__pyx_v_loop->uvloop, ((uv_process_t *)__pyx_v_self->__pyx_base._handle), (&__pyx_v_self->options)); /* "uvloop/handles/process.pyx":76 * &self.options) * * __forking = 0 # <<<<<<<<<<<<<< * __forking_loop = None * loop.active_process_handler = None */ __pyx_v_6uvloop_4loop___forking = 0; /* "uvloop/handles/process.pyx":77 * * __forking = 0 * __forking_loop = None # <<<<<<<<<<<<<< * loop.active_process_handler = None * */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop)); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/handles/process.pyx":78 * __forking = 0 * __forking_loop = None * loop.active_process_handler = None # <<<<<<<<<<<<<< * * if _PyImport_ReleaseLock() < 0: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_loop->active_process_handler); __Pyx_DECREF(((PyObject *)__pyx_v_loop->active_process_handler)); __pyx_v_loop->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None); /* "uvloop/handles/process.pyx":80 * loop.active_process_handler = None * * if _PyImport_ReleaseLock() < 0: # <<<<<<<<<<<<<< * # See CPython/posixmodule.c for details * self._abort_init() */ __pyx_t_12 = ((_PyImport_ReleaseLock() < 0) != 0); if (__pyx_t_12) { /* "uvloop/handles/process.pyx":82 * if _PyImport_ReleaseLock() < 0: * # See CPython/posixmodule.c for details * self._abort_init() # <<<<<<<<<<<<<< * raise RuntimeError('not holding the import lock') * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 82, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":83 * # See CPython/posixmodule.c for details * self._abort_init() * raise RuntimeError('not holding the import lock') # <<<<<<<<<<<<<< * * if err < 0: */ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 83, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(5, 83, __pyx_L24_error) /* "uvloop/handles/process.pyx":80 * loop.active_process_handler = None * * if _PyImport_ReleaseLock() < 0: # <<<<<<<<<<<<<< * # See CPython/posixmodule.c for details * self._abort_init() */ } /* "uvloop/handles/process.pyx":85 * raise RuntimeError('not holding the import lock') * * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_12 = ((__pyx_v_err < 0) != 0); if (__pyx_t_12) { /* "uvloop/handles/process.pyx":86 * * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 86, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":87 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_t_9 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 87, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(5, 87, __pyx_L24_error) /* "uvloop/handles/process.pyx":85 * raise RuntimeError('not holding the import lock') * * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/process.pyx":89 * raise convert_error(err) * * self._finish_init() # <<<<<<<<<<<<<< * * os_close(self._errpipe_write) */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 89, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":91 * self._finish_init() * * os_close(self._errpipe_write) # <<<<<<<<<<<<<< * * if preexec_fn is not None: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_10) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 91, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 91, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 91, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 91, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_self->_errpipe_write); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 91, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":93 * os_close(self._errpipe_write) * * if preexec_fn is not None: # <<<<<<<<<<<<<< * errpipe_data = bytearray() * while True: */ __pyx_t_12 = (__pyx_v_preexec_fn != Py_None); __pyx_t_15 = (__pyx_t_12 != 0); if (__pyx_t_15) { /* "uvloop/handles/process.pyx":94 * * if preexec_fn is not None: * errpipe_data = bytearray() # <<<<<<<<<<<<<< * while True: * # XXX: This is a blocking code that has to be */ __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyByteArray_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 94, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __pyx_v_errpipe_data = __pyx_t_9; __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":95 * if preexec_fn is not None: * errpipe_data = bytearray() * while True: # <<<<<<<<<<<<<< * # XXX: This is a blocking code that has to be * # rewritten (using loop.connect_read_pipe() or */ while (1) { /* "uvloop/handles/process.pyx":99 * # rewritten (using loop.connect_read_pipe() or * # otherwise.) * part = os_read(self._errpipe_read, 50000) # <<<<<<<<<<<<<< * errpipe_data += part * if not part or len(errpipe_data) > 50000: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_read); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_read; __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_14 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_read, __pyx_int_50000}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 99, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self->_errpipe_read, __pyx_int_50000}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 99, __pyx_L24_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 99, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_self->_errpipe_read); __Pyx_GIVEREF(__pyx_v_self->_errpipe_read); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_v_self->_errpipe_read); __Pyx_INCREF(__pyx_int_50000); __Pyx_GIVEREF(__pyx_int_50000); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_int_50000); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 99, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":100 * # otherwise.) * part = os_read(self._errpipe_read, 50000) * errpipe_data += part # <<<<<<<<<<<<<< * if not part or len(errpipe_data) > 50000: * break */ __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_errpipe_data, __pyx_v_part); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 100, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_errpipe_data, __pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":101 * part = os_read(self._errpipe_read, 50000) * errpipe_data += part * if not part or len(errpipe_data) > 50000: # <<<<<<<<<<<<<< * break * */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(5, 101, __pyx_L24_error) __pyx_t_2 = ((!__pyx_t_12) != 0); if (!__pyx_t_2) { } else { __pyx_t_15 = __pyx_t_2; goto __pyx_L32_bool_binop_done; } __pyx_t_6 = PyObject_Length(__pyx_v_errpipe_data); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(5, 101, __pyx_L24_error) __pyx_t_2 = ((__pyx_t_6 > 0xC350) != 0); __pyx_t_15 = __pyx_t_2; __pyx_L32_bool_binop_done:; if (__pyx_t_15) { /* "uvloop/handles/process.pyx":102 * errpipe_data += part * if not part or len(errpipe_data) > 50000: * break # <<<<<<<<<<<<<< * * finally: */ goto __pyx_L30_break; /* "uvloop/handles/process.pyx":101 * part = os_read(self._errpipe_read, 50000) * errpipe_data += part * if not part or len(errpipe_data) > 50000: # <<<<<<<<<<<<<< * break * */ } } __pyx_L30_break:; /* "uvloop/handles/process.pyx":93 * os_close(self._errpipe_write) * * if preexec_fn is not None: # <<<<<<<<<<<<<< * errpipe_data = bytearray() * while True: */ } } /* "uvloop/handles/process.pyx":105 * * finally: * os_close(self._errpipe_read) # <<<<<<<<<<<<<< * try: * os_close(self._errpipe_write) */ /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_10) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_read}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_read}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_read); __Pyx_GIVEREF(__pyx_v_self->_errpipe_read); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_self->_errpipe_read); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/handles/process.pyx":107 * os_close(self._errpipe_read) * try: * os_close(self._errpipe_write) # <<<<<<<<<<<<<< * except OSError: * # Might be already closed */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_8) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L34_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L34_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 107, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_self->_errpipe_write); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L41_try_end; __pyx_L34_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":108 * try: * os_close(self._errpipe_write) * except OSError: # <<<<<<<<<<<<<< * # Might be already closed * pass */ __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_14) { __Pyx_ErrRestore(0,0,0); goto __pyx_L35_exception_handled; } goto __pyx_L36_except_error; __pyx_L36_except_error:; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); goto __pyx_L1_error; __pyx_L35_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_L41_try_end:; } goto __pyx_L25; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L24_error:; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { /* "uvloop/handles/process.pyx":105 * * finally: * os_close(self._errpipe_read) # <<<<<<<<<<<<<< * try: * os_close(self._errpipe_write) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_10) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_read}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L43_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self->_errpipe_read}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L43_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 105, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_read); __Pyx_GIVEREF(__pyx_v_self->_errpipe_read); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_self->_errpipe_read); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 105, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); /*try:*/ { /* "uvloop/handles/process.pyx":107 * os_close(self._errpipe_read) * try: * os_close(self._errpipe_write) # <<<<<<<<<<<<<< * except OSError: * # Might be already closed */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_8) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->_errpipe_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L44_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L44_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 107, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_self->_errpipe_write); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 107, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ } __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; goto __pyx_L51_try_end; __pyx_L44_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":108 * try: * os_close(self._errpipe_write) * except OSError: # <<<<<<<<<<<<<< * # Might be already closed * pass */ __pyx_t_25 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OSError); if (__pyx_t_25) { __Pyx_ErrRestore(0,0,0); goto __pyx_L45_exception_handled; } goto __pyx_L46_except_error; __pyx_L46_except_error:; /* "uvloop/handles/process.pyx":106 * finally: * os_close(self._errpipe_read) * try: # <<<<<<<<<<<<<< * os_close(self._errpipe_write) * except OSError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); goto __pyx_L43_error; __pyx_L45_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); __pyx_L51_try_end:; } } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestore(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; goto __pyx_L1_error; __pyx_L43_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; goto __pyx_L1_error; } __pyx_L25:; } /* "uvloop/handles/process.pyx":115 * # so that the transport knows what the PID was even * # after the process is finished. * self._pid = (self._handle).pid # <<<<<<<<<<<<<< * * for fd in restore_inheritable: */ __pyx_t_9 = __Pyx_PyInt_From_int(((uv_process_t *)__pyx_v_self->__pyx_base._handle)->pid); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_GOTREF(__pyx_v_self->_pid); __Pyx_DECREF(__pyx_v_self->_pid); __pyx_v_self->_pid = __pyx_t_9; __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":117 * self._pid = (self._handle).pid * * for fd in restore_inheritable: # <<<<<<<<<<<<<< * os_set_inheritable(fd, False) * */ __pyx_t_9 = PyObject_GetIter(__pyx_v_restore_inheritable); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 117, __pyx_L1_error) for (;;) { { __pyx_t_1 = __pyx_t_7(__pyx_t_9); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(5, 117, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":118 * * for fd in restore_inheritable: * os_set_inheritable(fd, False) # <<<<<<<<<<<<<< * * fds_to_close = self._fds_to_close */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_10 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_8 = NULL; __pyx_t_17 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_17 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_fd, Py_False}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_fd, Py_False}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_17, __pyx_v_fd); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_17, Py_False); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":117 * self._pid = (self._handle).pid * * for fd in restore_inheritable: # <<<<<<<<<<<<<< * os_set_inheritable(fd, False) * */ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":120 * os_set_inheritable(fd, False) * * fds_to_close = self._fds_to_close # <<<<<<<<<<<<<< * self._fds_to_close = None * for fd in fds_to_close: */ __pyx_t_9 = __pyx_v_self->_fds_to_close; __Pyx_INCREF(__pyx_t_9); __pyx_v_fds_to_close = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":121 * * fds_to_close = self._fds_to_close * self._fds_to_close = None # <<<<<<<<<<<<<< * for fd in fds_to_close: * os_close(fd) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fds_to_close); __Pyx_DECREF(__pyx_v_self->_fds_to_close); __pyx_v_self->_fds_to_close = ((PyObject*)Py_None); /* "uvloop/handles/process.pyx":122 * fds_to_close = self._fds_to_close * self._fds_to_close = None * for fd in fds_to_close: # <<<<<<<<<<<<<< * os_close(fd) * */ __pyx_t_9 = PyObject_GetIter(__pyx_v_fds_to_close); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 122, __pyx_L1_error) for (;;) { { __pyx_t_1 = __pyx_t_7(__pyx_t_9); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(5, 122, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":123 * self._fds_to_close = None * for fd in fds_to_close: * os_close(fd) # <<<<<<<<<<<<<< * * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_10 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_11) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_fd}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 123, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_fd}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 123, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_v_fd); __Pyx_GIVEREF(__pyx_v_fd); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fd); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":122 * fds_to_close = self._fds_to_close * self._fds_to_close = None * for fd in fds_to_close: # <<<<<<<<<<<<<< * os_close(fd) * */ } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":125 * os_close(fd) * * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: # <<<<<<<<<<<<<< * time_sleep(1) * */ __pyx_t_9 = __Pyx_PyInt_AndObjC(__pyx_v_debug_flags, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(5, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_15) { /* "uvloop/handles/process.pyx":126 * * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: * time_sleep(1) # <<<<<<<<<<<<<< * * if preexec_fn is not None and errpipe_data: */ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_time_sleep, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/process.pyx":125 * os_close(fd) * * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: # <<<<<<<<<<<<<< * time_sleep(1) * */ } /* "uvloop/handles/process.pyx":128 * time_sleep(1) * * if preexec_fn is not None and errpipe_data: # <<<<<<<<<<<<<< * # preexec_fn has raised an exception. The child * # process must be dead now. */ __pyx_t_2 = (__pyx_v_preexec_fn != Py_None); __pyx_t_12 = (__pyx_t_2 != 0); if (__pyx_t_12) { } else { __pyx_t_15 = __pyx_t_12; goto __pyx_L58_bool_binop_done; } if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(5, 128, __pyx_L1_error) } __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_errpipe_data); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(5, 128, __pyx_L1_error) __pyx_t_15 = __pyx_t_12; __pyx_L58_bool_binop_done:; if (__pyx_t_15) { /* "uvloop/handles/process.pyx":131 * # preexec_fn has raised an exception. The child * # process must be dead now. * try: # <<<<<<<<<<<<<< * exc_name, exc_msg = errpipe_data.split(b':', 1) * exc_name = exc_name.decode() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { /* "uvloop/handles/process.pyx":132 * # process must be dead now. * try: * exc_name, exc_msg = errpipe_data.split(b':', 1) # <<<<<<<<<<<<<< * exc_name = exc_name.decode() * exc_msg = exc_msg.decode() */ if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(5, 132, __pyx_L60_error) } __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_errpipe_data, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 132, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 132, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 132, __pyx_L60_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 132, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 132, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 132, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_16(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L68_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_16(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L68_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_8), 2) < 0) __PYX_ERR(5, 132, __pyx_L60_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L69_unpacking_done; __pyx_L68_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 132, __pyx_L60_error) __pyx_L69_unpacking_done:; } __pyx_v_exc_name = __pyx_t_9; __pyx_t_9 = 0; __pyx_v_exc_msg = __pyx_t_10; __pyx_t_10 = 0; /* "uvloop/handles/process.pyx":133 * try: * exc_name, exc_msg = errpipe_data.split(b':', 1) * exc_name = exc_name.decode() # <<<<<<<<<<<<<< * exc_msg = exc_msg.decode() * except: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_name, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 133, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 133, __pyx_L60_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 133, __pyx_L60_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_exc_name, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":134 * exc_name, exc_msg = errpipe_data.split(b':', 1) * exc_name = exc_name.decode() * exc_msg = exc_msg.decode() # <<<<<<<<<<<<<< * except: * self._close() */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_msg, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 134, __pyx_L60_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 134, __pyx_L60_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 134, __pyx_L60_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_exc_msg, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":131 * # preexec_fn has raised an exception. The child * # process must be dead now. * try: # <<<<<<<<<<<<<< * exc_name, exc_msg = errpipe_data.split(b':', 1) * exc_name = exc_name.decode() */ } __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L67_try_end; __pyx_L60_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":135 * exc_name = exc_name.decode() * exc_msg = exc_msg.decode() * except: # <<<<<<<<<<<<<< * self._close() * raise subprocess_SubprocessError( */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_9) < 0) __PYX_ERR(5, 135, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/handles/process.pyx":136 * exc_msg = exc_msg.decode() * except: * self._close() # <<<<<<<<<<<<<< * raise subprocess_SubprocessError( * 'Bad exception data from child: {!r}'.format( */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 136, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":138 * self._close() * raise subprocess_SubprocessError( * 'Bad exception data from child: {!r}'.format( # <<<<<<<<<<<<<< * errpipe_data)) * exc_cls = getattr(__builtins__, exc_name, */ __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Bad_exception_data_from_child_r, __pyx_n_s_format); if (unlikely(!__pyx_t_26)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_26); /* "uvloop/handles/process.pyx":139 * raise subprocess_SubprocessError( * 'Bad exception data from child: {!r}'.format( * errpipe_data)) # <<<<<<<<<<<<<< * exc_cls = getattr(__builtins__, exc_name, * subprocess_SubprocessError) */ if (unlikely(!__pyx_v_errpipe_data)) { __Pyx_RaiseUnboundLocalError("errpipe_data"); __PYX_ERR(5, 139, __pyx_L62_except_error) } __pyx_t_27 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_26))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_26); if (likely(__pyx_t_27)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_26, function); } } if (!__pyx_t_27) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_v_errpipe_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_26)) { PyObject *__pyx_temp[2] = {__pyx_t_27, __pyx_v_errpipe_data}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_26, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_26)) { PyObject *__pyx_temp[2] = {__pyx_t_27, __pyx_v_errpipe_data}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_26, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_GOTREF(__pyx_t_11); } else #endif { __pyx_t_28 = PyTuple_New(1+1); if (unlikely(!__pyx_t_28)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_28); __Pyx_GIVEREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_27); __pyx_t_27 = NULL; __Pyx_INCREF(__pyx_v_errpipe_data); __Pyx_GIVEREF(__pyx_v_errpipe_data); PyTuple_SET_ITEM(__pyx_t_28, 0+1, __pyx_v_errpipe_data); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_28, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 138, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; } } __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_subprocess_SubprocessError); __pyx_t_26 = __pyx_v_6uvloop_4loop_subprocess_SubprocessError; __pyx_t_28 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) { __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_26); if (likely(__pyx_t_28)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26); __Pyx_INCREF(__pyx_t_28); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_26, function); } } if (!__pyx_t_28) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 137, __pyx_L62_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_26)) { PyObject *__pyx_temp[2] = {__pyx_t_28, __pyx_t_11}; __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_26, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 137, __pyx_L62_except_error) __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_26)) { PyObject *__pyx_temp[2] = {__pyx_t_28, __pyx_t_11}; __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_26, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 137, __pyx_L62_except_error) __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_27 = PyTuple_New(1+1); if (unlikely(!__pyx_t_27)) __PYX_ERR(5, 137, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_27); __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_28); __pyx_t_28 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_27, 0+1, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_27, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 137, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; } } __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 137, __pyx_L62_except_error) } __pyx_L62_except_error:; /* "uvloop/handles/process.pyx":131 * # preexec_fn has raised an exception. The child * # process must be dead now. * try: # <<<<<<<<<<<<<< * exc_name, exc_msg = errpipe_data.split(b':', 1) * exc_name = exc_name.decode() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); goto __pyx_L1_error; __pyx_L67_try_end:; } /* "uvloop/handles/process.pyx":140 * 'Bad exception data from child: {!r}'.format( * errpipe_data)) * exc_cls = getattr(__builtins__, exc_name, # <<<<<<<<<<<<<< * subprocess_SubprocessError) * */ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_builtins); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "uvloop/handles/process.pyx":141 * errpipe_data)) * exc_cls = getattr(__builtins__, exc_name, * subprocess_SubprocessError) # <<<<<<<<<<<<<< * * exc = subprocess_SubprocessError( */ __pyx_t_10 = __pyx_v_6uvloop_4loop_subprocess_SubprocessError; __Pyx_INCREF(__pyx_t_10); /* "uvloop/handles/process.pyx":140 * 'Bad exception data from child: {!r}'.format( * errpipe_data)) * exc_cls = getattr(__builtins__, exc_name, # <<<<<<<<<<<<<< * subprocess_SubprocessError) * */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_9, __pyx_v_exc_name, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_exc_cls = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":143 * subprocess_SubprocessError) * * exc = subprocess_SubprocessError( # <<<<<<<<<<<<<< * 'Exception occurred in preexec_fn.') * exc.__cause__ = exc_cls(exc_msg) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_subprocess_SubprocessError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":145 * exc = subprocess_SubprocessError( * 'Exception occurred in preexec_fn.') * exc.__cause__ = exc_cls(exc_msg) # <<<<<<<<<<<<<< * self._close() * raise exc */ __Pyx_INCREF(__pyx_v_exc_cls); __pyx_t_10 = __pyx_v_exc_cls; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_exc_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_exc_msg}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_exc_msg}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_exc_msg); __Pyx_GIVEREF(__pyx_v_exc_msg); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_exc_msg); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_exc, __pyx_n_s_cause, __pyx_t_1) < 0) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":146 * 'Exception occurred in preexec_fn.') * exc.__cause__ = exc_cls(exc_msg) * self._close() # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":147 * exc.__cause__ = exc_cls(exc_msg) * self._close() * raise exc # <<<<<<<<<<<<<< * * cdef _after_fork(self): */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(5, 147, __pyx_L1_error) /* "uvloop/handles/process.pyx":128 * time_sleep(1) * * if preexec_fn is not None and errpipe_data: # <<<<<<<<<<<<<< * # preexec_fn has raised an exception. The child * # process must be dead now. */ } /* "uvloop/handles/process.pyx":14 * self._restore_signals = True * * cdef _init(self, Loop loop, list args, dict env, # <<<<<<<<<<<<<< * cwd, start_new_session, * _stdin, _stdout, _stderr, # std* can be defined as macros in C */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_26); __Pyx_XDECREF(__pyx_t_27); __Pyx_XDECREF(__pyx_t_28); __Pyx_AddTraceback("uvloop.loop.UVProcess._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_restore_inheritable); __Pyx_XDECREF(__pyx_v_fd); __Pyx_XDECREF(__pyx_v_errpipe_data); __Pyx_XDECREF(__pyx_v_part); __Pyx_XDECREF(__pyx_v_fds_to_close); __Pyx_XDECREF(__pyx_v_exc_name); __Pyx_XDECREF(__pyx_v_exc_msg); __Pyx_XDECREF(__pyx_v_exc_cls); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":149 * raise exc * * cdef _after_fork(self): # <<<<<<<<<<<<<< * # See CPython/_posixsubprocess.c for details * */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__after_fork(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_f = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; int __pyx_t_20; char const *__pyx_t_21; PyObject *__pyx_t_22 = NULL; char const *__pyx_t_23; __Pyx_RefNannySetupContext("_after_fork", 0); /* "uvloop/handles/process.pyx":152 * # See CPython/_posixsubprocess.c for details * * if self._restore_signals: # <<<<<<<<<<<<<< * _Py_RestoreSignals() * */ __pyx_t_1 = (__pyx_v_self->_restore_signals != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":153 * * if self._restore_signals: * _Py_RestoreSignals() # <<<<<<<<<<<<<< * * if self._preexec_fn is not None: */ _Py_RestoreSignals(); /* "uvloop/handles/process.pyx":152 * # See CPython/_posixsubprocess.c for details * * if self._restore_signals: # <<<<<<<<<<<<<< * _Py_RestoreSignals() * */ } /* "uvloop/handles/process.pyx":155 * _Py_RestoreSignals() * * if self._preexec_fn is not None: # <<<<<<<<<<<<<< * PyOS_AfterFork() * */ __pyx_t_1 = (__pyx_v_self->_preexec_fn != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":156 * * if self._preexec_fn is not None: * PyOS_AfterFork() # <<<<<<<<<<<<<< * * try: */ PyOS_AfterFork(); /* "uvloop/handles/process.pyx":158 * PyOS_AfterFork() * * try: # <<<<<<<<<<<<<< * gc_disable() * self._preexec_fn() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/process.pyx":159 * * try: * gc_disable() # <<<<<<<<<<<<<< * self._preexec_fn() * except BaseException as ex: */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_gc_disable); __pyx_t_7 = __pyx_v_6uvloop_4loop_gc_disable; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 159, __pyx_L5_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 159, __pyx_L5_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":160 * try: * gc_disable() * self._preexec_fn() # <<<<<<<<<<<<<< * except BaseException as ex: * try: */ __Pyx_INCREF(__pyx_v_self->_preexec_fn); __pyx_t_7 = __pyx_v_self->_preexec_fn; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 160, __pyx_L5_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 160, __pyx_L5_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":158 * PyOS_AfterFork() * * try: # <<<<<<<<<<<<<< * gc_disable() * self._preexec_fn() */ } /* "uvloop/handles/process.pyx":170 * system._exit(255) * else: * os_close(self._errpipe_write) # <<<<<<<<<<<<<< * else: * os_close(self._errpipe_write) */ /*else:*/ { __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_7 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->_errpipe_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 170, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 170, __pyx_L7_except_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_self->_errpipe_write}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 170, __pyx_L7_except_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 170, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->_errpipe_write); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 170, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":161 * gc_disable() * self._preexec_fn() * except BaseException as ex: # <<<<<<<<<<<<<< * try: * with open(self._errpipe_write, 'wb') as f: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(5, 161, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/process.pyx":162 * self._preexec_fn() * except BaseException as ex: * try: # <<<<<<<<<<<<<< * with open(self._errpipe_write, 'wb') as f: * f.write(str(ex.__class__.__name__).encode()) */ /*try:*/ { /* "uvloop/handles/process.pyx":163 * except BaseException as ex: * try: * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<< * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') */ /*with:*/ { __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 163, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->_errpipe_write); __Pyx_INCREF(__pyx_n_u_wb); __Pyx_GIVEREF(__pyx_n_u_wb); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_u_wb); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 163, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 163, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_enter); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 163, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (__pyx_t_14) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 163, __pyx_L25_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 163, __pyx_L25_error) } __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_t_8; __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { __pyx_v_f = __pyx_t_13; __pyx_t_13 = 0; /* "uvloop/handles/process.pyx":164 * try: * with open(self._errpipe_write, 'wb') as f: * f.write(str(ex.__class__.__name__).encode()) # <<<<<<<<<<<<<< * f.write(b':') * f.write(str(ex.args[0]).encode()) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_name); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_14), NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_14) { __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_13); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_8}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_8}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_18, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 164, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "uvloop/handles/process.pyx":165 * with open(self._errpipe_write, 'wb') as f: * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') # <<<<<<<<<<<<<< * f.write(str(ex.args[0]).encode()) * finally: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 165, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 165, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/handles/process.pyx":166 * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') * f.write(str(ex.args[0]).encode()) # <<<<<<<<<<<<<< * finally: * system._exit(255) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_args); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_18, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = PyUnicode_AsEncodedString(((PyObject*)__pyx_t_8), NULL, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } if (!__pyx_t_8) { __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_GOTREF(__pyx_t_11); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_18}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_18}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_18); __pyx_t_18 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 166, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/handles/process.pyx":163 * except BaseException as ex: * try: * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<< * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') */ } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L38_try_end; __pyx_L31_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; /*except:*/ { __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_13, &__pyx_t_14) < 0) __PYX_ERR(5, 163, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_14); __pyx_t_18 = PyTuple_Pack(3, __pyx_t_11, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 163, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_18, NULL); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 163, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_19); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (__pyx_t_2 < 0) __PYX_ERR(5, 163, __pyx_L33_except_error) __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_13, __pyx_t_14); __pyx_t_11 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __PYX_ERR(5, 163, __pyx_L33_except_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L32_exception_handled; } __pyx_L33_except_error:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); goto __pyx_L23_error; __pyx_L32_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_L38_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_12) { __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__150, NULL); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 163, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } goto __pyx_L30; } __pyx_L30:; } goto __pyx_L42; __pyx_L25_error:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L23_error; __pyx_L42:; } } /* "uvloop/handles/process.pyx":168 * f.write(str(ex.args[0]).encode()) * finally: * system._exit(255) # <<<<<<<<<<<<<< * else: * os_close(self._errpipe_write) */ /*finally:*/ { /*normal exit:*/{ _exit(0xFF); goto __pyx_L24; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L23_error:; __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_19 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_19, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_17, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_10 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { _exit(0xFF); } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_19, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_17, __pyx_t_16); __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_19 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; goto __pyx_L18_error; } __pyx_L24:; } } /* "uvloop/handles/process.pyx":161 * gc_disable() * self._preexec_fn() * except BaseException as ex: # <<<<<<<<<<<<<< * try: * with open(self._errpipe_write, 'wb') as f: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L19; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_22 = 0; __pyx_t_19 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_12 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_12); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_19, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_19, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_20 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_12); } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_19, __pyx_t_15); __pyx_t_22 = 0; __pyx_t_19 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_12 = 0; __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_23; goto __pyx_L7_except_error; } __pyx_L19:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/handles/process.pyx":158 * PyOS_AfterFork() * * try: # <<<<<<<<<<<<<< * gc_disable() * self._preexec_fn() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L12_try_end:; } /* "uvloop/handles/process.pyx":155 * _Py_RestoreSignals() * * if self._preexec_fn is not None: # <<<<<<<<<<<<<< * PyOS_AfterFork() * */ goto __pyx_L4; } /* "uvloop/handles/process.pyx":172 * os_close(self._errpipe_write) * else: * os_close(self._errpipe_write) # <<<<<<<<<<<<<< * * cdef _close_after_spawn(self, int fd): */ /*else*/ { __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_close); __pyx_t_7 = __pyx_v_6uvloop_4loop_os_close; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_6) { __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->_errpipe_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 172, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_self->_errpipe_write}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 172, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self->_errpipe_write); __Pyx_GIVEREF(__pyx_v_self->_errpipe_write); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_self->_errpipe_write); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L4:; /* "uvloop/handles/process.pyx":149 * raise exc * * cdef _after_fork(self): # <<<<<<<<<<<<<< * # See CPython/_posixsubprocess.c for details * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("uvloop.loop.UVProcess._after_fork", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":174 * os_close(self._errpipe_write) * * cdef _close_after_spawn(self, int fd): # <<<<<<<<<<<<<< * if self._fds_to_close is None: * raise RuntimeError( */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("_close_after_spawn", 0); /* "uvloop/handles/process.pyx":175 * * cdef _close_after_spawn(self, int fd): * if self._fds_to_close is None: # <<<<<<<<<<<<<< * raise RuntimeError( * 'UVProcess._close_after_spawn called after uv_spawn') */ __pyx_t_1 = (__pyx_v_self->_fds_to_close == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":176 * cdef _close_after_spawn(self, int fd): * if self._fds_to_close is None: * raise RuntimeError( # <<<<<<<<<<<<<< * 'UVProcess._close_after_spawn called after uv_spawn') * self._fds_to_close.add(fd) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 176, __pyx_L1_error) /* "uvloop/handles/process.pyx":175 * * cdef _close_after_spawn(self, int fd): * if self._fds_to_close is None: # <<<<<<<<<<<<<< * raise RuntimeError( * 'UVProcess._close_after_spawn called after uv_spawn') */ } /* "uvloop/handles/process.pyx":178 * raise RuntimeError( * 'UVProcess._close_after_spawn called after uv_spawn') * self._fds_to_close.add(fd) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ if (unlikely(__pyx_v_self->_fds_to_close == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); __PYX_ERR(5, 178, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySet_Add(__pyx_v_self->_fds_to_close, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(5, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":174 * os_close(self._errpipe_write) * * cdef _close_after_spawn(self, int fd): # <<<<<<<<<<<<<< * if self._fds_to_close is None: * raise RuntimeError( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UVProcess._close_after_spawn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":180 * self._fds_to_close.add(fd) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.uv_opt_env is not NULL: * PyMem_RawFree(self.uv_opt_env) */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_9UVProcess_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/handles/process.pyx":181 * * def __dealloc__(self): * if self.uv_opt_env is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_opt_env) * self.uv_opt_env = NULL */ __pyx_t_1 = ((__pyx_v_self->uv_opt_env != NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":182 * def __dealloc__(self): * if self.uv_opt_env is not NULL: * PyMem_RawFree(self.uv_opt_env) # <<<<<<<<<<<<<< * self.uv_opt_env = NULL * */ PyMem_RawFree(__pyx_v_self->uv_opt_env); /* "uvloop/handles/process.pyx":183 * if self.uv_opt_env is not NULL: * PyMem_RawFree(self.uv_opt_env) * self.uv_opt_env = NULL # <<<<<<<<<<<<<< * * if self.uv_opt_args is not NULL: */ __pyx_v_self->uv_opt_env = NULL; /* "uvloop/handles/process.pyx":181 * * def __dealloc__(self): * if self.uv_opt_env is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_opt_env) * self.uv_opt_env = NULL */ } /* "uvloop/handles/process.pyx":185 * self.uv_opt_env = NULL * * if self.uv_opt_args is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_opt_args) * self.uv_opt_args = NULL */ __pyx_t_1 = ((__pyx_v_self->uv_opt_args != NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":186 * * if self.uv_opt_args is not NULL: * PyMem_RawFree(self.uv_opt_args) # <<<<<<<<<<<<<< * self.uv_opt_args = NULL * */ PyMem_RawFree(__pyx_v_self->uv_opt_args); /* "uvloop/handles/process.pyx":187 * if self.uv_opt_args is not NULL: * PyMem_RawFree(self.uv_opt_args) * self.uv_opt_args = NULL # <<<<<<<<<<<<<< * * cdef char** __to_cstring_array(self, list arr): */ __pyx_v_self->uv_opt_args = NULL; /* "uvloop/handles/process.pyx":185 * self.uv_opt_env = NULL * * if self.uv_opt_args is not NULL: # <<<<<<<<<<<<<< * PyMem_RawFree(self.uv_opt_args) * self.uv_opt_args = NULL */ } /* "uvloop/handles/process.pyx":180 * self._fds_to_close.add(fd) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.uv_opt_env is not NULL: * PyMem_RawFree(self.uv_opt_env) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/process.pyx":189 * self.uv_opt_args = NULL * * cdef char** __to_cstring_array(self, list arr): # <<<<<<<<<<<<<< * cdef: * int i */ static char **__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_arr) { int __pyx_v_i; int __pyx_v_arr_len; PyObject *__pyx_v_el = 0; char **__pyx_v_ret; char **__pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; __Pyx_RefNannySetupContext("__to_cstring_array", 0); /* "uvloop/handles/process.pyx":192 * cdef: * int i * int arr_len = len(arr) # <<<<<<<<<<<<<< * bytes el * */ if (unlikely(__pyx_v_arr == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(5, 192, __pyx_L1_error) } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_arr); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(5, 192, __pyx_L1_error) __pyx_v_arr_len = __pyx_t_1; /* "uvloop/handles/process.pyx":197 * char **ret * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * assert arr_len > 0 * */ __pyx_t_2 = (UVLOOP_DEBUG != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":198 * * if UVLOOP_DEBUG: * assert arr_len > 0 # <<<<<<<<<<<<<< * * ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_arr_len > 0) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(5, 198, __pyx_L1_error) } } #endif /* "uvloop/handles/process.pyx":197 * char **ret * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * assert arr_len > 0 * */ } /* "uvloop/handles/process.pyx":200 * assert arr_len > 0 * * ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) # <<<<<<<<<<<<<< * if ret is NULL: * raise MemoryError() */ __pyx_v_ret = ((char **)PyMem_RawMalloc(((__pyx_v_arr_len + 1) * (sizeof(char *))))); /* "uvloop/handles/process.pyx":201 * * ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) * if ret is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_2 = ((__pyx_v_ret == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":202 * ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) * if ret is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * * for i in range(arr_len): */ PyErr_NoMemory(); __PYX_ERR(5, 202, __pyx_L1_error) /* "uvloop/handles/process.pyx":201 * * ret = PyMem_RawMalloc((arr_len + 1) * sizeof(char *)) * if ret is NULL: # <<<<<<<<<<<<<< * raise MemoryError() * */ } /* "uvloop/handles/process.pyx":204 * raise MemoryError() * * for i in range(arr_len): # <<<<<<<<<<<<<< * el = arr[i] * # NB: PyBytes_AsSptring doesn't copy the data; */ __pyx_t_3 = __pyx_v_arr_len; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "uvloop/handles/process.pyx":205 * * for i in range(arr_len): * el = arr[i] # <<<<<<<<<<<<<< * # NB: PyBytes_AsSptring doesn't copy the data; * # we have to be careful when the "arr" is GCed, */ if (unlikely(__pyx_v_arr == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 205, __pyx_L1_error) } __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_arr, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(5, 205, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_el, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":209 * # we have to be careful when the "arr" is GCed, * # and it shouldn't be ever mutated. * ret[i] = PyBytes_AsString(el) # <<<<<<<<<<<<<< * * ret[arr_len] = NULL */ __pyx_t_6 = PyBytes_AsString(__pyx_v_el); if (unlikely(__pyx_t_6 == NULL)) __PYX_ERR(5, 209, __pyx_L1_error) (__pyx_v_ret[__pyx_v_i]) = __pyx_t_6; } /* "uvloop/handles/process.pyx":211 * ret[i] = PyBytes_AsString(el) * * ret[arr_len] = NULL # <<<<<<<<<<<<<< * return ret * */ (__pyx_v_ret[__pyx_v_arr_len]) = NULL; /* "uvloop/handles/process.pyx":212 * * ret[arr_len] = NULL * return ret # <<<<<<<<<<<<<< * * cdef _init_options(self, list args, dict env, cwd, start_new_session, */ __pyx_r = __pyx_v_ret; goto __pyx_L0; /* "uvloop/handles/process.pyx":189 * self.uv_opt_args = NULL * * cdef char** __to_cstring_array(self, list arr): # <<<<<<<<<<<<<< * cdef: * int i */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("uvloop.loop.UVProcess.__to_cstring_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_el); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":214 * return ret * * cdef _init_options(self, list args, dict env, cwd, start_new_session, # <<<<<<<<<<<<<< * _stdin, _stdout, _stderr): * */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_options(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char **__pyx_t_2; char *__pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("_init_options", 0); __Pyx_INCREF(__pyx_v_cwd); /* "uvloop/handles/process.pyx":217 * _stdin, _stdout, _stderr): * * memset(&self.options, 0, sizeof(uv.uv_process_options_t)) # <<<<<<<<<<<<<< * * self._init_env(env) */ memset((&__pyx_v_self->options), 0, (sizeof(uv_process_options_t))); /* "uvloop/handles/process.pyx":219 * memset(&self.options, 0, sizeof(uv.uv_process_options_t)) * * self._init_env(env) # <<<<<<<<<<<<<< * self.options.env = self.uv_opt_env * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_env(__pyx_v_self, __pyx_v_env); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":220 * * self._init_env(env) * self.options.env = self.uv_opt_env # <<<<<<<<<<<<<< * * self._init_args(args) */ __pyx_t_2 = __pyx_v_self->uv_opt_env; __pyx_v_self->options.env = __pyx_t_2; /* "uvloop/handles/process.pyx":222 * self.options.env = self.uv_opt_env * * self._init_args(args) # <<<<<<<<<<<<<< * self.options.file = self.uv_opt_file * self.options.args = self.uv_opt_args */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_args(__pyx_v_self, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":223 * * self._init_args(args) * self.options.file = self.uv_opt_file # <<<<<<<<<<<<<< * self.options.args = self.uv_opt_args * */ __pyx_t_3 = __pyx_v_self->uv_opt_file; __pyx_v_self->options.file = __pyx_t_3; /* "uvloop/handles/process.pyx":224 * self._init_args(args) * self.options.file = self.uv_opt_file * self.options.args = self.uv_opt_args # <<<<<<<<<<<<<< * * if start_new_session: */ __pyx_t_2 = __pyx_v_self->uv_opt_args; __pyx_v_self->options.args = __pyx_t_2; /* "uvloop/handles/process.pyx":226 * self.options.args = self.uv_opt_args * * if start_new_session: # <<<<<<<<<<<<<< * self.options.flags |= uv.UV_PROCESS_DETACHED * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_start_new_session); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 226, __pyx_L1_error) if (__pyx_t_4) { /* "uvloop/handles/process.pyx":227 * * if start_new_session: * self.options.flags |= uv.UV_PROCESS_DETACHED # <<<<<<<<<<<<<< * * if cwd is not None: */ __pyx_v_self->options.flags = (__pyx_v_self->options.flags | UV_PROCESS_DETACHED); /* "uvloop/handles/process.pyx":226 * self.options.args = self.uv_opt_args * * if start_new_session: # <<<<<<<<<<<<<< * self.options.flags |= uv.UV_PROCESS_DETACHED * */ } /* "uvloop/handles/process.pyx":229 * self.options.flags |= uv.UV_PROCESS_DETACHED * * if cwd is not None: # <<<<<<<<<<<<<< * if isinstance(cwd, str): * cwd = PyUnicode_EncodeFSDefault(cwd) */ __pyx_t_4 = (__pyx_v_cwd != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/handles/process.pyx":230 * * if cwd is not None: * if isinstance(cwd, str): # <<<<<<<<<<<<<< * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): */ __pyx_t_5 = PyUnicode_Check(__pyx_v_cwd); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/handles/process.pyx":231 * if cwd is not None: * if isinstance(cwd, str): * cwd = PyUnicode_EncodeFSDefault(cwd) # <<<<<<<<<<<<<< * if not isinstance(cwd, bytes): * raise ValueError('cwd must be a str or bytes object') */ __pyx_t_1 = PyUnicode_EncodeFSDefault(__pyx_v_cwd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cwd, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":230 * * if cwd is not None: * if isinstance(cwd, str): # <<<<<<<<<<<<<< * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): */ } /* "uvloop/handles/process.pyx":232 * if isinstance(cwd, str): * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): # <<<<<<<<<<<<<< * raise ValueError('cwd must be a str or bytes object') * self.__cwd = cwd */ __pyx_t_4 = PyBytes_Check(__pyx_v_cwd); __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_5) { /* "uvloop/handles/process.pyx":233 * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): * raise ValueError('cwd must be a str or bytes object') # <<<<<<<<<<<<<< * self.__cwd = cwd * self.options.cwd = PyBytes_AsString(self.__cwd) */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(5, 233, __pyx_L1_error) /* "uvloop/handles/process.pyx":232 * if isinstance(cwd, str): * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): # <<<<<<<<<<<<<< * raise ValueError('cwd must be a str or bytes object') * self.__cwd = cwd */ } /* "uvloop/handles/process.pyx":234 * if not isinstance(cwd, bytes): * raise ValueError('cwd must be a str or bytes object') * self.__cwd = cwd # <<<<<<<<<<<<<< * self.options.cwd = PyBytes_AsString(self.__cwd) * */ if (!(likely(PyBytes_CheckExact(__pyx_v_cwd))||((__pyx_v_cwd) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_cwd)->tp_name), 0))) __PYX_ERR(5, 234, __pyx_L1_error) __pyx_t_1 = __pyx_v_cwd; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx___cwd); __Pyx_DECREF(__pyx_v_self->__pyx___cwd); __pyx_v_self->__pyx___cwd = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":235 * raise ValueError('cwd must be a str or bytes object') * self.__cwd = cwd * self.options.cwd = PyBytes_AsString(self.__cwd) # <<<<<<<<<<<<<< * * self.options.exit_cb = &__uvprocess_on_exit_callback */ __pyx_t_1 = __pyx_v_self->__pyx___cwd; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyBytes_AsString(__pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) __PYX_ERR(5, 235, __pyx_L1_error) __pyx_v_self->options.cwd = __pyx_t_3; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":229 * self.options.flags |= uv.UV_PROCESS_DETACHED * * if cwd is not None: # <<<<<<<<<<<<<< * if isinstance(cwd, str): * cwd = PyUnicode_EncodeFSDefault(cwd) */ } /* "uvloop/handles/process.pyx":237 * self.options.cwd = PyBytes_AsString(self.__cwd) * * self.options.exit_cb = &__uvprocess_on_exit_callback # <<<<<<<<<<<<<< * * self._init_files(_stdin, _stdout, _stderr) */ __pyx_v_self->options.exit_cb = (&__pyx_f_6uvloop_4loop___uvprocess_on_exit_callback); /* "uvloop/handles/process.pyx":239 * self.options.exit_cb = &__uvprocess_on_exit_callback * * self._init_files(_stdin, _stdout, _stderr) # <<<<<<<<<<<<<< * * cdef _init_args(self, list args): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_files(__pyx_v_self, __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":214 * return ret * * cdef _init_options(self, list args, dict env, cwd, start_new_session, # <<<<<<<<<<<<<< * _stdin, _stdout, _stderr): * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcess._init_options", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cwd); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":241 * self._init_files(_stdin, _stdout, _stderr) * * cdef _init_args(self, list args): # <<<<<<<<<<<<<< * cdef: * bytes path */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_args(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_v_path = 0; int __pyx_v_an; int __pyx_v_i; PyObject *__pyx_v_arg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; char *__pyx_t_9; __Pyx_RefNannySetupContext("_init_args", 0); /* "uvloop/handles/process.pyx":244 * cdef: * bytes path * int an = len(args) # <<<<<<<<<<<<<< * * if an < 1: */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(5, 244, __pyx_L1_error) } __pyx_t_1 = PyList_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(5, 244, __pyx_L1_error) __pyx_v_an = __pyx_t_1; /* "uvloop/handles/process.pyx":246 * int an = len(args) * * if an < 1: # <<<<<<<<<<<<<< * raise ValueError('cannot spawn a process: args are empty') * */ __pyx_t_2 = ((__pyx_v_an < 1) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":247 * * if an < 1: * raise ValueError('cannot spawn a process: args are empty') # <<<<<<<<<<<<<< * * self.__args = args.copy() */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 247, __pyx_L1_error) /* "uvloop/handles/process.pyx":246 * int an = len(args) * * if an < 1: # <<<<<<<<<<<<<< * raise ValueError('cannot spawn a process: args are empty') * */ } /* "uvloop/handles/process.pyx":249 * raise ValueError('cannot spawn a process: args are empty') * * self.__args = args.copy() # <<<<<<<<<<<<<< * for i in range(an): * arg = args[i] */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 249, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->__pyx___args); __Pyx_DECREF(__pyx_v_self->__pyx___args); __pyx_v_self->__pyx___args = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":250 * * self.__args = args.copy() * for i in range(an): # <<<<<<<<<<<<<< * arg = args[i] * if isinstance(arg, str): */ __pyx_t_6 = __pyx_v_an; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; /* "uvloop/handles/process.pyx":251 * self.__args = args.copy() * for i in range(an): * arg = args[i] # <<<<<<<<<<<<<< * if isinstance(arg, str): * self.__args[i] = PyUnicode_EncodeFSDefault(arg) */ if (unlikely(__pyx_v_args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 251, __pyx_L1_error) } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_args, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":252 * for i in range(an): * arg = args[i] * if isinstance(arg, str): # <<<<<<<<<<<<<< * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): */ __pyx_t_2 = PyUnicode_Check(__pyx_v_arg); __pyx_t_8 = (__pyx_t_2 != 0); if (__pyx_t_8) { /* "uvloop/handles/process.pyx":253 * arg = args[i] * if isinstance(arg, str): * self.__args[i] = PyUnicode_EncodeFSDefault(arg) # <<<<<<<<<<<<<< * elif not isinstance(arg, bytes): * raise TypeError('all args must be str or bytes') */ __pyx_t_3 = PyUnicode_EncodeFSDefault(__pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 253, __pyx_L1_error) } if (unlikely(__Pyx_SetItemInt(__pyx_v_self->__pyx___args, __pyx_v_i, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":252 * for i in range(an): * arg = args[i] * if isinstance(arg, str): # <<<<<<<<<<<<<< * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): */ goto __pyx_L6; } /* "uvloop/handles/process.pyx":254 * if isinstance(arg, str): * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): # <<<<<<<<<<<<<< * raise TypeError('all args must be str or bytes') * */ __pyx_t_8 = PyBytes_Check(__pyx_v_arg); __pyx_t_2 = ((!(__pyx_t_8 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":255 * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): * raise TypeError('all args must be str or bytes') # <<<<<<<<<<<<<< * * path = self.__args[0] */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 255, __pyx_L1_error) /* "uvloop/handles/process.pyx":254 * if isinstance(arg, str): * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): # <<<<<<<<<<<<<< * raise TypeError('all args must be str or bytes') * */ } __pyx_L6:; } /* "uvloop/handles/process.pyx":257 * raise TypeError('all args must be str or bytes') * * path = self.__args[0] # <<<<<<<<<<<<<< * self.uv_opt_file = PyBytes_AsString(path) * self.uv_opt_args = self.__to_cstring_array(self.__args) */ if (unlikely(__pyx_v_self->__pyx___args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 257, __pyx_L1_error) } __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx___args, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(5, 257, __pyx_L1_error) __pyx_v_path = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":258 * * path = self.__args[0] * self.uv_opt_file = PyBytes_AsString(path) # <<<<<<<<<<<<<< * self.uv_opt_args = self.__to_cstring_array(self.__args) * */ __pyx_t_9 = PyBytes_AsString(__pyx_v_path); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(5, 258, __pyx_L1_error) __pyx_v_self->uv_opt_file = __pyx_t_9; /* "uvloop/handles/process.pyx":259 * path = self.__args[0] * self.uv_opt_file = PyBytes_AsString(path) * self.uv_opt_args = self.__to_cstring_array(self.__args) # <<<<<<<<<<<<<< * * cdef _init_env(self, dict env): */ __pyx_t_3 = __pyx_v_self->__pyx___args; __Pyx_INCREF(__pyx_t_3); __pyx_v_self->uv_opt_args = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___to_cstring_array(__pyx_v_self, ((PyObject*)__pyx_t_3)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":241 * self._init_files(_stdin, _stdout, _stderr) * * cdef _init_args(self, list args): # <<<<<<<<<<<<<< * cdef: * bytes path */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVProcess._init_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_path); __Pyx_XDECREF(__pyx_v_arg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":261 * self.uv_opt_args = self.__to_cstring_array(self.__args) * * cdef _init_env(self, dict env): # <<<<<<<<<<<<<< * if env is not None and len(env): * self.__env = list() */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_env(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, PyObject *__pyx_v_env) { PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("_init_env", 0); /* "uvloop/handles/process.pyx":262 * * cdef _init_env(self, dict env): * if env is not None and len(env): # <<<<<<<<<<<<<< * self.__env = list() * for key in env: */ __pyx_t_2 = (__pyx_v_env != ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } if (unlikely(__pyx_v_env == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(5, 262, __pyx_L1_error) } __pyx_t_4 = PyDict_Size(__pyx_v_env); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(5, 262, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/process.pyx":263 * cdef _init_env(self, dict env): * if env is not None and len(env): * self.__env = list() # <<<<<<<<<<<<<< * for key in env: * val = env[key] */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->__pyx___env); __Pyx_DECREF(__pyx_v_self->__pyx___env); __pyx_v_self->__pyx___env = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":264 * if env is not None and len(env): * self.__env = list() * for key in env: # <<<<<<<<<<<<<< * val = env[key] * */ __pyx_t_4 = 0; if (unlikely(__pyx_v_env == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(5, 264, __pyx_L1_error) } __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_env, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_8; __pyx_t_8 = 0; while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_6, &__pyx_t_4, &__pyx_t_8, NULL, NULL, __pyx_t_7); if (unlikely(__pyx_t_9 == 0)) break; if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(5, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":265 * self.__env = list() * for key in env: * val = env[key] # <<<<<<<<<<<<<< * * if isinstance(key, str): */ if (unlikely(__pyx_v_env == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 265, __pyx_L1_error) } __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_env, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":267 * val = env[key] * * if isinstance(key, str): # <<<<<<<<<<<<<< * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): */ __pyx_t_1 = PyUnicode_Check(__pyx_v_key); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/handles/process.pyx":268 * * if isinstance(key, str): * key = PyUnicode_EncodeFSDefault(key) # <<<<<<<<<<<<<< * elif not isinstance(key, bytes): * raise TypeError( */ __pyx_t_8 = PyUnicode_EncodeFSDefault(__pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":267 * val = env[key] * * if isinstance(key, str): # <<<<<<<<<<<<<< * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): */ goto __pyx_L8; } /* "uvloop/handles/process.pyx":269 * if isinstance(key, str): * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): # <<<<<<<<<<<<<< * raise TypeError( * 'all environment vars must be bytes or str') */ __pyx_t_3 = PyBytes_Check(__pyx_v_key); __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":270 * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): * raise TypeError( # <<<<<<<<<<<<<< * 'all environment vars must be bytes or str') * */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 270, __pyx_L1_error) /* "uvloop/handles/process.pyx":269 * if isinstance(key, str): * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): # <<<<<<<<<<<<<< * raise TypeError( * 'all environment vars must be bytes or str') */ } __pyx_L8:; /* "uvloop/handles/process.pyx":273 * 'all environment vars must be bytes or str') * * if isinstance(val, str): # <<<<<<<<<<<<<< * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): */ __pyx_t_1 = PyUnicode_Check(__pyx_v_val); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/handles/process.pyx":274 * * if isinstance(val, str): * val = PyUnicode_EncodeFSDefault(val) # <<<<<<<<<<<<<< * elif not isinstance(val, bytes): * raise TypeError( */ __pyx_t_8 = PyUnicode_EncodeFSDefault(__pyx_v_val); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/process.pyx":273 * 'all environment vars must be bytes or str') * * if isinstance(val, str): # <<<<<<<<<<<<<< * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): */ goto __pyx_L9; } /* "uvloop/handles/process.pyx":275 * if isinstance(val, str): * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): # <<<<<<<<<<<<<< * raise TypeError( * 'all environment values must be bytes or str') */ __pyx_t_3 = PyBytes_Check(__pyx_v_val); __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":276 * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): * raise TypeError( # <<<<<<<<<<<<<< * 'all environment values must be bytes or str') * */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 276, __pyx_L1_error) /* "uvloop/handles/process.pyx":275 * if isinstance(val, str): * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): # <<<<<<<<<<<<<< * raise TypeError( * 'all environment values must be bytes or str') */ } __pyx_L9:; /* "uvloop/handles/process.pyx":279 * 'all environment values must be bytes or str') * * self.__env.append(key + b'=' + val) # <<<<<<<<<<<<<< * * self.uv_opt_env = self.__to_cstring_array(self.__env) */ if (unlikely(__pyx_v_self->__pyx___env == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 279, __pyx_L1_error) } __pyx_t_8 = PyNumber_Add(__pyx_v_key, __pyx_kp_b__157); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_self->__pyx___env, __pyx_t_10); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(5, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":281 * self.__env.append(key + b'=' + val) * * self.uv_opt_env = self.__to_cstring_array(self.__env) # <<<<<<<<<<<<<< * else: * self.__env = None */ __pyx_t_5 = __pyx_v_self->__pyx___env; __Pyx_INCREF(__pyx_t_5); __pyx_v_self->uv_opt_env = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx___to_cstring_array(__pyx_v_self, ((PyObject*)__pyx_t_5)); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":262 * * cdef _init_env(self, dict env): * if env is not None and len(env): # <<<<<<<<<<<<<< * self.__env = list() * for key in env: */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":283 * self.uv_opt_env = self.__to_cstring_array(self.__env) * else: * self.__env = None # <<<<<<<<<<<<<< * * cdef _init_files(self, _stdin, _stdout, _stderr): */ /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->__pyx___env); __Pyx_DECREF(__pyx_v_self->__pyx___env); __pyx_v_self->__pyx___env = ((PyObject*)Py_None); } __pyx_L3:; /* "uvloop/handles/process.pyx":261 * self.uv_opt_args = self.__to_cstring_array(self.__args) * * cdef _init_env(self, dict env): # <<<<<<<<<<<<<< * if env is not None and len(env): * self.__env = list() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.UVProcess._init_env", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":285 * self.__env = None * * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<< * self.options.stdio_count = 0 * */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__init_files(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__stdin, CYTHON_UNUSED PyObject *__pyx_v__stdout, CYTHON_UNUSED PyObject *__pyx_v__stderr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_init_files", 0); /* "uvloop/handles/process.pyx":286 * * cdef _init_files(self, _stdin, _stdout, _stderr): * self.options.stdio_count = 0 # <<<<<<<<<<<<<< * * cdef _kill(self, int signum): */ __pyx_v_self->options.stdio_count = 0; /* "uvloop/handles/process.pyx":285 * self.__env = None * * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<< * self.options.stdio_count = 0 * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":288 * self.options.stdio_count = 0 * * cdef _kill(self, int signum): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__kill(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int __pyx_v_signum) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_kill", 0); /* "uvloop/handles/process.pyx":290 * cdef _kill(self, int signum): * cdef int err * self._ensure_alive() # <<<<<<<<<<<<<< * err = uv.uv_process_kill(self._handle, signum) * if err < 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":291 * cdef int err * self._ensure_alive() * err = uv.uv_process_kill(self._handle, signum) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_process_kill(((uv_process_t *)__pyx_v_self->__pyx_base._handle), __pyx_v_signum); /* "uvloop/handles/process.pyx":292 * self._ensure_alive() * err = uv.uv_process_kill(self._handle, signum) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":293 * err = uv.uv_process_kill(self._handle, signum) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * cdef _on_exit(self, int64_t exit_status, int term_signal): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(5, 293, __pyx_L1_error) /* "uvloop/handles/process.pyx":292 * self._ensure_alive() * err = uv.uv_process_kill(self._handle, signum) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/handles/process.pyx":288 * self.options.stdio_count = 0 * * cdef _kill(self, int signum): # <<<<<<<<<<<<<< * cdef int err * self._ensure_alive() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcess._kill", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":295 * raise convert_error(err) * * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<< * if term_signal: * # From Python docs: */ static PyObject *__pyx_f_6uvloop_4loop_9UVProcess__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_on_exit", 0); /* "uvloop/handles/process.pyx":296 * * cdef _on_exit(self, int64_t exit_status, int term_signal): * if term_signal: # <<<<<<<<<<<<<< * # From Python docs: * # A negative value -N indicates that the child was */ __pyx_t_1 = (__pyx_v_term_signal != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":300 * # A negative value -N indicates that the child was * # terminated by signal N (POSIX only). * self._returncode = -term_signal # <<<<<<<<<<<<<< * else: * self._returncode = exit_status */ __pyx_t_2 = __Pyx_PyInt_From_int((-__pyx_v_term_signal)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_returncode); __Pyx_DECREF(__pyx_v_self->_returncode); __pyx_v_self->_returncode = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":296 * * cdef _on_exit(self, int64_t exit_status, int term_signal): * if term_signal: # <<<<<<<<<<<<<< * # From Python docs: * # A negative value -N indicates that the child was */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":302 * self._returncode = -term_signal * else: * self._returncode = exit_status # <<<<<<<<<<<<<< * * self._close() */ /*else*/ { __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_exit_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_returncode); __Pyx_DECREF(__pyx_v_self->_returncode); __pyx_v_self->_returncode = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":304 * self._returncode = exit_status * * self._close() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":295 * raise convert_error(err) * * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<< * if term_signal: * # From Python docs: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UVProcess._on_exit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":315 * @cython.no_gc_clear * cdef class UVProcessTransport(UVProcess): * def __cinit__(self): # <<<<<<<<<<<<<< * self._exit_waiters = [] * self._protocol = None */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_18UVProcessTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/process.pyx":316 * cdef class UVProcessTransport(UVProcess): * def __cinit__(self): * self._exit_waiters = [] # <<<<<<<<<<<<<< * self._protocol = None * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_exit_waiters); __Pyx_DECREF(__pyx_v_self->_exit_waiters); __pyx_v_self->_exit_waiters = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":317 * def __cinit__(self): * self._exit_waiters = [] * self._protocol = None # <<<<<<<<<<<<<< * * self._init_futs = [] */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = Py_None; /* "uvloop/handles/process.pyx":319 * self._protocol = None * * self._init_futs = [] # <<<<<<<<<<<<<< * self._pending_calls = [] * self._stdio_ready = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_init_futs); __Pyx_DECREF(__pyx_v_self->_init_futs); __pyx_v_self->_init_futs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":320 * * self._init_futs = [] * self._pending_calls = [] # <<<<<<<<<<<<<< * self._stdio_ready = 0 * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_pending_calls); __Pyx_DECREF(__pyx_v_self->_pending_calls); __pyx_v_self->_pending_calls = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":321 * self._init_futs = [] * self._pending_calls = [] * self._stdio_ready = 0 # <<<<<<<<<<<<<< * * self._stdin = self._stdout = self._stderr = None */ __pyx_v_self->_stdio_ready = 0; /* "uvloop/handles/process.pyx":323 * self._stdio_ready = 0 * * self._stdin = self._stdout = self._stderr = None # <<<<<<<<<<<<<< * self.stdin_proto = self.stdout_proto = self.stderr_proto = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_stdin); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdin)); __pyx_v_self->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)Py_None); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_stdout); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdout)); __pyx_v_self->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_stderr); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stderr)); __pyx_v_self->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); /* "uvloop/handles/process.pyx":324 * * self._stdin = self._stdout = self._stderr = None * self.stdin_proto = self.stdout_proto = self.stderr_proto = None # <<<<<<<<<<<<<< * * self._finished = 0 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->stdin_proto); __Pyx_DECREF(__pyx_v_self->stdin_proto); __pyx_v_self->stdin_proto = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->stdout_proto); __Pyx_DECREF(__pyx_v_self->stdout_proto); __pyx_v_self->stdout_proto = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->stderr_proto); __Pyx_DECREF(__pyx_v_self->stderr_proto); __pyx_v_self->stderr_proto = Py_None; /* "uvloop/handles/process.pyx":326 * self.stdin_proto = self.stdout_proto = self.stderr_proto = None * * self._finished = 0 # <<<<<<<<<<<<<< * * cdef _on_exit(self, int64_t exit_status, int term_signal): */ __pyx_v_self->_finished = 0; /* "uvloop/handles/process.pyx":315 * @cython.no_gc_clear * cdef class UVProcessTransport(UVProcess): * def __cinit__(self): # <<<<<<<<<<<<<< * self._exit_waiters = [] * self._protocol = None */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":328 * self._finished = 0 * * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<< * UVProcess._on_exit(self, exit_status, term_signal) * */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) { PyObject *__pyx_v_waiter = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("_on_exit", 0); /* "uvloop/handles/process.pyx":329 * * cdef _on_exit(self, int64_t exit_status, int term_signal): * UVProcess._on_exit(self, exit_status, term_signal) # <<<<<<<<<<<<<< * * if self._stdio_ready: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_9UVProcess__on_exit(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_exit_status, __pyx_v_term_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":331 * UVProcess._on_exit(self, exit_status, term_signal) * * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.process_exited) * else: */ __pyx_t_2 = (__pyx_v_self->_stdio_ready != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":332 * * if self._stdio_ready: * self._loop.call_soon(self._protocol.process_exited) # <<<<<<<<<<<<<< * else: * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_process_exited); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":331 * UVProcess._on_exit(self, exit_status, term_signal) * * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.process_exited) * else: */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":334 * self._loop.call_soon(self._protocol.process_exited) * else: * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) # <<<<<<<<<<<<<< * * self._try_finish() */ /*else*/ { if (unlikely(__pyx_v_self->_pending_calls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 334, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_tuple__158); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(5, 334, __pyx_L1_error) } __pyx_L3:; /* "uvloop/handles/process.pyx":336 * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) * * self._try_finish() # <<<<<<<<<<<<<< * * for waiter in self._exit_waiters: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_try_finish(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":338 * self._try_finish() * * for waiter in self._exit_waiters: # <<<<<<<<<<<<<< * if not waiter.cancelled(): * waiter.set_result(self._returncode) */ if (unlikely(__pyx_v_self->_exit_waiters == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(5, 338, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_exit_waiters; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(5, 338, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":339 * * for waiter in self._exit_waiters: * if not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_result(self._returncode) * self._exit_waiters.clear() */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 339, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_2) != 0); if (__pyx_t_9) { /* "uvloop/handles/process.pyx":340 * for waiter in self._exit_waiters: * if not waiter.cancelled(): * waiter.set_result(self._returncode) # <<<<<<<<<<<<<< * self._exit_waiters.clear() * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_4) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->__pyx_base._returncode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base._returncode}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base._returncode}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_self->__pyx_base._returncode); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._returncode); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_self->__pyx_base._returncode); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":339 * * for waiter in self._exit_waiters: * if not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_result(self._returncode) * self._exit_waiters.clear() */ } /* "uvloop/handles/process.pyx":338 * self._try_finish() * * for waiter in self._exit_waiters: # <<<<<<<<<<<<<< * if not waiter.cancelled(): * waiter.set_result(self._returncode) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":341 * if not waiter.cancelled(): * waiter.set_result(self._returncode) * self._exit_waiters.clear() # <<<<<<<<<<<<<< * * cdef _check_proc(self): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_exit_waiters, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 341, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":328 * self._finished = 0 * * cdef _on_exit(self, int64_t exit_status, int term_signal): # <<<<<<<<<<<<<< * UVProcess._on_exit(self, exit_status, term_signal) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._on_exit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_waiter); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":343 * self._exit_waiters.clear() * * cdef _check_proc(self): # <<<<<<<<<<<<<< * if not self._is_alive() or self._returncode is not None: * raise ProcessLookupError() */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_check_proc", 0); /* "uvloop/handles/process.pyx":344 * * cdef _check_proc(self): * if not self._is_alive() or self._returncode is not None: # <<<<<<<<<<<<<< * raise ProcessLookupError() * */ __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._is_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)) != 0)) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/process.pyx":345 * cdef _check_proc(self): * if not self._is_alive() or self._returncode is not None: * raise ProcessLookupError() # <<<<<<<<<<<<<< * * cdef _pipe_connection_lost(self, int fd, exc): */ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_ProcessLookupError); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(5, 345, __pyx_L1_error) /* "uvloop/handles/process.pyx":344 * * cdef _check_proc(self): * if not self._is_alive() or self._returncode is not None: # <<<<<<<<<<<<<< * raise ProcessLookupError() * */ } /* "uvloop/handles/process.pyx":343 * self._exit_waiters.clear() * * cdef _check_proc(self): # <<<<<<<<<<<<<< * if not self._is_alive() or self._returncode is not None: * raise ProcessLookupError() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._check_proc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":347 * raise ProcessLookupError() * * cdef _pipe_connection_lost(self, int fd, exc): # <<<<<<<<<<<<<< * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannySetupContext("_pipe_connection_lost", 0); /* "uvloop/handles/process.pyx":348 * * cdef _pipe_connection_lost(self, int fd, exc): * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) * self._try_finish() */ __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":349 * cdef _pipe_connection_lost(self, int fd, exc): * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) # <<<<<<<<<<<<<< * self._try_finish() * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pipe_connection_lost); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_exc); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":350 * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) * self._try_finish() # <<<<<<<<<<<<<< * else: * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_try_finish(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":348 * * cdef _pipe_connection_lost(self, int fd, exc): * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) * self._try_finish() */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":352 * self._try_finish() * else: * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) # <<<<<<<<<<<<<< * * cdef _pipe_data_received(self, int fd, data): */ /*else*/ { if (unlikely(__pyx_v_self->_pending_calls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 352, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_exc); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(5, 352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":347 * raise ProcessLookupError() * * cdef _pipe_connection_lost(self, int fd, exc): # <<<<<<<<<<<<<< * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_connection_lost, fd, exc) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._pipe_connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":354 * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) * * cdef _pipe_data_received(self, int fd, data): # <<<<<<<<<<<<<< * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannySetupContext("_pipe_data_received", 0); /* "uvloop/handles/process.pyx":355 * * cdef _pipe_data_received(self, int fd, data): * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) * else: */ __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":356 * cdef _pipe_data_received(self, int fd, data): * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) # <<<<<<<<<<<<<< * else: * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_pipe_data_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_data}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_v_data}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_data); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":355 * * cdef _pipe_data_received(self, int fd, data): * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) * else: */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":358 * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) * else: * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) # <<<<<<<<<<<<<< * * cdef _file_redirect_stdio(self, int fd): */ /*else*/ { if (unlikely(__pyx_v_self->_pending_calls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 358, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_data); __pyx_t_2 = 0; __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(5, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":354 * self._pending_calls.append((_CALL_PIPE_CONNECTION_LOST, fd, exc)) * * cdef _pipe_data_received(self, int fd, data): # <<<<<<<<<<<<<< * if self._stdio_ready: * self._loop.call_soon(self._protocol.pipe_data_received, fd, data) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._pipe_data_received", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":360 * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) * * cdef _file_redirect_stdio(self, int fd): # <<<<<<<<<<<<<< * fd = os_dup(fd) * os_set_inheritable(fd, True) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("_file_redirect_stdio", 0); /* "uvloop/handles/process.pyx":361 * * cdef _file_redirect_stdio(self, int fd): * fd = os_dup(fd) # <<<<<<<<<<<<<< * os_set_inheritable(fd, True) * self._close_after_spawn(fd) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fd = __pyx_t_6; /* "uvloop/handles/process.pyx":362 * cdef _file_redirect_stdio(self, int fd): * fd = os_dup(fd) * os_set_inheritable(fd, True) # <<<<<<<<<<<<<< * self._close_after_spawn(fd) * return fd */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_5 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_2 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, Py_True}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 362, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_3, Py_True}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 362, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, Py_True); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":363 * fd = os_dup(fd) * os_set_inheritable(fd, True) * self._close_after_spawn(fd) # <<<<<<<<<<<<<< * return fd * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":364 * os_set_inheritable(fd, True) * self._close_after_spawn(fd) * return fd # <<<<<<<<<<<<<< * * cdef _file_devnull(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":360 * self._pending_calls.append((_CALL_PIPE_DATA_RECEIVED, fd, data)) * * cdef _file_redirect_stdio(self, int fd): # <<<<<<<<<<<<<< * fd = os_dup(fd) * os_set_inheritable(fd, True) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_redirect_stdio", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":366 * return fd * * cdef _file_devnull(self): # <<<<<<<<<<<<<< * dn = os_open(os_devnull, os_O_RDWR) * os_set_inheritable(dn, True) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_v_dn = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_file_devnull", 0); /* "uvloop/handles/process.pyx":367 * * cdef _file_devnull(self): * dn = os_open(os_devnull, os_O_RDWR) # <<<<<<<<<<<<<< * os_set_inheritable(dn, True) * self._close_after_spawn(dn) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_open); __pyx_t_2 = __pyx_v_6uvloop_4loop_os_open; __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_6uvloop_4loop_os_devnull, __pyx_v_6uvloop_4loop_os_O_RDWR}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 367, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_6uvloop_4loop_os_devnull, __pyx_v_6uvloop_4loop_os_O_RDWR}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 367, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_devnull); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_os_devnull); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_6uvloop_4loop_os_devnull); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_O_RDWR); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_os_O_RDWR); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_6uvloop_4loop_os_O_RDWR); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dn = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":368 * cdef _file_devnull(self): * dn = os_open(os_devnull, os_O_RDWR) * os_set_inheritable(dn, True) # <<<<<<<<<<<<<< * self._close_after_spawn(dn) * return dn */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_2 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_5 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dn, Py_True}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dn, Py_True}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 368, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_dn); __Pyx_GIVEREF(__pyx_v_dn); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dn); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, Py_True); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":369 * dn = os_open(os_devnull, os_O_RDWR) * os_set_inheritable(dn, True) * self._close_after_spawn(dn) # <<<<<<<<<<<<<< * return dn * */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_dn); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 369, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":370 * os_set_inheritable(dn, True) * self._close_after_spawn(dn) * return dn # <<<<<<<<<<<<<< * * cdef _file_outpipe(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dn); __pyx_r = __pyx_v_dn; goto __pyx_L0; /* "uvloop/handles/process.pyx":366 * return fd * * cdef _file_devnull(self): # <<<<<<<<<<<<<< * dn = os_open(os_devnull, os_O_RDWR) * os_set_inheritable(dn, True) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_devnull", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":372 * return dn * * cdef _file_outpipe(self): # <<<<<<<<<<<<<< * r, w = __socketpair() * os_set_inheritable(w, True) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_v_r = NULL; PyObject *__pyx_v_w = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_t_6; __Pyx_RefNannySetupContext("_file_outpipe", 0); /* "uvloop/handles/process.pyx":373 * * cdef _file_outpipe(self): * r, w = __socketpair() # <<<<<<<<<<<<<< * os_set_inheritable(w, True) * self._close_after_spawn(w) */ __pyx_t_1 = __pyx_f_6uvloop_4loop___socketpair(); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 373, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(5, 373, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 373, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_r = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_w = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":374 * cdef _file_outpipe(self): * r, w = __socketpair() * os_set_inheritable(w, True) # <<<<<<<<<<<<<< * self._close_after_spawn(w) * return r, w */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_2 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_w, Py_True}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 374, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_w, Py_True}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 374, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_w); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, Py_True); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":375 * r, w = __socketpair() * os_set_inheritable(w, True) * self._close_after_spawn(w) # <<<<<<<<<<<<<< * return r, w * */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 375, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":376 * os_set_inheritable(w, True) * self._close_after_spawn(w) * return r, w # <<<<<<<<<<<<<< * * cdef _file_inpipe(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_w); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":372 * return dn * * cdef _file_outpipe(self): # <<<<<<<<<<<<<< * r, w = __socketpair() * os_set_inheritable(w, True) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_outpipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_r); __Pyx_XDECREF(__pyx_v_w); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":378 * return r, w * * cdef _file_inpipe(self): # <<<<<<<<<<<<<< * r, w = __socketpair() * os_set_inheritable(r, True) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_v_r = NULL; PyObject *__pyx_v_w = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_t_6; __Pyx_RefNannySetupContext("_file_inpipe", 0); /* "uvloop/handles/process.pyx":379 * * cdef _file_inpipe(self): * r, w = __socketpair() # <<<<<<<<<<<<<< * os_set_inheritable(r, True) * self._close_after_spawn(r) */ __pyx_t_1 = __pyx_f_6uvloop_4loop___socketpair(); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 379, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(5, 379, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 379, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_r = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_w = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":380 * cdef _file_inpipe(self): * r, w = __socketpair() * os_set_inheritable(r, True) # <<<<<<<<<<<<<< * self._close_after_spawn(r) * return r, w */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_3 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_2 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, Py_True}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 380, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, Py_True}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 380, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_r); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, Py_True); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":381 * r, w = __socketpair() * os_set_inheritable(r, True) * self._close_after_spawn(r) # <<<<<<<<<<<<<< * return r, w * */ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 381, __pyx_L1_error) __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":382 * os_set_inheritable(r, True) * self._close_after_spawn(r) * return r, w # <<<<<<<<<<<<<< * * cdef _init_files(self, _stdin, _stdout, _stderr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_w); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":378 * return r, w * * cdef _file_inpipe(self): # <<<<<<<<<<<<<< * r, w = __socketpair() * os_set_inheritable(r, True) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._file_inpipe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_r); __Pyx_XDECREF(__pyx_v_w); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":384 * return r, w * * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<< * cdef uv.uv_stdio_container_t *iocnt * */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr) { uv_stdio_container_t *__pyx_v_iocnt; PyObject *__pyx_v_io = NULL; PyObject *__pyx_v_r = NULL; PyObject *__pyx_v_w = NULL; PyObject *__pyx_v_waiter = NULL; PyObject *__pyx_v_newfd = NULL; long __pyx_v_idx; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; uv_stdio_container_t *__pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; long __pyx_t_13; __Pyx_RefNannySetupContext("_init_files", 0); /* "uvloop/handles/process.pyx":387 * cdef uv.uv_stdio_container_t *iocnt * * UVProcess._init_files(self, _stdin, _stdout, _stderr) # <<<<<<<<<<<<<< * * io = [None, None, None] */ __pyx_t_1 = __pyx_f_6uvloop_4loop_9UVProcess__init_files(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v__stdin, __pyx_v__stdout, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":389 * UVProcess._init_files(self, _stdin, _stdout, _stderr) * * io = [None, None, None] # <<<<<<<<<<<<<< * * self.options.stdio_count = 3 */ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 0, Py_None); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 1, Py_None); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_1, 2, Py_None); __pyx_v_io = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":391 * io = [None, None, None] * * self.options.stdio_count = 3 # <<<<<<<<<<<<<< * self.options.stdio = self.iocnt * */ __pyx_v_self->__pyx_base.options.stdio_count = 3; /* "uvloop/handles/process.pyx":392 * * self.options.stdio_count = 3 * self.options.stdio = self.iocnt # <<<<<<<<<<<<<< * * if _stdin is not None: */ __pyx_t_2 = __pyx_v_self->__pyx_base.iocnt; __pyx_v_self->__pyx_base.options.stdio = __pyx_t_2; /* "uvloop/handles/process.pyx":394 * self.options.stdio = self.iocnt * * if _stdin is not None: # <<<<<<<<<<<<<< * if _stdin == subprocess_PIPE: * r, w = self._file_inpipe() */ __pyx_t_3 = (__pyx_v__stdin != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/handles/process.pyx":395 * * if _stdin is not None: * if _stdin == subprocess_PIPE: # <<<<<<<<<<<<<< * r, w = self._file_inpipe() * io[0] = r */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_v__stdin, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { /* "uvloop/handles/process.pyx":396 * if _stdin is not None: * if _stdin == subprocess_PIPE: * r, w = self._file_inpipe() # <<<<<<<<<<<<<< * io[0] = r * */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_inpipe(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 396, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(5, 396, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 396, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_w = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":397 * if _stdin == subprocess_PIPE: * r, w = self._file_inpipe() * io[0] = r # <<<<<<<<<<<<<< * * self.stdin_proto = WriteSubprocessPipeProto(self, 0) */ if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_v_r, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 397, __pyx_L1_error) /* "uvloop/handles/process.pyx":399 * io[0] = r * * self.stdin_proto = WriteSubprocessPipeProto(self, 0) # <<<<<<<<<<<<<< * waiter = self._loop._new_future() * self._stdin = WriteUnixTransport.new( */ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_WriteSubprocessPipeProto); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_0}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 399, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_self), __pyx_int_0}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 399, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_int_0); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->stdin_proto); __Pyx_DECREF(__pyx_v_self->stdin_proto); __pyx_v_self->stdin_proto = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":400 * * self.stdin_proto = WriteSubprocessPipeProto(self, 0) * waiter = self._loop._new_future() # <<<<<<<<<<<<<< * self._stdin = WriteUnixTransport.new( * self._loop, self.stdin_proto, None, waiter) */ __pyx_t_5 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_waiter = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":402 * waiter = self._loop._new_future() * self._stdin = WriteUnixTransport.new( * self._loop, self.stdin_proto, None, waiter) # <<<<<<<<<<<<<< * self._init_futs.append(waiter) * self._stdin._open(w) */ __pyx_t_5 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __pyx_v_self->stdin_proto; __Pyx_INCREF(__pyx_t_6); /* "uvloop/handles/process.pyx":401 * self.stdin_proto = WriteSubprocessPipeProto(self, 0) * waiter = self._loop._new_future() * self._stdin = WriteUnixTransport.new( # <<<<<<<<<<<<<< * self._loop, self.stdin_proto, None, waiter) * self._init_futs.append(waiter) */ __pyx_t_7 = ((PyObject *)__pyx_f_6uvloop_4loop_18WriteUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_5), __pyx_t_6, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_stdin); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdin)); __pyx_v_self->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":403 * self._stdin = WriteUnixTransport.new( * self._loop, self.stdin_proto, None, waiter) * self._init_futs.append(waiter) # <<<<<<<<<<<<<< * self._stdin._open(w) * self._stdin._init_protocol() */ if (unlikely(__pyx_v_self->_init_futs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 403, __pyx_L1_error) } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(5, 403, __pyx_L1_error) /* "uvloop/handles/process.pyx":404 * self._loop, self.stdin_proto, None, waiter) * self._init_futs.append(waiter) * self._stdin._open(w) # <<<<<<<<<<<<<< * self._stdin._init_protocol() * elif _stdin == subprocess_DEVNULL: */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 404, __pyx_L1_error) __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self->_stdin->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stdin), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":405 * self._init_futs.append(waiter) * self._stdin._open(w) * self._stdin._init_protocol() # <<<<<<<<<<<<<< * elif _stdin == subprocess_DEVNULL: * io[0] = self._file_devnull() */ __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport *)__pyx_v_self->_stdin->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stdin)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":395 * * if _stdin is not None: * if _stdin == subprocess_PIPE: # <<<<<<<<<<<<<< * r, w = self._file_inpipe() * io[0] = r */ goto __pyx_L4; } /* "uvloop/handles/process.pyx":406 * self._stdin._open(w) * self._stdin._init_protocol() * elif _stdin == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_RichCompare(__pyx_v__stdin, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "uvloop/handles/process.pyx":407 * self._stdin._init_protocol() * elif _stdin == subprocess_DEVNULL: * io[0] = self._file_devnull() # <<<<<<<<<<<<<< * elif _stdout == subprocess_STDOUT: * raise ValueError( */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":406 * self._stdin._open(w) * self._stdin._init_protocol() * elif _stdin == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: */ goto __pyx_L4; } /* "uvloop/handles/process.pyx":408 * elif _stdin == subprocess_DEVNULL: * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<< * raise ValueError( * 'subprocess.STDOUT is supported only by stderr parameter') */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { /* "uvloop/handles/process.pyx":409 * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: * raise ValueError( # <<<<<<<<<<<<<< * 'subprocess.STDOUT is supported only by stderr parameter') * else: */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__159, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 409, __pyx_L1_error) /* "uvloop/handles/process.pyx":408 * elif _stdin == subprocess_DEVNULL: * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<< * raise ValueError( * 'subprocess.STDOUT is supported only by stderr parameter') */ } /* "uvloop/handles/process.pyx":412 * 'subprocess.STDOUT is supported only by stderr parameter') * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stdin argument value {!r}'.format(_stdin)) * else: */ /*else*/ { /* "uvloop/handles/process.pyx":413 * else: * raise ValueError( * 'invalid stdin argument value {!r}'.format(_stdin)) # <<<<<<<<<<<<<< * else: * io[0] = self._file_redirect_stdio(sys.stdin.fileno()) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_stdin_argument_value_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v__stdin); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v__stdin}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v__stdin}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v__stdin); __Pyx_GIVEREF(__pyx_v__stdin); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v__stdin); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":412 * 'subprocess.STDOUT is supported only by stderr parameter') * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stdin argument value {!r}'.format(_stdin)) * else: */ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 412, __pyx_L1_error) } __pyx_L4:; /* "uvloop/handles/process.pyx":394 * self.options.stdio = self.iocnt * * if _stdin is not None: # <<<<<<<<<<<<<< * if _stdin == subprocess_PIPE: * r, w = self._file_inpipe() */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":415 * 'invalid stdin argument value {!r}'.format(_stdin)) * else: * io[0] = self._file_redirect_stdio(sys.stdin.fileno()) # <<<<<<<<<<<<<< * * if _stdout is not None: */ /*else*/ { __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_stdin); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fileno); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_1) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 415, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 0, __pyx_t_7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":417 * io[0] = self._file_redirect_stdio(sys.stdin.fileno()) * * if _stdout is not None: # <<<<<<<<<<<<<< * if _stdout == subprocess_PIPE: * # We can't use UV_CREATE_PIPE here, since 'stderr' might be */ __pyx_t_4 = (__pyx_v__stdout != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "uvloop/handles/process.pyx":418 * * if _stdout is not None: * if _stdout == subprocess_PIPE: # <<<<<<<<<<<<<< * # We can't use UV_CREATE_PIPE here, since 'stderr' might be * # set to 'subprocess.STDOUT', and there is no way to */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { /* "uvloop/handles/process.pyx":425 * # stderr manually. * * r, w = self._file_outpipe() # <<<<<<<<<<<<<< * io[1] = w * */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_outpipe(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 425, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(5, 425, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 425, __pyx_L1_error) __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":426 * * r, w = self._file_outpipe() * io[1] = w # <<<<<<<<<<<<<< * * self.stdout_proto = ReadSubprocessPipeProto(self, 1) */ if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_v_w, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 426, __pyx_L1_error) /* "uvloop/handles/process.pyx":428 * io[1] = w * * self.stdout_proto = ReadSubprocessPipeProto(self, 1) # <<<<<<<<<<<<<< * waiter = self._loop._new_future() * self._stdout = ReadUnixTransport.new( */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadSubprocessPipeProto); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_int_1}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 428, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_int_1}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 428, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_int_1); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->stdout_proto); __Pyx_DECREF(__pyx_v_self->stdout_proto); __pyx_v_self->stdout_proto = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":429 * * self.stdout_proto = ReadSubprocessPipeProto(self, 1) * waiter = self._loop._new_future() # <<<<<<<<<<<<<< * self._stdout = ReadUnixTransport.new( * self._loop, self.stdout_proto, None, waiter) */ __pyx_t_6 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":431 * waiter = self._loop._new_future() * self._stdout = ReadUnixTransport.new( * self._loop, self.stdout_proto, None, waiter) # <<<<<<<<<<<<<< * self._init_futs.append(waiter) * self._stdout._open(r) */ __pyx_t_6 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = __pyx_v_self->stdout_proto; __Pyx_INCREF(__pyx_t_1); /* "uvloop/handles/process.pyx":430 * self.stdout_proto = ReadSubprocessPipeProto(self, 1) * waiter = self._loop._new_future() * self._stdout = ReadUnixTransport.new( # <<<<<<<<<<<<<< * self._loop, self.stdout_proto, None, waiter) * self._init_futs.append(waiter) */ __pyx_t_5 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_6), __pyx_t_1, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_stdout); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stdout)); __pyx_v_self->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":432 * self._stdout = ReadUnixTransport.new( * self._loop, self.stdout_proto, None, waiter) * self._init_futs.append(waiter) # <<<<<<<<<<<<<< * self._stdout._open(r) * self._stdout._init_protocol() */ if (unlikely(__pyx_v_self->_init_futs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 432, __pyx_L1_error) } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(5, 432, __pyx_L1_error) /* "uvloop/handles/process.pyx":433 * self._loop, self.stdout_proto, None, waiter) * self._init_futs.append(waiter) * self._stdout._open(r) # <<<<<<<<<<<<<< * self._stdout._init_protocol() * elif _stdout == subprocess_DEVNULL: */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 433, __pyx_L1_error) __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stdout->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stdout), __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":434 * self._init_futs.append(waiter) * self._stdout._open(r) * self._stdout._init_protocol() # <<<<<<<<<<<<<< * elif _stdout == subprocess_DEVNULL: * io[1] = self._file_devnull() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stdout->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stdout)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":418 * * if _stdout is not None: * if _stdout == subprocess_PIPE: # <<<<<<<<<<<<<< * # We can't use UV_CREATE_PIPE here, since 'stderr' might be * # set to 'subprocess.STDOUT', and there is no way to */ goto __pyx_L8; } /* "uvloop/handles/process.pyx":435 * self._stdout._open(r) * self._stdout._init_protocol() * elif _stdout == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "uvloop/handles/process.pyx":436 * self._stdout._init_protocol() * elif _stdout == subprocess_DEVNULL: * io[1] = self._file_devnull() # <<<<<<<<<<<<<< * elif _stdout == subprocess_STDOUT: * raise ValueError( */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":435 * self._stdout._open(r) * self._stdout._init_protocol() * elif _stdout == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: */ goto __pyx_L8; } /* "uvloop/handles/process.pyx":437 * elif _stdout == subprocess_DEVNULL: * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<< * raise ValueError( * 'subprocess.STDOUT is supported only by stderr parameter') */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyObject_RichCompare(__pyx_v__stdout, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { /* "uvloop/handles/process.pyx":438 * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: * raise ValueError( # <<<<<<<<<<<<<< * 'subprocess.STDOUT is supported only by stderr parameter') * else: */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 438, __pyx_L1_error) /* "uvloop/handles/process.pyx":437 * elif _stdout == subprocess_DEVNULL: * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: # <<<<<<<<<<<<<< * raise ValueError( * 'subprocess.STDOUT is supported only by stderr parameter') */ } /* "uvloop/handles/process.pyx":441 * 'subprocess.STDOUT is supported only by stderr parameter') * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stdout argument value {!r}'.format(_stdout)) * else: */ /*else*/ { /* "uvloop/handles/process.pyx":442 * else: * raise ValueError( * 'invalid stdout argument value {!r}'.format(_stdout)) # <<<<<<<<<<<<<< * else: * io[1] = self._file_redirect_stdio(sys.stdout.fileno()) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_stdout_argument_value_r, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__stdout); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__stdout}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__stdout}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v__stdout); __Pyx_GIVEREF(__pyx_v__stdout); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v__stdout); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":441 * 'subprocess.STDOUT is supported only by stderr parameter') * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stdout argument value {!r}'.format(_stdout)) * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 441, __pyx_L1_error) } __pyx_L8:; /* "uvloop/handles/process.pyx":417 * io[0] = self._file_redirect_stdio(sys.stdin.fileno()) * * if _stdout is not None: # <<<<<<<<<<<<<< * if _stdout == subprocess_PIPE: * # We can't use UV_CREATE_PIPE here, since 'stderr' might be */ goto __pyx_L7; } /* "uvloop/handles/process.pyx":444 * 'invalid stdout argument value {!r}'.format(_stdout)) * else: * io[1] = self._file_redirect_stdio(sys.stdout.fileno()) # <<<<<<<<<<<<<< * * if _stderr is not None: */ /*else*/ { __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 444, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 1, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L7:; /* "uvloop/handles/process.pyx":446 * io[1] = self._file_redirect_stdio(sys.stdout.fileno()) * * if _stderr is not None: # <<<<<<<<<<<<<< * if _stderr == subprocess_PIPE: * r, w = self._file_outpipe() */ __pyx_t_3 = (__pyx_v__stderr != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/handles/process.pyx":447 * * if _stderr is not None: * if _stderr == subprocess_PIPE: # <<<<<<<<<<<<<< * r, w = self._file_outpipe() * io[2] = w */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/handles/process.pyx":448 * if _stderr is not None: * if _stderr == subprocess_PIPE: * r, w = self._file_outpipe() # <<<<<<<<<<<<<< * io[2] = w * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_outpipe(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 448, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_7 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < 0) __PYX_ERR(5, 448, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 448, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":449 * if _stderr == subprocess_PIPE: * r, w = self._file_outpipe() * io[2] = w # <<<<<<<<<<<<<< * * self.stderr_proto = ReadSubprocessPipeProto(self, 2) */ if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_v_w, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 449, __pyx_L1_error) /* "uvloop/handles/process.pyx":451 * io[2] = w * * self.stderr_proto = ReadSubprocessPipeProto(self, 2) # <<<<<<<<<<<<<< * waiter = self._loop._new_future() * self._stderr = ReadUnixTransport.new( */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadSubprocessPipeProto); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_int_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 451, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_int_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 451, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_int_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->stderr_proto); __Pyx_DECREF(__pyx_v_self->stderr_proto); __pyx_v_self->stderr_proto = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":452 * * self.stderr_proto = ReadSubprocessPipeProto(self, 2) * waiter = self._loop._new_future() # <<<<<<<<<<<<<< * self._stderr = ReadUnixTransport.new( * self._loop, self.stderr_proto, None, waiter) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":454 * waiter = self._loop._new_future() * self._stderr = ReadUnixTransport.new( * self._loop, self.stderr_proto, None, waiter) # <<<<<<<<<<<<<< * self._init_futs.append(waiter) * self._stderr._open(r) */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = __pyx_v_self->stderr_proto; __Pyx_INCREF(__pyx_t_7); /* "uvloop/handles/process.pyx":453 * self.stderr_proto = ReadSubprocessPipeProto(self, 2) * waiter = self._loop._new_future() * self._stderr = ReadUnixTransport.new( # <<<<<<<<<<<<<< * self._loop, self.stderr_proto, None, waiter) * self._init_futs.append(waiter) */ __pyx_t_6 = ((PyObject *)__pyx_f_6uvloop_4loop_17ReadUnixTransport_new(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_t_7, ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None), __pyx_v_waiter)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_stderr); __Pyx_DECREF(((PyObject *)__pyx_v_self->_stderr)); __pyx_v_self->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":455 * self._stderr = ReadUnixTransport.new( * self._loop, self.stderr_proto, None, waiter) * self._init_futs.append(waiter) # <<<<<<<<<<<<<< * self._stderr._open(r) * self._stderr._init_protocol() */ if (unlikely(__pyx_v_self->_init_futs == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 455, __pyx_L1_error) } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_init_futs, __pyx_v_waiter); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(5, 455, __pyx_L1_error) /* "uvloop/handles/process.pyx":456 * self._loop, self.stderr_proto, None, waiter) * self._init_futs.append(waiter) * self._stderr._open(r) # <<<<<<<<<<<<<< * self._stderr._init_protocol() * elif _stderr == subprocess_STDOUT: */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_r); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 456, __pyx_L1_error) __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stderr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._open(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self->_stderr), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":457 * self._init_futs.append(waiter) * self._stderr._open(r) * self._stderr._init_protocol() # <<<<<<<<<<<<<< * elif _stderr == subprocess_STDOUT: * if io[1] is None: */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport *)__pyx_v_self->_stderr->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._init_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self->_stderr)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":447 * * if _stderr is not None: * if _stderr == subprocess_PIPE: # <<<<<<<<<<<<<< * r, w = self._file_outpipe() * io[2] = w */ goto __pyx_L12; } /* "uvloop/handles/process.pyx":458 * self._stderr._open(r) * self._stderr._init_protocol() * elif _stderr == subprocess_STDOUT: # <<<<<<<<<<<<<< * if io[1] is None: * # shouldn't ever happen */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_STDOUT); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(5, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { /* "uvloop/handles/process.pyx":459 * self._stderr._init_protocol() * elif _stderr == subprocess_STDOUT: * if io[1] is None: # <<<<<<<<<<<<<< * # shouldn't ever happen * raise RuntimeError('cannot apply subprocess.STDOUT') */ __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_io, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = (__pyx_t_7 == Py_None); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "uvloop/handles/process.pyx":461 * if io[1] is None: * # shouldn't ever happen * raise RuntimeError('cannot apply subprocess.STDOUT') # <<<<<<<<<<<<<< * * newfd = os_dup(io[1]) */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 461, __pyx_L1_error) /* "uvloop/handles/process.pyx":459 * self._stderr._init_protocol() * elif _stderr == subprocess_STDOUT: * if io[1] is None: # <<<<<<<<<<<<<< * # shouldn't ever happen * raise RuntimeError('cannot apply subprocess.STDOUT') */ } /* "uvloop/handles/process.pyx":463 * raise RuntimeError('cannot apply subprocess.STDOUT') * * newfd = os_dup(io[1]) # <<<<<<<<<<<<<< * os_set_inheritable(newfd, True) * self._close_after_spawn(newfd) */ __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_io, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_dup); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_dup; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_newfd = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":464 * * newfd = os_dup(io[1]) * os_set_inheritable(newfd, True) # <<<<<<<<<<<<<< * self._close_after_spawn(newfd) * io[2] = newfd */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_1 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_11 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_newfd, Py_True}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 464, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_newfd, Py_True}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 464, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_newfd); __Pyx_GIVEREF(__pyx_v_newfd); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_newfd); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, Py_True); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":465 * newfd = os_dup(io[1]) * os_set_inheritable(newfd, True) * self._close_after_spawn(newfd) # <<<<<<<<<<<<<< * io[2] = newfd * elif _stderr == subprocess_DEVNULL: */ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_newfd); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 465, __pyx_L1_error) __pyx_t_7 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._close_after_spawn(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":466 * os_set_inheritable(newfd, True) * self._close_after_spawn(newfd) * io[2] = newfd # <<<<<<<<<<<<<< * elif _stderr == subprocess_DEVNULL: * io[2] = self._file_devnull() */ if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_v_newfd, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 466, __pyx_L1_error) /* "uvloop/handles/process.pyx":458 * self._stderr._open(r) * self._stderr._init_protocol() * elif _stderr == subprocess_STDOUT: # <<<<<<<<<<<<<< * if io[1] is None: * # shouldn't ever happen */ goto __pyx_L12; } /* "uvloop/handles/process.pyx":467 * self._close_after_spawn(newfd) * io[2] = newfd * elif _stderr == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[2] = self._file_devnull() * else: */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_DEVNULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_RichCompare(__pyx_v__stderr, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "uvloop/handles/process.pyx":468 * io[2] = newfd * elif _stderr == subprocess_DEVNULL: * io[2] = self._file_devnull() # <<<<<<<<<<<<<< * else: * raise ValueError( */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_devnull(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":467 * self._close_after_spawn(newfd) * io[2] = newfd * elif _stderr == subprocess_DEVNULL: # <<<<<<<<<<<<<< * io[2] = self._file_devnull() * else: */ goto __pyx_L12; } /* "uvloop/handles/process.pyx":470 * io[2] = self._file_devnull() * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stderr argument value {!r}'.format(_stderr)) * else: */ /*else*/ { /* "uvloop/handles/process.pyx":471 * else: * raise ValueError( * 'invalid stderr argument value {!r}'.format(_stderr)) # <<<<<<<<<<<<<< * else: * io[2] = self._file_redirect_stdio(sys.stderr.fileno()) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_stderr_argument_value_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v__stderr); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__stderr}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__stderr}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v__stderr); __Pyx_GIVEREF(__pyx_v__stderr); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v__stderr); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":470 * io[2] = self._file_devnull() * else: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid stderr argument value {!r}'.format(_stderr)) * else: */ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(5, 470, __pyx_L1_error) } __pyx_L12:; /* "uvloop/handles/process.pyx":446 * io[1] = self._file_redirect_stdio(sys.stdout.fileno()) * * if _stderr is not None: # <<<<<<<<<<<<<< * if _stderr == subprocess_PIPE: * r, w = self._file_outpipe() */ goto __pyx_L11; } /* "uvloop/handles/process.pyx":473 * 'invalid stderr argument value {!r}'.format(_stderr)) * else: * io[2] = self._file_redirect_stdio(sys.stderr.fileno()) # <<<<<<<<<<<<<< * * assert len(io) == 3 */ /*else*/ { __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stderr); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_fileno); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_11) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 473, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_file_redirect_stdio(__pyx_v_self, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_SetItemInt(__pyx_v_io, 2, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(5, 473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L11:; /* "uvloop/handles/process.pyx":475 * io[2] = self._file_redirect_stdio(sys.stderr.fileno()) * * assert len(io) == 3 # <<<<<<<<<<<<<< * for idx in range(3): * if io[idx] is not None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_12 = PyList_GET_SIZE(__pyx_v_io); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(5, 475, __pyx_L1_error) if (unlikely(!((__pyx_t_12 == 3) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(5, 475, __pyx_L1_error) } } #endif /* "uvloop/handles/process.pyx":476 * * assert len(io) == 3 * for idx in range(3): # <<<<<<<<<<<<<< * if io[idx] is not None: * iocnt = &self.iocnt[idx] */ for (__pyx_t_13 = 0; __pyx_t_13 < 3; __pyx_t_13+=1) { __pyx_v_idx = __pyx_t_13; /* "uvloop/handles/process.pyx":477 * assert len(io) == 3 * for idx in range(3): * if io[idx] is not None: # <<<<<<<<<<<<<< * iocnt = &self.iocnt[idx] * iocnt.flags = uv.UV_INHERIT_FD */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_io, __pyx_v_idx, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "uvloop/handles/process.pyx":478 * for idx in range(3): * if io[idx] is not None: * iocnt = &self.iocnt[idx] # <<<<<<<<<<<<<< * iocnt.flags = uv.UV_INHERIT_FD * iocnt.data.fd = io[idx] */ __pyx_v_iocnt = (&(__pyx_v_self->__pyx_base.iocnt[__pyx_v_idx])); /* "uvloop/handles/process.pyx":479 * if io[idx] is not None: * iocnt = &self.iocnt[idx] * iocnt.flags = uv.UV_INHERIT_FD # <<<<<<<<<<<<<< * iocnt.data.fd = io[idx] * */ __pyx_v_iocnt->flags = UV_INHERIT_FD; /* "uvloop/handles/process.pyx":480 * iocnt = &self.iocnt[idx] * iocnt.flags = uv.UV_INHERIT_FD * iocnt.data.fd = io[idx] # <<<<<<<<<<<<<< * * cdef _call_connection_made(self, waiter): */ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_io, __pyx_v_idx, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_iocnt->data.fd = __pyx_t_9; /* "uvloop/handles/process.pyx":477 * assert len(io) == 3 * for idx in range(3): * if io[idx] is not None: # <<<<<<<<<<<<<< * iocnt = &self.iocnt[idx] * iocnt.flags = uv.UV_INHERIT_FD */ } } /* "uvloop/handles/process.pyx":384 * return r, w * * cdef _init_files(self, _stdin, _stdout, _stderr): # <<<<<<<<<<<<<< * cdef uv.uv_stdio_container_t *iocnt * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._init_files", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_io); __Pyx_XDECREF(__pyx_v_r); __Pyx_XDECREF(__pyx_v_w); __Pyx_XDECREF(__pyx_v_waiter); __Pyx_XDECREF(__pyx_v_newfd); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":482 * iocnt.data.fd = io[idx] * * cdef _call_connection_made(self, waiter): # <<<<<<<<<<<<<< * try: * self._protocol.connection_made(self) */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_v_pending_calls = NULL; PyObject *__pyx_v_type = NULL; PyObject *__pyx_v_fd = NULL; PyObject *__pyx_v_arg = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; Py_ssize_t __pyx_t_23; PyObject *(*__pyx_t_24)(PyObject *); PyObject *(*__pyx_t_25)(PyObject *); __Pyx_RefNannySetupContext("_call_connection_made", 0); /* "uvloop/handles/process.pyx":483 * * cdef _call_connection_made(self, waiter): * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except Exception as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/handles/process.pyx":484 * cdef _call_connection_made(self, waiter): * try: * self._protocol.connection_made(self) # <<<<<<<<<<<<<< * except Exception as ex: * if waiter is not None and not waiter.cancelled(): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_made); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 484, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":483 * * cdef _call_connection_made(self, waiter): * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except Exception as ex: */ } /* "uvloop/handles/process.pyx":491 * raise * else: * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_result(True) * */ /*else:*/ { __pyx_t_9 = (__pyx_v_waiter != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L12_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 491, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 491, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 491, __pyx_L5_except_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(5, 491, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = ((!__pyx_t_10) != 0); __pyx_t_8 = __pyx_t_9; __pyx_L12_bool_binop_done:; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":492 * else: * if waiter is not None and not waiter.cancelled(): * waiter.set_result(True) # <<<<<<<<<<<<<< * * self._stdio_ready = 1 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 492, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 492, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":491 * raise * else: * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_result(True) * */ } } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":485 * try: * self._protocol.connection_made(self) * except Exception as ex: # <<<<<<<<<<<<<< * if waiter is not None and not waiter.cancelled(): * waiter.set_exception(ex) */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(5, 485, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_v_ex = __pyx_t_4; /*try:*/ { /* "uvloop/handles/process.pyx":486 * self._protocol.connection_made(self) * except Exception as ex: * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_exception(ex) * else: */ __pyx_t_9 = (__pyx_v_waiter != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L22_bool_binop_done; } __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 486, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (__pyx_t_13) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 486, __pyx_L19_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 486, __pyx_L19_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(5, 486, __pyx_L19_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = ((!__pyx_t_10) != 0); __pyx_t_8 = __pyx_t_9; __pyx_L22_bool_binop_done:; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":487 * except Exception as ex: * if waiter is not None and not waiter.cancelled(): * waiter.set_exception(ex) # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_13) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_ex); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_6); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_ex}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_ex}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_ex); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 487, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/process.pyx":486 * self._protocol.connection_made(self) * except Exception as ex: * if waiter is not None and not waiter.cancelled(): # <<<<<<<<<<<<<< * waiter.set_exception(ex) * else: */ goto __pyx_L21; } /* "uvloop/handles/process.pyx":489 * waiter.set_exception(ex) * else: * raise # <<<<<<<<<<<<<< * else: * if waiter is not None and not waiter.cancelled(): */ /*else*/ { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_7 = 0; __PYX_ERR(5, 489, __pyx_L19_error) } __pyx_L21:; } /* "uvloop/handles/process.pyx":485 * try: * self._protocol.connection_made(self) * except Exception as ex: # <<<<<<<<<<<<<< * if waiter is not None and not waiter.cancelled(): * waiter.set_exception(ex) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L20; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L19_error:; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); } __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L5_except_error; } __pyx_L20:; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/handles/process.pyx":483 * * cdef _call_connection_made(self, waiter): * try: # <<<<<<<<<<<<<< * self._protocol.connection_made(self) * except Exception as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/handles/process.pyx":494 * waiter.set_result(True) * * self._stdio_ready = 1 # <<<<<<<<<<<<<< * if self._pending_calls: * pending_calls = self._pending_calls.copy() */ __pyx_v_self->_stdio_ready = 1; /* "uvloop/handles/process.pyx":495 * * self._stdio_ready = 1 * if self._pending_calls: # <<<<<<<<<<<<<< * pending_calls = self._pending_calls.copy() * self._pending_calls.clear() */ __pyx_t_8 = (__pyx_v_self->_pending_calls != Py_None) && (PyList_GET_SIZE(__pyx_v_self->_pending_calls) != 0); if (__pyx_t_8) { /* "uvloop/handles/process.pyx":496 * self._stdio_ready = 1 * if self._pending_calls: * pending_calls = self._pending_calls.copy() # <<<<<<<<<<<<<< * self._pending_calls.clear() * for (type, fd, arg) in pending_calls: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_pending_calls, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 496, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pending_calls = __pyx_t_7; __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":497 * if self._pending_calls: * pending_calls = self._pending_calls.copy() * self._pending_calls.clear() # <<<<<<<<<<<<<< * for (type, fd, arg) in pending_calls: * if type == _CALL_PIPE_CONNECTION_LOST: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_pending_calls, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 497, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":498 * pending_calls = self._pending_calls.copy() * self._pending_calls.clear() * for (type, fd, arg) in pending_calls: # <<<<<<<<<<<<<< * if type == _CALL_PIPE_CONNECTION_LOST: * self._pipe_connection_lost(fd, arg) */ if (likely(PyList_CheckExact(__pyx_v_pending_calls)) || PyTuple_CheckExact(__pyx_v_pending_calls)) { __pyx_t_7 = __pyx_v_pending_calls; __Pyx_INCREF(__pyx_t_7); __pyx_t_23 = 0; __pyx_t_24 = NULL; } else { __pyx_t_23 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_pending_calls); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_24 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_24)) __PYX_ERR(5, 498, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_24)) { if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_23); __Pyx_INCREF(__pyx_t_4); __pyx_t_23++; if (unlikely(0 < 0)) __PYX_ERR(5, 498, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_23); __Pyx_INCREF(__pyx_t_4); __pyx_t_23++; if (unlikely(0 < 0)) __PYX_ERR(5, 498, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_24(__pyx_t_7); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(5, 498, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 498, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_12 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_12); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = Py_TYPE(__pyx_t_14)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_25(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L31_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_25(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L31_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_12 = __pyx_t_25(__pyx_t_14); if (unlikely(!__pyx_t_12)) goto __pyx_L31_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_25(__pyx_t_14), 3) < 0) __PYX_ERR(5, 498, __pyx_L1_error) __pyx_t_25 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L32_unpacking_done; __pyx_L31_unpacking_failed:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_25 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 498, __pyx_L1_error) __pyx_L32_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_type, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_fd, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_12); __pyx_t_12 = 0; /* "uvloop/handles/process.pyx":499 * self._pending_calls.clear() * for (type, fd, arg) in pending_calls: * if type == _CALL_PIPE_CONNECTION_LOST: # <<<<<<<<<<<<<< * self._pipe_connection_lost(fd, arg) * elif type == _CALL_PIPE_DATA_RECEIVED: */ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(5, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":500 * for (type, fd, arg) in pending_calls: * if type == _CALL_PIPE_CONNECTION_LOST: * self._pipe_connection_lost(fd, arg) # <<<<<<<<<<<<<< * elif type == _CALL_PIPE_DATA_RECEIVED: * self._pipe_data_received(fd, arg) */ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 500, __pyx_L1_error) __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_connection_lost(__pyx_v_self, __pyx_t_15, __pyx_v_arg); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":499 * self._pending_calls.clear() * for (type, fd, arg) in pending_calls: * if type == _CALL_PIPE_CONNECTION_LOST: # <<<<<<<<<<<<<< * self._pipe_connection_lost(fd, arg) * elif type == _CALL_PIPE_DATA_RECEIVED: */ goto __pyx_L33; } /* "uvloop/handles/process.pyx":501 * if type == _CALL_PIPE_CONNECTION_LOST: * self._pipe_connection_lost(fd, arg) * elif type == _CALL_PIPE_DATA_RECEIVED: # <<<<<<<<<<<<<< * self._pipe_data_received(fd, arg) * elif type == _CALL_PROCESS_EXITED: */ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(5, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":502 * self._pipe_connection_lost(fd, arg) * elif type == _CALL_PIPE_DATA_RECEIVED: * self._pipe_data_received(fd, arg) # <<<<<<<<<<<<<< * elif type == _CALL_PROCESS_EXITED: * self._loop.call_soon(self._protocol.process_exited) */ __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_fd); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 502, __pyx_L1_error) __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_data_received(__pyx_v_self, __pyx_t_15, __pyx_v_arg); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":501 * if type == _CALL_PIPE_CONNECTION_LOST: * self._pipe_connection_lost(fd, arg) * elif type == _CALL_PIPE_DATA_RECEIVED: # <<<<<<<<<<<<<< * self._pipe_data_received(fd, arg) * elif type == _CALL_PROCESS_EXITED: */ goto __pyx_L33; } /* "uvloop/handles/process.pyx":503 * elif type == _CALL_PIPE_DATA_RECEIVED: * self._pipe_data_received(fd, arg) * elif type == _CALL_PROCESS_EXITED: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.process_exited) * elif type == _CALL_CONNECTION_LOST: */ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(5, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":504 * self._pipe_data_received(fd, arg) * elif type == _CALL_PROCESS_EXITED: * self._loop.call_soon(self._protocol.process_exited) # <<<<<<<<<<<<<< * elif type == _CALL_CONNECTION_LOST: * self._loop.call_soon(self._protocol.connection_lost, None) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_process_exited); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":503 * elif type == _CALL_PIPE_DATA_RECEIVED: * self._pipe_data_received(fd, arg) * elif type == _CALL_PROCESS_EXITED: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.process_exited) * elif type == _CALL_CONNECTION_LOST: */ goto __pyx_L33; } /* "uvloop/handles/process.pyx":505 * elif type == _CALL_PROCESS_EXITED: * self._loop.call_soon(self._protocol.process_exited) * elif type == _CALL_CONNECTION_LOST: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.connection_lost, None) * */ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_type, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(5, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { /* "uvloop/handles/process.pyx":506 * self._loop.call_soon(self._protocol.process_exited) * elif type == _CALL_CONNECTION_LOST: * self._loop.call_soon(self._protocol.connection_lost, None) # <<<<<<<<<<<<<< * * cdef _try_finish(self): */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_6 = NULL; __pyx_t_15 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_15 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_14, Py_None}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_14, Py_None}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_15, __pyx_t_14); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_15, Py_None); __pyx_t_14 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":505 * elif type == _CALL_PROCESS_EXITED: * self._loop.call_soon(self._protocol.process_exited) * elif type == _CALL_CONNECTION_LOST: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.connection_lost, None) * */ } __pyx_L33:; /* "uvloop/handles/process.pyx":498 * pending_calls = self._pending_calls.copy() * self._pending_calls.clear() * for (type, fd, arg) in pending_calls: # <<<<<<<<<<<<<< * if type == _CALL_PIPE_CONNECTION_LOST: * self._pipe_connection_lost(fd, arg) */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":495 * * self._stdio_ready = 1 * if self._pending_calls: # <<<<<<<<<<<<<< * pending_calls = self._pending_calls.copy() * self._pending_calls.clear() */ } /* "uvloop/handles/process.pyx":482 * iocnt.data.fd = io[idx] * * cdef _call_connection_made(self, waiter): # <<<<<<<<<<<<<< * try: * self._protocol.connection_made(self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._call_connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XDECREF(__pyx_v_pending_calls); __Pyx_XDECREF(__pyx_v_type); __Pyx_XDECREF(__pyx_v_fd); __Pyx_XDECREF(__pyx_v_arg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":508 * self._loop.call_soon(self._protocol.connection_lost, None) * * cdef _try_finish(self): # <<<<<<<<<<<<<< * if self._returncode is None or self._finished: * return */ static PyObject *__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; __Pyx_RefNannySetupContext("_try_finish", 0); /* "uvloop/handles/process.pyx":509 * * cdef _try_finish(self): * if self._returncode is None or self._finished: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (__pyx_v_self->_finished != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/process.pyx":510 * cdef _try_finish(self): * if self._returncode is None or self._finished: * return # <<<<<<<<<<<<<< * * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/process.pyx":509 * * cdef _try_finish(self): * if self._returncode is None or self._finished: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/process.pyx":512 * return * * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<< * (self.stdout_proto is None or self.stdout_proto.disconnected) and * (self.stderr_proto is None or self.stderr_proto.disconnected)): */ __pyx_t_3 = (__pyx_v_self->stdin_proto == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (!__pyx_t_2) { } else { goto __pyx_L8_next_and; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stdin_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_and:; /* "uvloop/handles/process.pyx":513 * * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and * (self.stdout_proto is None or self.stdout_proto.disconnected) and # <<<<<<<<<<<<<< * (self.stderr_proto is None or self.stderr_proto.disconnected)): * */ __pyx_t_2 = (__pyx_v_self->stdout_proto == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { goto __pyx_L10_next_and; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stdout_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L7_bool_binop_done; } __pyx_L10_next_and:; /* "uvloop/handles/process.pyx":514 * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and * (self.stdout_proto is None or self.stdout_proto.disconnected) and * (self.stderr_proto is None or self.stderr_proto.disconnected)): # <<<<<<<<<<<<<< * * self._finished = 1 */ __pyx_t_3 = (__pyx_v_self->stderr_proto == Py_None); __pyx_t_2 = (__pyx_t_3 != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->stderr_proto, __pyx_n_s_disconnected); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; /* "uvloop/handles/process.pyx":512 * return * * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<< * (self.stdout_proto is None or self.stdout_proto.disconnected) and * (self.stderr_proto is None or self.stderr_proto.disconnected)): */ if (__pyx_t_1) { /* "uvloop/handles/process.pyx":516 * (self.stderr_proto is None or self.stderr_proto.disconnected)): * * self._finished = 1 # <<<<<<<<<<<<<< * * if self._stdio_ready: */ __pyx_v_self->_finished = 1; /* "uvloop/handles/process.pyx":518 * self._finished = 1 * * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.connection_lost, None) * else: */ __pyx_t_1 = (__pyx_v_self->_stdio_ready != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":519 * * if self._stdio_ready: * self._loop.call_soon(self._protocol.connection_lost, None) # <<<<<<<<<<<<<< * else: * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_protocol, __pyx_n_s_connection_lost); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, Py_None}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, Py_None}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, Py_None); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":518 * self._finished = 1 * * if self._stdio_ready: # <<<<<<<<<<<<<< * self._loop.call_soon(self._protocol.connection_lost, None) * else: */ goto __pyx_L13; } /* "uvloop/handles/process.pyx":521 * self._loop.call_soon(self._protocol.connection_lost, None) * else: * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) # <<<<<<<<<<<<<< * * def __stdio_inited(self, waiter, stdio_fut): */ /*else*/ { if (unlikely(__pyx_v_self->_pending_calls == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 521, __pyx_L1_error) } __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_pending_calls, __pyx_tuple__163); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(5, 521, __pyx_L1_error) } __pyx_L13:; /* "uvloop/handles/process.pyx":512 * return * * if ((self.stdin_proto is None or self.stdin_proto.disconnected) and # <<<<<<<<<<<<<< * (self.stdout_proto is None or self.stdout_proto.disconnected) and * (self.stderr_proto is None or self.stderr_proto.disconnected)): */ } /* "uvloop/handles/process.pyx":508 * self._loop.call_soon(self._protocol.connection_lost, None) * * cdef _try_finish(self): # <<<<<<<<<<<<<< * if self._returncode is None or self._finished: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._try_finish", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":523 * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) * * def __stdio_inited(self, waiter, stdio_fut): # <<<<<<<<<<<<<< * exc = stdio_fut.exception() * if exc is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_2__stdio_inited[] = "UVProcessTransport.__stdio_inited(self, waiter, stdio_fut)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_waiter = 0; PyObject *__pyx_v_stdio_fut = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__stdio_inited (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_waiter,&__pyx_n_s_stdio_fut,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_waiter)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stdio_fut)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__stdio_inited", 1, 2, 2, 1); __PYX_ERR(5, 523, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__stdio_inited") < 0)) __PYX_ERR(5, 523, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_waiter = values[0]; __pyx_v_stdio_fut = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__stdio_inited", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 523, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__stdio_inited", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), __pyx_v_waiter, __pyx_v_stdio_fut); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_2__stdio_inited(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_waiter, PyObject *__pyx_v_stdio_fut) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__stdio_inited", 0); /* "uvloop/handles/process.pyx":524 * * def __stdio_inited(self, waiter, stdio_fut): * exc = stdio_fut.exception() # <<<<<<<<<<<<<< * if exc is not None: * if waiter is None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stdio_fut, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 524, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":525 * def __stdio_inited(self, waiter, stdio_fut): * exc = stdio_fut.exception() * if exc is not None: # <<<<<<<<<<<<<< * if waiter is None: * raise exc */ __pyx_t_4 = (__pyx_v_exc != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/handles/process.pyx":526 * exc = stdio_fut.exception() * if exc is not None: * if waiter is None: # <<<<<<<<<<<<<< * raise exc * else: */ __pyx_t_5 = (__pyx_v_waiter == Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/handles/process.pyx":527 * if exc is not None: * if waiter is None: * raise exc # <<<<<<<<<<<<<< * else: * waiter.set_exception(exc) */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(5, 527, __pyx_L1_error) /* "uvloop/handles/process.pyx":526 * exc = stdio_fut.exception() * if exc is not None: * if waiter is None: # <<<<<<<<<<<<<< * raise exc * else: */ } /* "uvloop/handles/process.pyx":529 * raise exc * else: * waiter.set_exception(exc) # <<<<<<<<<<<<<< * else: * self._loop._call_soon_handle( */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exc); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/handles/process.pyx":525 * def __stdio_inited(self, waiter, stdio_fut): * exc = stdio_fut.exception() * if exc is not None: # <<<<<<<<<<<<<< * if waiter is None: * raise exc */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":531 * waiter.set_exception(exc) * else: * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1(self._loop, * "UVProcessTransport._call_connection_made", */ /*else*/ { /* "uvloop/handles/process.pyx":532 * else: * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<< * "UVProcessTransport._call_connection_made", * self._call_connection_made, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/handles/process.pyx":535 * "UVProcessTransport._call_connection_made", * self._call_connection_made, * self, waiter)) # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_UVProcessTransport__call_connect, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_self), __pyx_v_waiter); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":532 * else: * self._loop._call_soon_handle( * new_MethodHandle1(self._loop, # <<<<<<<<<<<<<< * "UVProcessTransport._call_connection_made", * self._call_connection_made, */ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(5, 532, __pyx_L1_error) /* "uvloop/handles/process.pyx":531 * waiter.set_exception(exc) * else: * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1(self._loop, * "UVProcessTransport._call_connection_made", */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base.__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":523 * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) * * def __stdio_inited(self, waiter, stdio_fut): # <<<<<<<<<<<<<< * exc = stdio_fut.exception() * if exc is not None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.__stdio_inited", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":538 * * @staticmethod * cdef UVProcessTransport new(Loop loop, protocol, args, env, # <<<<<<<<<<<<<< * cwd, start_new_session, * _stdin, _stdout, _stderr, pass_fds, */ static struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_f_6uvloop_4loop_18UVProcessTransport_new(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_protocol, PyObject *__pyx_v_args, PyObject *__pyx_v_env, PyObject *__pyx_v_cwd, PyObject *__pyx_v_start_new_session, PyObject *__pyx_v__stdin, PyObject *__pyx_v__stdout, PyObject *__pyx_v__stderr, PyObject *__pyx_v_pass_fds, PyObject *__pyx_v_waiter, PyObject *__pyx_v_debug_flags, PyObject *__pyx_v_preexec_fn, PyObject *__pyx_v_restore_signals) { struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_handle = 0; PyObject *__pyx_v_init_fut = NULL; struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/process.pyx":547 * * cdef UVProcessTransport handle * handle = UVProcessTransport.__new__(UVProcessTransport) # <<<<<<<<<<<<<< * handle._protocol = protocol * handle._init(loop, args, env, cwd, start_new_session, */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop_UVProcessTransport(((PyTypeObject *)__pyx_ptype_6uvloop_4loop_UVProcessTransport), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop_UVProcessTransport)))) __PYX_ERR(5, 547, __pyx_L1_error) __pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":548 * cdef UVProcessTransport handle * handle = UVProcessTransport.__new__(UVProcessTransport) * handle._protocol = protocol # <<<<<<<<<<<<<< * handle._init(loop, args, env, cwd, start_new_session, * __process_convert_fileno(_stdin), */ __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); __Pyx_GOTREF(__pyx_v_handle->_protocol); __Pyx_DECREF(__pyx_v_handle->_protocol); __pyx_v_handle->_protocol = __pyx_v_protocol; /* "uvloop/handles/process.pyx":549 * handle = UVProcessTransport.__new__(UVProcessTransport) * handle._protocol = protocol * handle._init(loop, args, env, cwd, start_new_session, # <<<<<<<<<<<<<< * __process_convert_fileno(_stdin), * __process_convert_fileno(_stdout), */ if (!(likely(PyList_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(5, 549, __pyx_L1_error) if (!(likely(PyDict_CheckExact(__pyx_v_env))||((__pyx_v_env) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_env)->tp_name), 0))) __PYX_ERR(5, 549, __pyx_L1_error) /* "uvloop/handles/process.pyx":550 * handle._protocol = protocol * handle._init(loop, args, env, cwd, start_new_session, * __process_convert_fileno(_stdin), # <<<<<<<<<<<<<< * __process_convert_fileno(_stdout), * __process_convert_fileno(_stderr), */ __pyx_t_1 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stdin); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "uvloop/handles/process.pyx":551 * handle._init(loop, args, env, cwd, start_new_session, * __process_convert_fileno(_stdin), * __process_convert_fileno(_stdout), # <<<<<<<<<<<<<< * __process_convert_fileno(_stderr), * pass_fds, */ __pyx_t_2 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stdout); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/handles/process.pyx":552 * __process_convert_fileno(_stdin), * __process_convert_fileno(_stdout), * __process_convert_fileno(_stderr), # <<<<<<<<<<<<<< * pass_fds, * debug_flags, */ __pyx_t_3 = __pyx_f_6uvloop_4loop___process_convert_fileno(__pyx_v__stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/process.pyx":549 * handle = UVProcessTransport.__new__(UVProcessTransport) * handle._protocol = protocol * handle._init(loop, args, env, cwd, start_new_session, # <<<<<<<<<<<<<< * __process_convert_fileno(_stdin), * __process_convert_fileno(_stdout), */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_handle), __pyx_v_loop, ((PyObject*)__pyx_v_args), ((PyObject*)__pyx_v_env), __pyx_v_cwd, __pyx_v_start_new_session, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_v_pass_fds, __pyx_v_debug_flags, __pyx_v_preexec_fn, __pyx_v_restore_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":558 * restore_signals) * * if handle._init_futs: # <<<<<<<<<<<<<< * handle._stdio_ready = 0 * init_fut = aio_gather(*handle._init_futs, loop=loop) */ __pyx_t_5 = (__pyx_v_handle->_init_futs != Py_None) && (PyList_GET_SIZE(__pyx_v_handle->_init_futs) != 0); if (__pyx_t_5) { /* "uvloop/handles/process.pyx":559 * * if handle._init_futs: * handle._stdio_ready = 0 # <<<<<<<<<<<<<< * init_fut = aio_gather(*handle._init_futs, loop=loop) * init_fut.add_done_callback( */ __pyx_v_handle->_stdio_ready = 0; /* "uvloop/handles/process.pyx":560 * if handle._init_futs: * handle._stdio_ready = 0 * init_fut = aio_gather(*handle._init_futs, loop=loop) # <<<<<<<<<<<<<< * init_fut.add_done_callback( * ft_partial(handle.__stdio_inited, waiter)) */ __pyx_t_4 = PySequence_Tuple(__pyx_v_handle->_init_futs); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, ((PyObject *)__pyx_v_loop)) < 0) __PYX_ERR(5, 560, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_init_fut = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":561 * handle._stdio_ready = 0 * init_fut = aio_gather(*handle._init_futs, loop=loop) * init_fut.add_done_callback( # <<<<<<<<<<<<<< * ft_partial(handle.__stdio_inited, waiter)) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_fut, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/process.pyx":562 * init_fut = aio_gather(*handle._init_futs, loop=loop) * init_fut.add_done_callback( * ft_partial(handle.__stdio_inited, waiter)) # <<<<<<<<<<<<<< * else: * handle._stdio_ready = 1 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_handle), __pyx_n_s_stdio_inited); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_6uvloop_4loop_ft_partial); __pyx_t_6 = __pyx_v_6uvloop_4loop_ft_partial; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_waiter}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_v_waiter}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_v_waiter); __Pyx_GIVEREF(__pyx_v_waiter); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_waiter); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":558 * restore_signals) * * if handle._init_futs: # <<<<<<<<<<<<<< * handle._stdio_ready = 0 * init_fut = aio_gather(*handle._init_futs, loop=loop) */ goto __pyx_L3; } /* "uvloop/handles/process.pyx":564 * ft_partial(handle.__stdio_inited, waiter)) * else: * handle._stdio_ready = 1 # <<<<<<<<<<<<<< * loop._call_soon_handle( * new_MethodHandle1(loop, */ /*else*/ { __pyx_v_handle->_stdio_ready = 1; /* "uvloop/handles/process.pyx":566 * handle._stdio_ready = 1 * loop._call_soon_handle( * new_MethodHandle1(loop, # <<<<<<<<<<<<<< * "UVProcessTransport._call_connection_made", * handle._call_connection_made, */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(__pyx_v_loop, __pyx_kp_u_UVProcessTransport__call_connect, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_handle->__pyx_base.__pyx_base.__pyx_vtab)->_call_connection_made), ((PyObject *)__pyx_v_handle), __pyx_v_waiter); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(5, 566, __pyx_L1_error) /* "uvloop/handles/process.pyx":565 * else: * handle._stdio_ready = 1 * loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1(loop, * "UVProcessTransport._call_connection_made", */ __pyx_t_3 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/process.pyx":571 * handle, waiter)) * * return handle # <<<<<<<<<<<<<< * * def get_protocol(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_handle)); __pyx_r = __pyx_v_handle; goto __pyx_L0; /* "uvloop/handles/process.pyx":538 * * @staticmethod * cdef UVProcessTransport new(Loop loop, protocol, args, env, # <<<<<<<<<<<<<< * cwd, start_new_session, * _stdin, _stdout, _stderr, pass_fds, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_handle); __Pyx_XDECREF(__pyx_v_init_fut); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":573 * return handle * * def get_protocol(self): # <<<<<<<<<<<<<< * return self._protocol * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_4get_protocol[] = "UVProcessTransport.get_protocol(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_protocol (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_4get_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_protocol", 0); /* "uvloop/handles/process.pyx":574 * * def get_protocol(self): * return self._protocol # <<<<<<<<<<<<<< * * def set_protocol(self, protocol): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_protocol); __pyx_r = __pyx_v_self->_protocol; goto __pyx_L0; /* "uvloop/handles/process.pyx":573 * return handle * * def get_protocol(self): # <<<<<<<<<<<<<< * return self._protocol * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":576 * return self._protocol * * def set_protocol(self, protocol): # <<<<<<<<<<<<<< * self._protocol = protocol * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_6set_protocol[] = "UVProcessTransport.set_protocol(self, protocol)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_protocol (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((PyObject *)__pyx_v_protocol)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_6set_protocol(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_protocol) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_protocol", 0); /* "uvloop/handles/process.pyx":577 * * def set_protocol(self, protocol): * self._protocol = protocol # <<<<<<<<<<<<<< * * def get_pid(self): */ __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); __Pyx_GOTREF(__pyx_v_self->_protocol); __Pyx_DECREF(__pyx_v_self->_protocol); __pyx_v_self->_protocol = __pyx_v_protocol; /* "uvloop/handles/process.pyx":576 * return self._protocol * * def set_protocol(self, protocol): # <<<<<<<<<<<<<< * self._protocol = protocol * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":579 * self._protocol = protocol * * def get_pid(self): # <<<<<<<<<<<<<< * return self._pid * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_8get_pid[] = "UVProcessTransport.get_pid(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pid (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_8get_pid(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pid", 0); /* "uvloop/handles/process.pyx":580 * * def get_pid(self): * return self._pid # <<<<<<<<<<<<<< * * def get_returncode(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx_base._pid); __pyx_r = __pyx_v_self->__pyx_base._pid; goto __pyx_L0; /* "uvloop/handles/process.pyx":579 * self._protocol = protocol * * def get_pid(self): # <<<<<<<<<<<<<< * return self._pid * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":582 * return self._pid * * def get_returncode(self): # <<<<<<<<<<<<<< * return self._returncode * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_10get_returncode[] = "UVProcessTransport.get_returncode(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_returncode (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_10get_returncode(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_returncode", 0); /* "uvloop/handles/process.pyx":583 * * def get_returncode(self): * return self._returncode # <<<<<<<<<<<<<< * * def get_pipe_transport(self, fd): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->__pyx_base._returncode); __pyx_r = __pyx_v_self->__pyx_base._returncode; goto __pyx_L0; /* "uvloop/handles/process.pyx":582 * return self._pid * * def get_returncode(self): # <<<<<<<<<<<<<< * return self._returncode * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":585 * return self._returncode * * def get_pipe_transport(self, fd): # <<<<<<<<<<<<<< * if fd == 0: * return self._stdin */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport[] = "UVProcessTransport.get_pipe_transport(self, fd)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pipe_transport (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((PyObject *)__pyx_v_fd)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, PyObject *__pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("get_pipe_transport", 0); /* "uvloop/handles/process.pyx":586 * * def get_pipe_transport(self, fd): * if fd == 0: # <<<<<<<<<<<<<< * return self._stdin * elif fd == 1: */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/handles/process.pyx":587 * def get_pipe_transport(self, fd): * if fd == 0: * return self._stdin # <<<<<<<<<<<<<< * elif fd == 1: * return self._stdout */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_stdin)); __pyx_r = ((PyObject *)__pyx_v_self->_stdin); goto __pyx_L0; /* "uvloop/handles/process.pyx":586 * * def get_pipe_transport(self, fd): * if fd == 0: # <<<<<<<<<<<<<< * return self._stdin * elif fd == 1: */ } /* "uvloop/handles/process.pyx":588 * if fd == 0: * return self._stdin * elif fd == 1: # <<<<<<<<<<<<<< * return self._stdout * elif fd == 2: */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/handles/process.pyx":589 * return self._stdin * elif fd == 1: * return self._stdout # <<<<<<<<<<<<<< * elif fd == 2: * return self._stderr */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_stdout)); __pyx_r = ((PyObject *)__pyx_v_self->_stdout); goto __pyx_L0; /* "uvloop/handles/process.pyx":588 * if fd == 0: * return self._stdin * elif fd == 1: # <<<<<<<<<<<<<< * return self._stdout * elif fd == 2: */ } /* "uvloop/handles/process.pyx":590 * elif fd == 1: * return self._stdout * elif fd == 2: # <<<<<<<<<<<<<< * return self._stderr * */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_fd, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(5, 590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/handles/process.pyx":591 * return self._stdout * elif fd == 2: * return self._stderr # <<<<<<<<<<<<<< * * def terminate(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_stderr)); __pyx_r = ((PyObject *)__pyx_v_self->_stderr); goto __pyx_L0; /* "uvloop/handles/process.pyx":590 * elif fd == 1: * return self._stdout * elif fd == 2: # <<<<<<<<<<<<<< * return self._stderr * */ } /* "uvloop/handles/process.pyx":585 * return self._returncode * * def get_pipe_transport(self, fd): # <<<<<<<<<<<<<< * if fd == 0: * return self._stdin */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.get_pipe_transport", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":593 * return self._stderr * * def terminate(self): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(uv.SIGTERM) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_14terminate[] = "UVProcessTransport.terminate(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("terminate (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_14terminate(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("terminate", 0); /* "uvloop/handles/process.pyx":594 * * def terminate(self): * self._check_proc() # <<<<<<<<<<<<<< * self._kill(uv.SIGTERM) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":595 * def terminate(self): * self._check_proc() * self._kill(uv.SIGTERM) # <<<<<<<<<<<<<< * * def kill(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGTERM); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":593 * return self._stderr * * def terminate(self): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(uv.SIGTERM) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.terminate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":597 * self._kill(uv.SIGTERM) * * def kill(self): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(uv.SIGKILL) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_16kill[] = "UVProcessTransport.kill(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kill (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_16kill(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("kill", 0); /* "uvloop/handles/process.pyx":598 * * def kill(self): * self._check_proc() # <<<<<<<<<<<<<< * self._kill(uv.SIGKILL) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":599 * def kill(self): * self._check_proc() * self._kill(uv.SIGKILL) # <<<<<<<<<<<<<< * * def send_signal(self, int signal): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGKILL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":597 * self._kill(uv.SIGTERM) * * def kill(self): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(uv.SIGKILL) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.kill", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":601 * self._kill(uv.SIGKILL) * * def send_signal(self, int signal): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(signal) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal(PyObject *__pyx_v_self, PyObject *__pyx_arg_signal); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_18send_signal[] = "UVProcessTransport.send_signal(self, int signal)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal(PyObject *__pyx_v_self, PyObject *__pyx_arg_signal) { int __pyx_v_signal; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_signal (wrapper)", 0); assert(__pyx_arg_signal); { __pyx_v_signal = __Pyx_PyInt_As_int(__pyx_arg_signal); if (unlikely((__pyx_v_signal == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 601, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.send_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), ((int)__pyx_v_signal)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_18send_signal(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, int __pyx_v_signal) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("send_signal", 0); /* "uvloop/handles/process.pyx":602 * * def send_signal(self, int signal): * self._check_proc() # <<<<<<<<<<<<<< * self._kill(signal) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_check_proc(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":603 * def send_signal(self, int signal): * self._check_proc() * self._kill(signal) # <<<<<<<<<<<<<< * * def is_closing(self): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), __pyx_v_signal); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":601 * self._kill(uv.SIGKILL) * * def send_signal(self, int signal): # <<<<<<<<<<<<<< * self._check_proc() * self._kill(signal) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.send_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":605 * self._kill(signal) * * def is_closing(self): # <<<<<<<<<<<<<< * return self._closed * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_20is_closing[] = "UVProcessTransport.is_closing(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_closing (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_20is_closing(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("is_closing", 0); /* "uvloop/handles/process.pyx":606 * * def is_closing(self): * return self._closed # <<<<<<<<<<<<<< * * def close(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base._closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":605 * self._kill(signal) * * def is_closing(self): # <<<<<<<<<<<<<< * return self._closed * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.is_closing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":608 * return self._closed * * def close(self): # <<<<<<<<<<<<<< * if self._returncode is None: * self._kill(uv.SIGKILL) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_22close[] = "UVProcessTransport.close(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_22close(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/handles/process.pyx":609 * * def close(self): * if self._returncode is None: # <<<<<<<<<<<<<< * self._kill(uv.SIGKILL) * */ __pyx_t_1 = (__pyx_v_self->__pyx_base._returncode == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":610 * def close(self): * if self._returncode is None: * self._kill(uv.SIGKILL) # <<<<<<<<<<<<<< * * if self._stdin is not None: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._kill(((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_v_self), SIGKILL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":609 * * def close(self): * if self._returncode is None: # <<<<<<<<<<<<<< * self._kill(uv.SIGKILL) * */ } /* "uvloop/handles/process.pyx":612 * self._kill(uv.SIGKILL) * * if self._stdin is not None: # <<<<<<<<<<<<<< * self._stdin.close() * if self._stdout is not None: */ __pyx_t_2 = (((PyObject *)__pyx_v_self->_stdin) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":613 * * if self._stdin is not None: * self._stdin.close() # <<<<<<<<<<<<<< * if self._stdout is not None: * self._stdout.close() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stdin), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 613, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":612 * self._kill(uv.SIGKILL) * * if self._stdin is not None: # <<<<<<<<<<<<<< * self._stdin.close() * if self._stdout is not None: */ } /* "uvloop/handles/process.pyx":614 * if self._stdin is not None: * self._stdin.close() * if self._stdout is not None: # <<<<<<<<<<<<<< * self._stdout.close() * if self._stderr is not None: */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_stdout) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":615 * self._stdin.close() * if self._stdout is not None: * self._stdout.close() # <<<<<<<<<<<<<< * if self._stderr is not None: * self._stderr.close() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stdout), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 615, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":614 * if self._stdin is not None: * self._stdin.close() * if self._stdout is not None: # <<<<<<<<<<<<<< * self._stdout.close() * if self._stderr is not None: */ } /* "uvloop/handles/process.pyx":616 * if self._stdout is not None: * self._stdout.close() * if self._stderr is not None: # <<<<<<<<<<<<<< * self._stderr.close() * */ __pyx_t_2 = (((PyObject *)__pyx_v_self->_stderr) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":617 * self._stdout.close() * if self._stderr is not None: * self._stderr.close() # <<<<<<<<<<<<<< * * self._close() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_stderr), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 617, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 617, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":616 * if self._stdout is not None: * self._stdout.close() * if self._stderr is not None: # <<<<<<<<<<<<<< * self._stderr.close() * */ } /* "uvloop/handles/process.pyx":619 * self._stderr.close() * * self._close() # <<<<<<<<<<<<<< * * def get_extra_info(self, name, default=None): */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/process.pyx":608 * return self._closed * * def close(self): # <<<<<<<<<<<<<< * if self._returncode is None: * self._kill(uv.SIGKILL) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":621 * self._close() * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * return default * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_24get_extra_info[] = "UVProcessTransport.get_extra_info(self, name, default=None)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_name = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_extra_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,&__pyx_n_s_default,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_extra_info") < 0)) __PYX_ERR(5, 621, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = values[0]; __pyx_v_default = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_extra_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 621, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UVProcessTransport.get_extra_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self), __pyx_v_name, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_24get_extra_info(CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_name, PyObject *__pyx_v_default) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_extra_info", 0); /* "uvloop/handles/process.pyx":622 * * def get_extra_info(self, name, default=None): * return default # <<<<<<<<<<<<<< * * def _wait(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; /* "uvloop/handles/process.pyx":621 * self._close() * * def get_extra_info(self, name, default=None): # <<<<<<<<<<<<<< * return default * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":624 * return default * * def _wait(self): # <<<<<<<<<<<<<< * fut = self._loop._new_future() * if self._returncode is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_18UVProcessTransport_26_wait[] = "UVProcessTransport._wait(self)"; static PyObject *__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_wait (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_18UVProcessTransport_26_wait(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *__pyx_v_self) { PyObject *__pyx_v_fut = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_wait", 0); /* "uvloop/handles/process.pyx":625 * * def _wait(self): * fut = self._loop._new_future() # <<<<<<<<<<<<<< * if self._returncode is not None: * fut.set_result(self._returncode) */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_v_self->__pyx_base.__pyx_base._loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_fut = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":626 * def _wait(self): * fut = self._loop._new_future() * if self._returncode is not None: # <<<<<<<<<<<<<< * fut.set_result(self._returncode) * return fut */ __pyx_t_2 = (__pyx_v_self->__pyx_base._returncode != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/process.pyx":627 * fut = self._loop._new_future() * if self._returncode is not None: * fut.set_result(self._returncode) # <<<<<<<<<<<<<< * return fut * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx_base._returncode); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx_base._returncode}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx_base._returncode}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_self->__pyx_base._returncode); __Pyx_GIVEREF(__pyx_v_self->__pyx_base._returncode); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->__pyx_base._returncode); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":628 * if self._returncode is not None: * fut.set_result(self._returncode) * return fut # <<<<<<<<<<<<<< * * self._exit_waiters.append(fut) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fut); __pyx_r = __pyx_v_fut; goto __pyx_L0; /* "uvloop/handles/process.pyx":626 * def _wait(self): * fut = self._loop._new_future() * if self._returncode is not None: # <<<<<<<<<<<<<< * fut.set_result(self._returncode) * return fut */ } /* "uvloop/handles/process.pyx":630 * return fut * * self._exit_waiters.append(fut) # <<<<<<<<<<<<<< * return fut * */ if (unlikely(__pyx_v_self->_exit_waiters == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(5, 630, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->_exit_waiters, __pyx_v_fut); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(5, 630, __pyx_L1_error) /* "uvloop/handles/process.pyx":631 * * self._exit_waiters.append(fut) * return fut # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fut); __pyx_r = __pyx_v_fut; goto __pyx_L0; /* "uvloop/handles/process.pyx":624 * return default * * def _wait(self): # <<<<<<<<<<<<<< * fut = self._loop._new_future() * if self._returncode is not None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVProcessTransport._wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fut); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":636 * class WriteSubprocessPipeProto(aio_BaseProtocol): * * def __init__(self, proc, fd): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto___init__[] = "WriteSubprocessPipeProto.__init__(self, proc, fd)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto___init__}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_proc = 0; PyObject *__pyx_v_fd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_proc,&__pyx_n_s_fd,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_proc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(5, 636, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(5, 636, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(5, 636, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_proc = values[1]; __pyx_v_fd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 636, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(__pyx_self, __pyx_v_self, __pyx_v_proc, __pyx_v_fd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proc, PyObject *__pyx_v_fd) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__init__", 0); /* "uvloop/handles/process.pyx":637 * * def __init__(self, proc, fd): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if type(proc) is not UVProcessTransport: * raise TypeError */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":638 * def __init__(self, proc, fd): * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: # <<<<<<<<<<<<<< * raise TypeError * if not isinstance(fd, int): */ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_proc)) != ((PyObject *)__pyx_ptype_6uvloop_4loop_UVProcessTransport)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":639 * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: * raise TypeError # <<<<<<<<<<<<<< * if not isinstance(fd, int): * raise TypeError */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(5, 639, __pyx_L1_error) /* "uvloop/handles/process.pyx":638 * def __init__(self, proc, fd): * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: # <<<<<<<<<<<<<< * raise TypeError * if not isinstance(fd, int): */ } /* "uvloop/handles/process.pyx":640 * if type(proc) is not UVProcessTransport: * raise TypeError * if not isinstance(fd, int): # <<<<<<<<<<<<<< * raise TypeError * self.proc = proc */ __pyx_t_2 = PyInt_Check(__pyx_v_fd); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":641 * raise TypeError * if not isinstance(fd, int): * raise TypeError # <<<<<<<<<<<<<< * self.proc = proc * self.fd = fd */ __Pyx_Raise(__pyx_builtin_TypeError, 0, 0, 0); __PYX_ERR(5, 641, __pyx_L1_error) /* "uvloop/handles/process.pyx":640 * if type(proc) is not UVProcessTransport: * raise TypeError * if not isinstance(fd, int): # <<<<<<<<<<<<<< * raise TypeError * self.proc = proc */ } /* "uvloop/handles/process.pyx":637 * * def __init__(self, proc, fd): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if type(proc) is not UVProcessTransport: * raise TypeError */ } /* "uvloop/handles/process.pyx":642 * if not isinstance(fd, int): * raise TypeError * self.proc = proc # <<<<<<<<<<<<<< * self.fd = fd * self.pipe = None */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proc, __pyx_v_proc) < 0) __PYX_ERR(5, 642, __pyx_L1_error) /* "uvloop/handles/process.pyx":643 * raise TypeError * self.proc = proc * self.fd = fd # <<<<<<<<<<<<<< * self.pipe = None * self.disconnected = False */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fd, __pyx_v_fd) < 0) __PYX_ERR(5, 643, __pyx_L1_error) /* "uvloop/handles/process.pyx":644 * self.proc = proc * self.fd = fd * self.pipe = None # <<<<<<<<<<<<<< * self.disconnected = False * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pipe, Py_None) < 0) __PYX_ERR(5, 644, __pyx_L1_error) /* "uvloop/handles/process.pyx":645 * self.fd = fd * self.pipe = None * self.disconnected = False # <<<<<<<<<<<<<< * * def connection_made(self, transport): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disconnected, Py_False) < 0) __PYX_ERR(5, 645, __pyx_L1_error) /* "uvloop/handles/process.pyx":636 * class WriteSubprocessPipeProto(aio_BaseProtocol): * * def __init__(self, proc, fd): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":647 * self.disconnected = False * * def connection_made(self, transport): # <<<<<<<<<<<<<< * self.pipe = transport * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made[] = "WriteSubprocessPipeProto.connection_made(self, transport)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made = {"connection_made", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_transport = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connection_made (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_transport,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_transport)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("connection_made", 1, 2, 2, 1); __PYX_ERR(5, 647, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connection_made") < 0)) __PYX_ERR(5, 647, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_transport = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connection_made", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 647, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(__pyx_self, __pyx_v_self, __pyx_v_transport); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_2connection_made(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_transport) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connection_made", 0); /* "uvloop/handles/process.pyx":648 * * def connection_made(self, transport): * self.pipe = transport # <<<<<<<<<<<<<< * * def __repr__(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pipe, __pyx_v_transport) < 0) __PYX_ERR(5, 648, __pyx_L1_error) /* "uvloop/handles/process.pyx":647 * self.disconnected = False * * def connection_made(self, transport): # <<<<<<<<<<<<<< * self.pipe = transport * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_made", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":650 * self.pipe = transport * * def __repr__(self): # <<<<<<<<<<<<<< * return ('<%s fd=%s pipe=%r>' * % (self.__class__.__name__, self.fd, self.pipe)) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__[] = "WriteSubprocessPipeProto.__repr__(self)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/handles/process.pyx":651 * * def __repr__(self): * return ('<%s fd=%s pipe=%r>' # <<<<<<<<<<<<<< * % (self.__class__.__name__, self.fd, self.pipe)) * */ __Pyx_XDECREF(__pyx_r); /* "uvloop/handles/process.pyx":652 * def __repr__(self): * return ('<%s fd=%s pipe=%r>' * % (self.__class__.__name__, self.fd, self.pipe)) # <<<<<<<<<<<<<< * * def connection_lost(self, exc): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pipe); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_s_fd_s_pipe_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":650 * self.pipe = transport * * def __repr__(self): # <<<<<<<<<<<<<< * return ('<%s fd=%s pipe=%r>' * % (self.__class__.__name__, self.fd, self.pipe)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":654 * % (self.__class__.__name__, self.fd, self.pipe)) * * def connection_lost(self, exc): # <<<<<<<<<<<<<< * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost[] = "WriteSubprocessPipeProto.connection_lost(self, exc)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost = {"connection_lost", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_exc = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connection_lost (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_exc,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("connection_lost", 1, 2, 2, 1); __PYX_ERR(5, 654, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "connection_lost") < 0)) __PYX_ERR(5, 654, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_exc = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connection_lost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 654, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(__pyx_self, __pyx_v_self, __pyx_v_exc); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_6connection_lost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("connection_lost", 0); /* "uvloop/handles/process.pyx":655 * * def connection_lost(self, exc): * self.disconnected = True # <<<<<<<<<<<<<< * (self.proc)._pipe_connection_lost(self.fd, exc) * self.proc = None */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disconnected, Py_True) < 0) __PYX_ERR(5, 655, __pyx_L1_error) /* "uvloop/handles/process.pyx":656 * def connection_lost(self, exc): * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) # <<<<<<<<<<<<<< * self.proc = None * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 656, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1), __pyx_t_3, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":657 * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) * self.proc = None # <<<<<<<<<<<<<< * * def pause_writing(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proc, Py_None) < 0) __PYX_ERR(5, 657, __pyx_L1_error) /* "uvloop/handles/process.pyx":654 * % (self.__class__.__name__, self.fd, self.pipe)) * * def connection_lost(self, exc): # <<<<<<<<<<<<<< * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.connection_lost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":659 * self.proc = None * * def pause_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.pause_writing() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing[] = "WriteSubprocessPipeProto.pause_writing(self)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing = {"pause_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pause_writing (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_8pause_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("pause_writing", 0); /* "uvloop/handles/process.pyx":660 * * def pause_writing(self): * (self.proc)._protocol.pause_writing() # <<<<<<<<<<<<<< * * def resume_writing(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_2)->_protocol, __pyx_n_s_pause_writing); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_2) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 660, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":659 * self.proc = None * * def pause_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.pause_writing() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.pause_writing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":662 * (self.proc)._protocol.pause_writing() * * def resume_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.resume_writing() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing[] = "WriteSubprocessPipeProto.resume_writing(self)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing = {"resume_writing", (PyCFunction)__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing, METH_O, __pyx_doc_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing}; static PyObject *__pyx_pw_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("resume_writing (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_24WriteSubprocessPipeProto_10resume_writing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("resume_writing", 0); /* "uvloop/handles/process.pyx":663 * * def resume_writing(self): * (self.proc)._protocol.resume_writing() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_2)->_protocol, __pyx_n_s_resume_writing); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_2) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 663, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/process.pyx":662 * (self.proc)._protocol.pause_writing() * * def resume_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.resume_writing() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.WriteSubprocessPipeProto.resume_writing", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":669 * aio_Protocol): * * def data_received(self, data): # <<<<<<<<<<<<<< * (self.proc)._pipe_data_received(self.fd, data) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_23ReadSubprocessPipeProto_data_received[] = "ReadSubprocessPipeProto.data_received(self, data)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received = {"data_received", (PyCFunction)__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_23ReadSubprocessPipeProto_data_received}; static PyObject *__pyx_pw_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_data = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("data_received (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("data_received", 1, 2, 2, 1); __PYX_ERR(5, 669, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "data_received") < 0)) __PYX_ERR(5, 669, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_data = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("data_received", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(5, 669, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.ReadSubprocessPipeProto.data_received", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(__pyx_self, __pyx_v_self, __pyx_v_data); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_23ReadSubprocessPipeProto_data_received(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("data_received", 0); /* "uvloop/handles/process.pyx":670 * * def data_received(self, data): * (self.proc)._pipe_data_received(self.fd, data) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport *)((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->_pipe_data_received(((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)__pyx_t_1), __pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":669 * aio_Protocol): * * def data_received(self, data): # <<<<<<<<<<<<<< * (self.proc)._pipe_data_received(self.fd, data) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.ReadSubprocessPipeProto.data_received", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":673 * * * cdef __process_convert_fileno(object obj): # <<<<<<<<<<<<<< * if obj is None or isinstance(obj, int): * return obj */ static PyObject *__pyx_f_6uvloop_4loop___process_convert_fileno(PyObject *__pyx_v_obj) { PyObject *__pyx_v_fileno = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__process_convert_fileno", 0); /* "uvloop/handles/process.pyx":674 * * cdef __process_convert_fileno(object obj): * if obj is None or isinstance(obj, int): # <<<<<<<<<<<<<< * return obj * */ __pyx_t_2 = (__pyx_v_obj == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = PyInt_Check(__pyx_v_obj); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/process.pyx":675 * cdef __process_convert_fileno(object obj): * if obj is None or isinstance(obj, int): * return obj # <<<<<<<<<<<<<< * * fileno = obj.fileno() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; /* "uvloop/handles/process.pyx":674 * * cdef __process_convert_fileno(object obj): * if obj is None or isinstance(obj, int): # <<<<<<<<<<<<<< * return obj * */ } /* "uvloop/handles/process.pyx":677 * return obj * * fileno = obj.fileno() # <<<<<<<<<<<<<< * if not isinstance(fileno, int): * raise TypeError( */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_fileno); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 677, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_fileno = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/process.pyx":678 * * fileno = obj.fileno() * if not isinstance(fileno, int): # <<<<<<<<<<<<<< * raise TypeError( * '{!r}.fileno() returned non-integer'.format(obj)) */ __pyx_t_1 = PyInt_Check(__pyx_v_fileno); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/handles/process.pyx":680 * if not isinstance(fileno, int): * raise TypeError( * '{!r}.fileno() returned non-integer'.format(obj)) # <<<<<<<<<<<<<< * return fileno * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r_fileno_returned_non_integer, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_obj}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_obj}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":679 * fileno = obj.fileno() * if not isinstance(fileno, int): * raise TypeError( # <<<<<<<<<<<<<< * '{!r}.fileno() returned non-integer'.format(obj)) * return fileno */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(5, 679, __pyx_L1_error) /* "uvloop/handles/process.pyx":678 * * fileno = obj.fileno() * if not isinstance(fileno, int): # <<<<<<<<<<<<<< * raise TypeError( * '{!r}.fileno() returned non-integer'.format(obj)) */ } /* "uvloop/handles/process.pyx":681 * raise TypeError( * '{!r}.fileno() returned non-integer'.format(obj)) * return fileno # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_fileno); __pyx_r = __pyx_v_fileno; goto __pyx_L0; /* "uvloop/handles/process.pyx":673 * * * cdef __process_convert_fileno(object obj): # <<<<<<<<<<<<<< * if obj is None or isinstance(obj, int): * return obj */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.__process_convert_fileno", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fileno); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/process.pyx":684 * * * cdef void __uvprocess_on_exit_callback(uv.uv_process_t *handle, # <<<<<<<<<<<<<< * int64_t exit_status, * int term_signal) with gil: */ static void __pyx_f_6uvloop_4loop___uvprocess_on_exit_callback(uv_process_t *__pyx_v_handle, int64_t __pyx_v_exit_status, int __pyx_v_term_signal) { struct __pyx_obj_6uvloop_4loop_UVProcess *__pyx_v_proc = 0; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uvprocess_on_exit_callback", 0); /* "uvloop/handles/process.pyx":689 * * if __ensure_handle_data(handle, * "UVProcess exit callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UVProcess exit callback")) == 0) != 0); /* "uvloop/handles/process.pyx":688 * int term_signal) with gil: * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UVProcess exit callback") == 0: * return */ if (__pyx_t_1) { /* "uvloop/handles/process.pyx":690 * if __ensure_handle_data(handle, * "UVProcess exit callback") == 0: * return # <<<<<<<<<<<<<< * * cdef UVProcess proc = handle.data */ goto __pyx_L0; /* "uvloop/handles/process.pyx":688 * int term_signal) with gil: * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UVProcess exit callback") == 0: * return */ } /* "uvloop/handles/process.pyx":692 * return * * cdef UVProcess proc = handle.data # <<<<<<<<<<<<<< * try: * proc._on_exit(exit_status, term_signal) */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_proc = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":693 * * cdef UVProcess proc = handle.data * try: # <<<<<<<<<<<<<< * proc._on_exit(exit_status, term_signal) * except BaseException as ex: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "uvloop/handles/process.pyx":694 * cdef UVProcess proc = handle.data * try: * proc._on_exit(exit_status, term_signal) # <<<<<<<<<<<<<< * except BaseException as ex: * proc._error(ex, False) */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_proc->__pyx_base.__pyx_vtab)->_on_exit(__pyx_v_proc, __pyx_v_exit_status, __pyx_v_term_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 694, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":693 * * cdef UVProcess proc = handle.data * try: # <<<<<<<<<<<<<< * proc._on_exit(exit_status, term_signal) * except BaseException as ex: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L4_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":695 * try: * proc._on_exit(exit_status, term_signal) * except BaseException as ex: # <<<<<<<<<<<<<< * proc._error(ex, False) * */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.__uvprocess_on_exit_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 695, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/handles/process.pyx":696 * proc._on_exit(exit_status, term_signal) * except BaseException as ex: * proc._error(ex, False) # <<<<<<<<<<<<<< * * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_proc->__pyx_base.__pyx_vtab)->__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_proc), __pyx_v_ex, Py_False); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 696, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "uvloop/handles/process.pyx":695 * try: * proc._on_exit(exit_status, term_signal) * except BaseException as ex: # <<<<<<<<<<<<<< * proc._error(ex, False) * */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L6_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "uvloop/handles/process.pyx":693 * * cdef UVProcess proc = handle.data * try: # <<<<<<<<<<<<<< * proc._on_exit(exit_status, term_signal) * except BaseException as ex: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "uvloop/handles/process.pyx":684 * * * cdef void __uvprocess_on_exit_callback(uv.uv_process_t *handle, # <<<<<<<<<<<<<< * int64_t exit_status, * int term_signal) with gil: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__uvprocess_on_exit_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_proc); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/process.pyx":699 * * * cdef __socketpair(): # <<<<<<<<<<<<<< * cdef: * int fds[2] */ static PyObject *__pyx_f_6uvloop_4loop___socketpair(void) { int __pyx_v_fds[2]; int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__socketpair", 0); /* "uvloop/handles/process.pyx":704 * int err * * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) # <<<<<<<<<<<<<< * if err: * exc = convert_error(-err) */ __pyx_v_err = socketpair(AF_UNIX, SOCK_STREAM, 0, __pyx_v_fds); /* "uvloop/handles/process.pyx":705 * * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) * if err: # <<<<<<<<<<<<<< * exc = convert_error(-err) * raise exc */ __pyx_t_1 = (__pyx_v_err != 0); if (__pyx_t_1) { /* "uvloop/handles/process.pyx":706 * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) * if err: * exc = convert_error(-err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":707 * if err: * exc = convert_error(-err) * raise exc # <<<<<<<<<<<<<< * * os_set_inheritable(fds[0], False) */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(5, 707, __pyx_L1_error) /* "uvloop/handles/process.pyx":705 * * err = system.socketpair(uv.AF_UNIX, uv.SOCK_STREAM, 0, fds) * if err: # <<<<<<<<<<<<<< * exc = convert_error(-err) * raise exc */ } /* "uvloop/handles/process.pyx":709 * raise exc * * os_set_inheritable(fds[0], False) # <<<<<<<<<<<<<< * os_set_inheritable(fds[1], False) * */ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_fds[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_4 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_False}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 709, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_False}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 709, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_False); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":710 * * os_set_inheritable(fds[0], False) * os_set_inheritable(fds[1], False) # <<<<<<<<<<<<<< * * return fds[0], fds[1] */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_fds[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __pyx_t_7 = __pyx_v_6uvloop_4loop_os_set_inheritable; __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, Py_False}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 710, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, Py_False}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 710, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, Py_False); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/process.pyx":712 * os_set_inheritable(fds[1], False) * * return fds[0], fds[1] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_fds[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_fds[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "uvloop/handles/process.pyx":699 * * * cdef __socketpair(): # <<<<<<<<<<<<<< * cdef: * int fds[2] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.__socketpair", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/request.pyx":10 * """ * * def __cinit__(self, Loop loop, *_): # <<<<<<<<<<<<<< * self.request = NULL * self.loop = loop */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; CYTHON_UNUSED PyObject *__pyx_v__ = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 1) { __pyx_v__ = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v__)) { __Pyx_RefNannyFinishContext(); return -1; } __Pyx_GOTREF(__pyx_v__); } else { __pyx_v__ = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__cinit__") < 0)) __PYX_ERR(18, 10, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(18, 10, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__); __pyx_v__ = 0; __Pyx_AddTraceback("uvloop.loop.UVRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(18, 10, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v__); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v__); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_9UVRequest___cinit__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, CYTHON_UNUSED PyObject *__pyx_v__) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/request.pyx":11 * * def __cinit__(self, Loop loop, *_): * self.request = NULL # <<<<<<<<<<<<<< * self.loop = loop * self.done = 0 */ __pyx_v_self->request = NULL; /* "uvloop/request.pyx":12 * def __cinit__(self, Loop loop, *_): * self.request = NULL * self.loop = loop # <<<<<<<<<<<<<< * self.done = 0 * Py_INCREF(self) */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->loop)); __pyx_v_self->loop = __pyx_v_loop; /* "uvloop/request.pyx":13 * self.request = NULL * self.loop = loop * self.done = 0 # <<<<<<<<<<<<<< * Py_INCREF(self) * */ __pyx_v_self->done = 0; /* "uvloop/request.pyx":14 * self.loop = loop * self.done = 0 * Py_INCREF(self) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/request.pyx":10 * """ * * def __cinit__(self, Loop loop, *_): # <<<<<<<<<<<<<< * self.request = NULL * self.loop = loop */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/request.pyx":16 * Py_INCREF(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.request is not NULL: * if self.done == 0: */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_9UVRequest_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_9UVRequest_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_9UVRequest_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_9UVRequest_2__dealloc__(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/request.pyx":17 * * def __dealloc__(self): * if self.request is not NULL: # <<<<<<<<<<<<<< * if self.done == 0: * raise RuntimeError( */ __pyx_t_1 = ((__pyx_v_self->request != NULL) != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":18 * def __dealloc__(self): * if self.request is not NULL: * if self.done == 0: # <<<<<<<<<<<<<< * raise RuntimeError( * 'Unable to deallocate request for {!r} (not done)' */ __pyx_t_1 = ((__pyx_v_self->done == 0) != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":21 * raise RuntimeError( * 'Unable to deallocate request for {!r} (not done)' * .format(self)) # <<<<<<<<<<<<<< * PyMem_RawFree(self.request) * self.request = NULL */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unable_to_deallocate_request_for, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/request.pyx":19 * if self.request is not NULL: * if self.done == 0: * raise RuntimeError( # <<<<<<<<<<<<<< * 'Unable to deallocate request for {!r} (not done)' * .format(self)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(18, 19, __pyx_L1_error) /* "uvloop/request.pyx":18 * def __dealloc__(self): * if self.request is not NULL: * if self.done == 0: # <<<<<<<<<<<<<< * raise RuntimeError( * 'Unable to deallocate request for {!r} (not done)' */ } /* "uvloop/request.pyx":22 * 'Unable to deallocate request for {!r} (not done)' * .format(self)) * PyMem_RawFree(self.request) # <<<<<<<<<<<<<< * self.request = NULL * */ PyMem_RawFree(__pyx_v_self->request); /* "uvloop/request.pyx":23 * .format(self)) * PyMem_RawFree(self.request) * self.request = NULL # <<<<<<<<<<<<<< * * cdef on_done(self): */ __pyx_v_self->request = NULL; /* "uvloop/request.pyx":17 * * def __dealloc__(self): * if self.request is not NULL: # <<<<<<<<<<<<<< * if self.done == 0: * raise RuntimeError( */ } /* "uvloop/request.pyx":16 * Py_INCREF(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.request is not NULL: * if self.done == 0: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("uvloop.loop.UVRequest.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/request.pyx":25 * self.request = NULL * * cdef on_done(self): # <<<<<<<<<<<<<< * self.done = 1 * Py_DECREF(self) */ static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_on_done(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_done", 0); /* "uvloop/request.pyx":26 * * cdef on_done(self): * self.done = 1 # <<<<<<<<<<<<<< * Py_DECREF(self) * */ __pyx_v_self->done = 1; /* "uvloop/request.pyx":27 * cdef on_done(self): * self.done = 1 * Py_DECREF(self) # <<<<<<<<<<<<<< * * cdef cancel(self): */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/request.pyx":25 * self.request = NULL * * cdef on_done(self): # <<<<<<<<<<<<<< * self.done = 1 * Py_DECREF(self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/request.pyx":29 * Py_DECREF(self) * * cdef cancel(self): # <<<<<<<<<<<<<< * # Most requests are implemented using a threadpool. It's only * # possible to cancel a request when it's still in a threadpool's */ static PyObject *__pyx_f_6uvloop_4loop_9UVRequest_cancel(struct __pyx_obj_6uvloop_4loop_UVRequest *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("cancel", 0); /* "uvloop/request.pyx":38 * cdef int err * * if self.done == 1: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_v_self->done == 1) != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":39 * * if self.done == 1: * return # <<<<<<<<<<<<<< * * if UVLOOP_DEBUG: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/request.pyx":38 * cdef int err * * if self.done == 1: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/request.pyx":41 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.request is NULL: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":42 * * if UVLOOP_DEBUG: * if self.request is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request is NULL'.format( */ __pyx_t_1 = ((__pyx_v_self->request == NULL) != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":44 * if self.request is NULL: * raise RuntimeError( * '{}.cancel: .request is NULL'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/request.pyx":45 * raise RuntimeError( * '{}.cancel: .request is NULL'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * if self.request.data is NULL: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/request.pyx":43 * if UVLOOP_DEBUG: * if self.request is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}.cancel: .request is NULL'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(18, 43, __pyx_L1_error) /* "uvloop/request.pyx":42 * * if UVLOOP_DEBUG: * if self.request is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request is NULL'.format( */ } /* "uvloop/request.pyx":47 * self.__class__.__name__)) * * if self.request.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request.data is NULL'.format( */ __pyx_t_1 = ((__pyx_v_self->request->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/request.pyx":49 * if self.request.data is NULL: * raise RuntimeError( * '{}.cancel: .request.data is NULL'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_data_is_NULL, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/request.pyx":50 * raise RuntimeError( * '{}.cancel: .request.data is NULL'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * if self.request.data is not self: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/request.pyx":48 * * if self.request.data is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}.cancel: .request.data is NULL'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(18, 48, __pyx_L1_error) /* "uvloop/request.pyx":47 * self.__class__.__name__)) * * if self.request.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request.data is NULL'.format( */ } /* "uvloop/request.pyx":52 * self.__class__.__name__)) * * if self.request.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request.data is not UVRequest'.format( */ __pyx_t_1 = (((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self->request->data) != __pyx_v_self); __pyx_t_7 = (__pyx_t_1 != 0); if (__pyx_t_7) { /* "uvloop/request.pyx":54 * if self.request.data is not self: * raise RuntimeError( * '{}.cancel: .request.data is not UVRequest'.format( # <<<<<<<<<<<<<< * self.__class__.__name__)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cancel_request_data_is_not_UVRe, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/request.pyx":55 * raise RuntimeError( * '{}.cancel: .request.data is not UVRequest'.format( * self.__class__.__name__)) # <<<<<<<<<<<<<< * * # We only can cancel pending requests. Let's try. */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(18, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(18, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/request.pyx":53 * * if self.request.data is not self: * raise RuntimeError( # <<<<<<<<<<<<<< * '{}.cancel: .request.data is not UVRequest'.format( * self.__class__.__name__)) */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(18, 53, __pyx_L1_error) /* "uvloop/request.pyx":52 * self.__class__.__name__)) * * if self.request.data is not self: # <<<<<<<<<<<<<< * raise RuntimeError( * '{}.cancel: .request.data is not UVRequest'.format( */ } /* "uvloop/request.pyx":41 * return * * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if self.request is NULL: * raise RuntimeError( */ } /* "uvloop/request.pyx":58 * * # We only can cancel pending requests. Let's try. * err = uv.uv_cancel(self.request) # <<<<<<<<<<<<<< * if err < 0: * if err == uv.UV_EBUSY: */ __pyx_v_err = uv_cancel(__pyx_v_self->request); /* "uvloop/request.pyx":59 * # We only can cancel pending requests. Let's try. * err = uv.uv_cancel(self.request) * if err < 0: # <<<<<<<<<<<<<< * if err == uv.UV_EBUSY: * # Can't close the request -- it's executing (see the first */ __pyx_t_7 = ((__pyx_v_err < 0) != 0); if (__pyx_t_7) { /* "uvloop/request.pyx":60 * err = uv.uv_cancel(self.request) * if err < 0: * if err == uv.UV_EBUSY: # <<<<<<<<<<<<<< * # Can't close the request -- it's executing (see the first * # comment). Loop will have to wait until the callback */ __pyx_t_7 = ((__pyx_v_err == UV_EBUSY) != 0); if (__pyx_t_7) { goto __pyx_L9; } /* "uvloop/request.pyx":65 * # fires. * pass * elif err == uv.UV_EINVAL: # <<<<<<<<<<<<<< * # From libuv docs: * # */ __pyx_t_7 = ((__pyx_v_err == UV_EINVAL) != 0); if (__pyx_t_7) { /* "uvloop/request.pyx":71 * # uv_getnameinfo_t and uv_work_t requests is currently * # supported. * return # <<<<<<<<<<<<<< * else: * ex = convert_error(err) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/request.pyx":65 * # fires. * pass * elif err == uv.UV_EINVAL: # <<<<<<<<<<<<<< * # From libuv docs: * # */ } /* "uvloop/request.pyx":73 * return * else: * ex = convert_error(err) # <<<<<<<<<<<<<< * self.loop._handle_exception(ex) */ /*else*/ { __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(18, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ex = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/request.pyx":74 * else: * ex = convert_error(err) * self.loop._handle_exception(ex) # <<<<<<<<<<<<<< */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_self->loop->__pyx_vtab)->_handle_exception(__pyx_v_self->loop, __pyx_v_ex); } __pyx_L9:; /* "uvloop/request.pyx":59 * # We only can cancel pending requests. Let's try. * err = uv.uv_cancel(self.request) * if err < 0: # <<<<<<<<<<<<<< * if err == uv.UV_EBUSY: * # Can't close the request -- it's executing (see the first */ } /* "uvloop/request.pyx":29 * Py_DECREF(self) * * cdef cancel(self): # <<<<<<<<<<<<<< * # Most requests are implemented using a threadpool. It's only * # possible to cancel a request when it's still in a threadpool's */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UVRequest.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":1 * cdef __port_to_int(port, proto): # <<<<<<<<<<<<<< * if port is None or port == '' or port == b'': * return 0 */ static PyObject *__pyx_f_6uvloop_4loop___port_to_int(PyObject *__pyx_v_port, PyObject *__pyx_v_proto) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__port_to_int", 0); __Pyx_INCREF(__pyx_v_port); /* "uvloop/dns.pyx":2 * cdef __port_to_int(port, proto): * if port is None or port == '' or port == b'': # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = (__pyx_v_port == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_port, __pyx_kp_u__30, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(19, 2, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_port, __pyx_kp_b__30, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(19, 2, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/dns.pyx":3 * cdef __port_to_int(port, proto): * if port is None or port == '' or port == b'': * return 0 # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "uvloop/dns.pyx":2 * cdef __port_to_int(port, proto): * if port is None or port == '' or port == b'': # <<<<<<<<<<<<<< * return 0 * */ } /* "uvloop/dns.pyx":5 * return 0 * * try: # <<<<<<<<<<<<<< * return int(port) * except (ValueError, TypeError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/dns.pyx":6 * * try: * return int(port) # <<<<<<<<<<<<<< * except (ValueError, TypeError): * pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_port); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 6, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L11_try_return; /* "uvloop/dns.pyx":5 * return 0 * * try: # <<<<<<<<<<<<<< * return int(port) * except (ValueError, TypeError): */ } __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/dns.pyx":7 * try: * return int(port) * except (ValueError, TypeError): # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/dns.pyx":5 * return 0 * * try: # <<<<<<<<<<<<<< * return int(port) * except (ValueError, TypeError): */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L11_try_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); } /* "uvloop/dns.pyx":10 * pass * * if isinstance(port, bytes): # <<<<<<<<<<<<<< * port = port.decode() * */ __pyx_t_1 = PyBytes_Check(__pyx_v_port); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/dns.pyx":11 * * if isinstance(port, bytes): * port = port.decode() # <<<<<<<<<<<<<< * * if isinstance(port, str) and proto is not None: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_port, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } if (__pyx_t_10) { __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else { __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 11, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_7); __pyx_t_7 = 0; /* "uvloop/dns.pyx":10 * pass * * if isinstance(port, bytes): # <<<<<<<<<<<<<< * port = port.decode() * */ } /* "uvloop/dns.pyx":13 * port = port.decode() * * if isinstance(port, str) and proto is not None: # <<<<<<<<<<<<<< * if proto == uv.IPPROTO_TCP: * return socket_getservbyname(port, 'tcp') */ __pyx_t_1 = PyUnicode_Check(__pyx_v_port); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L17_bool_binop_done; } __pyx_t_2 = (__pyx_v_proto != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_1; __pyx_L17_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/dns.pyx":14 * * if isinstance(port, str) and proto is not None: * if proto == uv.IPPROTO_TCP: # <<<<<<<<<<<<<< * return socket_getservbyname(port, 'tcp') * elif proto == uv.IPPROTO_UDP: */ __pyx_t_7 = __Pyx_PyInt_From_int(IPPROTO_TCP); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyObject_RichCompare(__pyx_v_proto, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(19, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { /* "uvloop/dns.pyx":15 * if isinstance(port, str) and proto is not None: * if proto == uv.IPPROTO_TCP: * return socket_getservbyname(port, 'tcp') # <<<<<<<<<<<<<< * elif proto == uv.IPPROTO_UDP: * return socket_getservbyname(port, 'udp') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_getservbyname); __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_getservbyname; __pyx_t_10 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_port, __pyx_n_u_tcp}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_port, __pyx_n_u_tcp}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_v_port); __Pyx_INCREF(__pyx_n_u_tcp); __Pyx_GIVEREF(__pyx_n_u_tcp); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_n_u_tcp); __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; /* "uvloop/dns.pyx":14 * * if isinstance(port, str) and proto is not None: * if proto == uv.IPPROTO_TCP: # <<<<<<<<<<<<<< * return socket_getservbyname(port, 'tcp') * elif proto == uv.IPPROTO_UDP: */ } /* "uvloop/dns.pyx":16 * if proto == uv.IPPROTO_TCP: * return socket_getservbyname(port, 'tcp') * elif proto == uv.IPPROTO_UDP: # <<<<<<<<<<<<<< * return socket_getservbyname(port, 'udp') * */ __pyx_t_9 = __Pyx_PyInt_From_int(IPPROTO_UDP); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyObject_RichCompare(__pyx_v_proto, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(19, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { /* "uvloop/dns.pyx":17 * return socket_getservbyname(port, 'tcp') * elif proto == uv.IPPROTO_UDP: * return socket_getservbyname(port, 'udp') # <<<<<<<<<<<<<< * * raise OSError('service/proto not found') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_getservbyname); __pyx_t_9 = __pyx_v_6uvloop_4loop_socket_getservbyname; __pyx_t_11 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_port, __pyx_n_u_udp}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_port, __pyx_n_u_udp}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_port); __Pyx_INCREF(__pyx_n_u_udp); __Pyx_GIVEREF(__pyx_n_u_udp); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_n_u_udp); __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "uvloop/dns.pyx":16 * if proto == uv.IPPROTO_TCP: * return socket_getservbyname(port, 'tcp') * elif proto == uv.IPPROTO_UDP: # <<<<<<<<<<<<<< * return socket_getservbyname(port, 'udp') * */ } /* "uvloop/dns.pyx":13 * port = port.decode() * * if isinstance(port, str) and proto is not None: # <<<<<<<<<<<<<< * if proto == uv.IPPROTO_TCP: * return socket_getservbyname(port, 'tcp') */ } /* "uvloop/dns.pyx":19 * return socket_getservbyname(port, 'udp') * * raise OSError('service/proto not found') # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(19, 19, __pyx_L1_error) /* "uvloop/dns.pyx":1 * cdef __port_to_int(port, proto): # <<<<<<<<<<<<<< * if port is None or port == '' or port == b'': * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.__port_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_port); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":22 * * * cdef __convert_sockaddr_to_pyaddr(const system.sockaddr* addr): # <<<<<<<<<<<<<< * # Converts sockaddr structs into what Python socket * # module can understand: */ static PyObject *__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(struct sockaddr const *__pyx_v_addr) { char __pyx_v_buf[0x80]; int __pyx_v_err; struct sockaddr_in *__pyx_v_addr4; struct sockaddr_in6 *__pyx_v_addr6; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__convert_sockaddr_to_pyaddr", 0); /* "uvloop/dns.pyx":34 * system.sockaddr_in6 *addr6 * * if addr.sa_family == uv.AF_INET: # <<<<<<<<<<<<<< * addr4 = addr * */ __pyx_t_1 = ((__pyx_v_addr->sa_family == AF_INET) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":35 * * if addr.sa_family == uv.AF_INET: * addr4 = addr # <<<<<<<<<<<<<< * * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) */ __pyx_v_addr4 = ((struct sockaddr_in *)__pyx_v_addr); /* "uvloop/dns.pyx":37 * addr4 = addr * * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_ip4_name(__pyx_v_addr4, __pyx_v_buf, (sizeof(__pyx_v_buf))); /* "uvloop/dns.pyx":38 * * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":39 * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * return ( */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(19, 39, __pyx_L1_error) /* "uvloop/dns.pyx":38 * * err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/dns.pyx":41 * raise convert_error(err) * * return ( # <<<<<<<<<<<<<< * (buf).decode(), * system.ntohs(addr4.sin_port) */ __Pyx_XDECREF(__pyx_r); /* "uvloop/dns.pyx":42 * * return ( * (buf).decode(), # <<<<<<<<<<<<<< * system.ntohs(addr4.sin_port) * ) */ __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); __PYX_ERR(19, 42, __pyx_L1_error) } __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_t_2), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/dns.pyx":43 * return ( * (buf).decode(), * system.ntohs(addr4.sin_port) # <<<<<<<<<<<<<< * ) * */ __pyx_t_2 = __Pyx_PyInt_From_int(ntohs(__pyx_v_addr4->sin_port)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "uvloop/dns.pyx":42 * * return ( * (buf).decode(), # <<<<<<<<<<<<<< * system.ntohs(addr4.sin_port) * ) */ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/dns.pyx":34 * system.sockaddr_in6 *addr6 * * if addr.sa_family == uv.AF_INET: # <<<<<<<<<<<<<< * addr4 = addr * */ } /* "uvloop/dns.pyx":46 * ) * * elif addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<< * addr6 = addr * */ __pyx_t_1 = ((__pyx_v_addr->sa_family == AF_INET6) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":47 * * elif addr.sa_family == uv.AF_INET6: * addr6 = addr # <<<<<<<<<<<<<< * * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) */ __pyx_v_addr6 = ((struct sockaddr_in6 *)__pyx_v_addr); /* "uvloop/dns.pyx":49 * addr6 = addr * * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_v_err = uv_ip6_name(__pyx_v_addr6, __pyx_v_buf, (sizeof(__pyx_v_buf))); /* "uvloop/dns.pyx":50 * * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":51 * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * return ( */ __pyx_t_4 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(19, 51, __pyx_L1_error) /* "uvloop/dns.pyx":50 * * err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/dns.pyx":53 * raise convert_error(err) * * return ( # <<<<<<<<<<<<<< * (buf).decode(), * system.ntohs(addr6.sin6_port), */ __Pyx_XDECREF(__pyx_r); /* "uvloop/dns.pyx":54 * * return ( * (buf).decode(), # <<<<<<<<<<<<<< * system.ntohs(addr6.sin6_port), * system.ntohl(addr6.sin6_flowinfo), */ __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); __PYX_ERR(19, 54, __pyx_L1_error) } __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_t_4), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":55 * return ( * (buf).decode(), * system.ntohs(addr6.sin6_port), # <<<<<<<<<<<<<< * system.ntohl(addr6.sin6_flowinfo), * addr6.sin6_scope_id */ __pyx_t_4 = __Pyx_PyInt_From_int(ntohs(__pyx_v_addr6->sin6_port)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "uvloop/dns.pyx":56 * (buf).decode(), * system.ntohs(addr6.sin6_port), * system.ntohl(addr6.sin6_flowinfo), # <<<<<<<<<<<<<< * addr6.sin6_scope_id * ) */ __pyx_t_3 = __Pyx_PyInt_From_int(ntohl(__pyx_v_addr6->sin6_flowinfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/dns.pyx":57 * system.ntohs(addr6.sin6_port), * system.ntohl(addr6.sin6_flowinfo), * addr6.sin6_scope_id # <<<<<<<<<<<<<< * ) * */ __pyx_t_5 = __Pyx_PyInt_From_unsigned_long(__pyx_v_addr6->sin6_scope_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/dns.pyx":54 * * return ( * (buf).decode(), # <<<<<<<<<<<<<< * system.ntohs(addr6.sin6_port), * system.ntohl(addr6.sin6_flowinfo), */ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "uvloop/dns.pyx":46 * ) * * elif addr.sa_family == uv.AF_INET6: # <<<<<<<<<<<<<< * addr6 = addr * */ } /* "uvloop/dns.pyx":60 * ) * * raise RuntimeError("cannot convert sockaddr into Python object") # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(19, 60, __pyx_L1_error) /* "uvloop/dns.pyx":22 * * * cdef __convert_sockaddr_to_pyaddr(const system.sockaddr* addr): # <<<<<<<<<<<<<< * # Converts sockaddr structs into what Python socket * # module can understand: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.__convert_sockaddr_to_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":63 * * * cdef __convert_pyaddr_to_sockaddr(int family, object addr, # <<<<<<<<<<<<<< * system.sockaddr* res): * cdef: */ static PyObject *__pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(int __pyx_v_family, PyObject *__pyx_v_addr, struct sockaddr *__pyx_v_res) { int __pyx_v_err; int __pyx_v_addr_len; int __pyx_v_scope_id; int __pyx_v_flowinfo; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_port = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; char const *__pyx_t_9; int __pyx_t_10; char const *__pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("__convert_pyaddr_to_sockaddr", 0); /* "uvloop/dns.pyx":68 * int err * int addr_len * int scope_id = 0 # <<<<<<<<<<<<<< * int flowinfo = 0 * */ __pyx_v_scope_id = 0; /* "uvloop/dns.pyx":69 * int addr_len * int scope_id = 0 * int flowinfo = 0 # <<<<<<<<<<<<<< * * if family == uv.AF_INET: */ __pyx_v_flowinfo = 0; /* "uvloop/dns.pyx":71 * int flowinfo = 0 * * if family == uv.AF_INET: # <<<<<<<<<<<<<< * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') */ __pyx_t_1 = ((__pyx_v_family == AF_INET) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":72 * * if family == uv.AF_INET: * if not isinstance(addr, tuple): # <<<<<<<<<<<<<< * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: */ __pyx_t_1 = PyTuple_Check(__pyx_v_addr); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":73 * if family == uv.AF_INET: * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') # <<<<<<<<<<<<<< * if len(addr) != 2: * raise ValueError('AF_INET address must be tuple of (host, port)') */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 73, __pyx_L1_error) /* "uvloop/dns.pyx":72 * * if family == uv.AF_INET: * if not isinstance(addr, tuple): # <<<<<<<<<<<<<< * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: */ } /* "uvloop/dns.pyx":74 * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: # <<<<<<<<<<<<<< * raise ValueError('AF_INET address must be tuple of (host, port)') * host, port = addr */ __pyx_t_4 = PyObject_Length(__pyx_v_addr); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(19, 74, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_4 != 2) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":75 * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: * raise ValueError('AF_INET address must be tuple of (host, port)') # <<<<<<<<<<<<<< * host, port = addr * if isinstance(host, str): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 75, __pyx_L1_error) /* "uvloop/dns.pyx":74 * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: # <<<<<<<<<<<<<< * raise ValueError('AF_INET address must be tuple of (host, port)') * host, port = addr */ } /* "uvloop/dns.pyx":76 * if len(addr) != 2: * raise ValueError('AF_INET address must be tuple of (host, port)') * host, port = addr # <<<<<<<<<<<<<< * if isinstance(host, str): * host = host.encode('idna') */ if ((likely(PyTuple_CheckExact(__pyx_v_addr))) || (PyList_CheckExact(__pyx_v_addr))) { PyObject* sequence = __pyx_v_addr; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(19, 76, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_addr); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(19, 76, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(19, 76, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_host = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_port = __pyx_t_5; __pyx_t_5 = 0; /* "uvloop/dns.pyx":77 * raise ValueError('AF_INET address must be tuple of (host, port)') * host, port = addr * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): */ __pyx_t_2 = PyUnicode_Check(__pyx_v_host); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":78 * host, port = addr * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * if not isinstance(host, (bytes, bytearray)): * raise TypeError('host must be a string or bytes object') */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":77 * raise ValueError('AF_INET address must be tuple of (host, port)') * host, port = addr * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): */ } /* "uvloop/dns.pyx":79 * if isinstance(host, str): * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<< * raise TypeError('host must be a string or bytes object') * */ __pyx_t_2 = PyBytes_Check(__pyx_v_host); __pyx_t_8 = (__pyx_t_2 != 0); if (!__pyx_t_8) { } else { __pyx_t_1 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } __pyx_t_8 = PyByteArray_Check(__pyx_v_host); __pyx_t_2 = (__pyx_t_8 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L10_bool_binop_done:; __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":80 * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): * raise TypeError('host must be a string or bytes object') # <<<<<<<<<<<<<< * * port = __port_to_int(port, None) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 80, __pyx_L1_error) /* "uvloop/dns.pyx":79 * if isinstance(host, str): * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): # <<<<<<<<<<<<<< * raise TypeError('host must be a string or bytes object') * */ } /* "uvloop/dns.pyx":82 * raise TypeError('host must be a string or bytes object') * * port = __port_to_int(port, None) # <<<<<<<<<<<<<< * * err = uv.uv_ip4_addr(host, port, res) */ __pyx_t_3 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_v_port, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":84 * port = __port_to_int(port, None) * * err = uv.uv_ip4_addr(host, port, res) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_host); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(19, 84, __pyx_L1_error) __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_port); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 84, __pyx_L1_error) __pyx_v_err = uv_ip4_addr(__pyx_t_9, ((int)__pyx_t_10), ((struct sockaddr_in *)__pyx_v_res)); /* "uvloop/dns.pyx":85 * * err = uv.uv_ip4_addr(host, port, res) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":86 * err = uv.uv_ip4_addr(host, port, res) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * elif family == uv.AF_INET6: */ __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 86, __pyx_L1_error) /* "uvloop/dns.pyx":85 * * err = uv.uv_ip4_addr(host, port, res) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/dns.pyx":71 * int flowinfo = 0 * * if family == uv.AF_INET: # <<<<<<<<<<<<<< * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') */ goto __pyx_L3; } /* "uvloop/dns.pyx":88 * raise convert_error(err) * * elif family == uv.AF_INET6: # <<<<<<<<<<<<<< * if not isinstance(addr, tuple): * raise TypeError('AF_INET6 address must be tuple') */ __pyx_t_2 = ((__pyx_v_family == AF_INET6) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":89 * * elif family == uv.AF_INET6: * if not isinstance(addr, tuple): # <<<<<<<<<<<<<< * raise TypeError('AF_INET6 address must be tuple') * */ __pyx_t_2 = PyTuple_Check(__pyx_v_addr); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":90 * elif family == uv.AF_INET6: * if not isinstance(addr, tuple): * raise TypeError('AF_INET6 address must be tuple') # <<<<<<<<<<<<<< * * addr_len = len(addr) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 90, __pyx_L1_error) /* "uvloop/dns.pyx":89 * * elif family == uv.AF_INET6: * if not isinstance(addr, tuple): # <<<<<<<<<<<<<< * raise TypeError('AF_INET6 address must be tuple') * */ } /* "uvloop/dns.pyx":92 * raise TypeError('AF_INET6 address must be tuple') * * addr_len = len(addr) # <<<<<<<<<<<<<< * if addr_len < 2 or addr_len > 4: * raise ValueError( */ __pyx_t_4 = PyObject_Length(__pyx_v_addr); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(19, 92, __pyx_L1_error) __pyx_v_addr_len = __pyx_t_4; /* "uvloop/dns.pyx":93 * * addr_len = len(addr) * if addr_len < 2 or addr_len > 4: # <<<<<<<<<<<<<< * raise ValueError( * 'AF_INET6 must be a tuple of 2-4 parameters: ' */ __pyx_t_2 = ((__pyx_v_addr_len < 2) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L15_bool_binop_done; } __pyx_t_2 = ((__pyx_v_addr_len > 4) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L15_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/dns.pyx":94 * addr_len = len(addr) * if addr_len < 2 or addr_len > 4: * raise ValueError( # <<<<<<<<<<<<<< * 'AF_INET6 must be a tuple of 2-4 parameters: ' * '(host, port, flowinfo?, scope_id?)') */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 94, __pyx_L1_error) /* "uvloop/dns.pyx":93 * * addr_len = len(addr) * if addr_len < 2 or addr_len > 4: # <<<<<<<<<<<<<< * raise ValueError( * 'AF_INET6 must be a tuple of 2-4 parameters: ' */ } /* "uvloop/dns.pyx":98 * '(host, port, flowinfo?, scope_id?)') * * host = addr[0] # <<<<<<<<<<<<<< * if isinstance(host, str): * host = host.encode('idna') */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_addr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_host = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/dns.pyx":99 * * host = addr[0] * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * */ __pyx_t_1 = PyUnicode_Check(__pyx_v_host); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":100 * host = addr[0] * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * * port = __port_to_int(addr[1], None) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/dns.pyx":99 * * host = addr[0] * if isinstance(host, str): # <<<<<<<<<<<<<< * host = host.encode('idna') * */ } /* "uvloop/dns.pyx":102 * host = host.encode('idna') * * port = __port_to_int(addr[1], None) # <<<<<<<<<<<<<< * * if addr_len > 2: */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_addr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_t_5, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_port = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/dns.pyx":104 * port = __port_to_int(addr[1], None) * * if addr_len > 2: # <<<<<<<<<<<<<< * flowinfo = addr[2] * if addr_len > 3: */ __pyx_t_2 = ((__pyx_v_addr_len > 2) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":105 * * if addr_len > 2: * flowinfo = addr[2] # <<<<<<<<<<<<<< * if addr_len > 3: * scope_id = addr[3] */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_addr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_flowinfo = __pyx_t_10; /* "uvloop/dns.pyx":104 * port = __port_to_int(addr[1], None) * * if addr_len > 2: # <<<<<<<<<<<<<< * flowinfo = addr[2] * if addr_len > 3: */ } /* "uvloop/dns.pyx":106 * if addr_len > 2: * flowinfo = addr[2] * if addr_len > 3: # <<<<<<<<<<<<<< * scope_id = addr[3] * */ __pyx_t_2 = ((__pyx_v_addr_len > 3) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":107 * flowinfo = addr[2] * if addr_len > 3: * scope_id = addr[3] # <<<<<<<<<<<<<< * * err = uv.uv_ip6_addr(host, port, res) */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_addr, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_scope_id = __pyx_t_10; /* "uvloop/dns.pyx":106 * if addr_len > 2: * flowinfo = addr[2] * if addr_len > 3: # <<<<<<<<<<<<<< * scope_id = addr[3] * */ } /* "uvloop/dns.pyx":109 * scope_id = addr[3] * * err = uv.uv_ip6_addr(host, port, res) # <<<<<<<<<<<<<< * if err < 0: * raise convert_error(err) */ __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_host); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(19, 109, __pyx_L1_error) __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_port); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 109, __pyx_L1_error) __pyx_v_err = uv_ip6_addr(__pyx_t_11, __pyx_t_10, ((struct sockaddr_in6 *)__pyx_v_res)); /* "uvloop/dns.pyx":110 * * err = uv.uv_ip6_addr(host, port, res) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":111 * err = uv.uv_ip6_addr(host, port, res) * if err < 0: * raise convert_error(err) # <<<<<<<<<<<<<< * * (res).sin6_flowinfo = flowinfo */ __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 111, __pyx_L1_error) /* "uvloop/dns.pyx":110 * * err = uv.uv_ip6_addr(host, port, res) * if err < 0: # <<<<<<<<<<<<<< * raise convert_error(err) * */ } /* "uvloop/dns.pyx":113 * raise convert_error(err) * * (res).sin6_flowinfo = flowinfo # <<<<<<<<<<<<<< * (res).sin6_scope_id = scope_id * */ ((struct sockaddr_in6 *)__pyx_v_res)->sin6_flowinfo = __pyx_v_flowinfo; /* "uvloop/dns.pyx":114 * * (res).sin6_flowinfo = flowinfo * (res).sin6_scope_id = scope_id # <<<<<<<<<<<<<< * * else: */ ((struct sockaddr_in6 *)__pyx_v_res)->sin6_scope_id = __pyx_v_scope_id; /* "uvloop/dns.pyx":88 * raise convert_error(err) * * elif family == uv.AF_INET6: # <<<<<<<<<<<<<< * if not isinstance(addr, tuple): * raise TypeError('AF_INET6 address must be tuple') */ goto __pyx_L3; } /* "uvloop/dns.pyx":117 * * else: * raise ValueError( # <<<<<<<<<<<<<< * 'epected AF_INET or AF_INET6 family, got {}'.format(family)) * */ /*else*/ { /* "uvloop/dns.pyx":118 * else: * raise ValueError( * 'epected AF_INET or AF_INET6 family, got {}'.format(family)) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_epected_AF_INET_or_AF_INET6_fami, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_12) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_6}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/dns.pyx":117 * * else: * raise ValueError( # <<<<<<<<<<<<<< * 'epected AF_INET or AF_INET6 family, got {}'.format(family)) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(19, 117, __pyx_L1_error) } __pyx_L3:; /* "uvloop/dns.pyx":63 * * * cdef __convert_pyaddr_to_sockaddr(int family, object addr, # <<<<<<<<<<<<<< * system.sockaddr* res): * cdef: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("uvloop.loop.__convert_pyaddr_to_sockaddr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_port); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":121 * * * cdef __static_getaddrinfo(object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, */ static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo(PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, struct sockaddr *__pyx_v_addr) { PyObject *__pyx_v_afs = NULL; PyObject *__pyx_v_af = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("__static_getaddrinfo", 0); __Pyx_INCREF(__pyx_v_port); /* "uvloop/dns.pyx":126 * system.sockaddr *addr): * * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: # <<<<<<<<<<<<<< * raise LookupError * */ __pyx_t_1 = __pyx_v_proto; __pyx_t_3 = ((__pyx_t_1 != 0) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 != IPPROTO_TCP) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 != IPPROTO_UDP) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/dns.pyx":127 * * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: * raise LookupError # <<<<<<<<<<<<<< * * if type == uv.SOCK_STREAM: */ __Pyx_Raise(__pyx_builtin_LookupError, 0, 0, 0); __PYX_ERR(19, 127, __pyx_L1_error) /* "uvloop/dns.pyx":126 * system.sockaddr *addr): * * if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: # <<<<<<<<<<<<<< * raise LookupError * */ } /* "uvloop/dns.pyx":129 * raise LookupError * * if type == uv.SOCK_STREAM: # <<<<<<<<<<<<<< * # Linux only: * # getaddrinfo() can raise when socket.type is a bit mask. */ __pyx_t_3 = ((__pyx_v_type == SOCK_STREAM) != 0); if (__pyx_t_3) { /* "uvloop/dns.pyx":135 * # SOCK_NONBLOCK, we simply return None, which will trigger * # a call to getaddrinfo() letting it process this request. * proto = uv.IPPROTO_TCP # <<<<<<<<<<<<<< * elif type == uv.SOCK_DGRAM: * proto = uv.IPPROTO_UDP */ __pyx_v_proto = IPPROTO_TCP; /* "uvloop/dns.pyx":129 * raise LookupError * * if type == uv.SOCK_STREAM: # <<<<<<<<<<<<<< * # Linux only: * # getaddrinfo() can raise when socket.type is a bit mask. */ goto __pyx_L7; } /* "uvloop/dns.pyx":136 * # a call to getaddrinfo() letting it process this request. * proto = uv.IPPROTO_TCP * elif type == uv.SOCK_DGRAM: # <<<<<<<<<<<<<< * proto = uv.IPPROTO_UDP * else: */ __pyx_t_3 = ((__pyx_v_type == SOCK_DGRAM) != 0); if (__pyx_t_3) { /* "uvloop/dns.pyx":137 * proto = uv.IPPROTO_TCP * elif type == uv.SOCK_DGRAM: * proto = uv.IPPROTO_UDP # <<<<<<<<<<<<<< * else: * raise LookupError */ __pyx_v_proto = IPPROTO_UDP; /* "uvloop/dns.pyx":136 * # a call to getaddrinfo() letting it process this request. * proto = uv.IPPROTO_TCP * elif type == uv.SOCK_DGRAM: # <<<<<<<<<<<<<< * proto = uv.IPPROTO_UDP * else: */ goto __pyx_L7; } /* "uvloop/dns.pyx":139 * proto = uv.IPPROTO_UDP * else: * raise LookupError # <<<<<<<<<<<<<< * * try: */ /*else*/ { __Pyx_Raise(__pyx_builtin_LookupError, 0, 0, 0); __PYX_ERR(19, 139, __pyx_L1_error) } __pyx_L7:; /* "uvloop/dns.pyx":141 * raise LookupError * * try: # <<<<<<<<<<<<<< * port = __port_to_int(port, proto) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/dns.pyx":142 * * try: * port = __port_to_int(port, proto) # <<<<<<<<<<<<<< * except: * raise LookupError */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 142, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __pyx_f_6uvloop_4loop___port_to_int(__pyx_v_port, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 142, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/dns.pyx":141 * raise LookupError * * try: # <<<<<<<<<<<<<< * port = __port_to_int(port, proto) * except: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/dns.pyx":143 * try: * port = __port_to_int(port, proto) * except: # <<<<<<<<<<<<<< * raise LookupError * */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(19, 143, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/dns.pyx":144 * port = __port_to_int(port, proto) * except: * raise LookupError # <<<<<<<<<<<<<< * * if family == uv.AF_UNSPEC: */ __Pyx_Raise(__pyx_builtin_LookupError, 0, 0, 0); __PYX_ERR(19, 144, __pyx_L10_except_error) } __pyx_L10_except_error:; /* "uvloop/dns.pyx":141 * raise LookupError * * try: # <<<<<<<<<<<<<< * port = __port_to_int(port, proto) * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L15_try_end:; } /* "uvloop/dns.pyx":146 * raise LookupError * * if family == uv.AF_UNSPEC: # <<<<<<<<<<<<<< * afs = [uv.AF_INET, uv.AF_INET6] * else: */ __pyx_t_3 = ((__pyx_v_family == AF_UNSPEC) != 0); if (__pyx_t_3) { /* "uvloop/dns.pyx":147 * * if family == uv.AF_UNSPEC: * afs = [uv.AF_INET, uv.AF_INET6] # <<<<<<<<<<<<<< * else: * afs = [family] */ __pyx_t_9 = __Pyx_PyInt_From_int(AF_INET); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyInt_From_int(AF_INET6); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_9 = 0; __pyx_t_7 = 0; __pyx_v_afs = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/dns.pyx":146 * raise LookupError * * if family == uv.AF_UNSPEC: # <<<<<<<<<<<<<< * afs = [uv.AF_INET, uv.AF_INET6] * else: */ goto __pyx_L18; } /* "uvloop/dns.pyx":149 * afs = [uv.AF_INET, uv.AF_INET6] * else: * afs = [family] # <<<<<<<<<<<<<< * * for af in afs: */ /*else*/ { __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = 0; __pyx_v_afs = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; } __pyx_L18:; /* "uvloop/dns.pyx":151 * afs = [family] * * for af in afs: # <<<<<<<<<<<<<< * try: * __convert_pyaddr_to_sockaddr(af, (host, port), addr) */ __pyx_t_7 = __pyx_v_afs; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0; for (;;) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(19, 151, __pyx_L1_error) #else __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_XDECREF_SET(__pyx_v_af, __pyx_t_8); __pyx_t_8 = 0; /* "uvloop/dns.pyx":152 * * for af in afs: * try: # <<<<<<<<<<<<<< * __convert_pyaddr_to_sockaddr(af, (host, port), addr) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/dns.pyx":153 * for af in afs: * try: * __convert_pyaddr_to_sockaddr(af, (host, port), addr) # <<<<<<<<<<<<<< * except: * continue */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_af); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 153, __pyx_L21_error) __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 153, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_host); __Pyx_GIVEREF(__pyx_v_host); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_host); __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_port); __pyx_t_9 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(__pyx_t_1, __pyx_t_8, __pyx_v_addr); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 153, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/dns.pyx":152 * * for af in afs: * try: # <<<<<<<<<<<<<< * __convert_pyaddr_to_sockaddr(af, (host, port), addr) * except: */ } /* "uvloop/dns.pyx":157 * continue * else: * return (af, type, proto) # <<<<<<<<<<<<<< * * raise LookupError */ /*else:*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 157, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 157, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(19, 157, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_af); __Pyx_GIVEREF(__pyx_v_af); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_af); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8); __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L24_except_return; } __pyx_L21_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/dns.pyx":154 * try: * __convert_pyaddr_to_sockaddr(af, (host, port), addr) * except: # <<<<<<<<<<<<<< * continue * else: */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(19, 154, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); /* "uvloop/dns.pyx":155 * __convert_pyaddr_to_sockaddr(af, (host, port), addr) * except: * continue # <<<<<<<<<<<<<< * else: * return (af, type, proto) */ goto __pyx_L30_except_continue; __pyx_L30_except_continue:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L27_try_continue; } __pyx_L23_except_error:; /* "uvloop/dns.pyx":152 * * for af in afs: * try: # <<<<<<<<<<<<<< * __convert_pyaddr_to_sockaddr(af, (host, port), addr) * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L27_try_continue:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L19_continue; __pyx_L24_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L0; } /* "uvloop/dns.pyx":151 * afs = [family] * * for af in afs: # <<<<<<<<<<<<<< * try: * __convert_pyaddr_to_sockaddr(af, (host, port), addr) */ __pyx_L19_continue:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/dns.pyx":159 * return (af, type, proto) * * raise LookupError # <<<<<<<<<<<<<< * * */ __Pyx_Raise(__pyx_builtin_LookupError, 0, 0, 0); __PYX_ERR(19, 159, __pyx_L1_error) /* "uvloop/dns.pyx":121 * * * cdef __static_getaddrinfo(object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_afs); __Pyx_XDECREF(__pyx_v_af); __Pyx_XDECREF(__pyx_v_port); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":162 * * * cdef __static_getaddrinfo_pyaddr(object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, int flags): */ static PyObject *__pyx_f_6uvloop_4loop___static_getaddrinfo_pyaddr(PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, CYTHON_UNUSED int __pyx_v_flags) { struct sockaddr_storage __pyx_v_addr; PyObject *__pyx_v_af = NULL; PyObject *__pyx_v_pyaddr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("__static_getaddrinfo_pyaddr", 0); /* "uvloop/dns.pyx":169 * system.sockaddr_storage addr * * try: # <<<<<<<<<<<<<< * (af, type, proto) = __static_getaddrinfo( * host, port, family, type, */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/dns.pyx":170 * * try: * (af, type, proto) = __static_getaddrinfo( # <<<<<<<<<<<<<< * host, port, family, type, * proto, &addr) */ __pyx_t_4 = __pyx_f_6uvloop_4loop___static_getaddrinfo(__pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, ((struct sockaddr *)(&__pyx_v_addr))); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; #if !CYTHON_COMPILING_IN_PYPY Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(19, 170, __pyx_L3_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_7 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(19, 170, __pyx_L3_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(19, 170, __pyx_L3_error) __pyx_L12_unpacking_done:; } __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 170, __pyx_L3_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_af = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_type = __pyx_t_10; __pyx_v_proto = __pyx_t_11; /* "uvloop/dns.pyx":169 * system.sockaddr_storage addr * * try: # <<<<<<<<<<<<<< * (af, type, proto) = __static_getaddrinfo( * host, port, family, type, */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":173 * host, port, family, type, * proto, &addr) * except LookupError: # <<<<<<<<<<<<<< * return * */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_LookupError); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(19, 173, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); /* "uvloop/dns.pyx":174 * proto, &addr) * except LookupError: * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/dns.pyx":169 * system.sockaddr_storage addr * * try: # <<<<<<<<<<<<<< * (af, type, proto) = __static_getaddrinfo( * host, port, family, type, */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L10_try_end:; } /* "uvloop/dns.pyx":176 * return * * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(&addr) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "uvloop/dns.pyx":177 * * try: * pyaddr = __convert_sockaddr_to_pyaddr(&addr) # <<<<<<<<<<<<<< * except: * return */ __pyx_t_6 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_addr))); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 177, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_pyaddr = __pyx_t_6; __pyx_t_6 = 0; /* "uvloop/dns.pyx":176 * return * * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(&addr) * except: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L22_try_end; __pyx_L15_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/dns.pyx":178 * try: * pyaddr = __convert_sockaddr_to_pyaddr(&addr) * except: # <<<<<<<<<<<<<< * return * */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(19, 178, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); /* "uvloop/dns.pyx":179 * pyaddr = __convert_sockaddr_to_pyaddr(&addr) * except: * return # <<<<<<<<<<<<<< * * return af, type, proto, '', pyaddr */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L18_except_return; } __pyx_L17_except_error:; /* "uvloop/dns.pyx":176 * return * * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(&addr) * except: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L1_error; __pyx_L18_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L0; __pyx_L22_try_end:; } /* "uvloop/dns.pyx":181 * return * * return af, type, proto, '', pyaddr # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_proto); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_af); __Pyx_GIVEREF(__pyx_v_af); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_af); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7); __Pyx_INCREF(__pyx_kp_u__30); __Pyx_GIVEREF(__pyx_kp_u__30); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u__30); __Pyx_INCREF(__pyx_v_pyaddr); __Pyx_GIVEREF(__pyx_v_pyaddr); PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_pyaddr); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "uvloop/dns.pyx":162 * * * cdef __static_getaddrinfo_pyaddr(object host, object port, # <<<<<<<<<<<<<< * int family, int type, * int proto, int flags): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.__static_getaddrinfo_pyaddr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_af); __Pyx_XDECREF(__pyx_v_pyaddr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":189 * system.addrinfo *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.data = NULL * */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8AddrInfo___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/dns.pyx":190 * * def __cinit__(self): * self.data = NULL # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->data = NULL; /* "uvloop/dns.pyx":189 * system.addrinfo *data * * def __cinit__(self): # <<<<<<<<<<<<<< * self.data = NULL * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":192 * self.data = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.data is not NULL: * uv.uv_freeaddrinfo(self.data) # returns void */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_8AddrInfo_2__dealloc__(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/dns.pyx":193 * * def __dealloc__(self): * if self.data is not NULL: # <<<<<<<<<<<<<< * uv.uv_freeaddrinfo(self.data) # returns void * self.data = NULL */ __pyx_t_1 = ((__pyx_v_self->data != NULL) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":194 * def __dealloc__(self): * if self.data is not NULL: * uv.uv_freeaddrinfo(self.data) # returns void # <<<<<<<<<<<<<< * self.data = NULL * */ uv_freeaddrinfo(__pyx_v_self->data); /* "uvloop/dns.pyx":195 * if self.data is not NULL: * uv.uv_freeaddrinfo(self.data) # returns void * self.data = NULL # <<<<<<<<<<<<<< * * cdef void set_data(self, system.addrinfo *data): */ __pyx_v_self->data = NULL; /* "uvloop/dns.pyx":193 * * def __dealloc__(self): * if self.data is not NULL: # <<<<<<<<<<<<<< * uv.uv_freeaddrinfo(self.data) # returns void * self.data = NULL */ } /* "uvloop/dns.pyx":192 * self.data = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.data is not NULL: * uv.uv_freeaddrinfo(self.data) # returns void */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "uvloop/dns.pyx":197 * self.data = NULL * * cdef void set_data(self, system.addrinfo *data): # <<<<<<<<<<<<<< * self.data = data * */ static void __pyx_f_6uvloop_4loop_8AddrInfo_set_data(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self, struct addrinfo *__pyx_v_data) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_data", 0); /* "uvloop/dns.pyx":198 * * cdef void set_data(self, system.addrinfo *data): * self.data = data # <<<<<<<<<<<<<< * * cdef unpack(self): */ __pyx_v_self->data = __pyx_v_data; /* "uvloop/dns.pyx":197 * self.data = NULL * * cdef void set_data(self, system.addrinfo *data): # <<<<<<<<<<<<<< * self.data = data * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "uvloop/dns.pyx":200 * self.data = data * * cdef unpack(self): # <<<<<<<<<<<<<< * cdef: * list result = [] */ static PyObject *__pyx_f_6uvloop_4loop_8AddrInfo_unpack(struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_self) { PyObject *__pyx_v_result = 0; struct addrinfo *__pyx_v_ptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; struct addrinfo *__pyx_t_3; unsigned short __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("unpack", 0); /* "uvloop/dns.pyx":202 * cdef unpack(self): * cdef: * list result = [] # <<<<<<<<<<<<<< * system.addrinfo *ptr * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/dns.pyx":205 * system.addrinfo *ptr * * if self.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError('AddrInfo.data is NULL') * */ __pyx_t_2 = ((__pyx_v_self->data == NULL) != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":206 * * if self.data is NULL: * raise RuntimeError('AddrInfo.data is NULL') # <<<<<<<<<<<<<< * * ptr = self.data */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(19, 206, __pyx_L1_error) /* "uvloop/dns.pyx":205 * system.addrinfo *ptr * * if self.data is NULL: # <<<<<<<<<<<<<< * raise RuntimeError('AddrInfo.data is NULL') * */ } /* "uvloop/dns.pyx":208 * raise RuntimeError('AddrInfo.data is NULL') * * ptr = self.data # <<<<<<<<<<<<<< * while ptr != NULL: * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): */ __pyx_t_3 = __pyx_v_self->data; __pyx_v_ptr = __pyx_t_3; /* "uvloop/dns.pyx":209 * * ptr = self.data * while ptr != NULL: # <<<<<<<<<<<<<< * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): * result.append(( */ while (1) { __pyx_t_2 = ((__pyx_v_ptr != NULL) != 0); if (!__pyx_t_2) break; /* "uvloop/dns.pyx":210 * ptr = self.data * while ptr != NULL: * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * result.append(( * ptr.ai_family, */ __pyx_t_4 = __pyx_v_ptr->ai_addr->sa_family; __pyx_t_5 = ((__pyx_t_4 == AF_INET) != 0); if (!__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } __pyx_t_5 = ((__pyx_t_4 == AF_INET6) != 0); __pyx_t_2 = __pyx_t_5; __pyx_L7_bool_binop_done:; __pyx_t_5 = (__pyx_t_2 != 0); if (__pyx_t_5) { /* "uvloop/dns.pyx":212 * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): * result.append(( * ptr.ai_family, # <<<<<<<<<<<<<< * ptr.ai_socktype, * ptr.ai_protocol, */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "uvloop/dns.pyx":213 * result.append(( * ptr.ai_family, * ptr.ai_socktype, # <<<<<<<<<<<<<< * ptr.ai_protocol, * '' if ptr.ai_canonname is NULL else */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_socktype); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "uvloop/dns.pyx":214 * ptr.ai_family, * ptr.ai_socktype, * ptr.ai_protocol, # <<<<<<<<<<<<<< * '' if ptr.ai_canonname is NULL else * (ptr.ai_canonname).decode(), */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_ptr->ai_protocol); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "uvloop/dns.pyx":215 * ptr.ai_socktype, * ptr.ai_protocol, * '' if ptr.ai_canonname is NULL else # <<<<<<<<<<<<<< * (ptr.ai_canonname).decode(), * __convert_sockaddr_to_pyaddr(ptr.ai_addr) */ if (((__pyx_v_ptr->ai_canonname == NULL) != 0)) { __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_8 = __pyx_kp_u__30; } else { /* "uvloop/dns.pyx":216 * ptr.ai_protocol, * '' if ptr.ai_canonname is NULL else * (ptr.ai_canonname).decode(), # <<<<<<<<<<<<<< * __convert_sockaddr_to_pyaddr(ptr.ai_addr) * )) */ __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_ptr->ai_canonname); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); __PYX_ERR(19, 216, __pyx_L1_error) } __pyx_t_10 = __Pyx_decode_bytes(((PyObject*)__pyx_t_9), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __pyx_t_10; __pyx_t_10 = 0; } /* "uvloop/dns.pyx":217 * '' if ptr.ai_canonname is NULL else * (ptr.ai_canonname).decode(), * __convert_sockaddr_to_pyaddr(ptr.ai_addr) # <<<<<<<<<<<<<< * )) * */ __pyx_t_10 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_ptr->ai_addr); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); /* "uvloop/dns.pyx":212 * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): * result.append(( * ptr.ai_family, # <<<<<<<<<<<<<< * ptr.ai_socktype, * ptr.ai_protocol, */ __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_10); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_10 = 0; /* "uvloop/dns.pyx":211 * while ptr != NULL: * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): * result.append(( # <<<<<<<<<<<<<< * ptr.ai_family, * ptr.ai_socktype, */ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_9); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(19, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/dns.pyx":210 * ptr = self.data * while ptr != NULL: * if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * result.append(( * ptr.ai_family, */ } /* "uvloop/dns.pyx":220 * )) * * ptr = ptr.ai_next # <<<<<<<<<<<<<< * * return result */ __pyx_t_3 = __pyx_v_ptr->ai_next; __pyx_v_ptr = __pyx_t_3; } /* "uvloop/dns.pyx":222 * ptr = ptr.ai_next * * return result # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "uvloop/dns.pyx":200 * self.data = data * * cdef unpack(self): # <<<<<<<<<<<<<< * cdef: * list result = [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.AddrInfo.unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":225 * * @staticmethod * cdef int isinstance(object other): # <<<<<<<<<<<<<< * return type(other) is AddrInfo * */ static int __pyx_f_6uvloop_4loop_8AddrInfo_isinstance(PyObject *__pyx_v_other) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("isinstance", 0); /* "uvloop/dns.pyx":226 * @staticmethod * cdef int isinstance(object other): * return type(other) is AddrInfo # <<<<<<<<<<<<<< * * */ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfo)); __pyx_r = __pyx_t_1; goto __pyx_L0; /* "uvloop/dns.pyx":225 * * @staticmethod * cdef int isinstance(object other): # <<<<<<<<<<<<<< * return type(other) is AddrInfo * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":234 * object callback * * def __cinit__(self, Loop loop, # <<<<<<<<<<<<<< * bytes host, bytes port, * int family, int type, int proto, int flags, */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_port = 0; int __pyx_v_family; int __pyx_v_type; int __pyx_v_proto; int __pyx_v_flags; PyObject *__pyx_v_callback = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_family,&__pyx_n_s_type,&__pyx_n_s_proto,&__pyx_n_s_flags,&__pyx_n_s_callback,0}; PyObject* values[8] = {0,0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_host)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 1); __PYX_ERR(19, 234, __pyx_L3_error) } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 2); __PYX_ERR(19, 234, __pyx_L3_error) } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_family)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 3); __PYX_ERR(19, 234, __pyx_L3_error) } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 4); __PYX_ERR(19, 234, __pyx_L3_error) } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_proto)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 5); __PYX_ERR(19, 234, __pyx_L3_error) } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 6); __PYX_ERR(19, 234, __pyx_L3_error) } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, 7); __PYX_ERR(19, 234, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(19, 234, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 8) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[6] = PyTuple_GET_ITEM(__pyx_args, 6); values[7] = PyTuple_GET_ITEM(__pyx_args, 7); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); __pyx_v_host = ((PyObject*)values[1]); __pyx_v_port = ((PyObject*)values[2]); __pyx_v_family = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_family == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 236, __pyx_L3_error) __pyx_v_type = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 236, __pyx_L3_error) __pyx_v_proto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_proto == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 236, __pyx_L3_error) __pyx_v_flags = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 236, __pyx_L3_error) __pyx_v_callback = values[7]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 234, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(19, 234, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_host), (&PyBytes_Type), 1, "host", 1))) __PYX_ERR(19, 235, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_port), (&PyBytes_Type), 1, "port", 1))) __PYX_ERR(19, 235, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_host, __pyx_v_port, __pyx_v_family, __pyx_v_type, __pyx_v_proto, __pyx_v_flags, __pyx_v_callback); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_15AddrInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_host, PyObject *__pyx_v_port, int __pyx_v_family, int __pyx_v_type, int __pyx_v_proto, int __pyx_v_flags, PyObject *__pyx_v_callback) { int __pyx_v_err; char *__pyx_v_chost; char *__pyx_v_cport; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_ex = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; char *__pyx_t_3; PyObject *__pyx_t_4 = NULL; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/dns.pyx":244 * char *cport * * if host is None: # <<<<<<<<<<<<<< * chost = NULL * else: */ __pyx_t_1 = (__pyx_v_host == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/dns.pyx":245 * * if host is None: * chost = NULL # <<<<<<<<<<<<<< * else: * chost = host */ __pyx_v_chost = NULL; /* "uvloop/dns.pyx":244 * char *cport * * if host is None: # <<<<<<<<<<<<<< * chost = NULL * else: */ goto __pyx_L3; } /* "uvloop/dns.pyx":247 * chost = NULL * else: * chost = host # <<<<<<<<<<<<<< * * if port is None: */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_host); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(19, 247, __pyx_L1_error) __pyx_v_chost = ((char *)__pyx_t_3); } __pyx_L3:; /* "uvloop/dns.pyx":249 * chost = host * * if port is None: # <<<<<<<<<<<<<< * cport = NULL * else: */ __pyx_t_2 = (__pyx_v_port == ((PyObject*)Py_None)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":250 * * if port is None: * cport = NULL # <<<<<<<<<<<<<< * else: * cport = port */ __pyx_v_cport = NULL; /* "uvloop/dns.pyx":249 * chost = host * * if port is None: # <<<<<<<<<<<<<< * cport = NULL * else: */ goto __pyx_L4; } /* "uvloop/dns.pyx":252 * cport = NULL * else: * cport = port # <<<<<<<<<<<<<< * * if cport is NULL and chost is NULL: */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_port); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(19, 252, __pyx_L1_error) __pyx_v_cport = ((char *)__pyx_t_3); } __pyx_L4:; /* "uvloop/dns.pyx":254 * cport = port * * if cport is NULL and chost is NULL: # <<<<<<<<<<<<<< * self.on_done() * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') */ __pyx_t_2 = ((__pyx_v_cport == NULL) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = ((__pyx_v_chost == NULL) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/dns.pyx":255 * * if cport is NULL and chost is NULL: * self.on_done() # <<<<<<<<<<<<<< * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') * ex = socket_gaierror(socket_EAI_NONAME, msg) */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":256 * if cport is NULL and chost is NULL: * self.on_done() * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') # <<<<<<<<<<<<<< * ex = socket_gaierror(socket_EAI_NONAME, msg) * callback(ex) */ __pyx_t_5 = gai_strerror(__pyx_v_6uvloop_4loop_socket_EAI_NONAME); __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_4); __pyx_v_msg = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":257 * self.on_done() * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') * ex = socket_gaierror(socket_EAI_NONAME, msg) # <<<<<<<<<<<<<< * callback(ex) * return */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_socket_EAI_NONAME); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_gaierror); __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_gaierror; __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_msg}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 257, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_v_msg}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 257, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(19, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_msg); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_ex = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/dns.pyx":258 * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') * ex = socket_gaierror(socket_EAI_NONAME, msg) * callback(ex) # <<<<<<<<<<<<<< * return * */ __Pyx_INCREF(__pyx_v_callback); __pyx_t_7 = __pyx_v_callback; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_10) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_ex); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_ex}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 258, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_ex}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 258, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ex); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":259 * ex = socket_gaierror(socket_EAI_NONAME, msg) * callback(ex) * return # <<<<<<<<<<<<<< * * memset(&self.hints, 0, sizeof(system.addrinfo)) */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/dns.pyx":254 * cport = port * * if cport is NULL and chost is NULL: # <<<<<<<<<<<<<< * self.on_done() * msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') */ } /* "uvloop/dns.pyx":261 * return * * memset(&self.hints, 0, sizeof(system.addrinfo)) # <<<<<<<<<<<<<< * self.hints.ai_flags = flags * self.hints.ai_family = family */ memset((&__pyx_v_self->hints), 0, (sizeof(struct addrinfo))); /* "uvloop/dns.pyx":262 * * memset(&self.hints, 0, sizeof(system.addrinfo)) * self.hints.ai_flags = flags # <<<<<<<<<<<<<< * self.hints.ai_family = family * self.hints.ai_socktype = type */ __pyx_v_self->hints.ai_flags = __pyx_v_flags; /* "uvloop/dns.pyx":263 * memset(&self.hints, 0, sizeof(system.addrinfo)) * self.hints.ai_flags = flags * self.hints.ai_family = family # <<<<<<<<<<<<<< * self.hints.ai_socktype = type * self.hints.ai_protocol = proto */ __pyx_v_self->hints.ai_family = __pyx_v_family; /* "uvloop/dns.pyx":264 * self.hints.ai_flags = flags * self.hints.ai_family = family * self.hints.ai_socktype = type # <<<<<<<<<<<<<< * self.hints.ai_protocol = proto * */ __pyx_v_self->hints.ai_socktype = __pyx_v_type; /* "uvloop/dns.pyx":265 * self.hints.ai_family = family * self.hints.ai_socktype = type * self.hints.ai_protocol = proto # <<<<<<<<<<<<<< * * self.request = PyMem_RawMalloc( */ __pyx_v_self->hints.ai_protocol = __pyx_v_proto; /* "uvloop/dns.pyx":267 * self.hints.ai_protocol = proto * * self.request = PyMem_RawMalloc( # <<<<<<<<<<<<<< * sizeof(uv.uv_getaddrinfo_t)) * if self.request is NULL: */ __pyx_v_self->__pyx_base.request = ((uv_req_t *)PyMem_RawMalloc((sizeof(uv_getaddrinfo_t)))); /* "uvloop/dns.pyx":269 * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getaddrinfo_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.request == NULL) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":270 * sizeof(uv.uv_getaddrinfo_t)) * if self.request is NULL: * self.on_done() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":271 * if self.request is NULL: * self.on_done() * raise MemoryError() # <<<<<<<<<<<<<< * * self.callback = callback */ PyErr_NoMemory(); __PYX_ERR(19, 271, __pyx_L1_error) /* "uvloop/dns.pyx":269 * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getaddrinfo_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ } /* "uvloop/dns.pyx":273 * raise MemoryError() * * self.callback = callback # <<<<<<<<<<<<<< * self.request.data = self * */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_self->callback); __Pyx_DECREF(__pyx_v_self->callback); __pyx_v_self->callback = __pyx_v_callback; /* "uvloop/dns.pyx":274 * * self.callback = callback * self.request.data = self # <<<<<<<<<<<<<< * * err = uv.uv_getaddrinfo(loop.uvloop, */ __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self); /* "uvloop/dns.pyx":276 * self.request.data = self * * err = uv.uv_getaddrinfo(loop.uvloop, # <<<<<<<<<<<<<< * self.request, * __on_addrinfo_resolved, */ __pyx_v_err = uv_getaddrinfo(__pyx_v_loop->uvloop, ((uv_getaddrinfo_t *)__pyx_v_self->__pyx_base.request), __pyx_f_6uvloop_4loop___on_addrinfo_resolved, __pyx_v_chost, __pyx_v_cport, (&__pyx_v_self->hints)); /* "uvloop/dns.pyx":283 * &self.hints) * * if err < 0: # <<<<<<<<<<<<<< * self.on_done() * callback(convert_error(err)) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":284 * * if err < 0: * self.on_done() # <<<<<<<<<<<<<< * callback(convert_error(err)) * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":285 * if err < 0: * self.on_done() * callback(convert_error(err)) # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_callback); __pyx_t_6 = __pyx_v_callback; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_10) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(19, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/dns.pyx":283 * &self.hints) * * if err < 0: # <<<<<<<<<<<<<< * self.on_done() * callback(convert_error(err)) */ } /* "uvloop/dns.pyx":234 * object callback * * def __cinit__(self, Loop loop, # <<<<<<<<<<<<<< * bytes host, bytes port, * int family, int type, int proto, int flags, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.AddrInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":292 * object callback * * def __cinit__(self, Loop loop, callback): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getnameinfo_t)) */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_callback = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_callback,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(19, 292, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(19, 292, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); __pyx_v_callback = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 292, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(19, 292, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_v_self), __pyx_v_loop, __pyx_v_callback); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_15NameInfoRequest___cinit__(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_callback) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/dns.pyx":293 * * def __cinit__(self, Loop loop, callback): * self.request = PyMem_RawMalloc( # <<<<<<<<<<<<<< * sizeof(uv.uv_getnameinfo_t)) * if self.request is NULL: */ __pyx_v_self->__pyx_base.request = ((uv_req_t *)PyMem_RawMalloc((sizeof(uv_getnameinfo_t)))); /* "uvloop/dns.pyx":295 * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getnameinfo_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.request == NULL) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":296 * sizeof(uv.uv_getnameinfo_t)) * if self.request is NULL: * self.on_done() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/dns.pyx":297 * if self.request is NULL: * self.on_done() * raise MemoryError() # <<<<<<<<<<<<<< * * self.callback = callback */ PyErr_NoMemory(); __PYX_ERR(19, 297, __pyx_L1_error) /* "uvloop/dns.pyx":295 * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getnameinfo_t)) * if self.request is NULL: # <<<<<<<<<<<<<< * self.on_done() * raise MemoryError() */ } /* "uvloop/dns.pyx":299 * raise MemoryError() * * self.callback = callback # <<<<<<<<<<<<<< * self.request.data = self * */ __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); __Pyx_GOTREF(__pyx_v_self->callback); __Pyx_DECREF(__pyx_v_self->callback); __pyx_v_self->callback = __pyx_v_callback; /* "uvloop/dns.pyx":300 * * self.callback = callback * self.request.data = self # <<<<<<<<<<<<<< * * cdef query(self, system.sockaddr *addr, int flags): */ __pyx_v_self->__pyx_base.request->data = ((void *)__pyx_v_self); /* "uvloop/dns.pyx":292 * object callback * * def __cinit__(self, Loop loop, callback): # <<<<<<<<<<<<<< * self.request = PyMem_RawMalloc( * sizeof(uv.uv_getnameinfo_t)) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":302 * self.request.data = self * * cdef query(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_getnameinfo(self.loop.uvloop, */ static PyObject *__pyx_f_6uvloop_4loop_15NameInfoRequest_query(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_flags) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("query", 0); /* "uvloop/dns.pyx":304 * cdef query(self, system.sockaddr *addr, int flags): * cdef int err * err = uv.uv_getnameinfo(self.loop.uvloop, # <<<<<<<<<<<<<< * self.request, * __on_nameinfo_resolved, */ __pyx_v_err = uv_getnameinfo(__pyx_v_self->__pyx_base.loop->uvloop, ((uv_getnameinfo_t *)__pyx_v_self->__pyx_base.request), __pyx_f_6uvloop_4loop___on_nameinfo_resolved, __pyx_v_addr, __pyx_v_flags); /* "uvloop/dns.pyx":309 * addr, * flags) * if err < 0: # <<<<<<<<<<<<<< * self.on_done() * self.callback(convert_error(err)) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":310 * flags) * if err < 0: * self.on_done() # <<<<<<<<<<<<<< * self.callback(convert_error(err)) * */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/dns.pyx":311 * if err < 0: * self.on_done() * self.callback(convert_error(err)) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->callback); __pyx_t_4 = __pyx_v_self->callback; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/dns.pyx":309 * addr, * flags) * if err < 0: # <<<<<<<<<<<<<< * self.on_done() * self.callback(convert_error(err)) */ } /* "uvloop/dns.pyx":302 * self.request.data = self * * cdef query(self, system.sockaddr *addr, int flags): # <<<<<<<<<<<<<< * cdef int err * err = uv.uv_getnameinfo(self.loop.uvloop, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.NameInfoRequest.query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/dns.pyx":314 * * * cdef void __on_addrinfo_resolved(uv.uv_getaddrinfo_t *resolver, # <<<<<<<<<<<<<< * int status, system.addrinfo *res) with gil: * */ static void __pyx_f_6uvloop_4loop___on_addrinfo_resolved(uv_getaddrinfo_t *__pyx_v_resolver, int __pyx_v_status, struct addrinfo *__pyx_v_res) { struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *__pyx_v_request = 0; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_callback = 0; struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_v_ai = 0; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__on_addrinfo_resolved", 0); /* "uvloop/dns.pyx":317 * int status, system.addrinfo *res) with gil: * * if resolver.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'AddrInfoRequest callback called with NULL resolver.data') */ __pyx_t_1 = ((__pyx_v_resolver->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":318 * * if resolver.data is NULL: * aio_logger.error( # <<<<<<<<<<<<<< * 'AddrInfoRequest callback called with NULL resolver.data') * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":320 * aio_logger.error( * 'AddrInfoRequest callback called with NULL resolver.data') * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/dns.pyx":317 * int status, system.addrinfo *res) with gil: * * if resolver.data is NULL: # <<<<<<<<<<<<<< * aio_logger.error( * 'AddrInfoRequest callback called with NULL resolver.data') */ } /* "uvloop/dns.pyx":323 * * cdef: * AddrInfoRequest request = resolver.data # <<<<<<<<<<<<<< * Loop loop = request.loop * object callback = request.callback */ __pyx_t_3 = ((PyObject *)__pyx_v_resolver->data); __Pyx_INCREF(__pyx_t_3); __pyx_v_request = ((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":324 * cdef: * AddrInfoRequest request = resolver.data * Loop loop = request.loop # <<<<<<<<<<<<<< * object callback = request.callback * AddrInfo ai */ __pyx_t_3 = ((PyObject *)__pyx_v_request->__pyx_base.loop); __Pyx_INCREF(__pyx_t_3); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":325 * AddrInfoRequest request = resolver.data * Loop loop = request.loop * object callback = request.callback # <<<<<<<<<<<<<< * AddrInfo ai * */ __pyx_t_3 = __pyx_v_request->callback; __Pyx_INCREF(__pyx_t_3); __pyx_v_callback = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/dns.pyx":328 * AddrInfo ai * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/dns.pyx":329 * * try: * if status < 0: # <<<<<<<<<<<<<< * callback(convert_error(status)) * else: */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "uvloop/dns.pyx":330 * try: * if status < 0: * callback(convert_error(status)) # <<<<<<<<<<<<<< * else: * ai = AddrInfo() */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_callback); __pyx_t_7 = __pyx_v_callback; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 330, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":329 * * try: * if status < 0: # <<<<<<<<<<<<<< * callback(convert_error(status)) * else: */ goto __pyx_L15; } /* "uvloop/dns.pyx":332 * callback(convert_error(status)) * else: * ai = AddrInfo() # <<<<<<<<<<<<<< * ai.set_data(res) * callback(ai) */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6uvloop_4loop_AddrInfo), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 332, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_ai = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":333 * else: * ai = AddrInfo() * ai.set_data(res) # <<<<<<<<<<<<<< * callback(ai) * except Exception as ex: */ ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo *)__pyx_v_ai->__pyx_vtab)->set_data(__pyx_v_ai, __pyx_v_res); /* "uvloop/dns.pyx":334 * ai = AddrInfo() * ai.set_data(res) * callback(ai) # <<<<<<<<<<<<<< * except Exception as ex: * loop._handle_exception(ex) */ __Pyx_INCREF(__pyx_v_callback); __pyx_t_7 = __pyx_v_callback; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_9) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_ai)); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)__pyx_v_ai)}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 334, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)__pyx_v_ai)}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 334, __pyx_L7_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_ai)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ai)); PyTuple_SET_ITEM(__pyx_t_2, 0+1, ((PyObject *)__pyx_v_ai)); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(19, 334, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L15:; /* "uvloop/dns.pyx":328 * AddrInfo ai * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L14_try_end; __pyx_L7_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/dns.pyx":335 * ai.set_data(res) * callback(ai) * except Exception as ex: # <<<<<<<<<<<<<< * loop._handle_exception(ex) * finally: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.__on_addrinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(19, 335, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_v_ex = __pyx_t_7; /*try:*/ { /* "uvloop/dns.pyx":336 * callback(ai) * except Exception as ex: * loop._handle_exception(ex) # <<<<<<<<<<<<<< * finally: * request.on_done() */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_ex); } /* "uvloop/dns.pyx":335 * ai.set_data(res) * callback(ai) * except Exception as ex: # <<<<<<<<<<<<<< * loop._handle_exception(ex) * finally: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L22; } __pyx_L22:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; __pyx_L9_except_error:; /* "uvloop/dns.pyx":328 * AddrInfo ai * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L5_error; __pyx_L8_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L14_try_end:; } } /* "uvloop/dns.pyx":338 * loop._handle_exception(ex) * finally: * request.on_done() # <<<<<<<<<<<<<< * * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L5_error:; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 338, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L1_error; __pyx_L24_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; goto __pyx_L1_error; } __pyx_L6:; } /* "uvloop/dns.pyx":314 * * * cdef void __on_addrinfo_resolved(uv.uv_getaddrinfo_t *resolver, # <<<<<<<<<<<<<< * int status, system.addrinfo *res) with gil: * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__on_addrinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF((PyObject *)__pyx_v_ai); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/dns.pyx":341 * * * cdef void __on_nameinfo_resolved(uv.uv_getnameinfo_t* req, # <<<<<<<<<<<<<< * int status, * const char* hostname, */ static void __pyx_f_6uvloop_4loop___on_nameinfo_resolved(uv_getnameinfo_t *__pyx_v_req, int __pyx_v_status, char const *__pyx_v_hostname, char const *__pyx_v_service) { struct __pyx_obj_6uvloop_4loop_NameInfoRequest *__pyx_v_request = 0; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_ex = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__on_nameinfo_resolved", 0); /* "uvloop/dns.pyx":346 * const char* service) with gil: * cdef: * NameInfoRequest request = req.data # <<<<<<<<<<<<<< * Loop loop = request.loop * object callback = request.callback */ __pyx_t_1 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_1); __pyx_v_request = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/dns.pyx":347 * cdef: * NameInfoRequest request = req.data * Loop loop = request.loop # <<<<<<<<<<<<<< * object callback = request.callback * */ __pyx_t_1 = ((PyObject *)__pyx_v_request->__pyx_base.loop); __Pyx_INCREF(__pyx_t_1); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/dns.pyx":348 * NameInfoRequest request = req.data * Loop loop = request.loop * object callback = request.callback # <<<<<<<<<<<<<< * * try: */ __pyx_t_1 = __pyx_v_request->callback; __Pyx_INCREF(__pyx_t_1); __pyx_v_callback = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/dns.pyx":350 * object callback = request.callback * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/dns.pyx":351 * * try: * if status < 0: # <<<<<<<<<<<<<< * callback(convert_error(status)) * else: */ __pyx_t_5 = ((__pyx_v_status < 0) != 0); if (__pyx_t_5) { /* "uvloop/dns.pyx":352 * try: * if status < 0: * callback(convert_error(status)) # <<<<<<<<<<<<<< * else: * callback(((hostname).decode(), */ __pyx_t_6 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_callback); __pyx_t_7 = __pyx_v_callback; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/dns.pyx":351 * * try: * if status < 0: # <<<<<<<<<<<<<< * callback(convert_error(status)) * else: */ goto __pyx_L14; } /* "uvloop/dns.pyx":354 * callback(convert_error(status)) * else: * callback(((hostname).decode(), # <<<<<<<<<<<<<< * (service).decode())) * except Exception as ex: */ /*else*/ { __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_hostname); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); __PYX_ERR(19, 354, __pyx_L6_error) } __pyx_t_9 = __Pyx_decode_bytes(((PyObject*)__pyx_t_7), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/dns.pyx":355 * else: * callback(((hostname).decode(), * (service).decode())) # <<<<<<<<<<<<<< * except Exception as ex: * loop._handle_exception(ex) */ __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_service); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 355, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "decode"); __PYX_ERR(19, 355, __pyx_L6_error) } __pyx_t_6 = __Pyx_decode_bytes(((PyObject*)__pyx_t_7), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(19, 355, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/dns.pyx":354 * callback(convert_error(status)) * else: * callback(((hostname).decode(), # <<<<<<<<<<<<<< * (service).decode())) * except Exception as ex: */ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_9 = 0; __pyx_t_6 = 0; __Pyx_INCREF(__pyx_v_callback); __pyx_t_6 = __pyx_v_callback; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_9) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L14:; /* "uvloop/dns.pyx":350 * object callback = request.callback * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/dns.pyx":356 * callback(((hostname).decode(), * (service).decode())) * except Exception as ex: # <<<<<<<<<<<<<< * loop._handle_exception(ex) * finally: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop.__on_nameinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(19, 356, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_v_ex = __pyx_t_6; /*try:*/ { /* "uvloop/dns.pyx":357 * (service).decode())) * except Exception as ex: * loop._handle_exception(ex) # <<<<<<<<<<<<<< * finally: * request.on_done() */ ((struct __pyx_vtabstruct_6uvloop_4loop_Loop *)__pyx_v_loop->__pyx_vtab)->_handle_exception(__pyx_v_loop, __pyx_v_ex); } /* "uvloop/dns.pyx":356 * callback(((hostname).decode(), * (service).decode())) * except Exception as ex: # <<<<<<<<<<<<<< * loop._handle_exception(ex) * finally: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L21; } __pyx_L21:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; /* "uvloop/dns.pyx":350 * object callback = request.callback * * try: # <<<<<<<<<<<<<< * if status < 0: * callback(convert_error(status)) */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L4_error; __pyx_L7_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L13_try_end:; } } /* "uvloop/dns.pyx":359 * loop._handle_exception(ex) * finally: * request.on_done() # <<<<<<<<<<<<<< */ /*finally:*/ { /*normal exit:*/{ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L4_error:; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest *)__pyx_v_request->__pyx_base.__pyx_vtab)->__pyx_base.on_done(((struct __pyx_obj_6uvloop_4loop_UVRequest *)__pyx_v_request)); if (unlikely(!__pyx_t_8)) __PYX_ERR(19, 359, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L1_error; __pyx_L23_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "uvloop/dns.pyx":341 * * * cdef void __on_nameinfo_resolved(uv.uv_getnameinfo_t* req, # <<<<<<<<<<<<<< * int status, * const char* hostname, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("uvloop.loop.__on_nameinfo_resolved", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF(__pyx_v_ex); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/udp.pyx":18 * system.sockaddr_storage addr * * cdef close(self): # <<<<<<<<<<<<<< * if self.closed: * return */ static PyObject *__pyx_f_6uvloop_4loop_15_UDPSendContext_close(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/handles/udp.pyx":19 * * cdef close(self): * if self.closed: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (__pyx_v_self->closed != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":20 * cdef close(self): * if self.closed: * return # <<<<<<<<<<<<<< * * self.closed = 1 */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":19 * * cdef close(self): * if self.closed: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/udp.pyx":22 * return * * self.closed = 1 # <<<<<<<<<<<<<< * PyBuffer_Release(&self.py_buf) # void * self.req.data = NULL */ __pyx_v_self->closed = 1; /* "uvloop/handles/udp.pyx":23 * * self.closed = 1 * PyBuffer_Release(&self.py_buf) # void # <<<<<<<<<<<<<< * self.req.data = NULL * Py_DECREF(self) */ PyBuffer_Release((&__pyx_v_self->py_buf)); /* "uvloop/handles/udp.pyx":24 * self.closed = 1 * PyBuffer_Release(&self.py_buf) # void * self.req.data = NULL # <<<<<<<<<<<<<< * Py_DECREF(self) * self.udp = None */ __pyx_v_self->req.data = NULL; /* "uvloop/handles/udp.pyx":25 * PyBuffer_Release(&self.py_buf) # void * self.req.data = NULL * Py_DECREF(self) # <<<<<<<<<<<<<< * self.udp = None * */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/udp.pyx":26 * self.req.data = NULL * Py_DECREF(self) * self.udp = None # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->udp); __Pyx_DECREF(((PyObject *)__pyx_v_self->udp)); __pyx_v_self->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); /* "uvloop/handles/udp.pyx":18 * system.sockaddr_storage addr * * cdef close(self): # <<<<<<<<<<<<<< * if self.closed: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":29 * * @staticmethod * cdef _UDPSendContext new(UDPTransport udp, object data): # <<<<<<<<<<<<<< * cdef _UDPSendContext ctx * ctx = _UDPSendContext.__new__(_UDPSendContext) */ static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_f_6uvloop_4loop_15_UDPSendContext_new(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp, PyObject *__pyx_v_data) { struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0; struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("new", 0); /* "uvloop/handles/udp.pyx":31 * cdef _UDPSendContext new(UDPTransport udp, object data): * cdef _UDPSendContext ctx * ctx = _UDPSendContext.__new__(_UDPSendContext) # <<<<<<<<<<<<<< * ctx.udp = None * ctx.closed = 1 */ __pyx_t_1 = __pyx_tp_new_6uvloop_4loop__UDPSendContext(((PyTypeObject *)__pyx_ptype_6uvloop_4loop__UDPSendContext), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6uvloop_4loop__UDPSendContext)))) __PYX_ERR(20, 31, __pyx_L1_error) __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":32 * cdef _UDPSendContext ctx * ctx = _UDPSendContext.__new__(_UDPSendContext) * ctx.udp = None # <<<<<<<<<<<<<< * ctx.closed = 1 * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_ctx->udp); __Pyx_DECREF(((PyObject *)__pyx_v_ctx->udp)); __pyx_v_ctx->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); /* "uvloop/handles/udp.pyx":33 * ctx = _UDPSendContext.__new__(_UDPSendContext) * ctx.udp = None * ctx.closed = 1 # <<<<<<<<<<<<<< * * ctx.req.data = ctx */ __pyx_v_ctx->closed = 1; /* "uvloop/handles/udp.pyx":35 * ctx.closed = 1 * * ctx.req.data = ctx # <<<<<<<<<<<<<< * Py_INCREF(ctx) * */ __pyx_v_ctx->req.data = ((void *)__pyx_v_ctx); /* "uvloop/handles/udp.pyx":36 * * ctx.req.data = ctx * Py_INCREF(ctx) # <<<<<<<<<<<<<< * * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) */ Py_INCREF(((PyObject *)__pyx_v_ctx)); /* "uvloop/handles/udp.pyx":38 * Py_INCREF(ctx) * * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<< * ctx.uv_buf = uv.uv_buf_init(ctx.py_buf.buf, ctx.py_buf.len) * ctx.udp = udp */ __pyx_t_2 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_ctx->py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(20, 38, __pyx_L1_error) /* "uvloop/handles/udp.pyx":39 * * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) * ctx.uv_buf = uv.uv_buf_init(ctx.py_buf.buf, ctx.py_buf.len) # <<<<<<<<<<<<<< * ctx.udp = udp * */ __pyx_v_ctx->uv_buf = uv_buf_init(((char *)__pyx_v_ctx->py_buf.buf), __pyx_v_ctx->py_buf.len); /* "uvloop/handles/udp.pyx":40 * PyObject_GetBuffer(data, &ctx.py_buf, PyBUF_SIMPLE) * ctx.uv_buf = uv.uv_buf_init(ctx.py_buf.buf, ctx.py_buf.len) * ctx.udp = udp # <<<<<<<<<<<<<< * * ctx.closed = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_udp)); __Pyx_GIVEREF(((PyObject *)__pyx_v_udp)); __Pyx_GOTREF(__pyx_v_ctx->udp); __Pyx_DECREF(((PyObject *)__pyx_v_ctx->udp)); __pyx_v_ctx->udp = __pyx_v_udp; /* "uvloop/handles/udp.pyx":42 * ctx.udp = udp * * ctx.closed = 0 # <<<<<<<<<<<<<< * return ctx * */ __pyx_v_ctx->closed = 0; /* "uvloop/handles/udp.pyx":43 * * ctx.closed = 0 * return ctx # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_ctx)); __pyx_r = __pyx_v_ctx; goto __pyx_L0; /* "uvloop/handles/udp.pyx":29 * * @staticmethod * cdef _UDPSendContext new(UDPTransport udp, object data): # <<<<<<<<<<<<<< * cdef _UDPSendContext ctx * ctx = _UDPSendContext.__new__(_UDPSendContext) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop._UDPSendContext.new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":45 * return ctx * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if not self.closed: */ /* Python wrapper */ static void __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6uvloop_4loop_15_UDPSendContext___dealloc__(struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "uvloop/handles/udp.pyx":46 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if not self.closed: * raise RuntimeError( */ __pyx_t_1 = (UVLOOP_DEBUG != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":47 * def __dealloc__(self): * if UVLOOP_DEBUG: * if not self.closed: # <<<<<<<<<<<<<< * raise RuntimeError( * 'open _UDPSendContext is being deallocated') */ __pyx_t_1 = ((!(__pyx_v_self->closed != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":48 * if UVLOOP_DEBUG: * if not self.closed: * raise RuntimeError( # <<<<<<<<<<<<<< * 'open _UDPSendContext is being deallocated') * self.udp = None */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__175, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(20, 48, __pyx_L1_error) /* "uvloop/handles/udp.pyx":47 * def __dealloc__(self): * if UVLOOP_DEBUG: * if not self.closed: # <<<<<<<<<<<<<< * raise RuntimeError( * 'open _UDPSendContext is being deallocated') */ } /* "uvloop/handles/udp.pyx":46 * * def __dealloc__(self): * if UVLOOP_DEBUG: # <<<<<<<<<<<<<< * if not self.closed: * raise RuntimeError( */ } /* "uvloop/handles/udp.pyx":50 * raise RuntimeError( * 'open _UDPSendContext is being deallocated') * self.udp = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->udp); __Pyx_DECREF(((PyObject *)__pyx_v_self->udp)); __pyx_v_self->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); /* "uvloop/handles/udp.pyx":45 * return ctx * * def __dealloc__(self): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if not self.closed: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("uvloop.loop._UDPSendContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "uvloop/handles/udp.pyx":55 * @cython.no_gc_clear * cdef class UDPTransport(UVBaseTransport): * def __cinit__(self): # <<<<<<<<<<<<<< * self._family = uv.AF_UNSPEC * self._address_set = 0 */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_12UDPTransport___cinit__(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/handles/udp.pyx":56 * cdef class UDPTransport(UVBaseTransport): * def __cinit__(self): * self._family = uv.AF_UNSPEC # <<<<<<<<<<<<<< * self._address_set = 0 * self.__receiving = 0 */ __pyx_v_self->_family = AF_UNSPEC; /* "uvloop/handles/udp.pyx":57 * def __cinit__(self): * self._family = uv.AF_UNSPEC * self._address_set = 0 # <<<<<<<<<<<<<< * self.__receiving = 0 * self._cached_py_address = None */ __pyx_v_self->_address_set = 0; /* "uvloop/handles/udp.pyx":58 * self._family = uv.AF_UNSPEC * self._address_set = 0 * self.__receiving = 0 # <<<<<<<<<<<<<< * self._cached_py_address = None * */ __pyx_v_self->__pyx___receiving = 0; /* "uvloop/handles/udp.pyx":59 * self._address_set = 0 * self.__receiving = 0 * self._cached_py_address = None # <<<<<<<<<<<<<< * * cdef _init(self, Loop loop, unsigned int family): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_cached_py_address); __Pyx_DECREF(__pyx_v_self->_cached_py_address); __pyx_v_self->_cached_py_address = Py_None; /* "uvloop/handles/udp.pyx":55 * @cython.no_gc_clear * cdef class UDPTransport(UVBaseTransport): * def __cinit__(self): # <<<<<<<<<<<<<< * self._family = uv.AF_UNSPEC * self._address_set = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":61 * self._cached_py_address = None * * cdef _init(self, Loop loop, unsigned int family): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__init(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, unsigned int __pyx_v_family) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; unsigned int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("_init", 0); /* "uvloop/handles/udp.pyx":64 * cdef int err * * self._start_init(loop) # <<<<<<<<<<<<<< * * self._handle = \ */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._start_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":66 * self._start_init(loop) * * self._handle = \ # <<<<<<<<<<<<<< * PyMem_RawMalloc(sizeof(uv.uv_udp_t)) * if self._handle is NULL: */ __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle = ((uv_handle_t *)PyMem_RawMalloc((sizeof(uv_udp_t)))); /* "uvloop/handles/udp.pyx":68 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_udp_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ __pyx_t_2 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":69 * PyMem_RawMalloc(sizeof(uv.uv_udp_t)) * if self._handle is NULL: * self._abort_init() # <<<<<<<<<<<<<< * raise MemoryError() * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":70 * if self._handle is NULL: * self._abort_init() * raise MemoryError() # <<<<<<<<<<<<<< * * err = uv.uv_udp_init_ex(loop.uvloop, */ PyErr_NoMemory(); __PYX_ERR(20, 70, __pyx_L1_error) /* "uvloop/handles/udp.pyx":68 * self._handle = \ * PyMem_RawMalloc(sizeof(uv.uv_udp_t)) * if self._handle is NULL: # <<<<<<<<<<<<<< * self._abort_init() * raise MemoryError() */ } /* "uvloop/handles/udp.pyx":72 * raise MemoryError() * * err = uv.uv_udp_init_ex(loop.uvloop, # <<<<<<<<<<<<<< * self._handle, * family) */ __pyx_v_err = uv_udp_init_ex(__pyx_v_loop->uvloop, ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_family); /* "uvloop/handles/udp.pyx":75 * self._handle, * family) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":76 * family) * if err < 0: * self._abort_init() # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._abort_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":77 * if err < 0: * self._abort_init() * raise convert_error(err) # <<<<<<<<<<<<<< * * if family in (uv.AF_INET, uv.AF_INET6): */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(20, 77, __pyx_L1_error) /* "uvloop/handles/udp.pyx":75 * self._handle, * family) * if err < 0: # <<<<<<<<<<<<<< * self._abort_init() * raise convert_error(err) */ } /* "uvloop/handles/udp.pyx":79 * raise convert_error(err) * * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * self._family = family * */ __pyx_t_3 = __pyx_v_family; __pyx_t_4 = ((__pyx_t_3 == AF_INET) != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L6_bool_binop_done; } __pyx_t_4 = ((__pyx_t_3 == AF_INET6) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L6_bool_binop_done:; __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "uvloop/handles/udp.pyx":80 * * if family in (uv.AF_INET, uv.AF_INET6): * self._family = family # <<<<<<<<<<<<<< * * self._finish_init() */ __pyx_v_self->_family = __pyx_v_family; /* "uvloop/handles/udp.pyx":79 * raise convert_error(err) * * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * self._family = family * */ } /* "uvloop/handles/udp.pyx":82 * self._family = family * * self._finish_init() # <<<<<<<<<<<<<< * * cdef _set_remote_address(self, system.sockaddr* addr, */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._finish_init(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":61 * self._cached_py_address = None * * cdef _init(self, Loop loop, unsigned int family): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UDPTransport._init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":84 * self._finish_init() * * cdef _set_remote_address(self, system.sockaddr* addr, # <<<<<<<<<<<<<< * size_t addr_len): * memcpy(&self._address, addr, addr_len) */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_remote_address(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, size_t __pyx_v_addr_len) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_remote_address", 0); /* "uvloop/handles/udp.pyx":86 * cdef _set_remote_address(self, system.sockaddr* addr, * size_t addr_len): * memcpy(&self._address, addr, addr_len) # <<<<<<<<<<<<<< * self._address_set = 1 * */ memcpy((&__pyx_v_self->_address), __pyx_v_addr, __pyx_v_addr_len); /* "uvloop/handles/udp.pyx":87 * size_t addr_len): * memcpy(&self._address, addr, addr_len) * self._address_set = 1 # <<<<<<<<<<<<<< * * cdef open(self, int family, int sockfd): */ __pyx_v_self->_address_set = 1; /* "uvloop/handles/udp.pyx":84 * self._finish_init() * * cdef _set_remote_address(self, system.sockaddr* addr, # <<<<<<<<<<<<<< * size_t addr_len): * memcpy(&self._address, addr, addr_len) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":89 * self._address_set = 1 * * cdef open(self, int family, int sockfd): # <<<<<<<<<<<<<< * if family in (uv.AF_INET, uv.AF_INET6): * self._family = family */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport_open(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_family, int __pyx_v_sockfd) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("open", 0); /* "uvloop/handles/udp.pyx":90 * * cdef open(self, int family, int sockfd): * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * self._family = family * else: */ __pyx_t_1 = __pyx_v_family; __pyx_t_3 = ((__pyx_t_1 == AF_INET) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 == AF_INET6) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":91 * cdef open(self, int family, int sockfd): * if family in (uv.AF_INET, uv.AF_INET6): * self._family = family # <<<<<<<<<<<<<< * else: * raise ValueError( */ __pyx_v_self->_family = __pyx_v_family; /* "uvloop/handles/udp.pyx":90 * * cdef open(self, int family, int sockfd): * if family in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * self._family = family * else: */ goto __pyx_L3; } /* "uvloop/handles/udp.pyx":93 * self._family = family * else: * raise ValueError( # <<<<<<<<<<<<<< * 'cannot open a UDP handle, invalid family {}'.format(family)) * */ /*else*/ { /* "uvloop/handles/udp.pyx":94 * else: * raise ValueError( * 'cannot open a UDP handle, invalid family {}'.format(family)) # <<<<<<<<<<<<<< * * cdef int err */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cannot_open_a_UDP_handle_invalid, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_family); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_7) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/udp.pyx":93 * self._family = family * else: * raise ValueError( # <<<<<<<<<<<<<< * 'cannot open a UDP handle, invalid family {}'.format(family)) * */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(20, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(20, 93, __pyx_L1_error) } __pyx_L3:; /* "uvloop/handles/udp.pyx":97 * * cdef int err * err = uv.uv_udp_open(self._handle, # <<<<<<<<<<<<<< * sockfd) * */ __pyx_v_err = uv_udp_open(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), ((uv_os_sock_t)__pyx_v_sockfd)); /* "uvloop/handles/udp.pyx":100 * sockfd) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_3 = ((__pyx_v_err < 0) != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":101 * * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_4 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/udp.pyx":102 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * cdef _bind(self, system.sockaddr* addr, bint reuse_addr): */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(20, 102, __pyx_L1_error) /* "uvloop/handles/udp.pyx":100 * sockfd) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/udp.pyx":89 * self._address_set = 1 * * cdef open(self, int family, int sockfd): # <<<<<<<<<<<<<< * if family in (uv.AF_INET, uv.AF_INET6): * self._family = family */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.UDPTransport.open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":104 * raise exc * * cdef _bind(self, system.sockaddr* addr, bint reuse_addr): # <<<<<<<<<<<<<< * cdef: * int err */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__bind(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, struct sockaddr *__pyx_v_addr, int __pyx_v_reuse_addr) { int __pyx_v_err; int __pyx_v_flags; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_bind", 0); /* "uvloop/handles/udp.pyx":107 * cdef: * int err * int flags = 0 # <<<<<<<<<<<<<< * * self._ensure_alive() */ __pyx_v_flags = 0; /* "uvloop/handles/udp.pyx":109 * int flags = 0 * * self._ensure_alive() # <<<<<<<<<<<<<< * * if reuse_addr: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":111 * self._ensure_alive() * * if reuse_addr: # <<<<<<<<<<<<<< * flags |= uv.UV_UDP_REUSEADDR * */ __pyx_t_2 = (__pyx_v_reuse_addr != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":112 * * if reuse_addr: * flags |= uv.UV_UDP_REUSEADDR # <<<<<<<<<<<<<< * * err = uv.uv_udp_bind(self._handle, addr, flags) */ __pyx_v_flags = (__pyx_v_flags | UV_UDP_REUSEADDR); /* "uvloop/handles/udp.pyx":111 * self._ensure_alive() * * if reuse_addr: # <<<<<<<<<<<<<< * flags |= uv.UV_UDP_REUSEADDR * */ } /* "uvloop/handles/udp.pyx":114 * flags |= uv.UV_UDP_REUSEADDR * * err = uv.uv_udp_bind(self._handle, addr, flags) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_udp_bind(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_addr, __pyx_v_flags); /* "uvloop/handles/udp.pyx":115 * * err = uv.uv_udp_bind(self._handle, addr, flags) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":116 * err = uv.uv_udp_bind(self._handle, addr, flags) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":117 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * cdef _set_broadcast(self, bint on): */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(20, 117, __pyx_L1_error) /* "uvloop/handles/udp.pyx":115 * * err = uv.uv_udp_bind(self._handle, addr, flags) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/udp.pyx":104 * raise exc * * cdef _bind(self, system.sockaddr* addr, bint reuse_addr): # <<<<<<<<<<<<<< * cdef: * int err */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UDPTransport._bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":119 * raise exc * * cdef _set_broadcast(self, bint on): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, int __pyx_v_on) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_set_broadcast", 0); /* "uvloop/handles/udp.pyx":122 * cdef int err * * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_udp_set_broadcast(self._handle, on) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":124 * self._ensure_alive() * * err = uv.uv_udp_set_broadcast(self._handle, on) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_udp_set_broadcast(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_v_on); /* "uvloop/handles/udp.pyx":125 * * err = uv.uv_udp_set_broadcast(self._handle, on) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ __pyx_t_2 = ((__pyx_v_err < 0) != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":126 * err = uv.uv_udp_set_broadcast(self._handle, on) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * raise exc * */ __pyx_t_1 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/handles/udp.pyx":127 * if err < 0: * exc = convert_error(err) * raise exc # <<<<<<<<<<<<<< * * cdef size_t _get_write_buffer_size(self): */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(20, 127, __pyx_L1_error) /* "uvloop/handles/udp.pyx":125 * * err = uv.uv_udp_set_broadcast(self._handle, on) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * raise exc */ } /* "uvloop/handles/udp.pyx":119 * raise exc * * cdef _set_broadcast(self, bint on): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.UDPTransport._set_broadcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":129 * raise exc * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * if self._handle is NULL: * return 0 */ static size_t __pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { size_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_get_write_buffer_size", 0); /* "uvloop/handles/udp.pyx":130 * * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: # <<<<<<<<<<<<<< * return 0 * return (self._handle).send_queue_size */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":131 * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: * return 0 # <<<<<<<<<<<<<< * return (self._handle).send_queue_size * */ __pyx_r = 0; goto __pyx_L0; /* "uvloop/handles/udp.pyx":130 * * cdef size_t _get_write_buffer_size(self): * if self._handle is NULL: # <<<<<<<<<<<<<< * return 0 * return (self._handle).send_queue_size */ } /* "uvloop/handles/udp.pyx":132 * if self._handle is NULL: * return 0 * return (self._handle).send_queue_size # <<<<<<<<<<<<<< * * cdef bint _is_reading(self): */ __pyx_r = ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)->send_queue_size; goto __pyx_L0; /* "uvloop/handles/udp.pyx":129 * raise exc * * cdef size_t _get_write_buffer_size(self): # <<<<<<<<<<<<<< * if self._handle is NULL: * return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":134 * return (self._handle).send_queue_size * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * return self.__receiving * */ static int __pyx_f_6uvloop_4loop_12UDPTransport__is_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_reading", 0); /* "uvloop/handles/udp.pyx":135 * * cdef bint _is_reading(self): * return self.__receiving # <<<<<<<<<<<<<< * * cdef _start_reading(self): */ __pyx_r = __pyx_v_self->__pyx___receiving; goto __pyx_L0; /* "uvloop/handles/udp.pyx":134 * return (self._handle).send_queue_size * * cdef bint _is_reading(self): # <<<<<<<<<<<<<< * return self.__receiving * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":137 * return self.__receiving * * cdef _start_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__start_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_start_reading", 0); /* "uvloop/handles/udp.pyx":140 * cdef int err * * if self.__receiving: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (__pyx_v_self->__pyx___receiving != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":141 * * if self.__receiving: * return # <<<<<<<<<<<<<< * * self._ensure_alive() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":140 * cdef int err * * if self.__receiving: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/udp.pyx":143 * return * * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_udp_recv_start(self._handle, */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":145 * self._ensure_alive() * * err = uv.uv_udp_recv_start(self._handle, # <<<<<<<<<<<<<< * __loop_alloc_buffer, * __uv_udp_on_receive) */ __pyx_v_err = uv_udp_recv_start(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), __pyx_f_6uvloop_4loop___loop_alloc_buffer, __pyx_f_6uvloop_4loop___uv_udp_on_receive); /* "uvloop/handles/udp.pyx":149 * __uv_udp_on_receive) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":150 * * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":151 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":152 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * else: * # UDPTransport must live until the read callback is called */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":149 * __uv_udp_on_receive) * * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/udp.pyx":155 * else: * # UDPTransport must live until the read callback is called * self.__receiving_started() # <<<<<<<<<<<<<< * * cdef _stop_reading(self): */ /*else*/ { __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/handles/udp.pyx":137 * return self.__receiving * * cdef _start_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UDPTransport._start_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":157 * self.__receiving_started() * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_stop_reading", 0); /* "uvloop/handles/udp.pyx":160 * cdef int err * * if not self.__receiving: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((!(__pyx_v_self->__pyx___receiving != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":161 * * if not self.__receiving: * return # <<<<<<<<<<<<<< * * self._ensure_alive() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":160 * cdef int err * * if not self.__receiving: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/udp.pyx":163 * return * * self._ensure_alive() # <<<<<<<<<<<<<< * * err = uv.uv_udp_recv_stop(self._handle) */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._ensure_alive(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":165 * self._ensure_alive() * * err = uv.uv_udp_recv_stop(self._handle) # <<<<<<<<<<<<<< * if err < 0: * exc = convert_error(err) */ __pyx_v_err = uv_udp_recv_stop(((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle)); /* "uvloop/handles/udp.pyx":166 * * err = uv.uv_udp_recv_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":167 * err = uv.uv_udp_recv_stop(self._handle) * if err < 0: * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * return */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":168 * if err < 0: * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":169 * exc = convert_error(err) * self._fatal_error(exc, True) * return # <<<<<<<<<<<<<< * else: * self.__receiving_stopped() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":166 * * err = uv.uv_udp_recv_stop(self._handle) * if err < 0: # <<<<<<<<<<<<<< * exc = convert_error(err) * self._fatal_error(exc, True) */ } /* "uvloop/handles/udp.pyx":171 * return * else: * self.__receiving_stopped() # <<<<<<<<<<<<<< * * cdef inline __receiving_started(self): */ /*else*/ { __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "uvloop/handles/udp.pyx":157 * self.__receiving_started() * * cdef _stop_reading(self): # <<<<<<<<<<<<<< * cdef int err * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.UDPTransport._stop_reading", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":173 * self.__receiving_stopped() * * cdef inline __receiving_started(self): # <<<<<<<<<<<<<< * if self.__receiving: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__receiving_started", 0); /* "uvloop/handles/udp.pyx":174 * * cdef inline __receiving_started(self): * if self.__receiving: # <<<<<<<<<<<<<< * return * self.__receiving = 1 */ __pyx_t_1 = (__pyx_v_self->__pyx___receiving != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":175 * cdef inline __receiving_started(self): * if self.__receiving: * return # <<<<<<<<<<<<<< * self.__receiving = 1 * Py_INCREF(self) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":174 * * cdef inline __receiving_started(self): * if self.__receiving: # <<<<<<<<<<<<<< * return * self.__receiving = 1 */ } /* "uvloop/handles/udp.pyx":176 * if self.__receiving: * return * self.__receiving = 1 # <<<<<<<<<<<<<< * Py_INCREF(self) * */ __pyx_v_self->__pyx___receiving = 1; /* "uvloop/handles/udp.pyx":177 * return * self.__receiving = 1 * Py_INCREF(self) # <<<<<<<<<<<<<< * * cdef inline __receiving_stopped(self): */ Py_INCREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/udp.pyx":173 * self.__receiving_stopped() * * cdef inline __receiving_started(self): # <<<<<<<<<<<<<< * if self.__receiving: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":179 * Py_INCREF(self) * * cdef inline __receiving_stopped(self): # <<<<<<<<<<<<<< * if not self.__receiving: * return */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__receiving_stopped", 0); /* "uvloop/handles/udp.pyx":180 * * cdef inline __receiving_stopped(self): * if not self.__receiving: # <<<<<<<<<<<<<< * return * self.__receiving = 0 */ __pyx_t_1 = ((!(__pyx_v_self->__pyx___receiving != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":181 * cdef inline __receiving_stopped(self): * if not self.__receiving: * return # <<<<<<<<<<<<<< * self.__receiving = 0 * Py_DECREF(self) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":180 * * cdef inline __receiving_stopped(self): * if not self.__receiving: # <<<<<<<<<<<<<< * return * self.__receiving = 0 */ } /* "uvloop/handles/udp.pyx":182 * if not self.__receiving: * return * self.__receiving = 0 # <<<<<<<<<<<<<< * Py_DECREF(self) * */ __pyx_v_self->__pyx___receiving = 0; /* "uvloop/handles/udp.pyx":183 * return * self.__receiving = 0 * Py_DECREF(self) # <<<<<<<<<<<<<< * * cdef _new_socket(self): */ Py_DECREF(((PyObject *)__pyx_v_self)); /* "uvloop/handles/udp.pyx":179 * Py_INCREF(self) * * cdef inline __receiving_stopped(self): # <<<<<<<<<<<<<< * if not self.__receiving: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":185 * Py_DECREF(self) * * cdef _new_socket(self): # <<<<<<<<<<<<<< * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError( */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__new_socket(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self) { PyObject *__pyx_v_fileno = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_new_socket", 0); /* "uvloop/handles/udp.pyx":186 * * cdef _new_socket(self): * if self._family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise RuntimeError( * 'UDPTransport.family is undefined; cannot create python socket') */ __pyx_t_1 = __pyx_v_self->_family; __pyx_t_3 = ((__pyx_t_1 != AF_INET) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 != AF_INET6) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":187 * cdef _new_socket(self): * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError( # <<<<<<<<<<<<<< * 'UDPTransport.family is undefined; cannot create python socket') * */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(20, 187, __pyx_L1_error) /* "uvloop/handles/udp.pyx":186 * * cdef _new_socket(self): * if self._family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise RuntimeError( * 'UDPTransport.family is undefined; cannot create python socket') */ } /* "uvloop/handles/udp.pyx":190 * 'UDPTransport.family is undefined; cannot create python socket') * * fileno = self._fileno() # <<<<<<<<<<<<<< * return socket_socket(self._family, uv.SOCK_STREAM, 0, fileno) * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._fileno(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_fileno = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/udp.pyx":191 * * fileno = self._fileno() * return socket_socket(self._family, uv.SOCK_STREAM, 0, fileno) # <<<<<<<<<<<<<< * * cdef _send(self, object data, object addr): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_family); if (unlikely(!__pyx_t_5)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(SOCK_STREAM); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_6uvloop_4loop_socket_socket); __pyx_t_7 = __pyx_v_6uvloop_4loop_socket_socket; __pyx_t_8 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_int_0, __pyx_v_fileno}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 4+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_int_0, __pyx_v_fileno}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 4+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_1, __pyx_int_0); __Pyx_INCREF(__pyx_v_fileno); __Pyx_GIVEREF(__pyx_v_fileno); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_1, __pyx_v_fileno); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "uvloop/handles/udp.pyx":185 * Py_DECREF(self) * * cdef _new_socket(self): # <<<<<<<<<<<<<< * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError( */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.UDPTransport._new_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fileno); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":193 * return socket_socket(self._family, uv.SOCK_STREAM, 0, fileno) * * cdef _send(self, object data, object addr): # <<<<<<<<<<<<<< * cdef: * _UDPSendContext ctx */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__send(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr) { struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0; int __pyx_v_err; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; struct sockaddr_storage __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_send", 0); __Pyx_INCREF(__pyx_v_addr); /* "uvloop/handles/udp.pyx":197 * _UDPSendContext ctx * * if self._family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise RuntimeError('UDPTransport.family is undefined; cannot send') * */ __pyx_t_1 = __pyx_v_self->_family; __pyx_t_3 = ((__pyx_t_1 != AF_INET) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_t_1 != AF_INET6) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":198 * * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError('UDPTransport.family is undefined; cannot send') # <<<<<<<<<<<<<< * * if self._address_set and addr is not None: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(20, 198, __pyx_L1_error) /* "uvloop/handles/udp.pyx":197 * _UDPSendContext ctx * * if self._family not in (uv.AF_INET, uv.AF_INET6): # <<<<<<<<<<<<<< * raise RuntimeError('UDPTransport.family is undefined; cannot send') * */ } /* "uvloop/handles/udp.pyx":200 * raise RuntimeError('UDPTransport.family is undefined; cannot send') * * if self._address_set and addr is not None: # <<<<<<<<<<<<<< * if self._cached_py_address is None: * self._cached_py_address = __convert_sockaddr_to_pyaddr( */ __pyx_t_2 = (__pyx_v_self->_address_set != 0); if (__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = (__pyx_v_addr != Py_None); __pyx_t_5 = (__pyx_t_2 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L7_bool_binop_done:; if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":201 * * if self._address_set and addr is not None: * if self._cached_py_address is None: # <<<<<<<<<<<<<< * self._cached_py_address = __convert_sockaddr_to_pyaddr( * &self._address) */ __pyx_t_3 = (__pyx_v_self->_cached_py_address == Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "uvloop/handles/udp.pyx":202 * if self._address_set and addr is not None: * if self._cached_py_address is None: * self._cached_py_address = __convert_sockaddr_to_pyaddr( # <<<<<<<<<<<<<< * &self._address) * */ __pyx_t_4 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(((struct sockaddr *)(&__pyx_v_self->_address))); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_cached_py_address); __Pyx_DECREF(__pyx_v_self->_cached_py_address); __pyx_v_self->_cached_py_address = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/handles/udp.pyx":201 * * if self._address_set and addr is not None: * if self._cached_py_address is None: # <<<<<<<<<<<<<< * self._cached_py_address = __convert_sockaddr_to_pyaddr( * &self._address) */ } /* "uvloop/handles/udp.pyx":205 * &self._address) * * if self._cached_py_address != addr: # <<<<<<<<<<<<<< * raise ValueError('Invalid address: must be None or %s' % * (self._cached_py_address,)) */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->_cached_py_address, __pyx_v_addr, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 205, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(20, 205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "uvloop/handles/udp.pyx":207 * if self._cached_py_address != addr: * raise ValueError('Invalid address: must be None or %s' % * (self._cached_py_address,)) # <<<<<<<<<<<<<< * * addr = None */ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->_cached_py_address); __Pyx_GIVEREF(__pyx_v_self->_cached_py_address); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->_cached_py_address); /* "uvloop/handles/udp.pyx":206 * * if self._cached_py_address != addr: * raise ValueError('Invalid address: must be None or %s' % # <<<<<<<<<<<<<< * (self._cached_py_address,)) * */ __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_Invalid_address_must_be_None_or, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(20, 206, __pyx_L1_error) /* "uvloop/handles/udp.pyx":205 * &self._address) * * if self._cached_py_address != addr: # <<<<<<<<<<<<<< * raise ValueError('Invalid address: must be None or %s' % * (self._cached_py_address,)) */ } /* "uvloop/handles/udp.pyx":209 * (self._cached_py_address,)) * * addr = None # <<<<<<<<<<<<<< * * ctx = _UDPSendContext.new(self, data) */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_addr, Py_None); /* "uvloop/handles/udp.pyx":200 * raise RuntimeError('UDPTransport.family is undefined; cannot send') * * if self._address_set and addr is not None: # <<<<<<<<<<<<<< * if self._cached_py_address is None: * self._cached_py_address = __convert_sockaddr_to_pyaddr( */ } /* "uvloop/handles/udp.pyx":211 * addr = None * * ctx = _UDPSendContext.new(self, data) # <<<<<<<<<<<<<< * try: * if addr is None: */ __pyx_t_6 = ((PyObject *)__pyx_f_6uvloop_4loop_15_UDPSendContext_new(__pyx_v_self, __pyx_v_data)); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/udp.pyx":212 * * ctx = _UDPSendContext.new(self, data) * try: # <<<<<<<<<<<<<< * if addr is None: * if self._address_set: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/handles/udp.pyx":213 * ctx = _UDPSendContext.new(self, data) * try: * if addr is None: # <<<<<<<<<<<<<< * if self._address_set: * ctx.addr = self._address */ __pyx_t_5 = (__pyx_v_addr == Py_None); __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":214 * try: * if addr is None: * if self._address_set: # <<<<<<<<<<<<<< * ctx.addr = self._address * else: */ __pyx_t_3 = (__pyx_v_self->_address_set != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":215 * if addr is None: * if self._address_set: * ctx.addr = self._address # <<<<<<<<<<<<<< * else: * raise RuntimeError( */ __pyx_t_10 = __pyx_v_self->_address; __pyx_v_ctx->addr = __pyx_t_10; /* "uvloop/handles/udp.pyx":214 * try: * if addr is None: * if self._address_set: # <<<<<<<<<<<<<< * ctx.addr = self._address * else: */ goto __pyx_L20; } /* "uvloop/handles/udp.pyx":217 * ctx.addr = self._address * else: * raise RuntimeError( # <<<<<<<<<<<<<< * 'unable to perform send operation: no address') * else: */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__178, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 217, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(20, 217, __pyx_L11_error) } __pyx_L20:; /* "uvloop/handles/udp.pyx":213 * ctx = _UDPSendContext.new(self, data) * try: * if addr is None: # <<<<<<<<<<<<<< * if self._address_set: * ctx.addr = self._address */ goto __pyx_L19; } /* "uvloop/handles/udp.pyx":220 * 'unable to perform send operation: no address') * else: * __convert_pyaddr_to_sockaddr(self._family, addr, # <<<<<<<<<<<<<< * &ctx.addr) * except: */ /*else*/ { /* "uvloop/handles/udp.pyx":221 * else: * __convert_pyaddr_to_sockaddr(self._family, addr, * &ctx.addr) # <<<<<<<<<<<<<< * except: * ctx.close() */ __pyx_t_6 = __pyx_f_6uvloop_4loop___convert_pyaddr_to_sockaddr(__pyx_v_self->_family, __pyx_v_addr, ((struct sockaddr *)(&__pyx_v_ctx->addr))); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 220, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L19:; /* "uvloop/handles/udp.pyx":212 * * ctx = _UDPSendContext.new(self, data) * try: # <<<<<<<<<<<<<< * if addr is None: * if self._address_set: */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/handles/udp.pyx":222 * __convert_pyaddr_to_sockaddr(self._family, addr, * &ctx.addr) * except: # <<<<<<<<<<<<<< * ctx.close() * raise */ /*except:*/ { __Pyx_AddTraceback("uvloop.loop.UDPTransport._send", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_11) < 0) __PYX_ERR(20, 222, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_11); /* "uvloop/handles/udp.pyx":223 * &ctx.addr) * except: * ctx.close() # <<<<<<<<<<<<<< * raise * */ __pyx_t_12 = ((struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_12)) __PYX_ERR(20, 223, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "uvloop/handles/udp.pyx":224 * except: * ctx.close() * raise # <<<<<<<<<<<<<< * * err = uv.uv_udp_send(&ctx.req, */ __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_4, __pyx_t_11); __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; __PYX_ERR(20, 224, __pyx_L13_except_error) } __pyx_L13_except_error:; /* "uvloop/handles/udp.pyx":212 * * ctx = _UDPSendContext.new(self, data) * try: # <<<<<<<<<<<<<< * if addr is None: * if self._address_set: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L18_try_end:; } /* "uvloop/handles/udp.pyx":226 * raise * * err = uv.uv_udp_send(&ctx.req, # <<<<<<<<<<<<<< * self._handle, * &ctx.uv_buf, */ __pyx_v_err = uv_udp_send((&__pyx_v_ctx->req), ((uv_udp_t *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._handle), (&__pyx_v_ctx->uv_buf), 1, ((struct sockaddr *)(&__pyx_v_ctx->addr)), __pyx_f_6uvloop_4loop___uv_udp_on_send); /* "uvloop/handles/udp.pyx":233 * __uv_udp_on_send) * * if err < 0: # <<<<<<<<<<<<<< * ctx.close() * */ __pyx_t_3 = ((__pyx_v_err < 0) != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":234 * * if err < 0: * ctx.close() # <<<<<<<<<<<<<< * * exc = convert_error(err) */ __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_11)) __PYX_ERR(20, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/handles/udp.pyx":236 * ctx.close() * * exc = convert_error(err) # <<<<<<<<<<<<<< * self._fatal_error(exc, True) * */ __pyx_t_11 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_11)) __PYX_ERR(20, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_v_exc = __pyx_t_11; __pyx_t_11 = 0; /* "uvloop/handles/udp.pyx":237 * * exc = convert_error(err) * self._fatal_error(exc, True) # <<<<<<<<<<<<<< * * cdef _on_receive(self, bytes data, object exc, object addr): */ __pyx_t_11 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_True, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(20, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "uvloop/handles/udp.pyx":233 * __uv_udp_on_send) * * if err < 0: # <<<<<<<<<<<<<< * ctx.close() * */ } /* "uvloop/handles/udp.pyx":193 * return socket_socket(self._family, uv.SOCK_STREAM, 0, fileno) * * cdef _send(self, object data, object addr): # <<<<<<<<<<<<<< * cdef: * _UDPSendContext ctx */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.UDPTransport._send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_addr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":239 * self._fatal_error(exc, True) * * cdef _on_receive(self, bytes data, object exc, object addr): # <<<<<<<<<<<<<< * if exc is None: * self._protocol.datagram_received(data, addr) */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_receive(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_exc, PyObject *__pyx_v_addr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_on_receive", 0); /* "uvloop/handles/udp.pyx":240 * * cdef _on_receive(self, bytes data, object exc, object addr): * if exc is None: # <<<<<<<<<<<<<< * self._protocol.datagram_received(data, addr) * else: */ __pyx_t_1 = (__pyx_v_exc == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":241 * cdef _on_receive(self, bytes data, object exc, object addr): * if exc is None: * self._protocol.datagram_received(data, addr) # <<<<<<<<<<<<<< * else: * self._protocol.error_received(exc) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_datagram_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_addr}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_addr}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_data); __Pyx_INCREF(__pyx_v_addr); __Pyx_GIVEREF(__pyx_v_addr); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_addr); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":240 * * cdef _on_receive(self, bytes data, object exc, object addr): * if exc is None: # <<<<<<<<<<<<<< * self._protocol.datagram_received(data, addr) * else: */ goto __pyx_L3; } /* "uvloop/handles/udp.pyx":243 * self._protocol.datagram_received(data, addr) * else: * self._protocol.error_received(exc) # <<<<<<<<<<<<<< * * cdef _on_sent(self, object exc): */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_error_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_7) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "uvloop/handles/udp.pyx":239 * self._fatal_error(exc, True) * * cdef _on_receive(self, bytes data, object exc, object addr): # <<<<<<<<<<<<<< * if exc is None: * self._protocol.datagram_received(data, addr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.UDPTransport._on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":245 * self._protocol.error_received(exc) * * cdef _on_sent(self, object exc): # <<<<<<<<<<<<<< * if exc is not None: * if isinstance(exc, OSError): */ static PyObject *__pyx_f_6uvloop_4loop_12UDPTransport__on_sent(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error __pyx_t_7; __Pyx_RefNannySetupContext("_on_sent", 0); /* "uvloop/handles/udp.pyx":246 * * cdef _on_sent(self, object exc): * if exc is not None: # <<<<<<<<<<<<<< * if isinstance(exc, OSError): * self._protocol.error_received(exc) */ __pyx_t_1 = (__pyx_v_exc != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":247 * cdef _on_sent(self, object exc): * if exc is not None: * if isinstance(exc, OSError): # <<<<<<<<<<<<<< * self._protocol.error_received(exc) * else: */ __pyx_t_2 = PyObject_IsInstance(__pyx_v_exc, __pyx_builtin_OSError); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(20, 247, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":248 * if exc is not None: * if isinstance(exc, OSError): * self._protocol.error_received(exc) # <<<<<<<<<<<<<< * else: * self._fatal_error( */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._protocol, __pyx_n_s_error_received); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exc}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":247 * cdef _on_sent(self, object exc): * if exc is not None: * if isinstance(exc, OSError): # <<<<<<<<<<<<<< * self._protocol.error_received(exc) * else: */ goto __pyx_L4; } /* "uvloop/handles/udp.pyx":250 * self._protocol.error_received(exc) * else: * self._fatal_error( # <<<<<<<<<<<<<< * exc, False, 'Fatal write error on datagram transport') * */ /*else*/ { /* "uvloop/handles/udp.pyx":251 * else: * self._fatal_error( * exc, False, 'Fatal write error on datagram transport') # <<<<<<<<<<<<<< * * self._maybe_resume_protocol() */ __pyx_t_7.__pyx_n = 1; __pyx_t_7.reason = __pyx_kp_u_Fatal_write_error_on_datagram_tr; __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_self), __pyx_v_exc, Py_False, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "uvloop/handles/udp.pyx":246 * * cdef _on_sent(self, object exc): * if exc is not None: # <<<<<<<<<<<<<< * if isinstance(exc, OSError): * self._protocol.error_received(exc) */ } /* "uvloop/handles/udp.pyx":253 * exc, False, 'Fatal write error on datagram transport') * * self._maybe_resume_protocol() # <<<<<<<<<<<<<< * if not self._get_write_buffer_size(): * if self._closing: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_resume_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":254 * * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * if self._closing: * self._schedule_call_connection_lost(None) */ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_write_buffer_size(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)) != 0)) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":255 * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): * if self._closing: # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(None) * */ __pyx_t_1 = (__pyx_v_self->__pyx_base._closing != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":256 * if not self._get_write_buffer_size(): * if self._closing: * self._schedule_call_connection_lost(None) # <<<<<<<<<<<<<< * * # === Public API === */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._schedule_call_connection_lost(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":255 * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): * if self._closing: # <<<<<<<<<<<<<< * self._schedule_call_connection_lost(None) * */ } /* "uvloop/handles/udp.pyx":254 * * self._maybe_resume_protocol() * if not self._get_write_buffer_size(): # <<<<<<<<<<<<<< * if self._closing: * self._schedule_call_connection_lost(None) */ } /* "uvloop/handles/udp.pyx":245 * self._protocol.error_received(exc) * * cdef _on_sent(self, object exc): # <<<<<<<<<<<<<< * if exc is not None: * if isinstance(exc, OSError): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.UDPTransport._on_sent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":260 * # === Public API === * * def sendto(self, data, addr=None): # <<<<<<<<<<<<<< * if not data: * return */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_12UDPTransport_2sendto[] = "UDPTransport.sendto(self, data, addr=None)"; static PyObject *__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_addr = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sendto (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_addr,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_addr); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sendto") < 0)) __PYX_ERR(20, 260, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_data = values[0]; __pyx_v_addr = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sendto", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(20, 260, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.UDPTransport.sendto", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_v_self), __pyx_v_data, __pyx_v_addr); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_12UDPTransport_2sendto(struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_addr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("sendto", 0); /* "uvloop/handles/udp.pyx":261 * * def sendto(self, data, addr=None): * if not data: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_data); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(20, 261, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":262 * def sendto(self, data, addr=None): * if not data: * return # <<<<<<<<<<<<<< * * if self._conn_lost: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":261 * * def sendto(self, data, addr=None): * if not data: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/handles/udp.pyx":264 * return * * if self._conn_lost: # <<<<<<<<<<<<<< * # TODO add warning * self._conn_lost += 1 */ __pyx_t_2 = (__pyx_v_self->__pyx_base._conn_lost != 0); if (__pyx_t_2) { /* "uvloop/handles/udp.pyx":266 * if self._conn_lost: * # TODO add warning * self._conn_lost += 1 # <<<<<<<<<<<<<< * return * */ __pyx_v_self->__pyx_base._conn_lost = (__pyx_v_self->__pyx_base._conn_lost + 1); /* "uvloop/handles/udp.pyx":267 * # TODO add warning * self._conn_lost += 1 * return # <<<<<<<<<<<<<< * * self._send(data, addr) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/handles/udp.pyx":264 * return * * if self._conn_lost: # <<<<<<<<<<<<<< * # TODO add warning * self._conn_lost += 1 */ } /* "uvloop/handles/udp.pyx":269 * return * * self._send(data, addr) # <<<<<<<<<<<<<< * self._maybe_pause_protocol() * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_send(__pyx_v_self, __pyx_v_data, __pyx_v_addr); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":270 * * self._send(data, addr) * self._maybe_pause_protocol() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._maybe_pause_protocol(((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":260 * # === Public API === * * def sendto(self, data, addr=None): # <<<<<<<<<<<<<< * if not data: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.UDPTransport.sendto", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/handles/udp.pyx":273 * * * cdef void __uv_udp_on_receive(uv.uv_udp_t* handle, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf, */ static void __pyx_f_6uvloop_4loop___uv_udp_on_receive(uv_udp_t *__pyx_v_handle, Py_ssize_t __pyx_v_nread, CYTHON_UNUSED uv_buf_t const *__pyx_v_buf, struct sockaddr const *__pyx_v_addr, CYTHON_UNUSED unsigned int __pyx_v_flags) { struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp = 0; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; PyObject *__pyx_v_data = 0; PyObject *__pyx_v_pyaddr = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; char const *__pyx_t_19; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_udp_on_receive", 0); /* "uvloop/handles/udp.pyx":280 * * if __ensure_handle_data(handle, * "UDPTransport receive callback") == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = ((__pyx_f_6uvloop_4loop___ensure_handle_data(((uv_handle_t *)__pyx_v_handle), ((char const *)"UDPTransport receive callback")) == 0) != 0); /* "uvloop/handles/udp.pyx":279 * unsigned flags) with gil: * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UDPTransport receive callback") == 0: * return */ if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":281 * if __ensure_handle_data(handle, * "UDPTransport receive callback") == 0: * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":279 * unsigned flags) with gil: * * if __ensure_handle_data(handle, # <<<<<<<<<<<<<< * "UDPTransport receive callback") == 0: * return */ } /* "uvloop/handles/udp.pyx":284 * * cdef: * UDPTransport udp = handle.data # <<<<<<<<<<<<<< * Loop loop = udp._loop * bytes data */ __pyx_t_2 = ((PyObject *)__pyx_v_handle->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":285 * cdef: * UDPTransport udp = handle.data * Loop loop = udp._loop # <<<<<<<<<<<<<< * bytes data * object pyaddr */ __pyx_t_2 = ((PyObject *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base._loop); __Pyx_INCREF(__pyx_t_2); __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":291 * # It's OK to free the buffer early, since nothing will * # be able to touch it until this method is done. * __loop_free_buffer(loop) # <<<<<<<<<<<<<< * * if udp._closed: */ __pyx_f_6uvloop_4loop___loop_free_buffer(__pyx_v_loop); /* "uvloop/handles/udp.pyx":293 * __loop_free_buffer(loop) * * if udp._closed: # <<<<<<<<<<<<<< * # The handle was closed, there is no reason to * # do any work now. */ __pyx_t_1 = (__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base._closed != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":296 * # The handle was closed, there is no reason to * # do any work now. * udp.__receiving_stopped() # Just in case. # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped(__pyx_v_udp); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":297 * # do any work now. * udp.__receiving_stopped() # Just in case. * return # <<<<<<<<<<<<<< * * if addr is NULL and nread == 0: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":293 * __loop_free_buffer(loop) * * if udp._closed: # <<<<<<<<<<<<<< * # The handle was closed, there is no reason to * # do any work now. */ } /* "uvloop/handles/udp.pyx":299 * return * * if addr is NULL and nread == 0: # <<<<<<<<<<<<<< * # From libuv docs: * # addr: struct sockaddr* containing the address */ __pyx_t_3 = ((__pyx_v_addr == NULL) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = ((__pyx_v_nread == 0) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":310 * # addr != NULL when an empty UDP packet is * # received. * return # <<<<<<<<<<<<<< * * if addr is NULL: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":299 * return * * if addr is NULL and nread == 0: # <<<<<<<<<<<<<< * # From libuv docs: * # addr: struct sockaddr* containing the address */ } /* "uvloop/handles/udp.pyx":312 * return * * if addr is NULL: # <<<<<<<<<<<<<< * pyaddr = None * else: */ __pyx_t_1 = ((__pyx_v_addr == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":313 * * if addr is NULL: * pyaddr = None # <<<<<<<<<<<<<< * else: * try: */ __Pyx_INCREF(Py_None); __pyx_v_pyaddr = Py_None; /* "uvloop/handles/udp.pyx":312 * return * * if addr is NULL: # <<<<<<<<<<<<<< * pyaddr = None * else: */ goto __pyx_L8; } /* "uvloop/handles/udp.pyx":315 * pyaddr = None * else: * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "uvloop/handles/udp.pyx":316 * else: * try: * pyaddr = __convert_sockaddr_to_pyaddr(addr) # <<<<<<<<<<<<<< * except BaseException as exc: * udp._error(exc, False) */ __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 316, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pyaddr = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":315 * pyaddr = None * else: * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L16_try_end; __pyx_L9_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":317 * try: * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) * return */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_7) { __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(20, 317, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_v_exc = __pyx_t_8; /*try:*/ { /* "uvloop/handles/udp.pyx":318 * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: * udp._error(exc, False) # <<<<<<<<<<<<<< * return * */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(20, 318, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "uvloop/handles/udp.pyx":319 * except BaseException as exc: * udp._error(exc, False) * return # <<<<<<<<<<<<<< * * if nread < 0: */ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L21_return; } /* "uvloop/handles/udp.pyx":317 * try: * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) * return */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L22_error:; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L11_except_error; } __pyx_L21_return: { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L12_except_return; } } } goto __pyx_L11_except_error; __pyx_L11_except_error:; /* "uvloop/handles/udp.pyx":315 * pyaddr = None * else: * try: # <<<<<<<<<<<<<< * pyaddr = __convert_sockaddr_to_pyaddr(addr) * except BaseException as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L12_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L16_try_end:; } } __pyx_L8:; /* "uvloop/handles/udp.pyx":321 * return * * if nread < 0: # <<<<<<<<<<<<<< * exc = convert_error(nread) * udp._on_receive(None, exc, pyaddr) */ __pyx_t_1 = ((__pyx_v_nread < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":322 * * if nread < 0: * exc = convert_error(nread) # <<<<<<<<<<<<<< * udp._on_receive(None, exc, pyaddr) * return */ __pyx_t_9 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_nread); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_v_exc = __pyx_t_9; __pyx_t_9 = 0; /* "uvloop/handles/udp.pyx":323 * if nread < 0: * exc = convert_error(nread) * udp._on_receive(None, exc, pyaddr) # <<<<<<<<<<<<<< * return * */ __pyx_t_9 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_receive(__pyx_v_udp, ((PyObject*)Py_None), __pyx_v_exc, __pyx_v_pyaddr); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "uvloop/handles/udp.pyx":324 * exc = convert_error(nread) * udp._on_receive(None, exc, pyaddr) * return # <<<<<<<<<<<<<< * * if pyaddr is None: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":321 * return * * if nread < 0: # <<<<<<<<<<<<<< * exc = convert_error(nread) * udp._on_receive(None, exc, pyaddr) */ } /* "uvloop/handles/udp.pyx":326 * return * * if pyaddr is None: # <<<<<<<<<<<<<< * udp._fatal_error( * RuntimeError( */ __pyx_t_1 = (__pyx_v_pyaddr == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":328 * if pyaddr is None: * udp._fatal_error( * RuntimeError( # <<<<<<<<<<<<<< * 'uv_udp.receive callback: addr is NULL and nread >= 0'), * False) */ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(20, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "uvloop/handles/udp.pyx":327 * * if pyaddr is None: * udp._fatal_error( # <<<<<<<<<<<<<< * RuntimeError( * 'uv_udp.receive callback: addr is NULL and nread >= 0'), */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._fatal_error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_t_9, Py_False, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/udp.pyx":331 * 'uv_udp.receive callback: addr is NULL and nread >= 0'), * False) * return # <<<<<<<<<<<<<< * * if nread == 0: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":326 * return * * if pyaddr is None: # <<<<<<<<<<<<<< * udp._fatal_error( * RuntimeError( */ } /* "uvloop/handles/udp.pyx":333 * return * * if nread == 0: # <<<<<<<<<<<<<< * data = b'' * else: */ __pyx_t_3 = ((__pyx_v_nread == 0) != 0); if (__pyx_t_3) { /* "uvloop/handles/udp.pyx":334 * * if nread == 0: * data = b'' # <<<<<<<<<<<<<< * else: * data = loop._recv_buffer[:nread] */ __Pyx_INCREF(__pyx_kp_b__30); __pyx_v_data = __pyx_kp_b__30; /* "uvloop/handles/udp.pyx":333 * return * * if nread == 0: # <<<<<<<<<<<<<< * data = b'' * else: */ goto __pyx_L30; } /* "uvloop/handles/udp.pyx":336 * data = b'' * else: * data = loop._recv_buffer[:nread] # <<<<<<<<<<<<<< * * try: */ /*else*/ { __pyx_t_8 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_loop->_recv_buffer) + 0, __pyx_v_nread - 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_data = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; } __pyx_L30:; /* "uvloop/handles/udp.pyx":338 * data = loop._recv_buffer[:nread] * * try: # <<<<<<<<<<<<<< * udp._on_receive(data, None, pyaddr) * except BaseException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "uvloop/handles/udp.pyx":339 * * try: * udp._on_receive(data, None, pyaddr) # <<<<<<<<<<<<<< * except BaseException as exc: * udp._error(exc, False) */ __pyx_t_8 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_receive(__pyx_v_udp, __pyx_v_data, Py_None, __pyx_v_pyaddr); if (unlikely(!__pyx_t_8)) __PYX_ERR(20, 339, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/udp.pyx":338 * data = loop._recv_buffer[:nread] * * try: # <<<<<<<<<<<<<< * udp._on_receive(data, None, pyaddr) * except BaseException as exc: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L38_try_end; __pyx_L31_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "uvloop/handles/udp.pyx":340 * try: * udp._on_receive(data, None, pyaddr) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) * */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_11) { __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_2) < 0) __PYX_ERR(20, 340, __pyx_L33_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __pyx_v_exc = __pyx_t_9; /*try:*/ { /* "uvloop/handles/udp.pyx":341 * udp._on_receive(data, None, pyaddr) * except BaseException as exc: * udp._error(exc, False) # <<<<<<<<<<<<<< * * */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_10)) __PYX_ERR(20, 341, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/handles/udp.pyx":340 * try: * udp._on_receive(data, None, pyaddr) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) * */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L45; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L44_error:; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_11 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_19 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16); __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_19; goto __pyx_L33_except_error; } __pyx_L45:; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L32_exception_handled; } goto __pyx_L33_except_error; __pyx_L33_except_error:; /* "uvloop/handles/udp.pyx":338 * data = loop._recv_buffer[:nread] * * try: # <<<<<<<<<<<<<< * udp._on_receive(data, None, pyaddr) * except BaseException as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L32_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L38_try_end:; } /* "uvloop/handles/udp.pyx":273 * * * cdef void __uv_udp_on_receive(uv.uv_udp_t* handle, # <<<<<<<<<<<<<< * ssize_t nread, * const uv.uv_buf_t* buf, */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_WriteUnraisable("uvloop.loop.__uv_udp_on_receive", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_udp); __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_XDECREF(__pyx_v_data); __Pyx_XDECREF(__pyx_v_pyaddr); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/handles/udp.pyx":344 * * * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: # <<<<<<<<<<<<<< * * if req.data is NULL: */ static void __pyx_f_6uvloop_4loop___uv_udp_on_send(uv_udp_send_t *__pyx_v_req, int __pyx_v_status) { struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_v_ctx = 0; struct __pyx_obj_6uvloop_4loop_UDPTransport *__pyx_v_udp = 0; PyObject *__pyx_v_exc = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__uv_udp_on_send", 0); /* "uvloop/handles/udp.pyx":346 * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: * * if req.data is NULL: # <<<<<<<<<<<<<< * # Shouldn't happen as: * # - _UDPSendContext does an extra INCREF in its 'init()' */ __pyx_t_1 = ((__pyx_v_req->data == NULL) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":350 * # - _UDPSendContext does an extra INCREF in its 'init()' * # - _UDPSendContext holds a ref to the relevant UDPTransport * aio_logger.error( # <<<<<<<<<<<<<< * 'UVStream.write callback called with NULL req.data, status=%r', * status) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_6uvloop_4loop_aio_logger, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/handles/udp.pyx":352 * aio_logger.error( * 'UVStream.write callback called with NULL req.data, status=%r', * status) # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_UVStream_write_callback_called_w, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(20, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_UVStream_write_callback_called_w); __Pyx_GIVEREF(__pyx_kp_u_UVStream_write_callback_called_w); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_UVStream_write_callback_called_w); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":353 * 'UVStream.write callback called with NULL req.data, status=%r', * status) * return # <<<<<<<<<<<<<< * * cdef: */ goto __pyx_L0; /* "uvloop/handles/udp.pyx":346 * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: * * if req.data is NULL: # <<<<<<<<<<<<<< * # Shouldn't happen as: * # - _UDPSendContext does an extra INCREF in its 'init()' */ } /* "uvloop/handles/udp.pyx":356 * * cdef: * _UDPSendContext ctx = <_UDPSendContext> req.data # <<<<<<<<<<<<<< * UDPTransport udp = ctx.udp * */ __pyx_t_2 = ((PyObject *)__pyx_v_req->data); __Pyx_INCREF(__pyx_t_2); __pyx_v_ctx = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":357 * cdef: * _UDPSendContext ctx = <_UDPSendContext> req.data * UDPTransport udp = ctx.udp # <<<<<<<<<<<<<< * * ctx.close() */ __pyx_t_2 = ((PyObject *)__pyx_v_ctx->udp); __Pyx_INCREF(__pyx_t_2); __pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":359 * UDPTransport udp = ctx.udp * * ctx.close() # <<<<<<<<<<<<<< * * if status < 0: */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext *)__pyx_v_ctx->__pyx_vtab)->close(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":361 * ctx.close() * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * print(exc) */ __pyx_t_1 = ((__pyx_v_status < 0) != 0); if (__pyx_t_1) { /* "uvloop/handles/udp.pyx":362 * * if status < 0: * exc = convert_error(status) # <<<<<<<<<<<<<< * print(exc) * else: */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/handles/udp.pyx":363 * if status < 0: * exc = convert_error(status) * print(exc) # <<<<<<<<<<<<<< * else: * exc = None */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_exc); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":361 * ctx.close() * * if status < 0: # <<<<<<<<<<<<<< * exc = convert_error(status) * print(exc) */ goto __pyx_L4; } /* "uvloop/handles/udp.pyx":365 * print(exc) * else: * exc = None # <<<<<<<<<<<<<< * * try: */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_exc = Py_None; } __pyx_L4:; /* "uvloop/handles/udp.pyx":367 * exc = None * * try: # <<<<<<<<<<<<<< * udp._on_sent(exc) * except BaseException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "uvloop/handles/udp.pyx":368 * * try: * udp._on_sent(exc) # <<<<<<<<<<<<<< * except BaseException as exc: * udp._error(exc, False) */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_on_sent(__pyx_v_udp, __pyx_v_exc); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 368, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":367 * exc = None * * try: # <<<<<<<<<<<<<< * udp._on_sent(exc) * except BaseException as exc: */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/handles/udp.pyx":369 * try: * udp._on_sent(exc) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_6) { __Pyx_AddTraceback("uvloop.loop.__uv_udp_on_send", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(20, 369, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); /*try:*/ { /* "uvloop/handles/udp.pyx":370 * udp._on_sent(exc) * except BaseException as exc: * udp._error(exc, False) # <<<<<<<<<<<<<< */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport *)__pyx_v_udp->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._error(((struct __pyx_obj_6uvloop_4loop_UVHandle *)__pyx_v_udp), __pyx_v_exc, Py_False); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 370, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "uvloop/handles/udp.pyx":369 * try: * udp._on_sent(exc) * except BaseException as exc: # <<<<<<<<<<<<<< * udp._error(exc, False) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L19; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L18_error:; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_6 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L7_except_error; } __pyx_L19:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/handles/udp.pyx":367 * exc = None * * try: # <<<<<<<<<<<<<< * udp._on_sent(exc) * except BaseException as exc: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L12_try_end:; } /* "uvloop/handles/udp.pyx":344 * * * cdef void __uv_udp_on_send(uv.uv_udp_send_t* req, int status) with gil: # <<<<<<<<<<<<<< * * if req.data is NULL: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_WriteUnraisable("uvloop.loop.__uv_udp_on_send", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ctx); __Pyx_XDECREF((PyObject *)__pyx_v_udp); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/server.pyx":2 * cdef class Server: * def __cinit__(self, Loop loop): # <<<<<<<<<<<<<< * self._loop = loop * self._servers = [] */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_6Server_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(21, 2, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 2, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(21, 2, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_6Server___cinit__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self), __pyx_v_loop); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_6Server___cinit__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "uvloop/server.pyx":3 * cdef class Server: * def __cinit__(self, Loop loop): * self._loop = loop # <<<<<<<<<<<<<< * self._servers = [] * self._waiters = [] */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->_loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop)); __pyx_v_self->_loop = __pyx_v_loop; /* "uvloop/server.pyx":4 * def __cinit__(self, Loop loop): * self._loop = loop * self._servers = [] # <<<<<<<<<<<<<< * self._waiters = [] * self._active_count = 0 */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_servers); __Pyx_DECREF(__pyx_v_self->_servers); __pyx_v_self->_servers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":5 * self._loop = loop * self._servers = [] * self._waiters = [] # <<<<<<<<<<<<<< * self._active_count = 0 * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_waiters); __Pyx_DECREF(__pyx_v_self->_waiters); __pyx_v_self->_waiters = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":6 * self._servers = [] * self._waiters = [] * self._active_count = 0 # <<<<<<<<<<<<<< * * cdef _add_server(self, UVStreamServer srv): */ __pyx_v_self->_active_count = 0; /* "uvloop/server.pyx":2 * cdef class Server: * def __cinit__(self, Loop loop): # <<<<<<<<<<<<<< * self._loop = loop * self._servers = [] */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":8 * self._active_count = 0 * * cdef _add_server(self, UVStreamServer srv): # <<<<<<<<<<<<<< * self._servers.append(srv) * */ static PyObject *__pyx_f_6uvloop_4loop_6Server__add_server(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_UVStreamServer *__pyx_v_srv) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_add_server", 0); /* "uvloop/server.pyx":9 * * cdef _add_server(self, UVStreamServer srv): * self._servers.append(srv) # <<<<<<<<<<<<<< * * cdef _wakeup(self): */ if (unlikely(__pyx_v_self->_servers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(21, 9, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyList_Append(__pyx_v_self->_servers, ((PyObject *)__pyx_v_srv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(21, 9, __pyx_L1_error) /* "uvloop/server.pyx":8 * self._active_count = 0 * * cdef _add_server(self, UVStreamServer srv): # <<<<<<<<<<<<<< * self._servers.append(srv) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Server._add_server", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":11 * self._servers.append(srv) * * cdef _wakeup(self): # <<<<<<<<<<<<<< * cdef list waiters * */ static PyObject *__pyx_f_6uvloop_4loop_6Server__wakeup(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_v_waiters = 0; PyObject *__pyx_v_waiter = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_wakeup", 0); /* "uvloop/server.pyx":14 * cdef list waiters * * waiters = self._waiters # <<<<<<<<<<<<<< * self._waiters = None * for waiter in waiters: */ __pyx_t_1 = __pyx_v_self->_waiters; __Pyx_INCREF(__pyx_t_1); __pyx_v_waiters = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":15 * * waiters = self._waiters * self._waiters = None # <<<<<<<<<<<<<< * for waiter in waiters: * if not waiter.done(): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_waiters); __Pyx_DECREF(__pyx_v_self->_waiters); __pyx_v_self->_waiters = ((PyObject*)Py_None); /* "uvloop/server.pyx":16 * waiters = self._waiters * self._waiters = None * for waiter in waiters: # <<<<<<<<<<<<<< * if not waiter.done(): * waiter.set_result(waiter) */ if (unlikely(__pyx_v_waiters == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(21, 16, __pyx_L1_error) } __pyx_t_1 = __pyx_v_waiters; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(21, 16, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_waiter, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":17 * self._waiters = None * for waiter in waiters: * if not waiter.done(): # <<<<<<<<<<<<<< * waiter.set_result(waiter) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_done); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 17, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(21, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = ((!__pyx_t_6) != 0); if (__pyx_t_7) { /* "uvloop/server.pyx":18 * for waiter in waiters: * if not waiter.done(): * waiter.set_result(waiter) # <<<<<<<<<<<<<< * * cdef _attach(self): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_waiter); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_waiter}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_waiter}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_waiter); __Pyx_GIVEREF(__pyx_v_waiter); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_waiter); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":17 * self._waiters = None * for waiter in waiters: * if not waiter.done(): # <<<<<<<<<<<<<< * waiter.set_result(waiter) * */ } /* "uvloop/server.pyx":16 * waiters = self._waiters * self._waiters = None * for waiter in waiters: # <<<<<<<<<<<<<< * if not waiter.done(): * waiter.set_result(waiter) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":11 * self._servers.append(srv) * * cdef _wakeup(self): # <<<<<<<<<<<<<< * cdef list waiters * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.Server._wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_waiters); __Pyx_XDECREF(__pyx_v_waiter); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":20 * waiter.set_result(waiter) * * cdef _attach(self): # <<<<<<<<<<<<<< * assert self._servers is not None * self._active_count += 1 */ static PyObject *__pyx_f_6uvloop_4loop_6Server__attach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("_attach", 0); /* "uvloop/server.pyx":21 * * cdef _attach(self): * assert self._servers is not None # <<<<<<<<<<<<<< * self._active_count += 1 * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (__pyx_v_self->_servers != ((PyObject*)Py_None)); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(21, 21, __pyx_L1_error) } } #endif /* "uvloop/server.pyx":22 * cdef _attach(self): * assert self._servers is not None * self._active_count += 1 # <<<<<<<<<<<<<< * * cdef _detach(self): */ __pyx_v_self->_active_count = (__pyx_v_self->_active_count + 1); /* "uvloop/server.pyx":20 * waiter.set_result(waiter) * * cdef _attach(self): # <<<<<<<<<<<<<< * assert self._servers is not None * self._active_count += 1 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Server._attach", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":24 * self._active_count += 1 * * cdef _detach(self): # <<<<<<<<<<<<<< * assert self._active_count > 0 * self._active_count -= 1 */ static PyObject *__pyx_f_6uvloop_4loop_6Server__detach(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_detach", 0); /* "uvloop/server.pyx":25 * * cdef _detach(self): * assert self._active_count > 0 # <<<<<<<<<<<<<< * self._active_count -= 1 * if self._active_count == 0 and self._servers is None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_self->_active_count > 0) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(21, 25, __pyx_L1_error) } } #endif /* "uvloop/server.pyx":26 * cdef _detach(self): * assert self._active_count > 0 * self._active_count -= 1 # <<<<<<<<<<<<<< * if self._active_count == 0 and self._servers is None: * self._wakeup() */ __pyx_v_self->_active_count = (__pyx_v_self->_active_count - 1); /* "uvloop/server.pyx":27 * assert self._active_count > 0 * self._active_count -= 1 * if self._active_count == 0 and self._servers is None: # <<<<<<<<<<<<<< * self._wakeup() * */ __pyx_t_2 = ((__pyx_v_self->_active_count == 0) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (__pyx_v_self->_servers == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/server.pyx":28 * self._active_count -= 1 * if self._active_count == 0 and self._servers is None: * self._wakeup() # <<<<<<<<<<<<<< * * # Public API */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_wakeup(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/server.pyx":27 * assert self._active_count > 0 * self._active_count -= 1 * if self._active_count == 0 and self._servers is None: # <<<<<<<<<<<<<< * self._wakeup() * */ } /* "uvloop/server.pyx":24 * self._active_count += 1 * * cdef _detach(self): # <<<<<<<<<<<<<< * assert self._active_count > 0 * self._active_count -= 1 */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.Server._detach", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":32 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Server_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_6Server_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Server_2__repr__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Server_2__repr__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "uvloop/server.pyx":33 * * def __repr__(self): * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) # <<<<<<<<<<<<<< * * async def wait_closed(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sockets); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_s_sockets_r, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/server.pyx":32 * # Public API * * def __repr__(self): # <<<<<<<<<<<<<< * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Server.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_6Server_6generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/server.pyx":35 * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) * * async def wait_closed(self): # <<<<<<<<<<<<<< * if self._servers is None or self._waiters is None: * return */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Server_5wait_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_6Server_4wait_closed[] = "Server.wait_closed(self)"; static PyObject *__pyx_pw_6uvloop_4loop_6Server_5wait_closed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("wait_closed (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Server_4wait_closed(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Server_4wait_closed(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("wait_closed", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20_wait_closed(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_20_wait_closed, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(21, 35, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6Server_6generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_wait_closed, __pyx_n_s_Server_wait_closed, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(21, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.Server.wait_closed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_6Server_6generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(21, 35, __pyx_L1_error) /* "uvloop/server.pyx":36 * * async def wait_closed(self): * if self._servers is None or self._waiters is None: # <<<<<<<<<<<<<< * return * waiter = self._loop._new_future() */ __pyx_t_2 = (__pyx_cur_scope->__pyx_v_self->_servers == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (__pyx_cur_scope->__pyx_v_self->_waiters == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/server.pyx":37 * async def wait_closed(self): * if self._servers is None or self._waiters is None: * return # <<<<<<<<<<<<<< * waiter = self._loop._new_future() * self._waiters.append(waiter) */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; goto __pyx_L0; /* "uvloop/server.pyx":36 * * async def wait_closed(self): * if self._servers is None or self._waiters is None: # <<<<<<<<<<<<<< * return * waiter = self._loop._new_future() */ } /* "uvloop/server.pyx":38 * if self._servers is None or self._waiters is None: * return * waiter = self._loop._new_future() # <<<<<<<<<<<<<< * self._waiters.append(waiter) * await waiter */ __pyx_t_4 = __pyx_f_6uvloop_4loop_4Loop__new_future(__pyx_cur_scope->__pyx_v_self->_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_cur_scope->__pyx_v_waiter = __pyx_t_4; __pyx_t_4 = 0; /* "uvloop/server.pyx":39 * return * waiter = self._loop._new_future() * self._waiters.append(waiter) # <<<<<<<<<<<<<< * await waiter * */ if (unlikely(__pyx_cur_scope->__pyx_v_self->_waiters == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(21, 39, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_self->_waiters, __pyx_cur_scope->__pyx_v_waiter); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(21, 39, __pyx_L1_error) /* "uvloop/server.pyx":40 * waiter = self._loop._new_future() * self._waiters.append(waiter) * await waiter # <<<<<<<<<<<<<< * * def close(self): */ __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_waiter); __Pyx_XGOTREF(__pyx_r); if (likely(__pyx_r)) { __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(21, 40, __pyx_L1_error) } else { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(21, 40, __pyx_L1_error) } } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/server.pyx":35 * return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) * * async def wait_closed(self): # <<<<<<<<<<<<<< * if self._servers is None or self._waiters is None: * return */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("wait_closed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":42 * await waiter * * def close(self): # <<<<<<<<<<<<<< * if self._servers is None: * return */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Server_8close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_6Server_7close[] = "Server.close(self)"; static PyObject *__pyx_pw_6uvloop_4loop_6Server_8close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Server_7close(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Server_7close(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_v_servers = 0; PyObject *__pyx_v_server = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("close", 0); /* "uvloop/server.pyx":43 * * def close(self): * if self._servers is None: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = (__pyx_v_self->_servers == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/server.pyx":44 * def close(self): * if self._servers is None: * return # <<<<<<<<<<<<<< * * cdef list servers = self._servers */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/server.pyx":43 * * def close(self): * if self._servers is None: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/server.pyx":46 * return * * cdef list servers = self._servers # <<<<<<<<<<<<<< * self._servers = None * */ __pyx_t_3 = __pyx_v_self->_servers; __Pyx_INCREF(__pyx_t_3); __pyx_v_servers = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":47 * * cdef list servers = self._servers * self._servers = None # <<<<<<<<<<<<<< * * for server in servers: */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_servers); __Pyx_DECREF(__pyx_v_self->_servers); __pyx_v_self->_servers = ((PyObject*)Py_None); /* "uvloop/server.pyx":49 * self._servers = None * * for server in servers: # <<<<<<<<<<<<<< * (server)._close() * */ if (unlikely(__pyx_v_servers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(21, 49, __pyx_L1_error) } __pyx_t_3 = __pyx_v_servers; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(21, 49, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_server, __pyx_t_5); __pyx_t_5 = 0; /* "uvloop/server.pyx":50 * * for server in servers: * (server)._close() # <<<<<<<<<<<<<< * * if self._active_count == 0: */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._close(((struct __pyx_obj_6uvloop_4loop_UVHandle *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server))); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/server.pyx":49 * self._servers = None * * for server in servers: # <<<<<<<<<<<<<< * (server)._close() * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":52 * (server)._close() * * if self._active_count == 0: # <<<<<<<<<<<<<< * self._wakeup() * */ __pyx_t_2 = ((__pyx_v_self->_active_count == 0) != 0); if (__pyx_t_2) { /* "uvloop/server.pyx":53 * * if self._active_count == 0: * self._wakeup() # <<<<<<<<<<<<<< * * property sockets: */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_Server *)__pyx_v_self->__pyx_vtab)->_wakeup(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":52 * (server)._close() * * if self._active_count == 0: # <<<<<<<<<<<<<< * self._wakeup() * */ } /* "uvloop/server.pyx":42 * await waiter * * def close(self): # <<<<<<<<<<<<<< * if self._servers is None: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.Server.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_servers); __Pyx_XDECREF(__pyx_v_server); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/server.pyx":56 * * property sockets: * def __get__(self): # <<<<<<<<<<<<<< * cdef list sockets = [] * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_6Server_7sockets___get__(((struct __pyx_obj_6uvloop_4loop_Server *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_6Server_7sockets___get__(struct __pyx_obj_6uvloop_4loop_Server *__pyx_v_self) { PyObject *__pyx_v_sockets = 0; PyObject *__pyx_v_server = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); /* "uvloop/server.pyx":57 * property sockets: * def __get__(self): * cdef list sockets = [] # <<<<<<<<<<<<<< * * for server in self._servers: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sockets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":59 * cdef list sockets = [] * * for server in self._servers: # <<<<<<<<<<<<<< * sockets.append( * (server)._get_socket() */ if (unlikely(__pyx_v_self->_servers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(21, 59, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_servers; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(21, 59, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_server, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":61 * for server in self._servers: * sockets.append( * (server)._get_socket() # <<<<<<<<<<<<<< * ) * */ __pyx_t_3 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base._get_socket(((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)__pyx_v_server))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/server.pyx":60 * * for server in self._servers: * sockets.append( # <<<<<<<<<<<<<< * (server)._get_socket() * ) */ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_sockets, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(21, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/server.pyx":59 * cdef list sockets = [] * * for server in self._servers: # <<<<<<<<<<<<<< * sockets.append( * (server)._get_socket() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/server.pyx":64 * ) * * return sockets # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_sockets); __pyx_r = __pyx_v_sockets; goto __pyx_L0; /* "uvloop/server.pyx":56 * * property sockets: * def __get__(self): # <<<<<<<<<<<<<< * cdef list sockets = [] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.Server.sockets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sockets); __Pyx_XDECREF(__pyx_v_server); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":8 * * * cdef inline _future_get_blocking(fut): # <<<<<<<<<<<<<< * try: * return fut._asyncio_future_blocking */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop__future_get_blocking(PyObject *__pyx_v_fut) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_future_get_blocking", 0); /* "uvloop/future.pyx":9 * * cdef inline _future_get_blocking(fut): * try: # <<<<<<<<<<<<<< * return fut._asyncio_future_blocking * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/future.pyx":10 * cdef inline _future_get_blocking(fut): * try: * return fut._asyncio_future_blocking # <<<<<<<<<<<<<< * except AttributeError: * return fut._blocking */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 10, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; /* "uvloop/future.pyx":9 * * cdef inline _future_get_blocking(fut): * try: # <<<<<<<<<<<<<< * return fut._asyncio_future_blocking * except AttributeError: */ } __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/future.pyx":11 * try: * return fut._asyncio_future_blocking * except AttributeError: # <<<<<<<<<<<<<< * return fut._blocking * */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop._future_get_blocking", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(6, 11, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/future.pyx":12 * return fut._asyncio_future_blocking * except AttributeError: * return fut._blocking # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_blocking); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 12, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/future.pyx":9 * * cdef inline _future_get_blocking(fut): * try: # <<<<<<<<<<<<<< * return fut._asyncio_future_blocking * except AttributeError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "uvloop/future.pyx":8 * * * cdef inline _future_get_blocking(fut): # <<<<<<<<<<<<<< * try: * return fut._asyncio_future_blocking */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop._future_get_blocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":15 * * * cdef inline _future_set_blocking(fut, val): # <<<<<<<<<<<<<< * try: * fut._asyncio_future_blocking */ static CYTHON_INLINE PyObject *__pyx_f_6uvloop_4loop__future_set_blocking(PyObject *__pyx_v_fut, PyObject *__pyx_v_val) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_future_set_blocking", 0); /* "uvloop/future.pyx":16 * * cdef inline _future_set_blocking(fut, val): * try: # <<<<<<<<<<<<<< * fut._asyncio_future_blocking * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/future.pyx":17 * cdef inline _future_set_blocking(fut, val): * try: * fut._asyncio_future_blocking # <<<<<<<<<<<<<< * except AttributeError: * fut._blocking = val */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fut, __pyx_n_s_asyncio_future_blocking); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 17, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/future.pyx":16 * * cdef inline _future_set_blocking(fut, val): * try: # <<<<<<<<<<<<<< * fut._asyncio_future_blocking * except AttributeError: */ } /* "uvloop/future.pyx":21 * fut._blocking = val * else: * fut._asyncio_future_blocking = val # <<<<<<<<<<<<<< * * */ /*else:*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_fut, __pyx_n_s_asyncio_future_blocking, __pyx_v_val) < 0) __PYX_ERR(6, 21, __pyx_L5_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/future.pyx":18 * try: * fut._asyncio_future_blocking * except AttributeError: # <<<<<<<<<<<<<< * fut._blocking = val * else: */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop._future_set_blocking", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(6, 18, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "uvloop/future.pyx":19 * fut._asyncio_future_blocking * except AttributeError: * fut._blocking = val # <<<<<<<<<<<<<< * else: * fut._asyncio_future_blocking = val */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_fut, __pyx_n_s_blocking, __pyx_v_val) < 0) __PYX_ERR(6, 19, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/future.pyx":16 * * cdef inline _future_set_blocking(fut, val): * try: # <<<<<<<<<<<<<< * fut._asyncio_future_blocking * except AttributeError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/future.pyx":15 * * * cdef inline _future_set_blocking(fut, val): # <<<<<<<<<<<<<< * try: * fut._asyncio_future_blocking */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop._future_set_blocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":36 * readonly bint _log_traceback * * def __init__(self, Loop loop): # <<<<<<<<<<<<<< * if loop is None: * loop = aio_get_event_loop() */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_10BaseFuture_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_10BaseFuture_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(6, 36, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 36, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.BaseFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(6, 36, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture___init__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), __pyx_v_loop); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_10BaseFuture___init__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF((PyObject *)__pyx_v_loop); /* "uvloop/future.pyx":37 * * def __init__(self, Loop loop): * if loop is None: # <<<<<<<<<<<<<< * loop = aio_get_event_loop() * if not isinstance(loop, Loop): */ __pyx_t_1 = (((PyObject *)__pyx_v_loop) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "uvloop/future.pyx":38 * def __init__(self, Loop loop): * if loop is None: * loop = aio_get_event_loop() # <<<<<<<<<<<<<< * if not isinstance(loop, Loop): * raise TypeError('uvloop.Future supports only uvloop.Loop') */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_get_event_loop); __pyx_t_4 = __pyx_v_6uvloop_4loop_aio_get_event_loop; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 38, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6uvloop_4loop_Loop))))) __PYX_ERR(6, 38, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_loop, ((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_3)); __pyx_t_3 = 0; /* "uvloop/future.pyx":39 * if loop is None: * loop = aio_get_event_loop() * if not isinstance(loop, Loop): # <<<<<<<<<<<<<< * raise TypeError('uvloop.Future supports only uvloop.Loop') * */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop); __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":40 * loop = aio_get_event_loop() * if not isinstance(loop, Loop): * raise TypeError('uvloop.Future supports only uvloop.Loop') # <<<<<<<<<<<<<< * * self._state = _FUT_PENDING */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(6, 40, __pyx_L1_error) /* "uvloop/future.pyx":39 * if loop is None: * loop = aio_get_event_loop() * if not isinstance(loop, Loop): # <<<<<<<<<<<<<< * raise TypeError('uvloop.Future supports only uvloop.Loop') * */ } /* "uvloop/future.pyx":37 * * def __init__(self, Loop loop): * if loop is None: # <<<<<<<<<<<<<< * loop = aio_get_event_loop() * if not isinstance(loop, Loop): */ } /* "uvloop/future.pyx":42 * raise TypeError('uvloop.Future supports only uvloop.Loop') * * self._state = _FUT_PENDING # <<<<<<<<<<<<<< * self._loop = loop * self._callbacks = [] */ __pyx_v_self->_state = 1; /* "uvloop/future.pyx":43 * * self._state = _FUT_PENDING * self._loop = loop # <<<<<<<<<<<<<< * self._callbacks = [] * self._result = None */ __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); __Pyx_GOTREF(__pyx_v_self->_loop); __Pyx_DECREF(((PyObject *)__pyx_v_self->_loop)); __pyx_v_self->_loop = __pyx_v_loop; /* "uvloop/future.pyx":44 * self._state = _FUT_PENDING * self._loop = loop * self._callbacks = [] # <<<<<<<<<<<<<< * self._result = None * self._exception = None */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_callbacks); __Pyx_DECREF(__pyx_v_self->_callbacks); __pyx_v_self->_callbacks = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/future.pyx":45 * self._loop = loop * self._callbacks = [] * self._result = None # <<<<<<<<<<<<<< * self._exception = None * self._blocking = False */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_result); __Pyx_DECREF(__pyx_v_self->_result); __pyx_v_self->_result = Py_None; /* "uvloop/future.pyx":46 * self._callbacks = [] * self._result = None * self._exception = None # <<<<<<<<<<<<<< * self._blocking = False * self._log_traceback = False */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_exception); __Pyx_DECREF(__pyx_v_self->_exception); __pyx_v_self->_exception = Py_None; /* "uvloop/future.pyx":47 * self._result = None * self._exception = None * self._blocking = False # <<<<<<<<<<<<<< * self._log_traceback = False * */ __pyx_v_self->_blocking = 0; /* "uvloop/future.pyx":48 * self._exception = None * self._blocking = False * self._log_traceback = False # <<<<<<<<<<<<<< * * if loop._debug: */ __pyx_v_self->_log_traceback = 0; /* "uvloop/future.pyx":50 * self._log_traceback = False * * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * else: */ __pyx_t_1 = (__pyx_v_loop->_debug != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":51 * * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * else: * self._source_traceback = None */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_6uvloop_4loop_tb_extract_stack); __pyx_t_5 = __pyx_v_6uvloop_4loop_tb_extract_stack; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/future.pyx":50 * self._log_traceback = False * * if loop._debug: # <<<<<<<<<<<<<< * self._source_traceback = tb_extract_stack(sys_getframe(0)) * else: */ goto __pyx_L5; } /* "uvloop/future.pyx":53 * self._source_traceback = tb_extract_stack(sys_getframe(0)) * else: * self._source_traceback = None # <<<<<<<<<<<<<< * * property _asyncio_future_blocking: */ /*else*/ { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_source_traceback); __Pyx_DECREF(__pyx_v_self->_source_traceback); __pyx_v_self->_source_traceback = Py_None; } __pyx_L5:; /* "uvloop/future.pyx":36 * readonly bint _log_traceback * * def __init__(self, Loop loop): # <<<<<<<<<<<<<< * if loop is None: * loop = aio_get_event_loop() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop.BaseFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_loop); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":56 * * property _asyncio_future_blocking: * def __get__(self): # <<<<<<<<<<<<<< * return self._blocking * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "uvloop/future.pyx":57 * property _asyncio_future_blocking: * def __get__(self): * return self._blocking # <<<<<<<<<<<<<< * * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_blocking); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":56 * * property _asyncio_future_blocking: * def __get__(self): # <<<<<<<<<<<<<< * return self._blocking * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._asyncio_future_blocking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":59 * return self._blocking * * def __set__(self, value): # <<<<<<<<<<<<<< * self._blocking = value * */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_2__set__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_2__set__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); /* "uvloop/future.pyx":60 * * def __set__(self, value): * self._blocking = value # <<<<<<<<<<<<<< * * cdef _schedule_callbacks(self): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 60, __pyx_L1_error) __pyx_v_self->_blocking = __pyx_t_1; /* "uvloop/future.pyx":59 * return self._blocking * * def __set__(self, value): # <<<<<<<<<<<<<< * self._blocking = value * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.BaseFuture._asyncio_future_blocking.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":62 * self._blocking = value * * cdef _schedule_callbacks(self): # <<<<<<<<<<<<<< * cdef: * list callbacks */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__schedule_callbacks(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_v_callbacks = 0; size_t __pyx_v_cb_len; size_t __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_t_3; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_schedule_callbacks", 0); /* "uvloop/future.pyx":65 * cdef: * list callbacks * size_t cb_len = len(self._callbacks) # <<<<<<<<<<<<<< * size_t i * */ __pyx_t_1 = __pyx_v_self->_callbacks; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(6, 65, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(6, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cb_len = __pyx_t_2; /* "uvloop/future.pyx":68 * size_t i * * if cb_len == 0: # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = ((__pyx_v_cb_len == 0) != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":69 * * if cb_len == 0: * return # <<<<<<<<<<<<<< * * callbacks = self._callbacks */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/future.pyx":68 * size_t i * * if cb_len == 0: # <<<<<<<<<<<<<< * return * */ } /* "uvloop/future.pyx":71 * return * * callbacks = self._callbacks # <<<<<<<<<<<<<< * self._callbacks = [] * */ __pyx_t_1 = __pyx_v_self->_callbacks; __Pyx_INCREF(__pyx_t_1); __pyx_v_callbacks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":72 * * callbacks = self._callbacks * self._callbacks = [] # <<<<<<<<<<<<<< * * for i from 0 <= i < cb_len: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_callbacks); __Pyx_DECREF(__pyx_v_self->_callbacks); __pyx_v_self->_callbacks = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":74 * self._callbacks = [] * * for i from 0 <= i < cb_len: # <<<<<<<<<<<<<< * self._loop.call_soon(callbacks[i], self) * */ __pyx_t_4 = __pyx_v_cb_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "uvloop/future.pyx":75 * * for i from 0 <= i < cb_len: * self._loop.call_soon(callbacks[i], self) # <<<<<<<<<<<<<< * * cdef _add_done_callback(self, fn): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_callbacks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(6, 75, __pyx_L1_error) } __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_callbacks, __pyx_v_i, size_t, 0, __Pyx_PyInt_FromSize_t, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)__pyx_v_self)); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/future.pyx":62 * self._blocking = value * * cdef _schedule_callbacks(self): # <<<<<<<<<<<<<< * cdef: * list callbacks */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("uvloop.loop.BaseFuture._schedule_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_callbacks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":77 * self._loop.call_soon(callbacks[i], self) * * cdef _add_done_callback(self, fn): # <<<<<<<<<<<<<< * if self._state != _FUT_PENDING: * self._loop.call_soon(fn, self) */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__add_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("_add_done_callback", 0); /* "uvloop/future.pyx":78 * * cdef _add_done_callback(self, fn): * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * self._loop.call_soon(fn, self) * else: */ __pyx_t_1 = ((__pyx_v_self->_state != 1) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":79 * cdef _add_done_callback(self, fn): * if self._state != _FUT_PENDING: * self._loop.call_soon(fn, self) # <<<<<<<<<<<<<< * else: * self._callbacks.append(fn) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_loop), __pyx_n_s_call_soon); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_fn, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_fn, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_fn); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_self)); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":78 * * cdef _add_done_callback(self, fn): * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * self._loop.call_soon(fn, self) * else: */ goto __pyx_L3; } /* "uvloop/future.pyx":81 * self._loop.call_soon(fn, self) * else: * self._callbacks.append(fn) # <<<<<<<<<<<<<< * * cdef _done(self): */ /*else*/ { if (unlikely(__pyx_v_self->_callbacks == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); __PYX_ERR(6, 81, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->_callbacks, __pyx_v_fn); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(6, 81, __pyx_L1_error) } __pyx_L3:; /* "uvloop/future.pyx":77 * self._loop.call_soon(callbacks[i], self) * * cdef _add_done_callback(self, fn): # <<<<<<<<<<<<<< * if self._state != _FUT_PENDING: * self._loop.call_soon(fn, self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop.BaseFuture._add_done_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":83 * self._callbacks.append(fn) * * cdef _done(self): # <<<<<<<<<<<<<< * return self._state != _FUT_PENDING * */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__done(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_done", 0); /* "uvloop/future.pyx":84 * * cdef _done(self): * return self._state != _FUT_PENDING # <<<<<<<<<<<<<< * * cdef _cancel(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_state != 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":83 * self._callbacks.append(fn) * * cdef _done(self): # <<<<<<<<<<<<<< * return self._state != _FUT_PENDING * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._done", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":86 * return self._state != _FUT_PENDING * * cdef _cancel(self): # <<<<<<<<<<<<<< * if self._done(): * return False */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__cancel(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_cancel", 0); /* "uvloop/future.pyx":87 * * cdef _cancel(self): * if self._done(): # <<<<<<<<<<<<<< * return False * self._state = _FUT_CANCELLED */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_done(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(6, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/future.pyx":88 * cdef _cancel(self): * if self._done(): * return False # <<<<<<<<<<<<<< * self._state = _FUT_CANCELLED * self._schedule_callbacks() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/future.pyx":87 * * cdef _cancel(self): * if self._done(): # <<<<<<<<<<<<<< * return False * self._state = _FUT_CANCELLED */ } /* "uvloop/future.pyx":89 * if self._done(): * return False * self._state = _FUT_CANCELLED # <<<<<<<<<<<<<< * self._schedule_callbacks() * return True */ __pyx_v_self->_state = 2; /* "uvloop/future.pyx":90 * return False * self._state = _FUT_CANCELLED * self._schedule_callbacks() # <<<<<<<<<<<<<< * return True * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_schedule_callbacks(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":91 * self._state = _FUT_CANCELLED * self._schedule_callbacks() * return True # <<<<<<<<<<<<<< * * # _result would shadow the "_result" property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/future.pyx":86 * return self._state != _FUT_PENDING * * cdef _cancel(self): # <<<<<<<<<<<<<< * if self._done(): * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":94 * * # _result would shadow the "_result" property * cdef _result_impl(self): # <<<<<<<<<<<<<< * if self._state == _FUT_CANCELLED: * raise aio_CancelledError */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__result_impl(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("_result_impl", 0); /* "uvloop/future.pyx":95 * # _result would shadow the "_result" property * cdef _result_impl(self): * if self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * raise aio_CancelledError * if self._state != _FUT_FINISHED: */ __pyx_t_1 = ((__pyx_v_self->_state == 2) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":96 * cdef _result_impl(self): * if self._state == _FUT_CANCELLED: * raise aio_CancelledError # <<<<<<<<<<<<<< * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Result is not ready.') */ __Pyx_Raise(__pyx_v_6uvloop_4loop_aio_CancelledError, 0, 0, 0); __PYX_ERR(6, 96, __pyx_L1_error) /* "uvloop/future.pyx":95 * # _result would shadow the "_result" property * cdef _result_impl(self): * if self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * raise aio_CancelledError * if self._state != _FUT_FINISHED: */ } /* "uvloop/future.pyx":97 * if self._state == _FUT_CANCELLED: * raise aio_CancelledError * if self._state != _FUT_FINISHED: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('Result is not ready.') * self._log_traceback = False */ __pyx_t_1 = ((__pyx_v_self->_state != 3) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":98 * raise aio_CancelledError * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Result is not ready.') # <<<<<<<<<<<<<< * self._log_traceback = False * if self._exception is not None: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_InvalidStateError, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(6, 98, __pyx_L1_error) /* "uvloop/future.pyx":97 * if self._state == _FUT_CANCELLED: * raise aio_CancelledError * if self._state != _FUT_FINISHED: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('Result is not ready.') * self._log_traceback = False */ } /* "uvloop/future.pyx":99 * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Result is not ready.') * self._log_traceback = False # <<<<<<<<<<<<<< * if self._exception is not None: * raise self._exception */ __pyx_v_self->_log_traceback = 0; /* "uvloop/future.pyx":100 * raise aio_InvalidStateError('Result is not ready.') * self._log_traceback = False * if self._exception is not None: # <<<<<<<<<<<<<< * raise self._exception * return self._result */ __pyx_t_1 = (__pyx_v_self->_exception != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":101 * self._log_traceback = False * if self._exception is not None: * raise self._exception # <<<<<<<<<<<<<< * return self._result * */ __Pyx_Raise(__pyx_v_self->_exception, 0, 0, 0); __PYX_ERR(6, 101, __pyx_L1_error) /* "uvloop/future.pyx":100 * raise aio_InvalidStateError('Result is not ready.') * self._log_traceback = False * if self._exception is not None: # <<<<<<<<<<<<<< * raise self._exception * return self._result */ } /* "uvloop/future.pyx":102 * if self._exception is not None: * raise self._exception * return self._result # <<<<<<<<<<<<<< * * cdef _str_state(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_result); __pyx_r = __pyx_v_self->_result; goto __pyx_L0; /* "uvloop/future.pyx":94 * * # _result would shadow the "_result" property * cdef _result_impl(self): # <<<<<<<<<<<<<< * if self._state == _FUT_CANCELLED: * raise aio_CancelledError */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.BaseFuture._result_impl", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":104 * return self._result * * cdef _str_state(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * return 'PENDING' */ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture__str_state(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_str_state", 0); /* "uvloop/future.pyx":105 * * cdef _str_state(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * return 'PENDING' * elif self._state == _FUT_CANCELLED: */ switch (__pyx_v_self->_state) { case 1: /* "uvloop/future.pyx":106 * cdef _str_state(self): * if self._state == _FUT_PENDING: * return 'PENDING' # <<<<<<<<<<<<<< * elif self._state == _FUT_CANCELLED: * return 'CANCELLED' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_PENDING); __pyx_r = __pyx_n_u_PENDING; goto __pyx_L0; /* "uvloop/future.pyx":105 * * cdef _str_state(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * return 'PENDING' * elif self._state == _FUT_CANCELLED: */ break; /* "uvloop/future.pyx":107 * if self._state == _FUT_PENDING: * return 'PENDING' * elif self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * return 'CANCELLED' * elif self._state == _FUT_FINISHED: */ case 2: /* "uvloop/future.pyx":108 * return 'PENDING' * elif self._state == _FUT_CANCELLED: * return 'CANCELLED' # <<<<<<<<<<<<<< * elif self._state == _FUT_FINISHED: * return 'FINISHED' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_CANCELLED); __pyx_r = __pyx_n_u_CANCELLED; goto __pyx_L0; /* "uvloop/future.pyx":107 * if self._state == _FUT_PENDING: * return 'PENDING' * elif self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * return 'CANCELLED' * elif self._state == _FUT_FINISHED: */ break; /* "uvloop/future.pyx":109 * elif self._state == _FUT_CANCELLED: * return 'CANCELLED' * elif self._state == _FUT_FINISHED: # <<<<<<<<<<<<<< * return 'FINISHED' * else: */ case 3: /* "uvloop/future.pyx":110 * return 'CANCELLED' * elif self._state == _FUT_FINISHED: * return 'FINISHED' # <<<<<<<<<<<<<< * else: * raise RuntimeError('unknown Future state') */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_u_FINISHED); __pyx_r = __pyx_n_u_FINISHED; goto __pyx_L0; /* "uvloop/future.pyx":109 * elif self._state == _FUT_CANCELLED: * return 'CANCELLED' * elif self._state == _FUT_FINISHED: # <<<<<<<<<<<<<< * return 'FINISHED' * else: */ break; default: /* "uvloop/future.pyx":112 * return 'FINISHED' * else: * raise RuntimeError('unknown Future state') # <<<<<<<<<<<<<< * * property _state: */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(6, 112, __pyx_L1_error) break; } /* "uvloop/future.pyx":104 * return self._result * * cdef _str_state(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * return 'PENDING' */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._str_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":115 * * property _state: * def __get__(self): # <<<<<<<<<<<<<< * return self._str_state() * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_6_state_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_6_state_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_6_state___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_6_state___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "uvloop/future.pyx":116 * property _state: * def __get__(self): * return self._str_state() # <<<<<<<<<<<<<< * * def cancel(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_str_state(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":115 * * property _state: * def __get__(self): # <<<<<<<<<<<<<< * return self._str_state() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":118 * return self._str_state() * * def cancel(self): # <<<<<<<<<<<<<< * """Cancel the future and schedule callbacks. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_3cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_2cancel[] = "BaseFuture.cancel(self)\nCancel the future and schedule callbacks.\n\n If the future is already done or cancelled, return False. Otherwise,\n change the future's state to cancelled, schedule the callbacks and\n return True.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_3cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_2cancel(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_2cancel(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("cancel", 0); /* "uvloop/future.pyx":125 * return True. * """ * return self._cancel() # <<<<<<<<<<<<<< * * def cancelled(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_cancel(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":118 * return self._str_state() * * def cancel(self): # <<<<<<<<<<<<<< * """Cancel the future and schedule callbacks. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":127 * return self._cancel() * * def cancelled(self): # <<<<<<<<<<<<<< * """Return True if the future was cancelled.""" * return self._state == _FUT_CANCELLED */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_5cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_4cancelled[] = "BaseFuture.cancelled(self)\nReturn True if the future was cancelled."; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_5cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancelled (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_4cancelled(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_4cancelled(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("cancelled", 0); /* "uvloop/future.pyx":129 * def cancelled(self): * """Return True if the future was cancelled.""" * return self._state == _FUT_CANCELLED # <<<<<<<<<<<<<< * * def done(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_state == 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":127 * return self._cancel() * * def cancelled(self): # <<<<<<<<<<<<<< * """Return True if the future was cancelled.""" * return self._state == _FUT_CANCELLED */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":131 * return self._state == _FUT_CANCELLED * * def done(self): # <<<<<<<<<<<<<< * """Return True if the future is done. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_7done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_6done[] = "BaseFuture.done(self)\nReturn True if the future is done.\n\n Done means either that a result / exception are available, or that the\n future was cancelled.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_7done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("done (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_6done(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_6done(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("done", 0); /* "uvloop/future.pyx":137 * future was cancelled. * """ * return self._state != _FUT_PENDING # <<<<<<<<<<<<<< * * def result(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_state != 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":131 * return self._state == _FUT_CANCELLED * * def done(self): # <<<<<<<<<<<<<< * """Return True if the future is done. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.done", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":139 * return self._state != _FUT_PENDING * * def result(self): # <<<<<<<<<<<<<< * """Return the result this future represents. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_9result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_8result[] = "BaseFuture.result(self)\nReturn the result this future represents.\n\n If the future has been cancelled, raises CancelledError. If the\n future's result isn't yet available, raises InvalidStateError. If\n the future is done and has an exception set, this exception is raised.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_9result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("result (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_8result(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_8result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("result", 0); /* "uvloop/future.pyx":146 * the future is done and has an exception set, this exception is raised. * """ * return self._result_impl() # <<<<<<<<<<<<<< * * def exception(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_result_impl(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":139 * return self._state != _FUT_PENDING * * def result(self): # <<<<<<<<<<<<<< * """Return the result this future represents. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":148 * return self._result_impl() * * def exception(self): # <<<<<<<<<<<<<< * """Return the exception that was set on this future. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_11exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_10exception[] = "BaseFuture.exception(self)\nReturn the exception that was set on this future.\n\n The exception (or None if no exception was set) is returned only if\n the future is done. If the future has been cancelled, raises\n CancelledError. If the future isn't done yet, raises\n InvalidStateError.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_11exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exception (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_10exception(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("exception", 0); /* "uvloop/future.pyx":156 * InvalidStateError. * """ * if self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * raise aio_CancelledError * if self._state != _FUT_FINISHED: */ __pyx_t_1 = ((__pyx_v_self->_state == 2) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":157 * """ * if self._state == _FUT_CANCELLED: * raise aio_CancelledError # <<<<<<<<<<<<<< * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Exception is not set.') */ __Pyx_Raise(__pyx_v_6uvloop_4loop_aio_CancelledError, 0, 0, 0); __PYX_ERR(6, 157, __pyx_L1_error) /* "uvloop/future.pyx":156 * InvalidStateError. * """ * if self._state == _FUT_CANCELLED: # <<<<<<<<<<<<<< * raise aio_CancelledError * if self._state != _FUT_FINISHED: */ } /* "uvloop/future.pyx":158 * if self._state == _FUT_CANCELLED: * raise aio_CancelledError * if self._state != _FUT_FINISHED: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('Exception is not set.') * self._log_traceback = False */ __pyx_t_1 = ((__pyx_v_self->_state != 3) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":159 * raise aio_CancelledError * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Exception is not set.') # <<<<<<<<<<<<<< * self._log_traceback = False * return self._exception */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_InvalidStateError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(6, 159, __pyx_L1_error) /* "uvloop/future.pyx":158 * if self._state == _FUT_CANCELLED: * raise aio_CancelledError * if self._state != _FUT_FINISHED: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('Exception is not set.') * self._log_traceback = False */ } /* "uvloop/future.pyx":160 * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Exception is not set.') * self._log_traceback = False # <<<<<<<<<<<<<< * return self._exception * */ __pyx_v_self->_log_traceback = 0; /* "uvloop/future.pyx":161 * raise aio_InvalidStateError('Exception is not set.') * self._log_traceback = False * return self._exception # <<<<<<<<<<<<<< * * def add_done_callback(self, fn): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_exception); __pyx_r = __pyx_v_self->_exception; goto __pyx_L0; /* "uvloop/future.pyx":148 * return self._result_impl() * * def exception(self): # <<<<<<<<<<<<<< * """Return the exception that was set on this future. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.BaseFuture.exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":163 * return self._exception * * def add_done_callback(self, fn): # <<<<<<<<<<<<<< * """Add a callback to be run when the future becomes done. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_13add_done_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_fn); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_12add_done_callback[] = "BaseFuture.add_done_callback(self, fn)\nAdd a callback to be run when the future becomes done.\n\n The callback is called with a single argument - the future object. If\n the future is already done when this is called, the callback is\n scheduled with call_soon.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_13add_done_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_fn) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_done_callback (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_12add_done_callback(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_fn)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_12add_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_done_callback", 0); /* "uvloop/future.pyx":170 * scheduled with call_soon. * """ * self._add_done_callback(fn) # <<<<<<<<<<<<<< * * def remove_done_callback(self, fn): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_add_done_callback(__pyx_v_self, __pyx_v_fn); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":163 * return self._exception * * def add_done_callback(self, fn): # <<<<<<<<<<<<<< * """Add a callback to be run when the future becomes done. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.add_done_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":172 * self._add_done_callback(fn) * * def remove_done_callback(self, fn): # <<<<<<<<<<<<<< * """Remove all instances of a callback from the "call when done" list. * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_15remove_done_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_fn); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_14remove_done_callback[] = "BaseFuture.remove_done_callback(self, fn)\nRemove all instances of a callback from the \"call when done\" list.\n\n Returns the number of callbacks removed.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_15remove_done_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_fn) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_done_callback (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_14remove_done_callback(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_fn)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_14remove_done_callback(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_fn) { size_t __pyx_v_clen; size_t __pyx_v_i; size_t __pyx_v_ni; PyObject *__pyx_v_cb = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; size_t __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("remove_done_callback", 0); /* "uvloop/future.pyx":178 * """ * cdef: * size_t clen = len(self._callbacks) # <<<<<<<<<<<<<< * size_t i * size_t ni = 0 */ __pyx_t_1 = __pyx_v_self->_callbacks; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(6, 178, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(6, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_clen = __pyx_t_2; /* "uvloop/future.pyx":180 * size_t clen = len(self._callbacks) * size_t i * size_t ni = 0 # <<<<<<<<<<<<<< * object cb * */ __pyx_v_ni = 0; /* "uvloop/future.pyx":183 * object cb * * for i from 0 <= i < clen: # <<<<<<<<<<<<<< * cb = self._callbacks[i] * if cb != fn: */ __pyx_t_3 = __pyx_v_clen; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "uvloop/future.pyx":184 * * for i from 0 <= i < clen: * cb = self._callbacks[i] # <<<<<<<<<<<<<< * if cb != fn: * self._callbacks[ni] = cb */ if (unlikely(__pyx_v_self->_callbacks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(6, 184, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_callbacks, __pyx_v_i, size_t, 0, __Pyx_PyInt_FromSize_t, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_cb, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":185 * for i from 0 <= i < clen: * cb = self._callbacks[i] * if cb != fn: # <<<<<<<<<<<<<< * self._callbacks[ni] = cb * ni += 1 */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_cb, __pyx_v_fn, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 185, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/future.pyx":186 * cb = self._callbacks[i] * if cb != fn: * self._callbacks[ni] = cb # <<<<<<<<<<<<<< * ni += 1 * */ if (unlikely(__pyx_v_self->_callbacks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(6, 186, __pyx_L1_error) } if (unlikely(__Pyx_SetItemInt(__pyx_v_self->_callbacks, __pyx_v_ni, __pyx_v_cb, size_t, 0, __Pyx_PyInt_FromSize_t, 1, 0, 1) < 0)) __PYX_ERR(6, 186, __pyx_L1_error) /* "uvloop/future.pyx":187 * if cb != fn: * self._callbacks[ni] = cb * ni += 1 # <<<<<<<<<<<<<< * * if ni != clen: */ __pyx_v_ni = (__pyx_v_ni + 1); /* "uvloop/future.pyx":185 * for i from 0 <= i < clen: * cb = self._callbacks[i] * if cb != fn: # <<<<<<<<<<<<<< * self._callbacks[ni] = cb * ni += 1 */ } } /* "uvloop/future.pyx":189 * ni += 1 * * if ni != clen: # <<<<<<<<<<<<<< * del self._callbacks[ni:] * */ __pyx_t_4 = ((__pyx_v_ni != __pyx_v_clen) != 0); if (__pyx_t_4) { /* "uvloop/future.pyx":190 * * if ni != clen: * del self._callbacks[ni:] # <<<<<<<<<<<<<< * * return clen - ni */ if (unlikely(__pyx_v_self->_callbacks == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(6, 190, __pyx_L1_error) } if (__Pyx_PyObject_DelSlice(__pyx_v_self->_callbacks, __pyx_v_ni, 0, NULL, NULL, NULL, 1, 0, 1) < 0) __PYX_ERR(6, 190, __pyx_L1_error) /* "uvloop/future.pyx":189 * ni += 1 * * if ni != clen: # <<<<<<<<<<<<<< * del self._callbacks[ni:] * */ } /* "uvloop/future.pyx":192 * del self._callbacks[ni:] * * return clen - ni # <<<<<<<<<<<<<< * * cpdef set_result(self, result): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_clen - __pyx_v_ni)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":172 * self._add_done_callback(fn) * * def remove_done_callback(self, fn): # <<<<<<<<<<<<<< * """Remove all instances of a callback from the "call when done" list. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.remove_done_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":194 * return clen - ni * * cpdef set_result(self, result): # <<<<<<<<<<<<<< * """Mark the future done and set its result. * */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_17set_result(PyObject *__pyx_v_self, PyObject *__pyx_v_result); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture_set_result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_result, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("set_result", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_17set_result)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_result}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_result}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_result); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/future.pyx":200 * InvalidStateError. * """ * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) */ __pyx_t_6 = ((__pyx_v_self->_state != 1) != 0); if (__pyx_t_6) { /* "uvloop/future.pyx":201 * """ * if self._state != _FUT_PENDING: * raise aio_InvalidStateError('{}: {!r}'.format( # <<<<<<<<<<<<<< * self._str_state(), self)) * self._result = result */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/future.pyx":202 * if self._state != _FUT_PENDING: * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) # <<<<<<<<<<<<<< * self._result = result * self._state = _FUT_FINISHED */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_str_state(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_self)); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_InvalidStateError); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_InvalidStateError; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(6, 201, __pyx_L1_error) /* "uvloop/future.pyx":200 * InvalidStateError. * """ * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) */ } /* "uvloop/future.pyx":203 * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) * self._result = result # <<<<<<<<<<<<<< * self._state = _FUT_FINISHED * self._schedule_callbacks() */ __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_GOTREF(__pyx_v_self->_result); __Pyx_DECREF(__pyx_v_self->_result); __pyx_v_self->_result = __pyx_v_result; /* "uvloop/future.pyx":204 * self._str_state(), self)) * self._result = result * self._state = _FUT_FINISHED # <<<<<<<<<<<<<< * self._schedule_callbacks() * */ __pyx_v_self->_state = 3; /* "uvloop/future.pyx":205 * self._result = result * self._state = _FUT_FINISHED * self._schedule_callbacks() # <<<<<<<<<<<<<< * * cpdef set_exception(self, exception): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_schedule_callbacks(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":194 * return clen - ni * * cpdef set_result(self, result): # <<<<<<<<<<<<<< * """Mark the future done and set its result. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.BaseFuture.set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_17set_result(PyObject *__pyx_v_self, PyObject *__pyx_v_result); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_16set_result[] = "BaseFuture.set_result(self, result)\nMark the future done and set its result.\n\n If the future is already done when this method is called, raises\n InvalidStateError.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_17set_result(PyObject *__pyx_v_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_result (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_16set_result(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_result)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_16set_result(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_result", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop_10BaseFuture_set_result(__pyx_v_self, __pyx_v_result, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":207 * self._schedule_callbacks() * * cpdef set_exception(self, exception): # <<<<<<<<<<<<<< * """Mark the future done and set an exception. * */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_19set_exception(PyObject *__pyx_v_self, PyObject *__pyx_v_exception); /*proto*/ static PyObject *__pyx_f_6uvloop_4loop_10BaseFuture_set_exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_exception, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; __Pyx_RefNannySetupContext("set_exception", 0); __Pyx_INCREF(__pyx_v_exception); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_19set_exception)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_exception}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_exception}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_exception); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "uvloop/future.pyx":213 * InvalidStateError. * """ * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) */ __pyx_t_6 = ((__pyx_v_self->_state != 1) != 0); if (__pyx_t_6) { /* "uvloop/future.pyx":214 * """ * if self._state != _FUT_PENDING: * raise aio_InvalidStateError('{}: {!r}'.format( # <<<<<<<<<<<<<< * self._str_state(), self)) * if isinstance(exception, type): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_r, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "uvloop/future.pyx":215 * if self._state != _FUT_PENDING: * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) # <<<<<<<<<<<<<< * if isinstance(exception, type): * exception = exception() */ __pyx_t_5 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_str_state(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_self)); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_InvalidStateError); __pyx_t_3 = __pyx_v_6uvloop_4loop_aio_InvalidStateError; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_8) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(6, 214, __pyx_L1_error) /* "uvloop/future.pyx":213 * InvalidStateError. * """ * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) */ } /* "uvloop/future.pyx":216 * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) * if isinstance(exception, type): # <<<<<<<<<<<<<< * exception = exception() * if type(exception) is StopIteration: */ __pyx_t_6 = PyType_Check(__pyx_v_exception); __pyx_t_9 = (__pyx_t_6 != 0); if (__pyx_t_9) { /* "uvloop/future.pyx":217 * self._str_state(), self)) * if isinstance(exception, type): * exception = exception() # <<<<<<<<<<<<<< * if type(exception) is StopIteration: * raise TypeError("StopIteration interacts badly with generators " */ __Pyx_INCREF(__pyx_v_exception); __pyx_t_3 = __pyx_v_exception; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 217, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_exception, __pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":216 * raise aio_InvalidStateError('{}: {!r}'.format( * self._str_state(), self)) * if isinstance(exception, type): # <<<<<<<<<<<<<< * exception = exception() * if type(exception) is StopIteration: */ } /* "uvloop/future.pyx":218 * if isinstance(exception, type): * exception = exception() * if type(exception) is StopIteration: # <<<<<<<<<<<<<< * raise TypeError("StopIteration interacts badly with generators " * "and cannot be raised into a Future") */ __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_v_exception)) == __pyx_builtin_StopIteration); __pyx_t_6 = (__pyx_t_9 != 0); if (__pyx_t_6) { /* "uvloop/future.pyx":219 * exception = exception() * if type(exception) is StopIteration: * raise TypeError("StopIteration interacts badly with generators " # <<<<<<<<<<<<<< * "and cannot be raised into a Future") * self._exception = exception */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(6, 219, __pyx_L1_error) /* "uvloop/future.pyx":218 * if isinstance(exception, type): * exception = exception() * if type(exception) is StopIteration: # <<<<<<<<<<<<<< * raise TypeError("StopIteration interacts badly with generators " * "and cannot be raised into a Future") */ } /* "uvloop/future.pyx":221 * raise TypeError("StopIteration interacts badly with generators " * "and cannot be raised into a Future") * self._exception = exception # <<<<<<<<<<<<<< * self._state = _FUT_FINISHED * self._schedule_callbacks() */ __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); __Pyx_GOTREF(__pyx_v_self->_exception); __Pyx_DECREF(__pyx_v_self->_exception); __pyx_v_self->_exception = __pyx_v_exception; /* "uvloop/future.pyx":222 * "and cannot be raised into a Future") * self._exception = exception * self._state = _FUT_FINISHED # <<<<<<<<<<<<<< * self._schedule_callbacks() * self._log_traceback = True */ __pyx_v_self->_state = 3; /* "uvloop/future.pyx":223 * self._exception = exception * self._state = _FUT_FINISHED * self._schedule_callbacks() # <<<<<<<<<<<<<< * self._log_traceback = True * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_self->__pyx_vtab)->_schedule_callbacks(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":224 * self._state = _FUT_FINISHED * self._schedule_callbacks() * self._log_traceback = True # <<<<<<<<<<<<<< * * # Copy of __await__ */ __pyx_v_self->_log_traceback = 1; /* "uvloop/future.pyx":207 * self._schedule_callbacks() * * cpdef set_exception(self, exception): # <<<<<<<<<<<<<< * """Mark the future done and set an exception. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop.BaseFuture.set_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exception); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_19set_exception(PyObject *__pyx_v_self, PyObject *__pyx_v_exception); /*proto*/ static char __pyx_doc_6uvloop_4loop_10BaseFuture_18set_exception[] = "BaseFuture.set_exception(self, exception)\nMark the future done and set an exception.\n\n If the future is already done when this method is called, raises\n InvalidStateError.\n "; static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_19set_exception(PyObject *__pyx_v_self, PyObject *__pyx_v_exception) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_exception (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_18set_exception(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_exception)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_18set_exception(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_exception) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_exception", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6uvloop_4loop_10BaseFuture_set_exception(__pyx_v_self, __pyx_v_exception, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture.set_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_10BaseFuture_22generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/future.pyx":227 * * # Copy of __await__ * def __iter__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_21__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_21__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_20__iter__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_20__iter__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21___iter__(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(6, 227, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_10BaseFuture_22generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_BaseFuture___iter, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(6, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.BaseFuture.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_10BaseFuture_22generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(6, 227, __pyx_L1_error) /* "uvloop/future.pyx":228 * # Copy of __await__ * def __iter__(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * self._blocking = True * yield self # This tells Task to wait for completion. */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->_state == 1) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":229 * def __iter__(self): * if self._state == _FUT_PENDING: * self._blocking = True # <<<<<<<<<<<<<< * yield self # This tells Task to wait for completion. * */ __pyx_cur_scope->__pyx_v_self->_blocking = 1; /* "uvloop/future.pyx":230 * if self._state == _FUT_PENDING: * self._blocking = True * yield self # This tells Task to wait for completion. # <<<<<<<<<<<<<< * * if self._state == _FUT_PENDING: */ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(6, 230, __pyx_L1_error) /* "uvloop/future.pyx":228 * # Copy of __await__ * def __iter__(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * self._blocking = True * yield self # This tells Task to wait for completion. */ } /* "uvloop/future.pyx":232 * yield self # This tells Task to wait for completion. * * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError("yield from wasn't used with future") * */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->_state == 1) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":233 * * if self._state == _FUT_PENDING: * raise AssertionError("yield from wasn't used with future") # <<<<<<<<<<<<<< * * return self._result_impl() # May raise too. */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(6, 233, __pyx_L1_error) /* "uvloop/future.pyx":232 * yield self # This tells Task to wait for completion. * * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError("yield from wasn't used with future") * */ } /* "uvloop/future.pyx":235 * raise AssertionError("yield from wasn't used with future") * * return self._result_impl() # May raise too. # <<<<<<<<<<<<<< * * # Copy of __iter__ */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_result_impl(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/future.pyx":227 * * # Copy of __await__ * def __iter__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_10BaseFuture_25generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/future.pyx":238 * * # Copy of __iter__ * def __await__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_24__await__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_24__await__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__await__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_23__await__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_23__await__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__await__", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22___await__(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_22___await__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(6, 238, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_10BaseFuture_25generator15, (PyObject *) __pyx_cur_scope, __pyx_n_s_await, __pyx_n_s_BaseFuture___await, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(6, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.BaseFuture.__await__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_10BaseFuture_25generator15(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *__pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L5_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(6, 238, __pyx_L1_error) /* "uvloop/future.pyx":239 * # Copy of __iter__ * def __await__(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * self._blocking = True * yield self # This tells Task to wait for completion. */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->_state == 1) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":240 * def __await__(self): * if self._state == _FUT_PENDING: * self._blocking = True # <<<<<<<<<<<<<< * yield self # This tells Task to wait for completion. * */ __pyx_cur_scope->__pyx_v_self->_blocking = 1; /* "uvloop/future.pyx":241 * if self._state == _FUT_PENDING: * self._blocking = True * yield self # This tells Task to wait for completion. # <<<<<<<<<<<<<< * * if self._state == _FUT_PENDING: */ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L5_resume_from_yield:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(6, 241, __pyx_L1_error) /* "uvloop/future.pyx":239 * # Copy of __iter__ * def __await__(self): * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * self._blocking = True * yield self # This tells Task to wait for completion. */ } /* "uvloop/future.pyx":243 * yield self # This tells Task to wait for completion. * * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError("yield from wasn't used with future") * */ __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->_state == 1) != 0); if (__pyx_t_1) { /* "uvloop/future.pyx":244 * * if self._state == _FUT_PENDING: * raise AssertionError("yield from wasn't used with future") # <<<<<<<<<<<<<< * * return self._result_impl() # May raise too. */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(6, 244, __pyx_L1_error) /* "uvloop/future.pyx":243 * yield self # This tells Task to wait for completion. * * if self._state == _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError("yield from wasn't used with future") * */ } /* "uvloop/future.pyx":246 * raise AssertionError("yield from wasn't used with future") * * return self._result_impl() # May raise too. # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_result_impl(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = 0; goto __pyx_L0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "uvloop/future.pyx":238 * * # Copy of __iter__ * def __await__(self): # <<<<<<<<<<<<<< * if self._state == _FUT_PENDING: * self._blocking = True */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("__await__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":28 * int _state * * readonly Loop _loop # <<<<<<<<<<<<<< * readonly list _callbacks * readonly object _exception */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_5_loop_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_5_loop_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_5_loop___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_5_loop___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_loop)); __pyx_r = ((PyObject *)__pyx_v_self->_loop); goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":29 * * readonly Loop _loop * readonly list _callbacks # <<<<<<<<<<<<<< * readonly object _exception * readonly object _result */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_10_callbacks_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_10_callbacks_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_10_callbacks___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10_callbacks___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_callbacks); __pyx_r = __pyx_v_self->_callbacks; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":30 * readonly Loop _loop * readonly list _callbacks * readonly object _exception # <<<<<<<<<<<<<< * readonly object _result * public bint _blocking */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_10_exception_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_10_exception_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_10_exception___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_10_exception___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_exception); __pyx_r = __pyx_v_self->_exception; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":31 * readonly list _callbacks * readonly object _exception * readonly object _result # <<<<<<<<<<<<<< * public bint _blocking * readonly object _source_traceback */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_7_result_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_7_result_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_7_result___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_7_result___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_result); __pyx_r = __pyx_v_self->_result; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":32 * readonly object _exception * readonly object _result * public bint _blocking # <<<<<<<<<<<<<< * readonly object _source_traceback * readonly bint _log_traceback */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_blocking); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._blocking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking_2__set__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_10BaseFuture_9_blocking_2__set__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 32, __pyx_L1_error) __pyx_v_self->_blocking = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.BaseFuture._blocking.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":33 * readonly object _result * public bint _blocking * readonly object _source_traceback # <<<<<<<<<<<<<< * readonly bint _log_traceback * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_17_source_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_17_source_traceback_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_17_source_traceback___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_17_source_traceback___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_source_traceback); __pyx_r = __pyx_v_self->_source_traceback; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":34 * public bint _blocking * readonly object _source_traceback * readonly bint _log_traceback # <<<<<<<<<<<<<< * * def __init__(self, Loop loop): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_14_log_traceback_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_10BaseFuture_14_log_traceback_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_10BaseFuture_14_log_traceback___get__(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_10BaseFuture_14_log_traceback___get__(struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_log_traceback); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseFuture._log_traceback.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":256 * public bint _log_destroy_pending * * def __init__(self, coro not None, Loop loop): # <<<<<<<<<<<<<< * BaseFuture.__init__(self, loop) * */ /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8BaseTask_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6uvloop_4loop_8BaseTask_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_coro = 0; struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coro,&__pyx_n_s_loop,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coro)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(6, 256, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(6, 256, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_coro = values[0]; __pyx_v_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 256, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.BaseTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_coro) == Py_None)) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "coro"); __PYX_ERR(6, 256, __pyx_L1_error) } if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6uvloop_4loop_Loop, 1, "loop", 0))) __PYX_ERR(6, 256, __pyx_L1_error) __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask___init__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self), __pyx_v_coro, __pyx_v_loop); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8BaseTask___init__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_coro, struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "uvloop/future.pyx":257 * * def __init__(self, coro not None, Loop loop): * BaseFuture.__init__(self, loop) # <<<<<<<<<<<<<< * * self._coro = coro */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6uvloop_4loop_BaseFuture), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 257, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_loop)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 257, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(((PyObject *)__pyx_v_loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_loop)); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)__pyx_v_loop)); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":259 * BaseFuture.__init__(self, loop) * * self._coro = coro # <<<<<<<<<<<<<< * self._fut_waiter = None * self._must_cancel = False */ __Pyx_INCREF(__pyx_v_coro); __Pyx_GIVEREF(__pyx_v_coro); __Pyx_GOTREF(__pyx_v_self->_coro); __Pyx_DECREF(__pyx_v_self->_coro); __pyx_v_self->_coro = __pyx_v_coro; /* "uvloop/future.pyx":260 * * self._coro = coro * self._fut_waiter = None # <<<<<<<<<<<<<< * self._must_cancel = False * self._log_destroy_pending = True */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fut_waiter); __Pyx_DECREF(__pyx_v_self->_fut_waiter); __pyx_v_self->_fut_waiter = Py_None; /* "uvloop/future.pyx":261 * self._coro = coro * self._fut_waiter = None * self._must_cancel = False # <<<<<<<<<<<<<< * self._log_destroy_pending = True * */ __pyx_v_self->_must_cancel = 0; /* "uvloop/future.pyx":262 * self._fut_waiter = None * self._must_cancel = False * self._log_destroy_pending = True # <<<<<<<<<<<<<< * * self.__class__._all_tasks.add(self) */ __pyx_v_self->_log_destroy_pending = 1; /* "uvloop/future.pyx":264 * self._log_destroy_pending = True * * self.__class__._all_tasks.add(self) # <<<<<<<<<<<<<< * * self._loop._call_soon_handle( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all_tasks); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)__pyx_v_self)); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":268 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":267 * * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 267, __pyx_L1_error) /* "uvloop/future.pyx":266 * self.__class__._all_tasks.add(self) * * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":256 * public bint _log_destroy_pending * * def __init__(self, coro not None, Loop loop): # <<<<<<<<<<<<<< * BaseFuture.__init__(self, loop) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.BaseTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":274 * None)) * * def cancel(self): # <<<<<<<<<<<<<< * if self.done(): * return False */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_3cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_8BaseTask_2cancel[] = "BaseTask.cancel(self)"; static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_3cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_2cancel(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_2cancel(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("cancel", 0); /* "uvloop/future.pyx":275 * * def cancel(self): * if self.done(): # <<<<<<<<<<<<<< * return False * if self._fut_waiter is not None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 275, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(6, 275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/future.pyx":276 * def cancel(self): * if self.done(): * return False # <<<<<<<<<<<<<< * if self._fut_waiter is not None: * if self._fut_waiter.cancel(): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "uvloop/future.pyx":275 * * def cancel(self): * if self.done(): # <<<<<<<<<<<<<< * return False * if self._fut_waiter is not None: */ } /* "uvloop/future.pyx":277 * if self.done(): * return False * if self._fut_waiter is not None: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * # Leave self._fut_waiter; it may be a Task that */ __pyx_t_4 = (__pyx_v_self->_fut_waiter != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/future.pyx":278 * return False * if self._fut_waiter is not None: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * # Leave self._fut_waiter; it may be a Task that * # catches and ignores the cancellation so we may have */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fut_waiter, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 278, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(6, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "uvloop/future.pyx":282 * # catches and ignores the cancellation so we may have * # to cancel it again later. * return True # <<<<<<<<<<<<<< * # It must be the case that self._step is already scheduled. * self._must_cancel = True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/future.pyx":278 * return False * if self._fut_waiter is not None: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * # Leave self._fut_waiter; it may be a Task that * # catches and ignores the cancellation so we may have */ } /* "uvloop/future.pyx":277 * if self.done(): * return False * if self._fut_waiter is not None: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * # Leave self._fut_waiter; it may be a Task that */ } /* "uvloop/future.pyx":284 * return True * # It must be the case that self._step is already scheduled. * self._must_cancel = True # <<<<<<<<<<<<<< * return True * */ __pyx_v_self->_must_cancel = 1; /* "uvloop/future.pyx":285 * # It must be the case that self._step is already scheduled. * self._must_cancel = True * return True # <<<<<<<<<<<<<< * * cdef _raise_wrong_loop(self, fut): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "uvloop/future.pyx":274 * None)) * * def cancel(self): # <<<<<<<<<<<<<< * if self.done(): * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop.BaseTask.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":287 * return True * * cdef _raise_wrong_loop(self, fut): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'Task {!r} got Future {!r} attached to a ' */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_wrong_loop(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_fut) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_raise_wrong_loop", 0); /* "uvloop/future.pyx":290 * ex = RuntimeError( * 'Task {!r} got Future {!r} attached to a ' * 'different loop'.format(self, fut)) # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Task_r_got_Future_r_attached_to, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_fut}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_fut}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_fut); __Pyx_GIVEREF(__pyx_v_fut); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_fut); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":288 * * cdef _raise_wrong_loop(self, fut): * ex = RuntimeError( # <<<<<<<<<<<<<< * 'Task {!r} got Future {!r} attached to a ' * 'different loop'.format(self, fut)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ex = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/future.pyx":293 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":292 * 'different loop'.format(self, fut)) * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), __pyx_v_ex); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 292, __pyx_L1_error) /* "uvloop/future.pyx":291 * 'Task {!r} got Future {!r} attached to a ' * 'different loop'.format(self, fut)) * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":287 * return True * * cdef _raise_wrong_loop(self, fut): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'Task {!r} got Future {!r} attached to a ' */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.BaseTask._raise_wrong_loop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":299 * ex)) * * cdef _raise_yield(self, fut): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'yield was used instead of yield from ' */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_yield(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_fut) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_raise_yield", 0); /* "uvloop/future.pyx":302 * ex = RuntimeError( * 'yield was used instead of yield from ' * 'in task {!r} with {!r}'.format(self, fut)) # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_yield_was_used_instead_of_yield, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_fut}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_fut}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_fut); __Pyx_GIVEREF(__pyx_v_fut); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_fut); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":300 * * cdef _raise_yield(self, fut): * ex = RuntimeError( # <<<<<<<<<<<<<< * 'yield was used instead of yield from ' * 'in task {!r} with {!r}'.format(self, fut)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ex = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/future.pyx":305 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":304 * 'in task {!r} with {!r}'.format(self, fut)) * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), __pyx_v_ex); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 304, __pyx_L1_error) /* "uvloop/future.pyx":303 * 'yield was used instead of yield from ' * 'in task {!r} with {!r}'.format(self, fut)) * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":299 * ex)) * * cdef _raise_yield(self, fut): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'yield was used instead of yield from ' */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.BaseTask._raise_yield", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":311 * ex)) * * cdef _raise_generator(self, val): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'yield was used instead of yield from for ' */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_generator(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_raise_generator", 0); /* "uvloop/future.pyx":314 * ex = RuntimeError( * 'yield was used instead of yield from for ' * 'generator in task {!r} with {}'.format(self, val)) # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_yield_was_used_instead_of_yield_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_val}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 314, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_val}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 314, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_val); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":312 * * cdef _raise_generator(self, val): * ex = RuntimeError( # <<<<<<<<<<<<<< * 'yield was used instead of yield from for ' * 'generator in task {!r} with {}'.format(self, val)) */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ex = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/future.pyx":317 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":316 * 'generator in task {!r} with {}'.format(self, val)) * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), __pyx_v_ex); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 316, __pyx_L1_error) /* "uvloop/future.pyx":315 * 'yield was used instead of yield from for ' * 'generator in task {!r} with {}'.format(self, val)) * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":311 * ex)) * * cdef _raise_generator(self, val): # <<<<<<<<<<<<<< * ex = RuntimeError( * 'yield was used instead of yield from for ' */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("uvloop.loop.BaseTask._raise_generator", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":323 * ex)) * * cdef _raise_else(self, val): # <<<<<<<<<<<<<< * ex = RuntimeError('Task got bad yield: {!r}'.format(val)) * self._loop._call_soon_handle( */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__raise_else(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_val) { PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_raise_else", 0); /* "uvloop/future.pyx":324 * * cdef _raise_else(self, val): * ex = RuntimeError('Task got bad yield: {!r}'.format(val)) # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Task_got_bad_yield_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_val}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_val}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_val); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ex = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/future.pyx":327 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":326 * ex = RuntimeError('Task got bad yield: {!r}'.format(val)) * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), __pyx_v_ex); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 326, __pyx_L1_error) /* "uvloop/future.pyx":325 * cdef _raise_else(self, val): * ex = RuntimeError('Task got bad yield: {!r}'.format(val)) * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":323 * ex)) * * cdef _raise_else(self, val): # <<<<<<<<<<<<<< * ex = RuntimeError('Task got bad yield: {!r}'.format(val)) * self._loop._call_soon_handle( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("uvloop.loop.BaseTask._raise_else", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":333 * ex)) * * cdef _skip_oneloop(self): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__skip_oneloop(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_skip_oneloop", 0); /* "uvloop/future.pyx":336 * self._loop._call_soon_handle( * new_MethodHandle1( * self._loop, # <<<<<<<<<<<<<< * "Task._step", * self._fast_step, */ __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base._loop); __Pyx_INCREF(__pyx_t_1); /* "uvloop/future.pyx":335 * cdef _skip_oneloop(self): * self._loop._call_soon_handle( * new_MethodHandle1( # <<<<<<<<<<<<<< * self._loop, * "Task._step", */ __pyx_t_2 = __pyx_f_6uvloop_4loop_new_MethodHandle1(((struct __pyx_obj_6uvloop_4loop_Loop *)__pyx_t_1), __pyx_kp_u_Task__step, ((__pyx_t_6uvloop_4loop_method1_t)((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step), ((PyObject *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6uvloop_4loop_Handle))))) __PYX_ERR(6, 335, __pyx_L1_error) /* "uvloop/future.pyx":334 * * cdef _skip_oneloop(self): * self._loop._call_soon_handle( # <<<<<<<<<<<<<< * new_MethodHandle1( * self._loop, */ __pyx_t_1 = __pyx_f_6uvloop_4loop_4Loop__call_soon_handle(__pyx_v_self->__pyx_base._loop, ((struct __pyx_obj_6uvloop_4loop_Handle *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":333 * ex)) * * cdef _skip_oneloop(self): # <<<<<<<<<<<<<< * self._loop._call_soon_handle( * new_MethodHandle1( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.BaseTask._skip_oneloop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":342 * None)) * * cdef _fast_step(self, exc): # <<<<<<<<<<<<<< * cdef: * BaseFuture nfut */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__fast_step(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_exc) { struct __pyx_obj_6uvloop_4loop_BaseFuture *__pyx_v_nfut = 0; PyObject *__pyx_v_meth = 0; PyObject *__pyx_v__current_tasks = 0; PyObject *__pyx_v_result = NULL; PyTypeObject *__pyx_v_result_type = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; char const *__pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; char const *__pyx_t_21; char const *__pyx_t_22; char const *__pyx_t_23; char const *__pyx_t_24; __Pyx_RefNannySetupContext("_fast_step", 0); __Pyx_INCREF(__pyx_v_exc); /* "uvloop/future.pyx":346 * BaseFuture nfut * object meth * object _current_tasks = self.__class__._current_tasks # <<<<<<<<<<<<<< * * if self._state != _FUT_PENDING: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_current_tasks); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__current_tasks = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/future.pyx":348 * object _current_tasks = self.__class__._current_tasks * * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError( * '_step(): already done: {!r}, {!r}'.format(self, exc)) */ __pyx_t_3 = ((__pyx_v_self->__pyx_base._state != 1) != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":350 * if self._state != _FUT_PENDING: * raise AssertionError( * '_step(): already done: {!r}, {!r}'.format(self, exc)) # <<<<<<<<<<<<<< * * if self._must_cancel: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_step_already_done_r_r, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_v_exc}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_v_exc}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self)); __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_exc); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":349 * * if self._state != _FUT_PENDING: * raise AssertionError( # <<<<<<<<<<<<<< * '_step(): already done: {!r}, {!r}'.format(self, exc)) * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(6, 349, __pyx_L1_error) /* "uvloop/future.pyx":348 * object _current_tasks = self.__class__._current_tasks * * if self._state != _FUT_PENDING: # <<<<<<<<<<<<<< * raise AssertionError( * '_step(): already done: {!r}, {!r}'.format(self, exc)) */ } /* "uvloop/future.pyx":352 * '_step(): already done: {!r}, {!r}'.format(self, exc)) * * if self._must_cancel: # <<<<<<<<<<<<<< * if not isinstance(exc, aio_CancelledError): * exc = aio_CancelledError() */ __pyx_t_3 = (__pyx_v_self->_must_cancel != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":353 * * if self._must_cancel: * if not isinstance(exc, aio_CancelledError): # <<<<<<<<<<<<<< * exc = aio_CancelledError() * self._must_cancel = False */ __pyx_t_2 = __pyx_v_6uvloop_4loop_aio_CancelledError; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(6, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":354 * if self._must_cancel: * if not isinstance(exc, aio_CancelledError): * exc = aio_CancelledError() # <<<<<<<<<<<<<< * self._must_cancel = False * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_CancelledError); __pyx_t_1 = __pyx_v_6uvloop_4loop_aio_CancelledError; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 354, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":353 * * if self._must_cancel: * if not isinstance(exc, aio_CancelledError): # <<<<<<<<<<<<<< * exc = aio_CancelledError() * self._must_cancel = False */ } /* "uvloop/future.pyx":355 * if not isinstance(exc, aio_CancelledError): * exc = aio_CancelledError() * self._must_cancel = False # <<<<<<<<<<<<<< * * self._fut_waiter = None */ __pyx_v_self->_must_cancel = 0; /* "uvloop/future.pyx":352 * '_step(): already done: {!r}, {!r}'.format(self, exc)) * * if self._must_cancel: # <<<<<<<<<<<<<< * if not isinstance(exc, aio_CancelledError): * exc = aio_CancelledError() */ } /* "uvloop/future.pyx":357 * self._must_cancel = False * * self._fut_waiter = None # <<<<<<<<<<<<<< * * # Let it fail early with an AttributeError if self._coro */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fut_waiter); __Pyx_DECREF(__pyx_v_self->_fut_waiter); __pyx_v_self->_fut_waiter = Py_None; /* "uvloop/future.pyx":361 * # Let it fail early with an AttributeError if self._coro * # is not a coroutine/generator. * if exc is None: # <<<<<<<<<<<<<< * meth = self._coro.send * else: */ __pyx_t_7 = (__pyx_v_exc == Py_None); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":362 * # is not a coroutine/generator. * if exc is None: * meth = self._coro.send # <<<<<<<<<<<<<< * else: * meth = self._coro.throw */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_coro, __pyx_n_s_send); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_meth = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/future.pyx":361 * # Let it fail early with an AttributeError if self._coro * # is not a coroutine/generator. * if exc is None: # <<<<<<<<<<<<<< * meth = self._coro.send * else: */ goto __pyx_L6; } /* "uvloop/future.pyx":364 * meth = self._coro.send * else: * meth = self._coro.throw # <<<<<<<<<<<<<< * * _current_tasks[self._loop] = self */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_coro, __pyx_n_s_throw); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_meth = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L6:; /* "uvloop/future.pyx":366 * meth = self._coro.throw * * _current_tasks[self._loop] = self # <<<<<<<<<<<<<< * # Call either coro.throw(exc) or coro.send(None). * try: */ if (unlikely(PyObject_SetItem(__pyx_v__current_tasks, ((PyObject *)__pyx_v_self->__pyx_base._loop), ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(6, 366, __pyx_L1_error) /* "uvloop/future.pyx":368 * _current_tasks[self._loop] = self * # Call either coro.throw(exc) or coro.send(None). * try: # <<<<<<<<<<<<<< * if exc is None: * # We use the `send` method directly, because coroutines */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "uvloop/future.pyx":369 * # Call either coro.throw(exc) or coro.send(None). * try: * if exc is None: # <<<<<<<<<<<<<< * # We use the `send` method directly, because coroutines * # don't have `__iter__` and `__next__` methods. */ __pyx_t_3 = (__pyx_v_exc == Py_None); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":372 * # We use the `send` method directly, because coroutines * # don't have `__iter__` and `__next__` methods. * result = meth(None) # <<<<<<<<<<<<<< * else: * result = meth(exc) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_meth, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 372, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/future.pyx":369 * # Call either coro.throw(exc) or coro.send(None). * try: * if exc is None: # <<<<<<<<<<<<<< * # We use the `send` method directly, because coroutines * # don't have `__iter__` and `__next__` methods. */ goto __pyx_L18; } /* "uvloop/future.pyx":374 * result = meth(None) * else: * result = meth(exc) # <<<<<<<<<<<<<< * except StopIteration as exc: * self.set_result(exc.value) */ /*else*/ { __Pyx_INCREF(__pyx_v_meth); __pyx_t_1 = __pyx_v_meth; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 374, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 374, __pyx_L10_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exc}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 374, __pyx_L10_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 374, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_exc); __Pyx_GIVEREF(__pyx_v_exc); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_exc); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 374, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L18:; /* "uvloop/future.pyx":368 * _current_tasks[self._loop] = self * # Call either coro.throw(exc) or coro.send(None). * try: # <<<<<<<<<<<<<< * if exc is None: * # We use the `send` method directly, because coroutines */ } /* "uvloop/future.pyx":385 * raise * else: * result_type = type(result) # <<<<<<<<<<<<<< * if result_type is uvloop_Future: * # Yielded Future must come from Future.__iter__(). */ /*else:*/ { __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_result))); __pyx_v_result_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_result))); /* "uvloop/future.pyx":386 * else: * result_type = type(result) * if result_type is uvloop_Future: # <<<<<<<<<<<<<< * # Yielded Future must come from Future.__iter__(). * nfut = result */ __pyx_t_7 = (__pyx_v_result_type == ((PyTypeObject*)__pyx_v_6uvloop_4loop_uvloop_Future)); __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { /* "uvloop/future.pyx":388 * if result_type is uvloop_Future: * # Yielded Future must come from Future.__iter__(). * nfut = result # <<<<<<<<<<<<<< * if nfut._loop is not self._loop: * self._raise_wrong_loop(result) */ __pyx_t_2 = __pyx_v_result; __Pyx_INCREF(__pyx_t_2); __pyx_v_nfut = ((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":389 * # Yielded Future must come from Future.__iter__(). * nfut = result * if nfut._loop is not self._loop: # <<<<<<<<<<<<<< * self._raise_wrong_loop(result) * elif nfut._blocking: */ __pyx_t_3 = (__pyx_v_nfut->_loop != __pyx_v_self->__pyx_base._loop); __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":390 * nfut = result * if nfut._loop is not self._loop: * self._raise_wrong_loop(result) # <<<<<<<<<<<<<< * elif nfut._blocking: * nfut._blocking = False */ __pyx_t_2 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_wrong_loop(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 390, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":389 * # Yielded Future must come from Future.__iter__(). * nfut = result * if nfut._loop is not self._loop: # <<<<<<<<<<<<<< * self._raise_wrong_loop(result) * elif nfut._blocking: */ goto __pyx_L20; } /* "uvloop/future.pyx":391 * if nfut._loop is not self._loop: * self._raise_wrong_loop(result) * elif nfut._blocking: # <<<<<<<<<<<<<< * nfut._blocking = False * nfut._add_done_callback(self._wakeup) */ __pyx_t_7 = (__pyx_v_nfut->_blocking != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":392 * self._raise_wrong_loop(result) * elif nfut._blocking: * nfut._blocking = False # <<<<<<<<<<<<<< * nfut._add_done_callback(self._wakeup) * self._fut_waiter = result */ __pyx_v_nfut->_blocking = 0; /* "uvloop/future.pyx":393 * elif nfut._blocking: * nfut._blocking = False * nfut._add_done_callback(self._wakeup) # <<<<<<<<<<<<<< * self._fut_waiter = result * if self._must_cancel: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wakeup); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 393, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)__pyx_v_nfut->__pyx_vtab)->_add_done_callback(__pyx_v_nfut, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 393, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":394 * nfut._blocking = False * nfut._add_done_callback(self._wakeup) * self._fut_waiter = result # <<<<<<<<<<<<<< * if self._must_cancel: * if self._fut_waiter.cancel(): */ __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_GOTREF(__pyx_v_self->_fut_waiter); __Pyx_DECREF(__pyx_v_self->_fut_waiter); __pyx_v_self->_fut_waiter = __pyx_v_result; /* "uvloop/future.pyx":395 * nfut._add_done_callback(self._wakeup) * self._fut_waiter = result * if self._must_cancel: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * self._must_cancel = False */ __pyx_t_7 = (__pyx_v_self->_must_cancel != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":396 * self._fut_waiter = result * if self._must_cancel: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * self._must_cancel = False * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fut_waiter, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 396, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 396, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 396, __pyx_L12_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 396, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "uvloop/future.pyx":397 * if self._must_cancel: * if self._fut_waiter.cancel(): * self._must_cancel = False # <<<<<<<<<<<<<< * else: * self._raise_yield(result) */ __pyx_v_self->_must_cancel = 0; /* "uvloop/future.pyx":396 * self._fut_waiter = result * if self._must_cancel: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * self._must_cancel = False * else: */ } /* "uvloop/future.pyx":395 * nfut._add_done_callback(self._wakeup) * self._fut_waiter = result * if self._must_cancel: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * self._must_cancel = False */ } /* "uvloop/future.pyx":391 * if nfut._loop is not self._loop: * self._raise_wrong_loop(result) * elif nfut._blocking: # <<<<<<<<<<<<<< * nfut._blocking = False * nfut._add_done_callback(self._wakeup) */ goto __pyx_L20; } /* "uvloop/future.pyx":399 * self._must_cancel = False * else: * self._raise_yield(result) # <<<<<<<<<<<<<< * * elif result_type is aio_Future or isfuture(result): */ /*else*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_yield(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 399, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L20:; /* "uvloop/future.pyx":386 * else: * result_type = type(result) * if result_type is uvloop_Future: # <<<<<<<<<<<<<< * # Yielded Future must come from Future.__iter__(). * nfut = result */ goto __pyx_L19; } /* "uvloop/future.pyx":401 * self._raise_yield(result) * * elif result_type is aio_Future or isfuture(result): # <<<<<<<<<<<<<< * # Yielded Future must come from Future.__iter__(). * if result._loop is not self._loop: */ __pyx_t_3 = (__pyx_v_result_type == ((PyTypeObject*)__pyx_v_6uvloop_4loop_aio_Future)); __pyx_t_11 = (__pyx_t_3 != 0); if (!__pyx_t_11) { } else { __pyx_t_7 = __pyx_t_11; goto __pyx_L23_bool_binop_done; } __pyx_t_1 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 401, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(6, 401, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __pyx_t_11; __pyx_L23_bool_binop_done:; if (__pyx_t_7) { /* "uvloop/future.pyx":403 * elif result_type is aio_Future or isfuture(result): * # Yielded Future must come from Future.__iter__(). * if result._loop is not self._loop: # <<<<<<<<<<<<<< * self._raise_wrong_loop(result) * elif _future_get_blocking(result): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_loop_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 403, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__pyx_t_1 != ((PyObject *)__pyx_v_self->__pyx_base._loop)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (__pyx_t_7 != 0); if (__pyx_t_11) { /* "uvloop/future.pyx":404 * # Yielded Future must come from Future.__iter__(). * if result._loop is not self._loop: * self._raise_wrong_loop(result) # <<<<<<<<<<<<<< * elif _future_get_blocking(result): * _future_set_blocking(result, False) */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_wrong_loop(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 404, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":403 * elif result_type is aio_Future or isfuture(result): * # Yielded Future must come from Future.__iter__(). * if result._loop is not self._loop: # <<<<<<<<<<<<<< * self._raise_wrong_loop(result) * elif _future_get_blocking(result): */ goto __pyx_L25; } /* "uvloop/future.pyx":405 * if result._loop is not self._loop: * self._raise_wrong_loop(result) * elif _future_get_blocking(result): # <<<<<<<<<<<<<< * _future_set_blocking(result, False) * result.add_done_callback(self._wakeup) */ __pyx_t_1 = __pyx_f_6uvloop_4loop__future_get_blocking(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 405, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(6, 405, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { /* "uvloop/future.pyx":406 * self._raise_wrong_loop(result) * elif _future_get_blocking(result): * _future_set_blocking(result, False) # <<<<<<<<<<<<<< * result.add_done_callback(self._wakeup) * self._fut_waiter = result */ __pyx_t_1 = __pyx_f_6uvloop_4loop__future_set_blocking(__pyx_v_result, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 406, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":407 * elif _future_get_blocking(result): * _future_set_blocking(result, False) * result.add_done_callback(self._wakeup) # <<<<<<<<<<<<<< * self._fut_waiter = result * if self._must_cancel: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wakeup); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 407, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":408 * _future_set_blocking(result, False) * result.add_done_callback(self._wakeup) * self._fut_waiter = result # <<<<<<<<<<<<<< * if self._must_cancel: * if self._fut_waiter.cancel(): */ __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); __Pyx_GOTREF(__pyx_v_self->_fut_waiter); __Pyx_DECREF(__pyx_v_self->_fut_waiter); __pyx_v_self->_fut_waiter = __pyx_v_result; /* "uvloop/future.pyx":409 * result.add_done_callback(self._wakeup) * self._fut_waiter = result * if self._must_cancel: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * self._must_cancel = False */ __pyx_t_11 = (__pyx_v_self->_must_cancel != 0); if (__pyx_t_11) { /* "uvloop/future.pyx":410 * self._fut_waiter = result * if self._must_cancel: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * self._must_cancel = False * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_fut_waiter, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 410, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_12) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 410, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 410, __pyx_L12_except_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(6, 410, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { /* "uvloop/future.pyx":411 * if self._must_cancel: * if self._fut_waiter.cancel(): * self._must_cancel = False # <<<<<<<<<<<<<< * else: * self._raise_yield(result) */ __pyx_v_self->_must_cancel = 0; /* "uvloop/future.pyx":410 * self._fut_waiter = result * if self._must_cancel: * if self._fut_waiter.cancel(): # <<<<<<<<<<<<<< * self._must_cancel = False * else: */ } /* "uvloop/future.pyx":409 * result.add_done_callback(self._wakeup) * self._fut_waiter = result * if self._must_cancel: # <<<<<<<<<<<<<< * if self._fut_waiter.cancel(): * self._must_cancel = False */ } /* "uvloop/future.pyx":405 * if result._loop is not self._loop: * self._raise_wrong_loop(result) * elif _future_get_blocking(result): # <<<<<<<<<<<<<< * _future_set_blocking(result, False) * result.add_done_callback(self._wakeup) */ goto __pyx_L25; } /* "uvloop/future.pyx":413 * self._must_cancel = False * else: * self._raise_yield(result) # <<<<<<<<<<<<<< * * elif result is None: */ /*else*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_yield(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 413, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L25:; /* "uvloop/future.pyx":401 * self._raise_yield(result) * * elif result_type is aio_Future or isfuture(result): # <<<<<<<<<<<<<< * # Yielded Future must come from Future.__iter__(). * if result._loop is not self._loop: */ goto __pyx_L19; } /* "uvloop/future.pyx":415 * self._raise_yield(result) * * elif result is None: # <<<<<<<<<<<<<< * # Bare yield relinquishes control for one event loop iteration. * self._skip_oneloop() */ __pyx_t_11 = (__pyx_v_result == Py_None); __pyx_t_7 = (__pyx_t_11 != 0); if (__pyx_t_7) { /* "uvloop/future.pyx":417 * elif result is None: * # Bare yield relinquishes control for one event loop iteration. * self._skip_oneloop() # <<<<<<<<<<<<<< * * elif inspect_isgenerator(result): */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_skip_oneloop(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 417, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":415 * self._raise_yield(result) * * elif result is None: # <<<<<<<<<<<<<< * # Bare yield relinquishes control for one event loop iteration. * self._skip_oneloop() */ goto __pyx_L19; } /* "uvloop/future.pyx":419 * self._skip_oneloop() * * elif inspect_isgenerator(result): # <<<<<<<<<<<<<< * # Yielding a generator is just wrong. * self._raise_generator(result) */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_inspect_isgenerator); __pyx_t_2 = __pyx_v_6uvloop_4loop_inspect_isgenerator; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_12) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_result}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_result}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_result); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(6, 419, __pyx_L12_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "uvloop/future.pyx":421 * elif inspect_isgenerator(result): * # Yielding a generator is just wrong. * self._raise_generator(result) # <<<<<<<<<<<<<< * * else: */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_generator(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 421, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":419 * self._skip_oneloop() * * elif inspect_isgenerator(result): # <<<<<<<<<<<<<< * # Yielding a generator is just wrong. * self._raise_generator(result) */ goto __pyx_L19; } /* "uvloop/future.pyx":425 * else: * # Yielding something else is an error. * self._raise_else(result) # <<<<<<<<<<<<<< * finally: * _current_tasks.pop(self._loop) */ /*else*/ { __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_raise_else(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 425, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L19:; } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L17_try_end; __pyx_L10_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":375 * else: * result = meth(exc) * except StopIteration as exc: # <<<<<<<<<<<<<< * self.set_result(exc.value) * except aio_CancelledError as exc: */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_step", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(6, 375, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); /*try:*/ { /* "uvloop/future.pyx":376 * result = meth(exc) * except StopIteration as exc: * self.set_result(exc.value) # <<<<<<<<<<<<<< * except aio_CancelledError as exc: * BaseFuture._cancel(self) # I.e., Future.cancel(self). */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 376, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_result(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), __pyx_t_12, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 376, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "uvloop/future.pyx":375 * else: * result = meth(exc) * except StopIteration as exc: # <<<<<<<<<<<<<< * self.set_result(exc.value) * except aio_CancelledError as exc: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L34; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L33_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L12_except_error; } __pyx_L34:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_exception_handled; } /* "uvloop/future.pyx":377 * except StopIteration as exc: * self.set_result(exc.value) * except aio_CancelledError as exc: # <<<<<<<<<<<<<< * BaseFuture._cancel(self) # I.e., Future.cancel(self). * except Exception as exc: */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6uvloop_4loop_aio_CancelledError); if (__pyx_t_13) { __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_step", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(6, 377, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); /*try:*/ { /* "uvloop/future.pyx":378 * self.set_result(exc.value) * except aio_CancelledError as exc: * BaseFuture._cancel(self) # I.e., Future.cancel(self). # <<<<<<<<<<<<<< * except Exception as exc: * self.set_exception(exc) */ __pyx_t_6 = __pyx_f_6uvloop_4loop_10BaseFuture__cancel(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 378, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "uvloop/future.pyx":377 * except StopIteration as exc: * self.set_result(exc.value) * except aio_CancelledError as exc: # <<<<<<<<<<<<<< * BaseFuture._cancel(self) # I.e., Future.cancel(self). * except Exception as exc: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L45; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L44_error:; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_13 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18); __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_21; goto __pyx_L12_except_error; } __pyx_L45:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L11_exception_handled; } /* "uvloop/future.pyx":379 * except aio_CancelledError as exc: * BaseFuture._cancel(self) # I.e., Future.cancel(self). * except Exception as exc: # <<<<<<<<<<<<<< * self.set_exception(exc) * except BaseException as exc: */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_5) { __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_step", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(6, 379, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); /*try:*/ { /* "uvloop/future.pyx":380 * BaseFuture._cancel(self) # I.e., Future.cancel(self). * except Exception as exc: * self.set_exception(exc) # <<<<<<<<<<<<<< * except BaseException as exc: * self.set_exception(exc) */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_exception(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), __pyx_v_exc, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 380, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "uvloop/future.pyx":379 * except aio_CancelledError as exc: * BaseFuture._cancel(self) # I.e., Future.cancel(self). * except Exception as exc: # <<<<<<<<<<<<<< * self.set_exception(exc) * except BaseException as exc: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L56; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L55_error:; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_22 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20); } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_22; goto __pyx_L12_except_error; } __pyx_L56:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_exception_handled; } /* "uvloop/future.pyx":381 * except Exception as exc: * self.set_exception(exc) * except BaseException as exc: # <<<<<<<<<<<<<< * self.set_exception(exc) * raise */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException); if (__pyx_t_13) { __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_step", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(6, 381, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_exc, __pyx_t_2); /*try:*/ { /* "uvloop/future.pyx":382 * self.set_exception(exc) * except BaseException as exc: * self.set_exception(exc) # <<<<<<<<<<<<<< * raise * else: */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_exception(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_self), __pyx_v_exc, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 382, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/future.pyx":383 * except BaseException as exc: * self.set_exception(exc) * raise # <<<<<<<<<<<<<< * else: * result_type = type(result) */ __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(6, 383, __pyx_L66_error) } /* "uvloop/future.pyx":381 * except Exception as exc: * self.set_exception(exc) * except BaseException as exc: # <<<<<<<<<<<<<< * self.set_exception(exc) * raise */ /*finally:*/ { /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L66_error:; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_13 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18); __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_23; goto __pyx_L12_except_error; } } } goto __pyx_L12_except_error; __pyx_L12_except_error:; /* "uvloop/future.pyx":368 * _current_tasks[self._loop] = self * # Call either coro.throw(exc) or coro.send(None). * try: # <<<<<<<<<<<<<< * if exc is None: * # We use the `send` method directly, because coroutines */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L8_error; __pyx_L11_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L17_try_end:; } } /* "uvloop/future.pyx":427 * self._raise_else(result) * finally: * _current_tasks.pop(self._loop) # <<<<<<<<<<<<<< * * cdef _fast_wakeup(self, future): */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__current_tasks, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->__pyx_base._loop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->__pyx_base._loop)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self->__pyx_base._loop)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._loop)); PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_self->__pyx_base._loop)); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L8_error:; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_24 = __pyx_filename; { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__current_tasks, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self->__pyx_base._loop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self->__pyx_base._loop)}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_self->__pyx_base._loop)}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._loop)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._loop)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self->__pyx_base._loop)); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 427, __pyx_L73_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_8); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_24; goto __pyx_L1_error; __pyx_L73_error:; __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; goto __pyx_L1_error; } __pyx_L9:; } /* "uvloop/future.pyx":342 * None)) * * cdef _fast_step(self, exc): # <<<<<<<<<<<<<< * cdef: * BaseFuture nfut */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_step", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_nfut); __Pyx_XDECREF(__pyx_v_meth); __Pyx_XDECREF(__pyx_v__current_tasks); __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_result_type); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":429 * _current_tasks.pop(self._loop) * * cdef _fast_wakeup(self, future): # <<<<<<<<<<<<<< * try: * if type(future) is uvloop_Future: */ static PyObject *__pyx_f_6uvloop_4loop_8BaseTask__fast_wakeup(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; __Pyx_RefNannySetupContext("_fast_wakeup", 0); /* "uvloop/future.pyx":430 * * cdef _fast_wakeup(self, future): * try: # <<<<<<<<<<<<<< * if type(future) is uvloop_Future: * (future)._result_impl() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "uvloop/future.pyx":431 * cdef _fast_wakeup(self, future): * try: * if type(future) is uvloop_Future: # <<<<<<<<<<<<<< * (future)._result_impl() * else: */ __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_future)) == __pyx_v_6uvloop_4loop_uvloop_Future); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/future.pyx":432 * try: * if type(future) is uvloop_Future: * (future)._result_impl() # <<<<<<<<<<<<<< * else: * future.result() */ __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture *)((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_future)->__pyx_vtab)->_result_impl(((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_v_future)); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 432, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/future.pyx":431 * cdef _fast_wakeup(self, future): * try: * if type(future) is uvloop_Future: # <<<<<<<<<<<<<< * (future)._result_impl() * else: */ goto __pyx_L11; } /* "uvloop/future.pyx":434 * (future)._result_impl() * else: * future.result() # <<<<<<<<<<<<<< * except Exception as exc: * # This may also be a cancellation. */ /*else*/ { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 434, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 434, __pyx_L3_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 434, __pyx_L3_error) } __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L11:; /* "uvloop/future.pyx":430 * * cdef _fast_wakeup(self, future): * try: # <<<<<<<<<<<<<< * if type(future) is uvloop_Future: * (future)._result_impl() */ } /* "uvloop/future.pyx":441 * # Don't pass the value of `future.result()` explicitly, * # as `Future.__iter__` and `Future.__await__` don't need it. * self._fast_step(None) # <<<<<<<<<<<<<< * * def _step(self, exc=None): */ /*else:*/ { __pyx_t_6 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step(__pyx_v_self, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 441, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "uvloop/future.pyx":435 * else: * future.result() * except Exception as exc: # <<<<<<<<<<<<<< * # This may also be a cancellation. * self._fast_step(exc) */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_9) { __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(6, 435, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_v_exc = __pyx_t_7; /*try:*/ { /* "uvloop/future.pyx":437 * except Exception as exc: * # This may also be a cancellation. * self._fast_step(exc) # <<<<<<<<<<<<<< * else: * # Don't pass the value of `future.result()` explicitly, */ __pyx_t_10 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 437, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "uvloop/future.pyx":435 * else: * future.result() * except Exception as exc: # <<<<<<<<<<<<<< * # This may also be a cancellation. * self._fast_step(exc) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; goto __pyx_L18; } /*exception exit:*/{ __Pyx_PyThreadState_declare __pyx_L17_error:; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = NULL; } __Pyx_PyThreadState_assign if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); } __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L5_except_error; } __pyx_L18:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "uvloop/future.pyx":430 * * cdef _fast_wakeup(self, future): * try: # <<<<<<<<<<<<<< * if type(future) is uvloop_Future: * (future)._result_impl() */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L10_try_end:; } /* "uvloop/future.pyx":429 * _current_tasks.pop(self._loop) * * cdef _fast_wakeup(self, future): # <<<<<<<<<<<<<< * try: * if type(future) is uvloop_Future: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("uvloop.loop.BaseTask._fast_wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":443 * self._fast_step(None) * * def _step(self, exc=None): # <<<<<<<<<<<<<< * self._fast_step(exc) * self = None */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_5_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_8BaseTask_4_step[] = "BaseTask._step(self, exc=None)"; static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_5_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exc = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_step (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_step") < 0)) __PYX_ERR(6, 443, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_exc = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_step", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 443, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop.BaseTask._step", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_4_step(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self), __pyx_v_exc); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_4_step(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_exc) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_step", 0); __Pyx_INCREF((PyObject *)__pyx_v_self); /* "uvloop/future.pyx":444 * * def _step(self, exc=None): * self._fast_step(exc) # <<<<<<<<<<<<<< * self = None * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_step(__pyx_v_self, __pyx_v_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":445 * def _step(self, exc=None): * self._fast_step(exc) * self = None # <<<<<<<<<<<<<< * * def _wakeup(self, future): */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_BaseTask *)Py_None)); /* "uvloop/future.pyx":443 * self._fast_step(None) * * def _step(self, exc=None): # <<<<<<<<<<<<<< * self._fast_step(exc) * self = None */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseTask._step", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":447 * self = None * * def _wakeup(self, future): # <<<<<<<<<<<<<< * self._fast_wakeup(future) * self = None */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_7_wakeup(PyObject *__pyx_v_self, PyObject *__pyx_v_future); /*proto*/ static char __pyx_doc_6uvloop_4loop_8BaseTask_6_wakeup[] = "BaseTask._wakeup(self, future)"; static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_7_wakeup(PyObject *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_wakeup (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_6_wakeup(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self), ((PyObject *)__pyx_v_future)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_6_wakeup(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_wakeup", 0); __Pyx_INCREF((PyObject *)__pyx_v_self); /* "uvloop/future.pyx":448 * * def _wakeup(self, future): * self._fast_wakeup(future) # <<<<<<<<<<<<<< * self = None * */ __pyx_t_1 = ((struct __pyx_vtabstruct_6uvloop_4loop_BaseTask *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fast_wakeup(__pyx_v_self, __pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/future.pyx":449 * def _wakeup(self, future): * self._fast_wakeup(future) * self = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_self, ((struct __pyx_obj_6uvloop_4loop_BaseTask *)Py_None)); /* "uvloop/future.pyx":447 * self = None * * def _wakeup(self, future): # <<<<<<<<<<<<<< * self._fast_wakeup(future) * self = None */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseTask._wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_self); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":251 * cdef class BaseTask(BaseFuture): * cdef: * readonly object _coro # <<<<<<<<<<<<<< * readonly object _fut_waiter * readonly bint _must_cancel */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_5_coro_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_5_coro_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_5_coro___get__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_5_coro___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_coro); __pyx_r = __pyx_v_self->_coro; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":252 * cdef: * readonly object _coro * readonly object _fut_waiter # <<<<<<<<<<<<<< * readonly bint _must_cancel * public bint _log_destroy_pending */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_11_fut_waiter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_11_fut_waiter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_11_fut_waiter___get__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_11_fut_waiter___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_fut_waiter); __pyx_r = __pyx_v_self->_fut_waiter; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":253 * readonly object _coro * readonly object _fut_waiter * readonly bint _must_cancel # <<<<<<<<<<<<<< * public bint _log_destroy_pending * */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_12_must_cancel_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_12_must_cancel_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_12_must_cancel___get__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_12_must_cancel___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_must_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseTask._must_cancel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":254 * readonly object _fut_waiter * readonly bint _must_cancel * public bint _log_destroy_pending # <<<<<<<<<<<<<< * * def __init__(self, coro not None, Loop loop): */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending___get__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending___get__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_log_destroy_pending); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop.BaseTask._log_destroy_pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending_2__set__(((struct __pyx_obj_6uvloop_4loop_BaseTask *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6uvloop_4loop_8BaseTask_20_log_destroy_pending_2__set__(struct __pyx_obj_6uvloop_4loop_BaseTask *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 254, __pyx_L1_error) __pyx_v_self->_log_destroy_pending = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop.BaseTask._log_destroy_pending.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/future.pyx":484 * * * cdef _is_uvloop_future(fut): # <<<<<<<<<<<<<< * return uvloop_Future is not None and type(fut) == uvloop_Future */ static PyObject *__pyx_f_6uvloop_4loop__is_uvloop_future(PyObject *__pyx_v_fut) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_is_uvloop_future", 0); /* "uvloop/future.pyx":485 * * cdef _is_uvloop_future(fut): * return uvloop_Future is not None and type(fut) == uvloop_Future # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = (__pyx_v_6uvloop_4loop_uvloop_Future != Py_None); if (__pyx_t_2) { } else { __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_fut)), __pyx_v_6uvloop_4loop_uvloop_Future, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 485, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "uvloop/future.pyx":484 * * * cdef _is_uvloop_future(fut): # <<<<<<<<<<<<<< * return uvloop_Future is not None and type(fut) == uvloop_Future */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("uvloop.loop._is_uvloop_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":6 * # to support earlier versions. * * cdef _set_concurrent_future_state(concurrent, source): # <<<<<<<<<<<<<< * """Copy state from a future to a concurrent.futures.Future.""" * assert source.done() */ static PyObject *__pyx_f_6uvloop_4loop__set_concurrent_future_state(PyObject *__pyx_v_concurrent, PyObject *__pyx_v_source) { PyObject *__pyx_v_exception = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_set_concurrent_future_state", 0); /* "uvloop/chain_futs.pyx":8 * cdef _set_concurrent_future_state(concurrent, source): * """Copy state from a future to a concurrent.futures.Future.""" * assert source.done() # <<<<<<<<<<<<<< * if source.cancelled(): * concurrent.cancel() */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 8, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(22, 8, __pyx_L1_error) } } #endif /* "uvloop/chain_futs.pyx":9 * """Copy state from a future to a concurrent.futures.Future.""" * assert source.done() * if source.cancelled(): # <<<<<<<<<<<<<< * concurrent.cancel() * if not concurrent.set_running_or_notify_cancel(): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 9, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":10 * assert source.done() * if source.cancelled(): * concurrent.cancel() # <<<<<<<<<<<<<< * if not concurrent.set_running_or_notify_cancel(): * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_concurrent, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 10, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":9 * """Copy state from a future to a concurrent.futures.Future.""" * assert source.done() * if source.cancelled(): # <<<<<<<<<<<<<< * concurrent.cancel() * if not concurrent.set_running_or_notify_cancel(): */ } /* "uvloop/chain_futs.pyx":11 * if source.cancelled(): * concurrent.cancel() * if not concurrent.set_running_or_notify_cancel(): # <<<<<<<<<<<<<< * return * exception = source.exception() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_concurrent, __pyx_n_s_set_running_or_notify_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 11, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "uvloop/chain_futs.pyx":12 * concurrent.cancel() * if not concurrent.set_running_or_notify_cancel(): * return # <<<<<<<<<<<<<< * exception = source.exception() * if exception is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/chain_futs.pyx":11 * if source.cancelled(): * concurrent.cancel() * if not concurrent.set_running_or_notify_cancel(): # <<<<<<<<<<<<<< * return * exception = source.exception() */ } /* "uvloop/chain_futs.pyx":13 * if not concurrent.set_running_or_notify_cancel(): * return * exception = source.exception() # <<<<<<<<<<<<<< * if exception is not None: * concurrent.set_exception(exception) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 13, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exception = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":14 * return * exception = source.exception() * if exception is not None: # <<<<<<<<<<<<<< * concurrent.set_exception(exception) * else: */ __pyx_t_5 = (__pyx_v_exception != Py_None); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":15 * exception = source.exception() * if exception is not None: * concurrent.set_exception(exception) # <<<<<<<<<<<<<< * else: * result = source.result() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_concurrent, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exception}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exception}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exception); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":14 * return * exception = source.exception() * if exception is not None: # <<<<<<<<<<<<<< * concurrent.set_exception(exception) * else: */ goto __pyx_L5; } /* "uvloop/chain_futs.pyx":17 * concurrent.set_exception(exception) * else: * result = source.result() # <<<<<<<<<<<<<< * concurrent.set_result(result) * */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 17, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":18 * else: * result = source.result() * concurrent.set_result(result) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_concurrent, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_result); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; /* "uvloop/chain_futs.pyx":6 * # to support earlier versions. * * cdef _set_concurrent_future_state(concurrent, source): # <<<<<<<<<<<<<< * """Copy state from a future to a concurrent.futures.Future.""" * assert source.done() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop._set_concurrent_future_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exception); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":21 * * * cdef _copy_future_state(source, dest): # <<<<<<<<<<<<<< * """Internal helper to copy state from another Future. * */ static PyObject *__pyx_f_6uvloop_4loop__copy_future_state(PyObject *__pyx_v_source, PyObject *__pyx_v_dest) { PyObject *__pyx_v_exception = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_copy_future_state", 0); /* "uvloop/chain_futs.pyx":26 * The other Future may be a concurrent.futures.Future. * """ * assert source.done() # <<<<<<<<<<<<<< * if dest.cancelled(): * return */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 26, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(22, 26, __pyx_L1_error) } } #endif /* "uvloop/chain_futs.pyx":27 * """ * assert source.done() * if dest.cancelled(): # <<<<<<<<<<<<<< * return * assert not dest.done() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 27, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":28 * assert source.done() * if dest.cancelled(): * return # <<<<<<<<<<<<<< * assert not dest.done() * if source.cancelled(): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/chain_futs.pyx":27 * """ * assert source.done() * if dest.cancelled(): # <<<<<<<<<<<<<< * return * assert not dest.done() */ } /* "uvloop/chain_futs.pyx":29 * if dest.cancelled(): * return * assert not dest.done() # <<<<<<<<<<<<<< * if source.cancelled(): * dest.cancel() */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest, __pyx_n_s_done); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 29, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!((!__pyx_t_4) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(22, 29, __pyx_L1_error) } } #endif /* "uvloop/chain_futs.pyx":30 * return * assert not dest.done() * if source.cancelled(): # <<<<<<<<<<<<<< * dest.cancel() * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 30, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":31 * assert not dest.done() * if source.cancelled(): * dest.cancel() # <<<<<<<<<<<<<< * else: * exception = source.exception() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 31, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":30 * return * assert not dest.done() * if source.cancelled(): # <<<<<<<<<<<<<< * dest.cancel() * else: */ goto __pyx_L4; } /* "uvloop/chain_futs.pyx":33 * dest.cancel() * else: * exception = source.exception() # <<<<<<<<<<<<<< * if exception is not None: * dest.set_exception(exception) */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 33, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exception = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":34 * else: * exception = source.exception() * if exception is not None: # <<<<<<<<<<<<<< * dest.set_exception(exception) * else: */ __pyx_t_4 = (__pyx_v_exception != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "uvloop/chain_futs.pyx":35 * exception = source.exception() * if exception is not None: * dest.set_exception(exception) # <<<<<<<<<<<<<< * else: * result = source.result() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exception}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_exception}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_exception); __Pyx_GIVEREF(__pyx_v_exception); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exception); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":34 * else: * exception = source.exception() * if exception is not None: # <<<<<<<<<<<<<< * dest.set_exception(exception) * else: */ goto __pyx_L5; } /* "uvloop/chain_futs.pyx":37 * dest.set_exception(exception) * else: * result = source.result() # <<<<<<<<<<<<<< * dest.set_result(result) * */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 37, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":38 * else: * result = source.result() * dest.set_result(result) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dest, __pyx_n_s_set_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_result); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; } __pyx_L4:; /* "uvloop/chain_futs.pyx":21 * * * cdef _copy_future_state(source, dest): # <<<<<<<<<<<<<< * """Internal helper to copy state from another Future. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("uvloop.loop._copy_future_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exception); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":66 * dest_loop = destination._loop * * def _set_state(future, other): # <<<<<<<<<<<<<< * if isfuture(future): * _copy_future_state(other, future) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_1_set_state(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_13_chain_future_1_set_state = {"_set_state", (PyCFunction)__pyx_pw_6uvloop_4loop_13_chain_future_1_set_state, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_1_set_state(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future = 0; PyObject *__pyx_v_other = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_state (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future,&__pyx_n_s_other,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_set_state", 1, 2, 2, 1); __PYX_ERR(22, 66, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_state") < 0)) __PYX_ERR(22, 66, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_future = values[0]; __pyx_v_other = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_state", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 66, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop._chain_future._set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_13_chain_future__set_state(__pyx_self, __pyx_v_future, __pyx_v_other); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future__set_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_set_state", 0); /* "uvloop/chain_futs.pyx":67 * * def _set_state(future, other): * if isfuture(future): # <<<<<<<<<<<<<< * _copy_future_state(other, future) * else: */ __pyx_t_1 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(22, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/chain_futs.pyx":68 * def _set_state(future, other): * if isfuture(future): * _copy_future_state(other, future) # <<<<<<<<<<<<<< * else: * _set_concurrent_future_state(future, other) */ __pyx_t_1 = __pyx_f_6uvloop_4loop__copy_future_state(__pyx_v_other, __pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":67 * * def _set_state(future, other): * if isfuture(future): # <<<<<<<<<<<<<< * _copy_future_state(other, future) * else: */ goto __pyx_L3; } /* "uvloop/chain_futs.pyx":70 * _copy_future_state(other, future) * else: * _set_concurrent_future_state(future, other) # <<<<<<<<<<<<<< * * def _call_check_cancel(destination): */ /*else*/ { __pyx_t_1 = __pyx_f_6uvloop_4loop__set_concurrent_future_state(__pyx_v_future, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "uvloop/chain_futs.pyx":66 * dest_loop = destination._loop * * def _set_state(future, other): # <<<<<<<<<<<<<< * if isfuture(future): * _copy_future_state(other, future) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("uvloop.loop._chain_future._set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":72 * _set_concurrent_future_state(future, other) * * def _call_check_cancel(destination): # <<<<<<<<<<<<<< * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_3_call_check_cancel(PyObject *__pyx_self, PyObject *__pyx_v_destination); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_13_chain_future_3_call_check_cancel = {"_call_check_cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_13_chain_future_3_call_check_cancel, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_3_call_check_cancel(PyObject *__pyx_self, PyObject *__pyx_v_destination) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_check_cancel (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_13_chain_future_2_call_check_cancel(__pyx_self, ((PyObject *)__pyx_v_destination)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future_2_call_check_cancel(PyObject *__pyx_self, PyObject *__pyx_v_destination) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_call_check_cancel", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "uvloop/chain_futs.pyx":73 * * def _call_check_cancel(destination): * if destination.cancelled(): # <<<<<<<<<<<<<< * if source_loop is None or source_loop is dest_loop: * source.cancel() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_destination, __pyx_n_s_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 73, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":74 * def _call_check_cancel(destination): * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: # <<<<<<<<<<<<<< * source.cancel() * else: */ if (unlikely(!__pyx_cur_scope->__pyx_v_source_loop)) { __Pyx_RaiseClosureNameError("source_loop"); __PYX_ERR(22, 74, __pyx_L1_error) } __pyx_t_5 = (__pyx_cur_scope->__pyx_v_source_loop == Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (!__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } if (unlikely(!__pyx_cur_scope->__pyx_v_source_loop)) { __Pyx_RaiseClosureNameError("source_loop"); __PYX_ERR(22, 74, __pyx_L1_error) } if (unlikely(!__pyx_cur_scope->__pyx_v_dest_loop)) { __Pyx_RaiseClosureNameError("dest_loop"); __PYX_ERR(22, 74, __pyx_L1_error) } __pyx_t_6 = (__pyx_cur_scope->__pyx_v_source_loop == __pyx_cur_scope->__pyx_v_dest_loop); __pyx_t_5 = (__pyx_t_6 != 0); __pyx_t_4 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (__pyx_t_4) { /* "uvloop/chain_futs.pyx":75 * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: * source.cancel() # <<<<<<<<<<<<<< * else: * source_loop.call_soon_threadsafe(source.cancel) */ if (unlikely(!__pyx_cur_scope->__pyx_v_source)) { __Pyx_RaiseClosureNameError("source"); __PYX_ERR(22, 75, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_source, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 75, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/chain_futs.pyx":74 * def _call_check_cancel(destination): * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: # <<<<<<<<<<<<<< * source.cancel() * else: */ goto __pyx_L4; } /* "uvloop/chain_futs.pyx":77 * source.cancel() * else: * source_loop.call_soon_threadsafe(source.cancel) # <<<<<<<<<<<<<< * * def _call_set_state(source): */ /*else*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_source_loop)) { __Pyx_RaiseClosureNameError("source_loop"); __PYX_ERR(22, 77, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_source_loop, __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_cur_scope->__pyx_v_source)) { __Pyx_RaiseClosureNameError("source"); __PYX_ERR(22, 77, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_source, __pyx_n_s_cancel); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_7) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; /* "uvloop/chain_futs.pyx":73 * * def _call_check_cancel(destination): * if destination.cancelled(): # <<<<<<<<<<<<<< * if source_loop is None or source_loop is dest_loop: * source.cancel() */ } /* "uvloop/chain_futs.pyx":72 * _set_concurrent_future_state(future, other) * * def _call_check_cancel(destination): # <<<<<<<<<<<<<< * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop._chain_future._call_check_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":79 * source_loop.call_soon_threadsafe(source.cancel) * * def _call_set_state(source): # <<<<<<<<<<<<<< * if dest_loop is None or dest_loop is source_loop: * _set_state(destination, source) */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_5_call_set_state(PyObject *__pyx_self, PyObject *__pyx_v_source); /*proto*/ static PyMethodDef __pyx_mdef_6uvloop_4loop_13_chain_future_5_call_set_state = {"_call_set_state", (PyCFunction)__pyx_pw_6uvloop_4loop_13_chain_future_5_call_set_state, METH_O, 0}; static PyObject *__pyx_pw_6uvloop_4loop_13_chain_future_5_call_set_state(PyObject *__pyx_self, PyObject *__pyx_v_source) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_call_set_state (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_13_chain_future_4_call_set_state(__pyx_self, ((PyObject *)__pyx_v_source)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_13_chain_future_4_call_set_state(PyObject *__pyx_self, PyObject *__pyx_v_source) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_cur_scope; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_call_set_state", 0); __pyx_outer_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "uvloop/chain_futs.pyx":80 * * def _call_set_state(source): * if dest_loop is None or dest_loop is source_loop: # <<<<<<<<<<<<<< * _set_state(destination, source) * else: */ if (unlikely(!__pyx_cur_scope->__pyx_v_dest_loop)) { __Pyx_RaiseClosureNameError("dest_loop"); __PYX_ERR(22, 80, __pyx_L1_error) } __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dest_loop == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } if (unlikely(!__pyx_cur_scope->__pyx_v_dest_loop)) { __Pyx_RaiseClosureNameError("dest_loop"); __PYX_ERR(22, 80, __pyx_L1_error) } if (unlikely(!__pyx_cur_scope->__pyx_v_source_loop)) { __Pyx_RaiseClosureNameError("source_loop"); __PYX_ERR(22, 80, __pyx_L1_error) } __pyx_t_3 = (__pyx_cur_scope->__pyx_v_dest_loop == __pyx_cur_scope->__pyx_v_source_loop); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":81 * def _call_set_state(source): * if dest_loop is None or dest_loop is source_loop: * _set_state(destination, source) # <<<<<<<<<<<<<< * else: * dest_loop.call_soon_threadsafe(_set_state, destination, source) */ if (unlikely(!__pyx_cur_scope->__pyx_v_destination)) { __Pyx_RaiseClosureNameError("destination"); __PYX_ERR(22, 81, __pyx_L1_error) } __pyx_t_4 = __pyx_cur_scope->__pyx_v_destination; __Pyx_INCREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_v__set_state)) { __Pyx_RaiseClosureNameError("_set_state"); __PYX_ERR(22, 81, __pyx_L1_error) } __pyx_t_5 = __pyx_pf_6uvloop_4loop_13_chain_future__set_state(__pyx_cur_scope->__pyx_v__set_state, __pyx_t_4, __pyx_v_source); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/chain_futs.pyx":80 * * def _call_set_state(source): * if dest_loop is None or dest_loop is source_loop: # <<<<<<<<<<<<<< * _set_state(destination, source) * else: */ goto __pyx_L3; } /* "uvloop/chain_futs.pyx":83 * _set_state(destination, source) * else: * dest_loop.call_soon_threadsafe(_set_state, destination, source) # <<<<<<<<<<<<<< * * destination.add_done_callback(_call_check_cancel) */ /*else*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_dest_loop)) { __Pyx_RaiseClosureNameError("dest_loop"); __PYX_ERR(22, 83, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dest_loop, __pyx_n_s_call_soon_threadsafe); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_v__set_state)) { __Pyx_RaiseClosureNameError("_set_state"); __PYX_ERR(22, 83, __pyx_L1_error) } if (unlikely(!__pyx_cur_scope->__pyx_v_destination)) { __Pyx_RaiseClosureNameError("destination"); __PYX_ERR(22, 83, __pyx_L1_error) } __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_cur_scope->__pyx_v__set_state, __pyx_cur_scope->__pyx_v_destination, __pyx_v_source}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_cur_scope->__pyx_v__set_state, __pyx_cur_scope->__pyx_v_destination, __pyx_v_source}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_cur_scope->__pyx_v__set_state); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__set_state); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v__set_state); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_destination); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_destination); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_cur_scope->__pyx_v_destination); __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_source); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; /* "uvloop/chain_futs.pyx":79 * source_loop.call_soon_threadsafe(source.cancel) * * def _call_set_state(source): # <<<<<<<<<<<<<< * if dest_loop is None or dest_loop is source_loop: * _set_state(destination, source) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("uvloop.loop._chain_future._call_set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":41 * * * cdef _chain_future(source, destination): # <<<<<<<<<<<<<< * """Chain two futures so that when one completes, so does the other. * */ static PyObject *__pyx_f_6uvloop_4loop__chain_future(PyObject *__pyx_v_source, PyObject *__pyx_v_destination) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_cur_scope; PyObject *__pyx_v__call_check_cancel = 0; PyObject *__pyx_v__call_set_state = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("_chain_future", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(22, 41, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_source = __pyx_v_source; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_source); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_source); __pyx_cur_scope->__pyx_v_destination = __pyx_v_destination; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_destination); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_destination); /* "uvloop/chain_futs.pyx":48 * Compatible with both asyncio.Future and concurrent.futures.Future. * """ * if not isfuture(source) and not isinstance(source, cc_Future): # <<<<<<<<<<<<<< * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_source; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6uvloop_4loop_isfuture(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __pyx_cur_scope->__pyx_v_source; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_v_6uvloop_4loop_cc_Future; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(22, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":49 * """ * if not isfuture(source) and not isinstance(source, cc_Future): * raise TypeError('A future is required for source argument') # <<<<<<<<<<<<<< * if not isfuture(destination) and not isinstance(destination, cc_Future): * raise TypeError('A future is required for destination argument') */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(22, 49, __pyx_L1_error) /* "uvloop/chain_futs.pyx":48 * Compatible with both asyncio.Future and concurrent.futures.Future. * """ * if not isfuture(source) and not isinstance(source, cc_Future): # <<<<<<<<<<<<<< * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): */ } /* "uvloop/chain_futs.pyx":50 * if not isfuture(source) and not isinstance(source, cc_Future): * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): # <<<<<<<<<<<<<< * raise TypeError('A future is required for destination argument') * */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_destination; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6uvloop_4loop_isfuture(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(22, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } __pyx_t_3 = __pyx_cur_scope->__pyx_v_destination; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_v_6uvloop_4loop_cc_Future; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_t_3, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(22, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":51 * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): * raise TypeError('A future is required for destination argument') # <<<<<<<<<<<<<< * * source_loop = None */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(22, 51, __pyx_L1_error) /* "uvloop/chain_futs.pyx":50 * if not isfuture(source) and not isinstance(source, cc_Future): * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): # <<<<<<<<<<<<<< * raise TypeError('A future is required for destination argument') * */ } /* "uvloop/chain_futs.pyx":53 * raise TypeError('A future is required for destination argument') * * source_loop = None # <<<<<<<<<<<<<< * dest_loop = None * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_source_loop = Py_None; /* "uvloop/chain_futs.pyx":54 * * source_loop = None * dest_loop = None # <<<<<<<<<<<<<< * * if _is_uvloop_future(source): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_dest_loop = Py_None; /* "uvloop/chain_futs.pyx":56 * dest_loop = None * * if _is_uvloop_future(source): # <<<<<<<<<<<<<< * source_loop = (source)._loop * elif isfuture(source): */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_source; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6uvloop_4loop__is_uvloop_future(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":57 * * if _is_uvloop_future(source): * source_loop = (source)._loop # <<<<<<<<<<<<<< * elif isfuture(source): * source_loop = source._loop */ __pyx_t_3 = ((PyObject *)((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_cur_scope->__pyx_v_source)->_loop); __Pyx_INCREF(__pyx_t_3); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_source_loop); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_source_loop, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/chain_futs.pyx":56 * dest_loop = None * * if _is_uvloop_future(source): # <<<<<<<<<<<<<< * source_loop = (source)._loop * elif isfuture(source): */ goto __pyx_L9; } /* "uvloop/chain_futs.pyx":58 * if _is_uvloop_future(source): * source_loop = (source)._loop * elif isfuture(source): # <<<<<<<<<<<<<< * source_loop = source._loop * */ __pyx_t_3 = __pyx_cur_scope->__pyx_v_source; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6uvloop_4loop_isfuture(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":59 * source_loop = (source)._loop * elif isfuture(source): * source_loop = source._loop # <<<<<<<<<<<<<< * * if _is_uvloop_future(destination): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_source, __pyx_n_s_loop_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_source_loop); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_source_loop, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":58 * if _is_uvloop_future(source): * source_loop = (source)._loop * elif isfuture(source): # <<<<<<<<<<<<<< * source_loop = source._loop * */ } __pyx_L9:; /* "uvloop/chain_futs.pyx":61 * source_loop = source._loop * * if _is_uvloop_future(destination): # <<<<<<<<<<<<<< * dest_loop = (destination)._loop * elif isfuture(destination): */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_destination; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6uvloop_4loop__is_uvloop_future(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":62 * * if _is_uvloop_future(destination): * dest_loop = (destination)._loop # <<<<<<<<<<<<<< * elif isfuture(destination): * dest_loop = destination._loop */ __pyx_t_3 = ((PyObject *)((struct __pyx_obj_6uvloop_4loop_BaseFuture *)__pyx_cur_scope->__pyx_v_destination)->_loop); __Pyx_INCREF(__pyx_t_3); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dest_loop); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dest_loop, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/chain_futs.pyx":61 * source_loop = source._loop * * if _is_uvloop_future(destination): # <<<<<<<<<<<<<< * dest_loop = (destination)._loop * elif isfuture(destination): */ goto __pyx_L10; } /* "uvloop/chain_futs.pyx":63 * if _is_uvloop_future(destination): * dest_loop = (destination)._loop * elif isfuture(destination): # <<<<<<<<<<<<<< * dest_loop = destination._loop * */ __pyx_t_3 = __pyx_cur_scope->__pyx_v_destination; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6uvloop_4loop_isfuture(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(22, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "uvloop/chain_futs.pyx":64 * dest_loop = (destination)._loop * elif isfuture(destination): * dest_loop = destination._loop # <<<<<<<<<<<<<< * * def _set_state(future, other): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_destination, __pyx_n_s_loop_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dest_loop); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dest_loop, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":63 * if _is_uvloop_future(destination): * dest_loop = (destination)._loop * elif isfuture(destination): # <<<<<<<<<<<<<< * dest_loop = destination._loop * */ } __pyx_L10:; /* "uvloop/chain_futs.pyx":66 * dest_loop = destination._loop * * def _set_state(future, other): # <<<<<<<<<<<<<< * if isfuture(future): * _copy_future_state(other, future) */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_13_chain_future_1_set_state, 0, __pyx_n_s_chain_future_locals__set_state, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v__set_state = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":72 * _set_concurrent_future_state(future, other) * * def _call_check_cancel(destination): # <<<<<<<<<<<<<< * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_13_chain_future_3_call_check_cancel, 0, __pyx_n_s_chain_future_locals__call_check, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__call_check_cancel = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":79 * source_loop.call_soon_threadsafe(source.cancel) * * def _call_set_state(source): # <<<<<<<<<<<<<< * if dest_loop is None or dest_loop is source_loop: * _set_state(destination, source) */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_13_chain_future_5_call_set_state, 0, __pyx_n_s_chain_future_locals__call_set_s, ((PyObject*)__pyx_cur_scope), __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__call_set_state = __pyx_t_2; __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":85 * dest_loop.call_soon_threadsafe(_set_state, destination, source) * * destination.add_done_callback(_call_check_cancel) # <<<<<<<<<<<<<< * source.add_done_callback(_call_set_state) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_destination, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v__call_check_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__call_check_cancel}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__call_check_cancel}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v__call_check_cancel); __Pyx_GIVEREF(__pyx_v__call_check_cancel); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v__call_check_cancel); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":86 * * destination.add_done_callback(_call_check_cancel) * source.add_done_callback(_call_set_state) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_source, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_7) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v__call_set_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__call_set_state}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__call_set_state}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v__call_set_state); __Pyx_GIVEREF(__pyx_v__call_set_state); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v__call_set_state); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/chain_futs.pyx":41 * * * cdef _chain_future(source, destination): # <<<<<<<<<<<<<< * """Chain two futures so that when one completes, so does the other. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("uvloop.loop._chain_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v__call_check_cancel); __Pyx_XDECREF(__pyx_v__call_set_state); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/chain_futs.pyx":89 * * * def _wrap_future(future, *, loop=None): # <<<<<<<<<<<<<< * # Don't use this function -- it's here for tests purposes only * # and can be removed in future versions of uvloop. */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_1_wrap_future(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop__wrap_future[] = "_wrap_future(future, *, loop=None)"; static PyMethodDef __pyx_mdef_6uvloop_4loop_1_wrap_future = {"_wrap_future", (PyCFunction)__pyx_pw_6uvloop_4loop_1_wrap_future, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop__wrap_future}; static PyObject *__pyx_pw_6uvloop_4loop_1_wrap_future(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_future = 0; PyObject *__pyx_v_loop = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_wrap_future (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future,&__pyx_n_s_loop,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (kw_args == 1) { const Py_ssize_t index = 1; PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]); if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_wrap_future") < 0)) __PYX_ERR(22, 89, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_future = values[0]; __pyx_v_loop = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_wrap_future", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(22, 89, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop._wrap_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop__wrap_future(__pyx_self, __pyx_v_future, __pyx_v_loop); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop__wrap_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_loop) { PyObject *__pyx_v_create_future = NULL; PyObject *__pyx_v_new_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("_wrap_future", 0); __Pyx_INCREF(__pyx_v_loop); /* "uvloop/chain_futs.pyx":93 * # and can be removed in future versions of uvloop. * * if isfuture(future): # <<<<<<<<<<<<<< * return future * assert isinstance(future, cc_Future), \ */ __pyx_t_1 = __pyx_f_6uvloop_4loop_isfuture(__pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(22, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "uvloop/chain_futs.pyx":94 * * if isfuture(future): * return future # <<<<<<<<<<<<<< * assert isinstance(future, cc_Future), \ * 'concurrent.futures.Future is expected, got {!r}'.format(future) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_future); __pyx_r = __pyx_v_future; goto __pyx_L0; /* "uvloop/chain_futs.pyx":93 * # and can be removed in future versions of uvloop. * * if isfuture(future): # <<<<<<<<<<<<<< * return future * assert isinstance(future, cc_Future), \ */ } /* "uvloop/chain_futs.pyx":95 * if isfuture(future): * return future * assert isinstance(future, cc_Future), \ # <<<<<<<<<<<<<< * 'concurrent.futures.Future is expected, got {!r}'.format(future) * if loop is None: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = __pyx_v_6uvloop_4loop_cc_Future; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_future, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(22, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!(__pyx_t_2 != 0))) { /* "uvloop/chain_futs.pyx":96 * return future * assert isinstance(future, cc_Future), \ * 'concurrent.futures.Future is expected, got {!r}'.format(future) # <<<<<<<<<<<<<< * if loop is None: * loop = aio_get_event_loop() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_concurrent_futures_Future_is_exp, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_4) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } else { #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_future}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_future}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_future); __Pyx_GIVEREF(__pyx_v_future); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_future); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_Pack(1, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(22, 95, __pyx_L1_error) } } #endif /* "uvloop/chain_futs.pyx":97 * assert isinstance(future, cc_Future), \ * 'concurrent.futures.Future is expected, got {!r}'.format(future) * if loop is None: # <<<<<<<<<<<<<< * loop = aio_get_event_loop() * try: */ __pyx_t_2 = (__pyx_v_loop == Py_None); __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { /* "uvloop/chain_futs.pyx":98 * 'concurrent.futures.Future is expected, got {!r}'.format(future) * if loop is None: * loop = aio_get_event_loop() # <<<<<<<<<<<<<< * try: * create_future = loop.create_future */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_get_event_loop); __pyx_t_1 = __pyx_v_6uvloop_4loop_aio_get_event_loop; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 98, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_loop, __pyx_t_3); __pyx_t_3 = 0; /* "uvloop/chain_futs.pyx":97 * assert isinstance(future, cc_Future), \ * 'concurrent.futures.Future is expected, got {!r}'.format(future) * if loop is None: # <<<<<<<<<<<<<< * loop = aio_get_event_loop() * try: */ } /* "uvloop/chain_futs.pyx":99 * if loop is None: * loop = aio_get_event_loop() * try: # <<<<<<<<<<<<<< * create_future = loop.create_future * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "uvloop/chain_futs.pyx":100 * loop = aio_get_event_loop() * try: * create_future = loop.create_future # <<<<<<<<<<<<<< * except AttributeError: * new_future = aio_Future(loop=loop) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_create_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 100, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_create_future = __pyx_t_3; __pyx_t_3 = 0; /* "uvloop/chain_futs.pyx":99 * if loop is None: * loop = aio_get_event_loop() * try: # <<<<<<<<<<<<<< * create_future = loop.create_future * except AttributeError: */ } /* "uvloop/chain_futs.pyx":104 * new_future = aio_Future(loop=loop) * else: * new_future = create_future() # <<<<<<<<<<<<<< * _chain_future(future, new_future) * return new_future */ /*else:*/ { __Pyx_INCREF(__pyx_v_create_future); __pyx_t_1 = __pyx_v_create_future; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 104, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 104, __pyx_L7_except_error) } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_new_future = __pyx_t_3; __pyx_t_3 = 0; } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "uvloop/chain_futs.pyx":101 * try: * create_future = loop.create_future * except AttributeError: # <<<<<<<<<<<<<< * new_future = aio_Future(loop=loop) * else: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_10) { __Pyx_AddTraceback("uvloop.loop._wrap_future", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(22, 101, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_5); /* "uvloop/chain_futs.pyx":102 * create_future = loop.create_future * except AttributeError: * new_future = aio_Future(loop=loop) # <<<<<<<<<<<<<< * else: * new_future = create_future() */ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(22, 102, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(22, 102, __pyx_L7_except_error) __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_6uvloop_4loop_aio_Future, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(22, 102, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_new_future = __pyx_t_11; __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "uvloop/chain_futs.pyx":99 * if loop is None: * loop = aio_get_event_loop() * try: # <<<<<<<<<<<<<< * create_future = loop.create_future * except AttributeError: */ __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L6_exception_handled:; __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L12_try_end:; } /* "uvloop/chain_futs.pyx":105 * else: * new_future = create_future() * _chain_future(future, new_future) # <<<<<<<<<<<<<< * return new_future */ __pyx_t_5 = __pyx_f_6uvloop_4loop__chain_future(__pyx_v_future, __pyx_v_new_future); if (unlikely(!__pyx_t_5)) __PYX_ERR(22, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/chain_futs.pyx":106 * new_future = create_future() * _chain_future(future, new_future) * return new_future # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_new_future); __pyx_r = __pyx_v_new_future; goto __pyx_L0; /* "uvloop/chain_futs.pyx":89 * * * def _wrap_future(future, *, loop=None): # <<<<<<<<<<<<<< * # Don't use this function -- it's here for tests purposes only * # and can be removed in future versions of uvloop. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("uvloop.loop._wrap_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_create_future); __Pyx_XDECREF(__pyx_v_new_future); __Pyx_XDECREF(__pyx_v_loop); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2592 * * * cdef void __atfork_child() nogil: # <<<<<<<<<<<<<< * # See CPython/posixmodule.c for details * global __forking */ static void __pyx_f_6uvloop_4loop___atfork_child(void) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save; #endif __Pyx_RefNannySetupContext("__atfork_child", 1); /* "uvloop/loop.pyx":2594 * cdef void __atfork_child() nogil: * # See CPython/posixmodule.c for details * global __forking # <<<<<<<<<<<<<< * * with gil: */ /*try:*/ { /* "uvloop/loop.pyx":2596 * global __forking * * with gil: # <<<<<<<<<<<<<< * if (__forking and * __forking_loop is not None and */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "uvloop/loop.pyx":2597 * * with gil: * if (__forking and # <<<<<<<<<<<<<< * __forking_loop is not None and * __forking_loop.active_process_handler is not None): */ __pyx_t_2 = (__pyx_v_6uvloop_4loop___forking != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L10_bool_binop_done; } /* "uvloop/loop.pyx":2598 * with gil: * if (__forking and * __forking_loop is not None and # <<<<<<<<<<<<<< * __forking_loop.active_process_handler is not None): * */ __pyx_t_2 = (((PyObject *)__pyx_v_6uvloop_4loop___forking_loop) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L10_bool_binop_done; } /* "uvloop/loop.pyx":2599 * if (__forking and * __forking_loop is not None and * __forking_loop.active_process_handler is not None): # <<<<<<<<<<<<<< * * __forking_loop.active_process_handler._after_fork() */ __pyx_t_3 = (((PyObject *)__pyx_v_6uvloop_4loop___forking_loop->active_process_handler) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L10_bool_binop_done:; /* "uvloop/loop.pyx":2597 * * with gil: * if (__forking and # <<<<<<<<<<<<<< * __forking_loop is not None and * __forking_loop.active_process_handler is not None): */ if (__pyx_t_1) { /* "uvloop/loop.pyx":2601 * __forking_loop.active_process_handler is not None): * * __forking_loop.active_process_handler._after_fork() # <<<<<<<<<<<<<< * * */ __pyx_t_4 = ((struct __pyx_vtabstruct_6uvloop_4loop_UVProcess *)__pyx_v_6uvloop_4loop___forking_loop->active_process_handler->__pyx_base.__pyx_vtab)->_after_fork(__pyx_v_6uvloop_4loop___forking_loop->active_process_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 2601, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "uvloop/loop.pyx":2597 * * with gil: * if (__forking and # <<<<<<<<<<<<<< * __forking_loop is not None and * __forking_loop.active_process_handler is not None): */ } } /* "uvloop/loop.pyx":2596 * global __forking * * with gil: # <<<<<<<<<<<<<< * if (__forking and * __forking_loop is not None and */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "uvloop/loop.pyx":2594 * cdef void __atfork_child() nogil: * # See CPython/posixmodule.c for details * global __forking # <<<<<<<<<<<<<< * * with gil: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __pyx_gilstate_save = PyGILState_Ensure(); #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __pyx_gilstate_save = PyGILState_Ensure(); #endif goto __pyx_L1_error; } __pyx_L5:; } /* "uvloop/loop.pyx":2592 * * * cdef void __atfork_child() nogil: # <<<<<<<<<<<<<< * # See CPython/posixmodule.c for details * global __forking */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("uvloop.loop.__atfork_child", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 1); __pyx_L0:; #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif } /* "uvloop/loop.pyx":2604 * * * cdef __install_atfork(): # <<<<<<<<<<<<<< * global __atfork_installed * if __atfork_installed: */ static PyObject *__pyx_f_6uvloop_4loop___install_atfork(void) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__install_atfork", 0); /* "uvloop/loop.pyx":2606 * cdef __install_atfork(): * global __atfork_installed * if __atfork_installed: # <<<<<<<<<<<<<< * return * __atfork_installed = 1 */ __pyx_t_1 = (__pyx_v_6uvloop_4loop___atfork_installed != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2607 * global __atfork_installed * if __atfork_installed: * return # <<<<<<<<<<<<<< * __atfork_installed = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":2606 * cdef __install_atfork(): * global __atfork_installed * if __atfork_installed: # <<<<<<<<<<<<<< * return * __atfork_installed = 1 */ } /* "uvloop/loop.pyx":2608 * if __atfork_installed: * return * __atfork_installed = 1 # <<<<<<<<<<<<<< * * cdef int err */ __pyx_v_6uvloop_4loop___atfork_installed = 1; /* "uvloop/loop.pyx":2612 * cdef int err * * err = system.pthread_atfork(NULL, NULL, &__atfork_child) # <<<<<<<<<<<<<< * if err: * __atfork_installed = 0 */ __pyx_v_err = pthread_atfork(NULL, NULL, (&__pyx_f_6uvloop_4loop___atfork_child)); /* "uvloop/loop.pyx":2613 * * err = system.pthread_atfork(NULL, NULL, &__atfork_child) * if err: # <<<<<<<<<<<<<< * __atfork_installed = 0 * raise convert_error(-err) */ __pyx_t_1 = (__pyx_v_err != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2614 * err = system.pthread_atfork(NULL, NULL, &__atfork_child) * if err: * __atfork_installed = 0 # <<<<<<<<<<<<<< * raise convert_error(-err) * */ __pyx_v_6uvloop_4loop___atfork_installed = 0; /* "uvloop/loop.pyx":2615 * if err: * __atfork_installed = 0 * raise convert_error(-err) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error((-__pyx_v_err)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2615, __pyx_L1_error) /* "uvloop/loop.pyx":2613 * * err = system.pthread_atfork(NULL, NULL, &__atfork_child) * if err: # <<<<<<<<<<<<<< * __atfork_installed = 0 * raise convert_error(-err) */ } /* "uvloop/loop.pyx":2604 * * * cdef __install_atfork(): # <<<<<<<<<<<<<< * global __atfork_installed * if __atfork_installed: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__install_atfork", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2620 * # Install PyMem* memory allocators * cdef vint __mem_installed = 0 * cdef __install_pymem(): # <<<<<<<<<<<<<< * global __mem_installed * if __mem_installed: */ static PyObject *__pyx_f_6uvloop_4loop___install_pymem(void) { int __pyx_v_err; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__install_pymem", 0); /* "uvloop/loop.pyx":2622 * cdef __install_pymem(): * global __mem_installed * if __mem_installed: # <<<<<<<<<<<<<< * return * __mem_installed = 1 */ __pyx_t_1 = (__pyx_v_6uvloop_4loop___mem_installed != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2623 * global __mem_installed * if __mem_installed: * return # <<<<<<<<<<<<<< * __mem_installed = 1 * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "uvloop/loop.pyx":2622 * cdef __install_pymem(): * global __mem_installed * if __mem_installed: # <<<<<<<<<<<<<< * return * __mem_installed = 1 */ } /* "uvloop/loop.pyx":2624 * if __mem_installed: * return * __mem_installed = 1 # <<<<<<<<<<<<<< * * cdef int err */ __pyx_v_6uvloop_4loop___mem_installed = 1; /* "uvloop/loop.pyx":2627 * * cdef int err * err = uv.uv_replace_allocator(PyMem_RawMalloc, # <<<<<<<<<<<<<< * PyMem_RawRealloc, * PyMem_RawCalloc, */ __pyx_v_err = uv_replace_allocator(((uv_malloc_func)PyMem_RawMalloc), ((uv_realloc_func)PyMem_RawRealloc), ((uv_calloc_func)PyMem_RawCalloc), ((uv_free_func)PyMem_RawFree)); /* "uvloop/loop.pyx":2631 * PyMem_RawCalloc, * PyMem_RawFree) * if err < 0: # <<<<<<<<<<<<<< * __mem_installed = 0 * raise convert_error(err) */ __pyx_t_1 = ((__pyx_v_err < 0) != 0); if (__pyx_t_1) { /* "uvloop/loop.pyx":2632 * PyMem_RawFree) * if err < 0: * __mem_installed = 0 # <<<<<<<<<<<<<< * raise convert_error(err) * */ __pyx_v_6uvloop_4loop___mem_installed = 0; /* "uvloop/loop.pyx":2633 * if err < 0: * __mem_installed = 0 * raise convert_error(err) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_f_6uvloop_4loop_convert_error(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 2633, __pyx_L1_error) /* "uvloop/loop.pyx":2631 * PyMem_RawCalloc, * PyMem_RawFree) * if err < 0: # <<<<<<<<<<<<<< * __mem_installed = 0 * raise convert_error(err) */ } /* "uvloop/loop.pyx":2620 * # Install PyMem* memory allocators * cdef vint __mem_installed = 0 * cdef __install_pymem(): # <<<<<<<<<<<<<< * global __mem_installed * if __mem_installed: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("uvloop.loop.__install_pymem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "uvloop/loop.pyx":2636 * * * def _sighandler_noop(signum, frame): # <<<<<<<<<<<<<< * """Dummy signal handler.""" * pass */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_3_sighandler_noop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6uvloop_4loop_2_sighandler_noop[] = "_sighandler_noop(signum, frame)\nDummy signal handler."; static PyMethodDef __pyx_mdef_6uvloop_4loop_3_sighandler_noop = {"_sighandler_noop", (PyCFunction)__pyx_pw_6uvloop_4loop_3_sighandler_noop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_2_sighandler_noop}; static PyObject *__pyx_pw_6uvloop_4loop_3_sighandler_noop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_signum = 0; CYTHON_UNUSED PyObject *__pyx_v_frame = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_sighandler_noop (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signum,&__pyx_n_s_frame,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signum)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_sighandler_noop", 1, 2, 2, 1); __PYX_ERR(1, 2636, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_sighandler_noop") < 0)) __PYX_ERR(1, 2636, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_signum = values[0]; __pyx_v_frame = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_sighandler_noop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 2636, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("uvloop.loop._sighandler_noop", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6uvloop_4loop_2_sighandler_noop(__pyx_self, __pyx_v_signum, __pyx_v_frame); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_2_sighandler_noop(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_signum, CYTHON_UNUSED PyObject *__pyx_v_frame) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_sighandler_noop", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_6generator16(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "uvloop/loop.pyx":2643 * ########### Stuff for tests: * * async def _test_coroutine_1(): # <<<<<<<<<<<<<< * return 42 */ /* Python wrapper */ static PyObject *__pyx_pw_6uvloop_4loop_5_test_coroutine_1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6uvloop_4loop_4_test_coroutine_1[] = "_test_coroutine_1()"; static PyMethodDef __pyx_mdef_6uvloop_4loop_5_test_coroutine_1 = {"_test_coroutine_1", (PyCFunction)__pyx_pw_6uvloop_4loop_5_test_coroutine_1, METH_NOARGS, __pyx_doc_6uvloop_4loop_4_test_coroutine_1}; static PyObject *__pyx_pw_6uvloop_4loop_5_test_coroutine_1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_test_coroutine_1 (wrapper)", 0); __pyx_r = __pyx_pf_6uvloop_4loop_4_test_coroutine_1(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6uvloop_4loop_4_test_coroutine_1(CYTHON_UNUSED PyObject *__pyx_self) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_test_coroutine_1", 0); __pyx_cur_scope = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 *)__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1(__pyx_ptype_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 2643, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } { __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_6uvloop_4loop_6generator16, (PyObject *) __pyx_cur_scope, __pyx_n_s_test_coroutine_1, __pyx_n_s_test_coroutine_1, __pyx_n_s_uvloop_loop); if (unlikely(!gen)) __PYX_ERR(1, 2643, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("uvloop.loop._test_coroutine_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_6uvloop_4loop_6generator16(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 2643, __pyx_L1_error) /* "uvloop/loop.pyx":2644 * * async def _test_coroutine_1(): * return 42 # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_int_42); goto __pyx_L0; /* "uvloop/loop.pyx":2643 * ########### Stuff for tests: * * async def _test_coroutine_1(): # <<<<<<<<<<<<<< * return 42 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("_test_coroutine_1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_vtabstruct_6uvloop_4loop_UVHandle __pyx_vtable_6uvloop_4loop_UVHandle; static PyObject *__pyx_tp_new_6uvloop_4loop_UVHandle(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVHandle *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVHandle *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_UVHandle; p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); p->_source_traceback = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_8UVHandle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVHandle(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVHandle *p = (struct __pyx_obj_6uvloop_4loop_UVHandle *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_8UVHandle_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_loop); Py_CLEAR(p->_source_traceback); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVHandle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVHandle *p = (struct __pyx_obj_6uvloop_4loop_UVHandle *)o; if (p->_loop) { e = (*v)(((PyObject*)p->_loop), a); if (e) return e; } if (p->_source_traceback) { e = (*v)(p->_source_traceback, a); if (e) return e; } return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_8UVHandle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_8UVHandle_17_source_traceback_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_UVHandle[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_UVHandle[] = { {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_8UVHandle__source_traceback, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVHandle = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVHandle", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVHandle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVHandle, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "UVHandle()\nA base class for all libuv handles.\n\n Automatically manages memory deallocation and closing.\n\n Important:\n\n 1. call \"_ensure_alive()\" before calling any libuv functions on\n your handles.\n\n 2. call \"__ensure_handle_data\" in *all* libuv handle callbacks.\n ", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVHandle, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVHandle, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_UVHandle, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVHandle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVSocketHandle __pyx_vtable_6uvloop_4loop_UVSocketHandle; static PyObject *__pyx_tp_new_6uvloop_4loop_UVSocketHandle(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVSocketHandle; p->_fileobj = Py_None; Py_INCREF(Py_None); p->__pyx___cached_socket = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_14UVSocketHandle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p = (struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_fileobj); Py_CLEAR(p->__pyx___cached_socket); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVSocketHandle *p = (struct __pyx_obj_6uvloop_4loop_UVSocketHandle *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->_fileobj) { e = (*v)(p->_fileobj, a); if (e) return e; } if (p->__pyx___cached_socket) { e = (*v)(p->__pyx___cached_socket, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVSocketHandle[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVSocketHandle = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVSocketHandle", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVSocketHandle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVSocketHandle, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVSocketHandle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVAsync __pyx_vtable_6uvloop_4loop_UVAsync; static PyObject *__pyx_tp_new_6uvloop_4loop_UVAsync(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVAsync *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVAsync; p->ctx = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_UVAsync(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVAsync *p = (struct __pyx_obj_6uvloop_4loop_UVAsync *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ctx); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVAsync(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVAsync *p = (struct __pyx_obj_6uvloop_4loop_UVAsync *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->ctx) { e = (*v)(p->ctx, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_6uvloop_4loop_UVAsync = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVAsync", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVAsync), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVAsync, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVAsync, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVAsync, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVTimer __pyx_vtable_6uvloop_4loop_UVTimer; static PyObject *__pyx_tp_new_6uvloop_4loop_UVTimer(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVTimer *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVTimer; p->ctx = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_UVTimer(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVTimer *p = (struct __pyx_obj_6uvloop_4loop_UVTimer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ctx); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVTimer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVTimer *p = (struct __pyx_obj_6uvloop_4loop_UVTimer *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->ctx) { e = (*v)(p->ctx, a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_6uvloop_4loop_UVTimer = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVTimer", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVTimer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVTimer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVTimer, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVTimer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVIdle __pyx_vtable_6uvloop_4loop_UVIdle; static PyObject *__pyx_tp_new_6uvloop_4loop_UVIdle(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVIdle *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVIdle; p->h = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_UVIdle(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVIdle *p = (struct __pyx_obj_6uvloop_4loop_UVIdle *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->h); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVIdle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVIdle *p = (struct __pyx_obj_6uvloop_4loop_UVIdle *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->h) { e = (*v)(((PyObject*)p->h), a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_6uvloop_4loop_UVIdle = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVIdle", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVIdle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVIdle, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVIdle, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVIdle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVBaseTransport __pyx_vtable_6uvloop_4loop_UVBaseTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_UVBaseTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVSocketHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVBaseTransport; p->_protocol_data_received = Py_None; Py_INCREF(Py_None); p->_protocol = Py_None; Py_INCREF(Py_None); p->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None); p->_waiter = Py_None; Py_INCREF(Py_None); p->_extra_info = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_15UVBaseTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p = (struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->_protocol_data_received); Py_CLEAR(p->_protocol); Py_CLEAR(p->_server); Py_CLEAR(p->_waiter); Py_CLEAR(p->_extra_info); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVBaseTransport *p = (struct __pyx_obj_6uvloop_4loop_UVBaseTransport *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(o, v, a); if (e) return e; if (p->_protocol_data_received) { e = (*v)(p->_protocol_data_received, a); if (e) return e; } if (p->_protocol) { e = (*v)(p->_protocol, a); if (e) return e; } if (p->_server) { e = (*v)(((PyObject*)p->_server), a); if (e) return e; } if (p->_waiter) { e = (*v)(p->_waiter, a); if (e) return e; } if (p->_extra_info) { e = (*v)(p->_extra_info, a); if (e) return e; } return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_15UVBaseTransport__paused(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_15UVBaseTransport_7_paused_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_15UVBaseTransport__closing(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_15UVBaseTransport_8_closing_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_UVBaseTransport[] = { {"get_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_3get_protocol, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_2get_protocol}, {"set_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_5set_protocol, METH_O, __pyx_doc_6uvloop_4loop_15UVBaseTransport_4set_protocol}, {"_force_close", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_7_force_close, METH_O, __pyx_doc_6uvloop_4loop_15UVBaseTransport_6_force_close}, {"abort", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_9abort, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_8abort}, {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_11close, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_10close}, {"is_closing", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_13is_closing, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_12is_closing}, {"get_write_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_15get_write_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_14get_write_buffer_size}, {"set_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_17set_write_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_16set_write_buffer_limits}, {"get_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_19get_write_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_18get_write_buffer_limits}, {"get_extra_info", (PyCFunction)__pyx_pw_6uvloop_4loop_15UVBaseTransport_21get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_15UVBaseTransport_20get_extra_info}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_UVBaseTransport[] = { {(char *)"_paused", __pyx_getprop_6uvloop_4loop_15UVBaseTransport__paused, 0, (char *)0, 0}, {(char *)"_closing", __pyx_getprop_6uvloop_4loop_15UVBaseTransport__closing, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVBaseTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVBaseTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVBaseTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVBaseTransport, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_UVBaseTransport, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVBaseTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_Loop __pyx_vtable_6uvloop_4loop_Loop; static PyObject *__pyx_tp_new_6uvloop_4loop_Loop(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop_Loop *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_Loop *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Loop; p->slow_callback_duration = Py_None; Py_INCREF(Py_None); p->_task_factory = Py_None; Py_INCREF(Py_None); p->_exception_handler = Py_None; Py_INCREF(Py_None); p->_default_executor = Py_None; Py_INCREF(Py_None); p->_ready = Py_None; Py_INCREF(Py_None); p->_queued_streams = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_transports = Py_None; Py_INCREF(Py_None); p->_signal_handlers = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_ssock = Py_None; Py_INCREF(Py_None); p->_csock = Py_None; Py_INCREF(Py_None); p->_timers = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_polls = ((PyObject*)Py_None); Py_INCREF(Py_None); p->active_process_handler = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)Py_None); Py_INCREF(Py_None); p->handler_async = ((struct __pyx_obj_6uvloop_4loop_UVAsync *)Py_None); Py_INCREF(Py_None); p->handler_idle = ((struct __pyx_obj_6uvloop_4loop_UVIdle *)Py_None); Py_INCREF(Py_None); p->handler_check__exec_writes = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)Py_None); Py_INCREF(Py_None); p->_last_error = Py_None; Py_INCREF(Py_None); p->_asyncgens = Py_None; Py_INCREF(Py_None); p->_debug_handles_total = Py_None; Py_INCREF(Py_None); p->_debug_handles_closed = Py_None; Py_INCREF(Py_None); p->_debug_handles_current = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_4Loop_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_Loop(PyObject *o) { struct __pyx_obj_6uvloop_4loop_Loop *p = (struct __pyx_obj_6uvloop_4loop_Loop *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_4Loop_5__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->slow_callback_duration); Py_CLEAR(p->_task_factory); Py_CLEAR(p->_exception_handler); Py_CLEAR(p->_default_executor); Py_CLEAR(p->_ready); Py_CLEAR(p->_queued_streams); Py_CLEAR(p->_transports); Py_CLEAR(p->_signal_handlers); Py_CLEAR(p->_ssock); Py_CLEAR(p->_csock); Py_CLEAR(p->_timers); Py_CLEAR(p->_polls); Py_CLEAR(p->active_process_handler); Py_CLEAR(p->handler_async); Py_CLEAR(p->handler_idle); Py_CLEAR(p->handler_check__exec_writes); Py_CLEAR(p->_last_error); Py_CLEAR(p->_asyncgens); Py_CLEAR(p->_debug_handles_total); Py_CLEAR(p->_debug_handles_closed); Py_CLEAR(p->_debug_handles_current); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6uvloop_4loop_Loop(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_Loop *p = (struct __pyx_obj_6uvloop_4loop_Loop *)o; if (p->slow_callback_duration) { e = (*v)(p->slow_callback_duration, a); if (e) return e; } if (p->_task_factory) { e = (*v)(p->_task_factory, a); if (e) return e; } if (p->_exception_handler) { e = (*v)(p->_exception_handler, a); if (e) return e; } if (p->_default_executor) { e = (*v)(p->_default_executor, a); if (e) return e; } if (p->_ready) { e = (*v)(p->_ready, a); if (e) return e; } if (p->_queued_streams) { e = (*v)(p->_queued_streams, a); if (e) return e; } if (p->_transports) { e = (*v)(p->_transports, a); if (e) return e; } if (p->_signal_handlers) { e = (*v)(p->_signal_handlers, a); if (e) return e; } if (p->_ssock) { e = (*v)(p->_ssock, a); if (e) return e; } if (p->_csock) { e = (*v)(p->_csock, a); if (e) return e; } if (p->_timers) { e = (*v)(p->_timers, a); if (e) return e; } if (p->_polls) { e = (*v)(p->_polls, a); if (e) return e; } if (p->active_process_handler) { e = (*v)(((PyObject*)p->active_process_handler), a); if (e) return e; } if (p->handler_async) { e = (*v)(((PyObject*)p->handler_async), a); if (e) return e; } if (p->handler_idle) { e = (*v)(((PyObject*)p->handler_idle), a); if (e) return e; } if (p->handler_check__exec_writes) { e = (*v)(((PyObject*)p->handler_check__exec_writes), a); if (e) return e; } if (p->_last_error) { e = (*v)(p->_last_error, a); if (e) return e; } if (p->_asyncgens) { e = (*v)(p->_asyncgens, a); if (e) return e; } if (p->_debug_handles_total) { e = (*v)(p->_debug_handles_total, a); if (e) return e; } if (p->_debug_handles_closed) { e = (*v)(p->_debug_handles_closed, a); if (e) return e; } if (p->_debug_handles_current) { e = (*v)(p->_debug_handles_current, a); if (e) return e; } return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop_slow_callback_duration(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_1__get__(o); } static int __pyx_setprop_6uvloop_4loop_4Loop_slow_callback_duration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_3__set__(o, v); } else { return __pyx_pw_6uvloop_4loop_4Loop_22slow_callback_duration_5__del__(o); } } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__closed(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_7_closed_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cc(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_9_debug_cc_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_20_debug_handles_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_closed(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_21_debug_handles_closed_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_handles_current(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_22_debug_handles_current_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_freed(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_23_debug_uv_handles_freed_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_23_debug_cb_handles_count_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_29_debug_cb_timer_handles_count_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_shutdown_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_shutdown_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_listen_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_33_debug_stream_listen_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_read_cb_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_34_debug_stream_read_cb_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_28_debug_stream_read_eof_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_38_debug_stream_read_eof_cb_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_31_debug_stream_read_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_tries(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_25_debug_stream_write_tries_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_32_debug_stream_write_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_29_debug_stream_write_ctx_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_cnt(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_27_debug_stream_write_ctx_cnt_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_35_debug_stream_write_cb_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_read_events_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_23_poll_read_events_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_read_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_26_poll_read_cb_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_write_events_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_24_poll_write_events_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__poll_write_cb_errors_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_27_poll_write_cb_errors_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__sock_try_write_total(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_21_sock_try_write_total_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_4Loop__debug_exception_handler_cnt(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_4Loop_28_debug_exception_handler_cnt_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_Loop[] = { {"_get_backend_id", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_7_get_backend_id, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_6_get_backend_id}, {"print_debug_info", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_9print_debug_info, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_8print_debug_info}, {"call_soon", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_13call_soon, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_12call_soon}, {"call_soon_threadsafe", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_15call_soon_threadsafe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_14call_soon_threadsafe}, {"call_later", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_17call_later, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_16call_later}, {"call_at", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_19call_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_18call_at}, {"time", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_21time, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_20time}, {"stop", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_23stop, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_22stop}, {"run_forever", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_25run_forever, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_24run_forever}, {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_27close, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_26close}, {"get_debug", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_29get_debug, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_28get_debug}, {"set_debug", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_31set_debug, METH_O, __pyx_doc_6uvloop_4loop_4Loop_30set_debug}, {"is_running", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_33is_running, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_32is_running}, {"is_closed", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_35is_closed, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_34is_closed}, {"create_future", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_37create_future, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_36create_future}, {"create_task", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_39create_task, METH_O, __pyx_doc_6uvloop_4loop_4Loop_38create_task}, {"set_task_factory", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_41set_task_factory, METH_O, __pyx_doc_6uvloop_4loop_4Loop_40set_task_factory}, {"get_task_factory", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_43get_task_factory, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_42get_task_factory}, {"run_until_complete", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_45run_until_complete, METH_O, __pyx_doc_6uvloop_4loop_4Loop_44run_until_complete}, {"getaddrinfo", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_47getaddrinfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_46getaddrinfo}, {"getnameinfo", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_49getnameinfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_48getnameinfo}, {"create_server", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_52create_server, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_51create_server}, {"create_connection", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_55create_connection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_54create_connection}, {"create_unix_server", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_58create_unix_server, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_57create_unix_server}, {"create_unix_connection", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_61create_unix_connection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_60create_unix_connection}, {"default_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_64default_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_63default_exception_handler}, {"get_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_66get_exception_handler, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_65get_exception_handler}, {"set_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_68set_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_67set_exception_handler}, {"call_exception_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_70call_exception_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_69call_exception_handler}, {"add_reader", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_72add_reader, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_71add_reader}, {"remove_reader", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_74remove_reader, METH_O, __pyx_doc_6uvloop_4loop_4Loop_73remove_reader}, {"add_writer", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_76add_writer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_75add_writer}, {"remove_writer", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_78remove_writer, METH_O, __pyx_doc_6uvloop_4loop_4Loop_77remove_writer}, {"sock_recv", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_80sock_recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_79sock_recv}, {"sock_sendall", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_82sock_sendall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_81sock_sendall}, {"sock_accept", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_85sock_accept, METH_O, __pyx_doc_6uvloop_4loop_4Loop_84sock_accept}, {"sock_connect", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_87sock_connect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_86sock_connect}, {"connect_accepted_socket", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_90connect_accepted_socket, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_89connect_accepted_socket}, {"run_in_executor", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_93run_in_executor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_92run_in_executor}, {"set_default_executor", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_95set_default_executor, METH_O, __pyx_doc_6uvloop_4loop_4Loop_94set_default_executor}, {"__subprocess_run", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_97__subprocess_run, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_96__subprocess_run}, {"subprocess_shell", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_100subprocess_shell, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_99subprocess_shell}, {"subprocess_exec", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_102subprocess_exec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_101subprocess_exec}, {"connect_read_pipe", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_104connect_read_pipe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_103connect_read_pipe}, {"connect_write_pipe", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_107connect_write_pipe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_106connect_write_pipe}, {"add_signal_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_110add_signal_handler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_109add_signal_handler}, {"remove_signal_handler", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_112remove_signal_handler, METH_O, __pyx_doc_6uvloop_4loop_4Loop_111remove_signal_handler}, {"create_datagram_endpoint", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_114create_datagram_endpoint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_4Loop_113create_datagram_endpoint}, {"_asyncgen_finalizer_hook", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_117_asyncgen_finalizer_hook, METH_O, __pyx_doc_6uvloop_4loop_4Loop_116_asyncgen_finalizer_hook}, {"_asyncgen_firstiter_hook", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_119_asyncgen_firstiter_hook, METH_O, __pyx_doc_6uvloop_4loop_4Loop_118_asyncgen_firstiter_hook}, {"shutdown_asyncgens", (PyCFunction)__pyx_pw_6uvloop_4loop_4Loop_121shutdown_asyncgens, METH_NOARGS, __pyx_doc_6uvloop_4loop_4Loop_120shutdown_asyncgens}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Loop[] = { {(char *)"slow_callback_duration", __pyx_getprop_6uvloop_4loop_4Loop_slow_callback_duration, __pyx_setprop_6uvloop_4loop_4Loop_slow_callback_duration, (char *)"slow_callback_duration: object", 0}, {(char *)"_closed", __pyx_getprop_6uvloop_4loop_4Loop__closed, 0, (char *)0, 0}, {(char *)"_debug_cc", __pyx_getprop_6uvloop_4loop_4Loop__debug_cc, 0, (char *)0, 0}, {(char *)"_debug_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_total, 0, (char *)0, 0}, {(char *)"_debug_handles_closed", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_closed, 0, (char *)0, 0}, {(char *)"_debug_handles_current", __pyx_getprop_6uvloop_4loop_4Loop__debug_handles_current, 0, (char *)0, 0}, {(char *)"_debug_uv_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_total, 0, (char *)0, 0}, {(char *)"_debug_uv_handles_freed", __pyx_getprop_6uvloop_4loop_4Loop__debug_uv_handles_freed, 0, (char *)0, 0}, {(char *)"_debug_cb_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_total, 0, (char *)0, 0}, {(char *)"_debug_cb_handles_count", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_handles_count, 0, (char *)0, 0}, {(char *)"_debug_cb_timer_handles_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_total, 0, (char *)0, 0}, {(char *)"_debug_cb_timer_handles_count", __pyx_getprop_6uvloop_4loop_4Loop__debug_cb_timer_handles_count, 0, (char *)0, 0}, {(char *)"_debug_stream_shutdown_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_shutdown_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_listen_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_listen_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_read_cb_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_total, 0, (char *)0, 0}, {(char *)"_debug_stream_read_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_cb_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_read_eof_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_total, 0, (char *)0, 0}, {(char *)"_debug_stream_read_eof_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_eof_cb_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_read_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_read_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_write_tries", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_tries, 0, (char *)0, 0}, {(char *)"_debug_stream_write_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_errors_total, 0, (char *)0, 0}, {(char *)"_debug_stream_write_ctx_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_total, 0, (char *)0, 0}, {(char *)"_debug_stream_write_ctx_cnt", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_ctx_cnt, 0, (char *)0, 0}, {(char *)"_debug_stream_write_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__debug_stream_write_cb_errors_total, 0, (char *)0, 0}, {(char *)"_poll_read_events_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_read_events_total, 0, (char *)0, 0}, {(char *)"_poll_read_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_read_cb_errors_total, 0, (char *)0, 0}, {(char *)"_poll_write_events_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_write_events_total, 0, (char *)0, 0}, {(char *)"_poll_write_cb_errors_total", __pyx_getprop_6uvloop_4loop_4Loop__poll_write_cb_errors_total, 0, (char *)0, 0}, {(char *)"_sock_try_write_total", __pyx_getprop_6uvloop_4loop_4Loop__sock_try_write_total, 0, (char *)0, 0}, {(char *)"_debug_exception_handler_cnt", __pyx_getprop_6uvloop_4loop_4Loop__debug_exception_handler_cnt, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_Loop = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.Loop", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_Loop), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_Loop, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_4Loop_11__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Loop()", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_Loop, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_Loop, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_Loop, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6uvloop_4loop_4Loop_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_Loop, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_Handle __pyx_vtable_6uvloop_4loop_Handle; static struct __pyx_obj_6uvloop_4loop_Handle *__pyx_freelist_6uvloop_4loop_Handle[250]; static int __pyx_freecount_6uvloop_4loop_Handle = 0; static PyObject *__pyx_tp_new_6uvloop_4loop_Handle(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop_Handle *p; PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_Handle > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_Handle)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop_Handle[--__pyx_freecount_6uvloop_4loop_Handle]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_Handle)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6uvloop_4loop_Handle *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Handle; p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); p->meth_name = ((PyObject*)Py_None); Py_INCREF(Py_None); p->arg1 = Py_None; Py_INCREF(Py_None); p->arg2 = Py_None; Py_INCREF(Py_None); p->arg3 = Py_None; Py_INCREF(Py_None); p->arg4 = Py_None; Py_INCREF(Py_None); p->_source_traceback = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_6Handle_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_Handle(PyObject *o) { struct __pyx_obj_6uvloop_4loop_Handle *p = (struct __pyx_obj_6uvloop_4loop_Handle *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_6Handle_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->loop); Py_CLEAR(p->meth_name); Py_CLEAR(p->arg1); Py_CLEAR(p->arg2); Py_CLEAR(p->arg3); Py_CLEAR(p->arg4); Py_CLEAR(p->_source_traceback); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_Handle < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_Handle)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { __pyx_freelist_6uvloop_4loop_Handle[__pyx_freecount_6uvloop_4loop_Handle++] = ((struct __pyx_obj_6uvloop_4loop_Handle *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop_Handle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_Handle *p = (struct __pyx_obj_6uvloop_4loop_Handle *)o; if (p->loop) { e = (*v)(((PyObject*)p->loop), a); if (e) return e; } if (p->arg1) { e = (*v)(p->arg1, a); if (e) return e; } if (p->arg2) { e = (*v)(p->arg2, a); if (e) return e; } if (p->arg3) { e = (*v)(p->arg3, a); if (e) return e; } if (p->arg4) { e = (*v)(p->arg4, a); if (e) return e; } if (p->_source_traceback) { e = (*v)(p->_source_traceback, a); if (e) return e; } return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_6Handle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_6Handle_17_source_traceback_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_Handle[] = { {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_6Handle_9cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Handle_8cancel}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Handle[] = { {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_6Handle__source_traceback, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_Handle = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.Handle", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_Handle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_Handle, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_6Handle_7__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Handle()", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_Handle, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_Handle, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_Handle, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6uvloop_4loop_6Handle_5__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_Handle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_TimerHandle __pyx_vtable_6uvloop_4loop_TimerHandle; static struct __pyx_obj_6uvloop_4loop_TimerHandle *__pyx_freelist_6uvloop_4loop_TimerHandle[250]; static int __pyx_freecount_6uvloop_4loop_TimerHandle = 0; static PyObject *__pyx_tp_new_6uvloop_4loop_TimerHandle(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_TimerHandle *p; PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_TimerHandle > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop_TimerHandle[--__pyx_freecount_6uvloop_4loop_TimerHandle]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6uvloop_4loop_TimerHandle *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_TimerHandle; p->callback = Py_None; Py_INCREF(Py_None); p->args = Py_None; Py_INCREF(Py_None); p->timer = ((struct __pyx_obj_6uvloop_4loop_UVTimer *)Py_None); Py_INCREF(Py_None); p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); p->_source_traceback = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_11TimerHandle_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_TimerHandle(PyObject *o) { struct __pyx_obj_6uvloop_4loop_TimerHandle *p = (struct __pyx_obj_6uvloop_4loop_TimerHandle *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_11TimerHandle_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } if (p->__weakref__) PyObject_ClearWeakRefs(o); Py_CLEAR(p->callback); Py_CLEAR(p->args); Py_CLEAR(p->timer); Py_CLEAR(p->loop); Py_CLEAR(p->_source_traceback); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_TimerHandle < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { __pyx_freelist_6uvloop_4loop_TimerHandle[__pyx_freecount_6uvloop_4loop_TimerHandle++] = ((struct __pyx_obj_6uvloop_4loop_TimerHandle *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop_TimerHandle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_TimerHandle *p = (struct __pyx_obj_6uvloop_4loop_TimerHandle *)o; if (p->callback) { e = (*v)(p->callback, a); if (e) return e; } if (p->args) { e = (*v)(p->args, a); if (e) return e; } if (p->timer) { e = (*v)(((PyObject*)p->timer), a); if (e) return e; } if (p->loop) { e = (*v)(((PyObject*)p->loop), a); if (e) return e; } if (p->_source_traceback) { e = (*v)(p->_source_traceback, a); if (e) return e; } return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_11TimerHandle__source_traceback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_11TimerHandle_17_source_traceback_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_TimerHandle[] = { {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_11TimerHandle_7cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_11TimerHandle_6cancel}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_TimerHandle[] = { {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_11TimerHandle__source_traceback, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_TimerHandle = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.TimerHandle", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_TimerHandle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_TimerHandle, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_11TimerHandle_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_TimerHandle, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_TimerHandle, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_TimerHandle, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_TimerHandle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVCheck __pyx_vtable_6uvloop_4loop_UVCheck; static PyObject *__pyx_tp_new_6uvloop_4loop_UVCheck(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVCheck *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVCheck *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVCheck; p->h = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_UVCheck(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVCheck *p = (struct __pyx_obj_6uvloop_4loop_UVCheck *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->h); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVCheck(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVCheck *p = (struct __pyx_obj_6uvloop_4loop_UVCheck *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->h) { e = (*v)(((PyObject*)p->h), a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_6uvloop_4loop_UVCheck = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVCheck", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVCheck), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVCheck, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVCheck, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVCheck, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVPoll __pyx_vtable_6uvloop_4loop_UVPoll; static PyObject *__pyx_tp_new_6uvloop_4loop_UVPoll(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVPoll *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVPoll *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVPoll; p->reading_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None); p->writing_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_UVPoll(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVPoll *p = (struct __pyx_obj_6uvloop_4loop_UVPoll *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->reading_handle); Py_CLEAR(p->writing_handle); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVPoll(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVPoll *p = (struct __pyx_obj_6uvloop_4loop_UVPoll *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->reading_handle) { e = (*v)(((PyObject*)p->reading_handle), a); if (e) return e; } if (p->writing_handle) { e = (*v)(((PyObject*)p->writing_handle), a); if (e) return e; } return 0; } static PyTypeObject __pyx_type_6uvloop_4loop_UVPoll = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVPoll", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVPoll), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVPoll, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVPoll, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVPoll, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVStream __pyx_vtable_6uvloop_4loop_UVStream; static PyObject *__pyx_tp_new_6uvloop_4loop_UVStream(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVStream *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVBaseTransport(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVStream *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVStream; p->_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_8UVStream_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVStream(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVStream *p = (struct __pyx_obj_6uvloop_4loop_UVStream *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_buffer); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVStream(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVStream *p = (struct __pyx_obj_6uvloop_4loop_UVStream *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport(o, v, a); if (e) return e; if (p->_buffer) { e = (*v)(p->_buffer, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVStream[] = { {"write", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_5write, METH_O, __pyx_doc_6uvloop_4loop_8UVStream_4write}, {"writelines", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_7writelines, METH_O, __pyx_doc_6uvloop_4loop_8UVStream_6writelines}, {"write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_9write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_8write_eof}, {"can_write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_11can_write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_10can_write_eof}, {"pause_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_13pause_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_12pause_reading}, {"resume_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_8UVStream_15resume_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_8UVStream_14resume_reading}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVStream = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVStream", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVStream), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVStream, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVStream, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVStreamServer __pyx_vtable_6uvloop_4loop_UVStreamServer; static PyObject *__pyx_tp_new_6uvloop_4loop_UVStreamServer(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVStreamServer *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVSocketHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVStreamServer; p->ssl = Py_None; Py_INCREF(Py_None); p->protocol_factory = Py_None; Py_INCREF(Py_None); p->_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_14UVStreamServer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVStreamServer *p = (struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->ssl); Py_CLEAR(p->protocol_factory); Py_CLEAR(p->_server); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVSocketHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVStreamServer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVStreamServer *p = (struct __pyx_obj_6uvloop_4loop_UVStreamServer *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVSocketHandle(o, v, a); if (e) return e; if (p->ssl) { e = (*v)(p->ssl, a); if (e) return e; } if (p->protocol_factory) { e = (*v)(p->protocol_factory, a); if (e) return e; } if (p->_server) { e = (*v)(((PyObject*)p->_server), a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVStreamServer[] = { {"__on_ssl_connected", (PyCFunction)__pyx_pw_6uvloop_4loop_14UVStreamServer_3__on_ssl_connected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_14UVStreamServer_2__on_ssl_connected}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVStreamServer = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVStreamServer", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVStreamServer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVStreamServer, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVStreamServer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_TCPServer __pyx_vtable_6uvloop_4loop_TCPServer; static PyObject *__pyx_tp_new_6uvloop_4loop_TCPServer(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_TCPServer *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStreamServer(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_TCPServer; return o; } static PyTypeObject __pyx_type_6uvloop_4loop_TCPServer = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.TCPServer", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_TCPServer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_TCPServer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_TCPTransport __pyx_vtable_6uvloop_4loop_TCPTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_TCPTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_TCPTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_TCPTransport; return o; } static PyMethodDef __pyx_methods_6uvloop_4loop_TCPTransport[] = { {"get_extra_info", (PyCFunction)__pyx_pw_6uvloop_4loop_12TCPTransport_1get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12TCPTransport_get_extra_info}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_TCPTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.TCPTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_TCPTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_TCPTransport, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_TCPTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UnixServer __pyx_vtable_6uvloop_4loop_UnixServer; static PyObject *__pyx_tp_new_6uvloop_4loop_UnixServer(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UnixServer *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStreamServer(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UnixServer; return o; } static PyTypeObject __pyx_type_6uvloop_4loop_UnixServer = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UnixServer", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UnixServer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStreamServer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStreamServer, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UnixServer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UnixTransport __pyx_vtable_6uvloop_4loop_UnixTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_UnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UnixTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UnixTransport; return o; } static PyTypeObject __pyx_type_6uvloop_4loop_UnixTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UnixTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UnixTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UnixTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_ReadUnixTransport __pyx_vtable_6uvloop_4loop_ReadUnixTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_ReadUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_ReadUnixTransport; return o; } static PyMethodDef __pyx_methods_6uvloop_4loop_ReadUnixTransport[] = { {"get_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_1get_write_buffer_limits, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_get_write_buffer_limits}, {"set_write_buffer_limits", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_3set_write_buffer_limits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_2set_write_buffer_limits}, {"get_write_buffer_size", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_5get_write_buffer_size, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_4get_write_buffer_size}, {"write", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_7write, METH_O, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_6write}, {"writelines", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_9writelines, METH_O, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_8writelines}, {"write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_11write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_10write_eof}, {"can_write_eof", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_13can_write_eof, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_12can_write_eof}, {"abort", (PyCFunction)__pyx_pw_6uvloop_4loop_17ReadUnixTransport_15abort, METH_NOARGS, __pyx_doc_6uvloop_4loop_17ReadUnixTransport_14abort}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_ReadUnixTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.ReadUnixTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_ReadUnixTransport, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_ReadUnixTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_WriteUnixTransport __pyx_vtable_6uvloop_4loop_WriteUnixTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_WriteUnixTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVStream(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_WriteUnixTransport; return o; } static PyMethodDef __pyx_methods_6uvloop_4loop_WriteUnixTransport[] = { {"pause_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_1pause_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_pause_reading}, {"resume_reading", (PyCFunction)__pyx_pw_6uvloop_4loop_18WriteUnixTransport_3resume_reading, METH_NOARGS, __pyx_doc_6uvloop_4loop_18WriteUnixTransport_2resume_reading}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_WriteUnixTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.WriteUnixTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVStream, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVStream_3__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVStream, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_WriteUnixTransport, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_WriteUnixTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVProcess __pyx_vtable_6uvloop_4loop_UVProcess; static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcess(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVProcess *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVHandle(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVProcess *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVProcess; p->_returncode = Py_None; Py_INCREF(Py_None); p->_pid = Py_None; Py_INCREF(Py_None); p->_errpipe_read = Py_None; Py_INCREF(Py_None); p->_errpipe_write = Py_None; Py_INCREF(Py_None); p->_preexec_fn = Py_None; Py_INCREF(Py_None); p->_fds_to_close = ((PyObject*)Py_None); Py_INCREF(Py_None); p->__pyx___env = ((PyObject*)Py_None); Py_INCREF(Py_None); p->__pyx___args = ((PyObject*)Py_None); Py_INCREF(Py_None); p->__pyx___cwd = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_9UVProcess_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVProcess(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVProcess *p = (struct __pyx_obj_6uvloop_4loop_UVProcess *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_9UVProcess_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_returncode); Py_CLEAR(p->_pid); Py_CLEAR(p->_errpipe_read); Py_CLEAR(p->_errpipe_write); Py_CLEAR(p->_preexec_fn); Py_CLEAR(p->_fds_to_close); Py_CLEAR(p->__pyx___env); Py_CLEAR(p->__pyx___args); Py_CLEAR(p->__pyx___cwd); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVHandle(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVProcess(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVProcess *p = (struct __pyx_obj_6uvloop_4loop_UVProcess *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVHandle(o, v, a); if (e) return e; if (p->_returncode) { e = (*v)(p->_returncode, a); if (e) return e; } if (p->_pid) { e = (*v)(p->_pid, a); if (e) return e; } if (p->_errpipe_read) { e = (*v)(p->_errpipe_read, a); if (e) return e; } if (p->_errpipe_write) { e = (*v)(p->_errpipe_write, a); if (e) return e; } if (p->_preexec_fn) { e = (*v)(p->_preexec_fn, a); if (e) return e; } if (p->_fds_to_close) { e = (*v)(p->_fds_to_close, a); if (e) return e; } if (p->__pyx___env) { e = (*v)(p->__pyx___env, a); if (e) return e; } if (p->__pyx___args) { e = (*v)(p->__pyx___args, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVProcess[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVProcess = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVProcess", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVProcess), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVProcess, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Abstract class; wrapper over uv_process_t handle.", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVProcess, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVProcess, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVProcess, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVProcessTransport __pyx_vtable_6uvloop_4loop_UVProcessTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_UVProcessTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVProcess(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o); p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UVProcessTransport; p->_exit_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_init_futs = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_pending_calls = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_protocol = Py_None; Py_INCREF(Py_None); p->_stdin = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)Py_None); Py_INCREF(Py_None); p->_stdout = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); Py_INCREF(Py_None); p->_stderr = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); Py_INCREF(Py_None); p->stdin_proto = Py_None; Py_INCREF(Py_None); p->stdout_proto = Py_None; Py_INCREF(Py_None); p->stderr_proto = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_18UVProcessTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVProcessTransport(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_exit_waiters); Py_CLEAR(p->_init_futs); Py_CLEAR(p->_pending_calls); Py_CLEAR(p->_protocol); Py_CLEAR(p->_stdin); Py_CLEAR(p->_stdout); Py_CLEAR(p->_stderr); Py_CLEAR(p->stdin_proto); Py_CLEAR(p->stdout_proto); Py_CLEAR(p->stderr_proto); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVProcess(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVProcessTransport(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVProcessTransport *p = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVProcess(o, v, a); if (e) return e; if (p->_exit_waiters) { e = (*v)(p->_exit_waiters, a); if (e) return e; } if (p->_init_futs) { e = (*v)(p->_init_futs, a); if (e) return e; } if (p->_pending_calls) { e = (*v)(p->_pending_calls, a); if (e) return e; } if (p->_protocol) { e = (*v)(p->_protocol, a); if (e) return e; } if (p->_stdin) { e = (*v)(((PyObject*)p->_stdin), a); if (e) return e; } if (p->_stdout) { e = (*v)(((PyObject*)p->_stdout), a); if (e) return e; } if (p->_stderr) { e = (*v)(((PyObject*)p->_stderr), a); if (e) return e; } if (p->stdin_proto) { e = (*v)(p->stdin_proto, a); if (e) return e; } if (p->stdout_proto) { e = (*v)(p->stdout_proto, a); if (e) return e; } if (p->stderr_proto) { e = (*v)(p->stderr_proto, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVProcessTransport[] = { {"__stdio_inited", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_3__stdio_inited, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_2__stdio_inited}, {"get_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_5get_protocol, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_4get_protocol}, {"set_protocol", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_7set_protocol, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_6set_protocol}, {"get_pid", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_9get_pid, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_8get_pid}, {"get_returncode", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_11get_returncode, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_10get_returncode}, {"get_pipe_transport", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_13get_pipe_transport, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_12get_pipe_transport}, {"terminate", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_15terminate, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_14terminate}, {"kill", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_17kill, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_16kill}, {"send_signal", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_19send_signal, METH_O, __pyx_doc_6uvloop_4loop_18UVProcessTransport_18send_signal}, {"is_closing", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_21is_closing, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_20is_closing}, {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_23close, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_22close}, {"get_extra_info", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_25get_extra_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_24get_extra_info}, {"_wait", (PyCFunction)__pyx_pw_6uvloop_4loop_18UVProcessTransport_27_wait, METH_NOARGS, __pyx_doc_6uvloop_4loop_18UVProcessTransport_26_wait}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVProcessTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVProcessTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVProcessTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVProcessTransport, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVProcessTransport, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVProcessTransport, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVProcessTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UVRequest __pyx_vtable_6uvloop_4loop_UVRequest; static PyObject *__pyx_tp_new_6uvloop_4loop_UVRequest(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UVRequest *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UVRequest *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_UVRequest; p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_9UVRequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UVRequest(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_9UVRequest_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->loop); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6uvloop_4loop_UVRequest(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o; if (p->loop) { e = (*v)(((PyObject*)p->loop), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_UVRequest(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_UVRequest *p = (struct __pyx_obj_6uvloop_4loop_UVRequest *)o; tmp = ((PyObject*)p->loop); p->loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UVRequest[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UVRequest = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UVRequest", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UVRequest), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UVRequest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "A base class for all libuv requests (uv_getaddrinfo_t, etc).\n\n Important: it's a responsibility of the subclass to call the\n \"on_done\" method in the request's callback.\n\n If \"on_done\" isn't called, the request object will never die.\n ", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UVRequest, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_UVRequest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UVRequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UVRequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_UDPTransport __pyx_vtable_6uvloop_4loop_UDPTransport; static PyObject *__pyx_tp_new_6uvloop_4loop_UDPTransport(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_UDPTransport *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVBaseTransport(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)o); p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVHandle*)__pyx_vtabptr_6uvloop_4loop_UDPTransport; p->_cached_py_address = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_12UDPTransport_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_UDPTransport(PyObject *o) { struct __pyx_obj_6uvloop_4loop_UDPTransport *p = (struct __pyx_obj_6uvloop_4loop_UDPTransport *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_cached_py_address); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVBaseTransport(o); } static int __pyx_tp_traverse_6uvloop_4loop_UDPTransport(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_UDPTransport *p = (struct __pyx_obj_6uvloop_4loop_UDPTransport *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVBaseTransport(o, v, a); if (e) return e; if (p->_cached_py_address) { e = (*v)(p->_cached_py_address, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_UDPTransport[] = { {"sendto", (PyCFunction)__pyx_pw_6uvloop_4loop_12UDPTransport_3sendto, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_12UDPTransport_2sendto}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_UDPTransport = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.UDPTransport", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_UDPTransport), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_UDPTransport, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_7__repr__, /*tp_repr*/ #else 0, /*tp_repr*/ #endif 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_UDPTransport, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_UDPTransport, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_8UVHandle_3__init__, /*tp_init*/ #else 0, /*tp_init*/ #endif 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_UDPTransport, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_Server __pyx_vtable_6uvloop_4loop_Server; static PyObject *__pyx_tp_new_6uvloop_4loop_Server(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_Server *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_Server *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_Server; p->_servers = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_6Server_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_Server(PyObject *o) { struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_servers); Py_CLEAR(p->_waiters); Py_CLEAR(p->_loop); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6uvloop_4loop_Server(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o; if (p->_servers) { e = (*v)(p->_servers, a); if (e) return e; } if (p->_waiters) { e = (*v)(p->_waiters, a); if (e) return e; } if (p->_loop) { e = (*v)(((PyObject*)p->_loop), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_Server(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_Server *p = (struct __pyx_obj_6uvloop_4loop_Server *)o; tmp = ((PyObject*)p->_servers); p->_servers = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_waiters); p->_waiters = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_loop); p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_6Server_sockets(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_6Server_7sockets_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_Server[] = { {"wait_closed", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_5wait_closed, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_4wait_closed}, {"close", (PyCFunction)__pyx_pw_6uvloop_4loop_6Server_8close, METH_NOARGS, __pyx_doc_6uvloop_4loop_6Server_7close}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_Server[] = { {(char *)"sockets", __pyx_getprop_6uvloop_4loop_6Server_sockets, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_Server = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.Server", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_Server), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_Server, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_6uvloop_4loop_6Server_3__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_Server, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_Server, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_Server, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_Server, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_Server, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop__StreamWriteContext __pyx_vtable_6uvloop_4loop__StreamWriteContext; static struct __pyx_obj_6uvloop_4loop__StreamWriteContext *__pyx_freelist_6uvloop_4loop__StreamWriteContext[250]; static int __pyx_freecount_6uvloop_4loop__StreamWriteContext = 0; static PyObject *__pyx_tp_new_6uvloop_4loop__StreamWriteContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p; PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop__StreamWriteContext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop__StreamWriteContext[--__pyx_freecount_6uvloop_4loop__StreamWriteContext]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop__StreamWriteContext; p->buffers = ((PyObject*)Py_None); Py_INCREF(Py_None); p->stream = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop__StreamWriteContext(PyObject *o) { struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_19_StreamWriteContext_1__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->buffers); Py_CLEAR(p->stream); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop__StreamWriteContext < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { __pyx_freelist_6uvloop_4loop__StreamWriteContext[__pyx_freecount_6uvloop_4loop__StreamWriteContext++] = ((struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop__StreamWriteContext(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop__StreamWriteContext *p = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *)o; if (p->buffers) { e = (*v)(p->buffers, a); if (e) return e; } if (p->stream) { e = (*v)(((PyObject*)p->stream), a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop__StreamWriteContext[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop__StreamWriteContext = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop._StreamWriteContext", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop__StreamWriteContext), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop__StreamWriteContext, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop__StreamWriteContext, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop__StreamWriteContext, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop__StreamWriteContext, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop__TCPConnectRequest __pyx_vtable_6uvloop_4loop__TCPConnectRequest; static PyObject *__pyx_tp_new_6uvloop_4loop__TCPConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop__TCPConnectRequest; p->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_18_TCPConnectRequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop__TCPConnectRequest(PyObject *o) { struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->transport); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o); } static int __pyx_tp_traverse_6uvloop_4loop__TCPConnectRequest(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e; if (p->transport) { e = (*v)(((PyObject*)p->transport), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop__TCPConnectRequest(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *)o; __pyx_tp_clear_6uvloop_4loop_UVRequest(o); tmp = ((PyObject*)p->transport); p->transport = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop__TCPConnectRequest[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop__TCPConnectRequest = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop._TCPConnectRequest", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop__TCPConnectRequest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop__TCPConnectRequest, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop__TCPConnectRequest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop__TCPConnectRequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop__TCPConnectRequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop__PipeConnectRequest __pyx_vtable_6uvloop_4loop__PipeConnectRequest; static PyObject *__pyx_tp_new_6uvloop_4loop__PipeConnectRequest(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop__PipeConnectRequest; p->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_19_PipeConnectRequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop__PipeConnectRequest(PyObject *o) { struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->transport); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o); } static int __pyx_tp_traverse_6uvloop_4loop__PipeConnectRequest(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e; if (p->transport) { e = (*v)(((PyObject*)p->transport), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop__PipeConnectRequest(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *p = (struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *)o; __pyx_tp_clear_6uvloop_4loop_UVRequest(o); tmp = ((PyObject*)p->transport); p->transport = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop__PipeConnectRequest[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop__PipeConnectRequest = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop._PipeConnectRequest", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop__PipeConnectRequest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop__PipeConnectRequest, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop__PipeConnectRequest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop__PipeConnectRequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop__PipeConnectRequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfo __pyx_vtable_6uvloop_4loop_AddrInfo; static struct __pyx_obj_6uvloop_4loop_AddrInfo *__pyx_freelist_6uvloop_4loop_AddrInfo[250]; static int __pyx_freecount_6uvloop_4loop_AddrInfo = 0; static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop_AddrInfo *p; PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop_AddrInfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop_AddrInfo[--__pyx_freecount_6uvloop_4loop_AddrInfo]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo)); (void) PyObject_INIT(o, t); } else { if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_AddrInfo; if (unlikely(__pyx_pw_6uvloop_4loop_8AddrInfo_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_AddrInfo(PyObject *o) { #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_8AddrInfo_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop_AddrInfo < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { __pyx_freelist_6uvloop_4loop_AddrInfo[__pyx_freecount_6uvloop_4loop_AddrInfo++] = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static PyMethodDef __pyx_methods_6uvloop_4loop_AddrInfo[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_AddrInfo = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.AddrInfo", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfo), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_AddrInfo, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_AddrInfo, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_AddrInfo, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_AddrInfoRequest __pyx_vtable_6uvloop_4loop_AddrInfoRequest; static PyObject *__pyx_tp_new_6uvloop_4loop_AddrInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop_AddrInfoRequest; p->callback = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_15AddrInfoRequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_AddrInfoRequest(PyObject *o) { struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->callback); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o); } static int __pyx_tp_traverse_6uvloop_4loop_AddrInfoRequest(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e; if (p->callback) { e = (*v)(p->callback, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_AddrInfoRequest(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_AddrInfoRequest *)o; __pyx_tp_clear_6uvloop_4loop_UVRequest(o); tmp = ((PyObject*)p->callback); p->callback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_AddrInfoRequest[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_AddrInfoRequest = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.AddrInfoRequest", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_AddrInfoRequest), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_AddrInfoRequest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_AddrInfoRequest, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_AddrInfoRequest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_AddrInfoRequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_AddrInfoRequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_NameInfoRequest __pyx_vtable_6uvloop_4loop_NameInfoRequest; static PyObject *__pyx_tp_new_6uvloop_4loop_NameInfoRequest(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_UVRequest(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_UVRequest*)__pyx_vtabptr_6uvloop_4loop_NameInfoRequest; p->callback = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6uvloop_4loop_15NameInfoRequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6uvloop_4loop_NameInfoRequest(PyObject *o) { struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->callback); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_UVRequest(o); } static int __pyx_tp_traverse_6uvloop_4loop_NameInfoRequest(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o; e = __pyx_tp_traverse_6uvloop_4loop_UVRequest(o, v, a); if (e) return e; if (p->callback) { e = (*v)(p->callback, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_NameInfoRequest(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_NameInfoRequest *p = (struct __pyx_obj_6uvloop_4loop_NameInfoRequest *)o; __pyx_tp_clear_6uvloop_4loop_UVRequest(o); tmp = ((PyObject*)p->callback); p->callback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop_NameInfoRequest[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_NameInfoRequest = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.NameInfoRequest", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_NameInfoRequest), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_NameInfoRequest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_NameInfoRequest, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_NameInfoRequest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_NameInfoRequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_NameInfoRequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop__UDPSendContext __pyx_vtable_6uvloop_4loop__UDPSendContext; static struct __pyx_obj_6uvloop_4loop__UDPSendContext *__pyx_freelist_6uvloop_4loop__UDPSendContext[250]; static int __pyx_freecount_6uvloop_4loop__UDPSendContext = 0; static PyObject *__pyx_tp_new_6uvloop_4loop__UDPSendContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop__UDPSendContext *p; PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop__UDPSendContext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop__UDPSendContext[--__pyx_freecount_6uvloop_4loop__UDPSendContext]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop__UDPSendContext; p->udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); Py_INCREF(Py_None); p->py_buf.obj = NULL; return o; } static void __pyx_tp_dealloc_6uvloop_4loop__UDPSendContext(PyObject *o) { struct __pyx_obj_6uvloop_4loop__UDPSendContext *p = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6uvloop_4loop_15_UDPSendContext_1__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->udp); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop__UDPSendContext < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) { __pyx_freelist_6uvloop_4loop__UDPSendContext[__pyx_freecount_6uvloop_4loop__UDPSendContext++] = ((struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop__UDPSendContext(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop__UDPSendContext *p = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *)o; if (p->udp) { e = (*v)(((PyObject*)p->udp), a); if (e) return e; } if (p->py_buf.obj) { e = (*v)(p->py_buf.obj, a); if (e) return e; } return 0; } static PyMethodDef __pyx_methods_6uvloop_4loop__UDPSendContext[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop__UDPSendContext = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop._UDPSendContext", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop__UDPSendContext), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop__UDPSendContext, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop__UDPSendContext, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop__UDPSendContext, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop__UDPSendContext, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture __pyx_vtable_6uvloop_4loop_BaseFuture; static PyObject *__pyx_tp_new_6uvloop_4loop_BaseFuture(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6uvloop_4loop_BaseFuture *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_BaseFuture *)o); p->__pyx_vtab = __pyx_vtabptr_6uvloop_4loop_BaseFuture; p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); p->_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None); p->_exception = Py_None; Py_INCREF(Py_None); p->_result = Py_None; Py_INCREF(Py_None); p->_source_traceback = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_BaseFuture(PyObject *o) { struct __pyx_obj_6uvloop_4loop_BaseFuture *p = (struct __pyx_obj_6uvloop_4loop_BaseFuture *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_loop); Py_CLEAR(p->_callbacks); Py_CLEAR(p->_exception); Py_CLEAR(p->_result); Py_CLEAR(p->_source_traceback); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6uvloop_4loop_BaseFuture(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_BaseFuture *p = (struct __pyx_obj_6uvloop_4loop_BaseFuture *)o; if (p->_loop) { e = (*v)(((PyObject*)p->_loop), a); if (e) return e; } if (p->_callbacks) { e = (*v)(p->_callbacks, a); if (e) return e; } if (p->_exception) { e = (*v)(p->_exception, a); if (e) return e; } if (p->_result) { e = (*v)(p->_result, a); if (e) return e; } if (p->_source_traceback) { e = (*v)(p->_source_traceback, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_BaseFuture(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_BaseFuture *p = (struct __pyx_obj_6uvloop_4loop_BaseFuture *)o; tmp = ((PyObject*)p->_loop); p->_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_callbacks); p->_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_exception); p->_exception = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_result); p->_result = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_source_traceback); p->_source_traceback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__asyncio_future_blocking(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_1__get__(o); } static int __pyx_setprop_6uvloop_4loop_10BaseFuture__asyncio_future_blocking(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6uvloop_4loop_10BaseFuture_24_asyncio_future_blocking_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__state(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_6_state_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__loop(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_5_loop_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__callbacks(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_10_callbacks_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__exception(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_10_exception_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__result(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_7_result_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__blocking(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_1__get__(o); } static int __pyx_setprop_6uvloop_4loop_10BaseFuture__blocking(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6uvloop_4loop_10BaseFuture_9_blocking_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__source_traceback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_17_source_traceback_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_10BaseFuture__log_traceback(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_10BaseFuture_14_log_traceback_1__get__(o); } static PyMethodDef __pyx_methods_6uvloop_4loop_BaseFuture[] = { {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_3cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_10BaseFuture_2cancel}, {"cancelled", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_5cancelled, METH_NOARGS, __pyx_doc_6uvloop_4loop_10BaseFuture_4cancelled}, {"done", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_7done, METH_NOARGS, __pyx_doc_6uvloop_4loop_10BaseFuture_6done}, {"result", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_9result, METH_NOARGS, __pyx_doc_6uvloop_4loop_10BaseFuture_8result}, {"exception", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_11exception, METH_NOARGS, __pyx_doc_6uvloop_4loop_10BaseFuture_10exception}, {"add_done_callback", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_13add_done_callback, METH_O, __pyx_doc_6uvloop_4loop_10BaseFuture_12add_done_callback}, {"remove_done_callback", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_15remove_done_callback, METH_O, __pyx_doc_6uvloop_4loop_10BaseFuture_14remove_done_callback}, {"set_result", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_17set_result, METH_O, __pyx_doc_6uvloop_4loop_10BaseFuture_16set_result}, {"set_exception", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_19set_exception, METH_O, __pyx_doc_6uvloop_4loop_10BaseFuture_18set_exception}, {"__await__", (PyCFunction)__pyx_pw_6uvloop_4loop_10BaseFuture_24__await__, METH_NOARGS|METH_COEXIST, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_BaseFuture[] = { {(char *)"_asyncio_future_blocking", __pyx_getprop_6uvloop_4loop_10BaseFuture__asyncio_future_blocking, __pyx_setprop_6uvloop_4loop_10BaseFuture__asyncio_future_blocking, (char *)0, 0}, {(char *)"_state", __pyx_getprop_6uvloop_4loop_10BaseFuture__state, 0, (char *)0, 0}, {(char *)"_loop", __pyx_getprop_6uvloop_4loop_10BaseFuture__loop, 0, (char *)0, 0}, {(char *)"_callbacks", __pyx_getprop_6uvloop_4loop_10BaseFuture__callbacks, 0, (char *)0, 0}, {(char *)"_exception", __pyx_getprop_6uvloop_4loop_10BaseFuture__exception, 0, (char *)0, 0}, {(char *)"_result", __pyx_getprop_6uvloop_4loop_10BaseFuture__result, 0, (char *)0, 0}, {(char *)"_blocking", __pyx_getprop_6uvloop_4loop_10BaseFuture__blocking, __pyx_setprop_6uvloop_4loop_10BaseFuture__blocking, (char *)"_blocking: 'bool'", 0}, {(char *)"_source_traceback", __pyx_getprop_6uvloop_4loop_10BaseFuture__source_traceback, 0, (char *)0, 0}, {(char *)"_log_traceback", __pyx_getprop_6uvloop_4loop_10BaseFuture__log_traceback, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static __Pyx_PyAsyncMethodsStruct __pyx_tp_as_async_BaseFuture = { __pyx_pw_6uvloop_4loop_10BaseFuture_24__await__, /*am_await*/ 0, /*am_aiter*/ 0, /*am_anext*/ }; #endif static PyTypeObject __pyx_type_6uvloop_4loop_BaseFuture = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.BaseFuture", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_BaseFuture), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_BaseFuture, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 &__pyx_tp_as_async_BaseFuture, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "BaseFuture(Loop loop)", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_BaseFuture, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_BaseFuture, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6uvloop_4loop_10BaseFuture_21__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_BaseFuture, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_BaseFuture, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6uvloop_4loop_10BaseFuture_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_BaseFuture, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_vtabstruct_6uvloop_4loop_BaseTask __pyx_vtable_6uvloop_4loop_BaseTask; static PyObject *__pyx_tp_new_6uvloop_4loop_BaseTask(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6uvloop_4loop_BaseTask *p; PyObject *o = __pyx_tp_new_6uvloop_4loop_BaseFuture(t, a, k); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6uvloop_4loop_BaseTask *)o); p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6uvloop_4loop_BaseFuture*)__pyx_vtabptr_6uvloop_4loop_BaseTask; p->_coro = Py_None; Py_INCREF(Py_None); p->_fut_waiter = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6uvloop_4loop_BaseTask(PyObject *o) { struct __pyx_obj_6uvloop_4loop_BaseTask *p = (struct __pyx_obj_6uvloop_4loop_BaseTask *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->_coro); Py_CLEAR(p->_fut_waiter); PyObject_GC_Track(o); __pyx_tp_dealloc_6uvloop_4loop_BaseFuture(o); } static int __pyx_tp_traverse_6uvloop_4loop_BaseTask(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop_BaseTask *p = (struct __pyx_obj_6uvloop_4loop_BaseTask *)o; e = __pyx_tp_traverse_6uvloop_4loop_BaseFuture(o, v, a); if (e) return e; if (p->_coro) { e = (*v)(p->_coro, a); if (e) return e; } if (p->_fut_waiter) { e = (*v)(p->_fut_waiter, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop_BaseTask(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop_BaseTask *p = (struct __pyx_obj_6uvloop_4loop_BaseTask *)o; __pyx_tp_clear_6uvloop_4loop_BaseFuture(o); tmp = ((PyObject*)p->_coro); p->_coro = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_fut_waiter); p->_fut_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6uvloop_4loop_8BaseTask__coro(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_8BaseTask_5_coro_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_8BaseTask__fut_waiter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_8BaseTask_11_fut_waiter_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_8BaseTask__must_cancel(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_8BaseTask_12_must_cancel_1__get__(o); } static PyObject *__pyx_getprop_6uvloop_4loop_8BaseTask__log_destroy_pending(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_1__get__(o); } static int __pyx_setprop_6uvloop_4loop_8BaseTask__log_destroy_pending(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6uvloop_4loop_8BaseTask_20_log_destroy_pending_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6uvloop_4loop_BaseTask[] = { {"cancel", (PyCFunction)__pyx_pw_6uvloop_4loop_8BaseTask_3cancel, METH_NOARGS, __pyx_doc_6uvloop_4loop_8BaseTask_2cancel}, {"_step", (PyCFunction)__pyx_pw_6uvloop_4loop_8BaseTask_5_step, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6uvloop_4loop_8BaseTask_4_step}, {"_wakeup", (PyCFunction)__pyx_pw_6uvloop_4loop_8BaseTask_7_wakeup, METH_O, __pyx_doc_6uvloop_4loop_8BaseTask_6_wakeup}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6uvloop_4loop_BaseTask[] = { {(char *)"_coro", __pyx_getprop_6uvloop_4loop_8BaseTask__coro, 0, (char *)0, 0}, {(char *)"_fut_waiter", __pyx_getprop_6uvloop_4loop_8BaseTask__fut_waiter, 0, (char *)0, 0}, {(char *)"_must_cancel", __pyx_getprop_6uvloop_4loop_8BaseTask__must_cancel, 0, (char *)0, 0}, {(char *)"_log_destroy_pending", __pyx_getprop_6uvloop_4loop_8BaseTask__log_destroy_pending, __pyx_setprop_6uvloop_4loop_8BaseTask__log_destroy_pending, (char *)"_log_destroy_pending: 'bool'", 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6uvloop_4loop_BaseTask = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.BaseTask", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop_BaseTask), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop_BaseTask, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "BaseTask(coro, Loop loop)", /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop_BaseTask, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop_BaseTask, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ #if CYTHON_COMPILING_IN_PYPY __pyx_pw_6uvloop_4loop_10BaseFuture_21__iter__, /*tp_iter*/ #else 0, /*tp_iter*/ #endif 0, /*tp_iternext*/ __pyx_methods_6uvloop_4loop_BaseTask, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6uvloop_4loop_BaseTask, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6uvloop_4loop_8BaseTask_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop_BaseTask, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_fut); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct___getaddrinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct___getaddrinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o; if (p->__pyx_v_fut) { e = (*v)(p->__pyx_v_fut, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct___getaddrinfo(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo *)o; tmp = ((PyObject*)p->__pyx_v_fut); p->__pyx_v_fut = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct___getaddrinfo", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct___getaddrinfo, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_fut); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_1__getnameinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_1__getnameinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o; if (p->__pyx_v_fut) { e = (*v)(p->__pyx_v_fut, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_1__getnameinfo(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo *)o; tmp = ((PyObject*)p->__pyx_v_fut); p->__pyx_v_fut = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_1__getnameinfo", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_1__getnameinfo, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_fd); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_2__sock_connect[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_2__sock_connect++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o; if (p->__pyx_v_fd) { e = (*v)(p->__pyx_v_fd, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_2__sock_connect(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect *)o; tmp = ((PyObject*)p->__pyx_v_fd); p->__pyx_v_fd = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_2__sock_connect", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_2__sock_connect, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_3_run_until_complete[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_3_run_until_complete = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3_run_until_complete > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_3_run_until_complete[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3_run_until_complete]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3_run_until_complete < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_3_run_until_complete[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_3_run_until_complete++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_3_run_until_complete(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_3_run_until_complete = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_3_run_until_complete", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_3_run_until_complete, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_3_run_until_complete, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_3_run_until_complete, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_3_run_until_complete, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_getnameinfo[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_getnameinfo = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_getnameinfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_getnameinfo[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_getnameinfo]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_ai_cnt); Py_CLEAR(p->__pyx_v_flowinfo); Py_CLEAR(p->__pyx_v_scope_id); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sockaddr); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_getnameinfo < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_4_getnameinfo[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_4_getnameinfo++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)o; if (p->__pyx_v_ai_cnt) { e = (*v)(((PyObject*)p->__pyx_v_ai_cnt), a); if (e) return e; } if (p->__pyx_v_flowinfo) { e = (*v)(p->__pyx_v_flowinfo, a); if (e) return e; } if (p->__pyx_v_scope_id) { e = (*v)(p->__pyx_v_scope_id, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_sockaddr) { e = (*v)(p->__pyx_v_sockaddr, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_4_getnameinfo(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo *)o; tmp = ((PyObject*)p->__pyx_v_ai_cnt); p->__pyx_v_ai_cnt = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_flowinfo); p->__pyx_v_flowinfo = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_scope_id); p->__pyx_v_scope_id = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sockaddr); p->__pyx_v_sockaddr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_4_getnameinfo = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_4_getnameinfo", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_4_getnameinfo, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_4_getnameinfo, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_4_getnameinfo, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_4_getnameinfo, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_create_server[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_create_server = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_create_server(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_create_server > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_create_server[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_create_server]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_5_create_server(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_backlog); Py_CLEAR(p->__pyx_v_fileno); Py_CLEAR(p->__pyx_v_fs); Py_CLEAR(p->__pyx_v_host); Py_CLEAR(p->__pyx_v_hosts); Py_CLEAR(p->__pyx_v_info); Py_CLEAR(p->__pyx_v_infos); Py_CLEAR(p->__pyx_v_port); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_reuse_address); Py_CLEAR(p->__pyx_v_reuse_port); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_server); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_ssl); Py_CLEAR(p->__pyx_v_tcp); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_create_server < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_5_create_server[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_5_create_server++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_5_create_server(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)o; if (p->__pyx_v_backlog) { e = (*v)(p->__pyx_v_backlog, a); if (e) return e; } if (p->__pyx_v_fileno) { e = (*v)(p->__pyx_v_fileno, a); if (e) return e; } if (p->__pyx_v_fs) { e = (*v)(p->__pyx_v_fs, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } if (p->__pyx_v_hosts) { e = (*v)(p->__pyx_v_hosts, a); if (e) return e; } if (p->__pyx_v_info) { e = (*v)(p->__pyx_v_info, a); if (e) return e; } if (p->__pyx_v_infos) { e = (*v)(p->__pyx_v_infos, a); if (e) return e; } if (p->__pyx_v_port) { e = (*v)(p->__pyx_v_port, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_reuse_address) { e = (*v)(p->__pyx_v_reuse_address, a); if (e) return e; } if (p->__pyx_v_reuse_port) { e = (*v)(p->__pyx_v_reuse_port, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_server) { e = (*v)(((PyObject*)p->__pyx_v_server), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_ssl) { e = (*v)(p->__pyx_v_ssl, a); if (e) return e; } if (p->__pyx_v_tcp) { e = (*v)(((PyObject*)p->__pyx_v_tcp), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_5_create_server(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server *)o; tmp = ((PyObject*)p->__pyx_v_backlog); p->__pyx_v_backlog = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fileno); p->__pyx_v_fileno = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fs); p->__pyx_v_fs = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_host); p->__pyx_v_host = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_hosts); p->__pyx_v_hosts = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_info); p->__pyx_v_info = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_infos); p->__pyx_v_infos = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_port); p->__pyx_v_port = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_reuse_address); p->__pyx_v_reuse_address = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_reuse_port); p->__pyx_v_reuse_port = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_server); p->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl); p->__pyx_v_ssl = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tcp); p->__pyx_v_tcp = ((struct __pyx_obj_6uvloop_4loop_TCPServer *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_5_create_server = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_5_create_server", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_5_create_server, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_5_create_server, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_5_create_server, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_5_create_server, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_create_connection[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_create_connection = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_create_connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_create_connection > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_create_connection[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_create_connection]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_6_create_connection(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_ai_local); Py_CLEAR(p->__pyx_v_ai_remote); Py_CLEAR(p->__pyx_v_app_protocol); Py_CLEAR(p->__pyx_v_exc); Py_CLEAR(p->__pyx_v_exceptions); Py_CLEAR(p->__pyx_v_f1); Py_CLEAR(p->__pyx_v_f2); Py_CLEAR(p->__pyx_v_family); Py_CLEAR(p->__pyx_v_fileno); Py_CLEAR(p->__pyx_v_flags); Py_CLEAR(p->__pyx_v_fs); Py_CLEAR(p->__pyx_v_genexpr); Py_CLEAR(p->__pyx_v_host); Py_CLEAR(p->__pyx_v_local_addr); Py_CLEAR(p->__pyx_v_model); Py_CLEAR(p->__pyx_v_port); Py_CLEAR(p->__pyx_v_proto); Py_CLEAR(p->__pyx_v_protocol); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_server_hostname); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_ssl); Py_CLEAR(p->__pyx_v_ssl_waiter); Py_CLEAR(p->__pyx_v_sslcontext); Py_CLEAR(p->__pyx_v_tr); Py_CLEAR(p->__pyx_v_waiter); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); Py_CLEAR(p->__pyx_t_2); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_create_connection < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_6_create_connection[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_6_create_connection++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_6_create_connection(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)o; if (p->__pyx_v_ai_local) { e = (*v)(((PyObject*)p->__pyx_v_ai_local), a); if (e) return e; } if (p->__pyx_v_ai_remote) { e = (*v)(((PyObject*)p->__pyx_v_ai_remote), a); if (e) return e; } if (p->__pyx_v_app_protocol) { e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e; } if (p->__pyx_v_exc) { e = (*v)(p->__pyx_v_exc, a); if (e) return e; } if (p->__pyx_v_exceptions) { e = (*v)(p->__pyx_v_exceptions, a); if (e) return e; } if (p->__pyx_v_f1) { e = (*v)(p->__pyx_v_f1, a); if (e) return e; } if (p->__pyx_v_f2) { e = (*v)(p->__pyx_v_f2, a); if (e) return e; } if (p->__pyx_v_family) { e = (*v)(p->__pyx_v_family, a); if (e) return e; } if (p->__pyx_v_fileno) { e = (*v)(p->__pyx_v_fileno, a); if (e) return e; } if (p->__pyx_v_flags) { e = (*v)(p->__pyx_v_flags, a); if (e) return e; } if (p->__pyx_v_fs) { e = (*v)(p->__pyx_v_fs, a); if (e) return e; } if (p->__pyx_v_genexpr) { e = (*v)(p->__pyx_v_genexpr, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } if (p->__pyx_v_local_addr) { e = (*v)(p->__pyx_v_local_addr, a); if (e) return e; } if (p->__pyx_v_model) { e = (*v)(p->__pyx_v_model, a); if (e) return e; } if (p->__pyx_v_port) { e = (*v)(p->__pyx_v_port, a); if (e) return e; } if (p->__pyx_v_proto) { e = (*v)(p->__pyx_v_proto, a); if (e) return e; } if (p->__pyx_v_protocol) { e = (*v)(p->__pyx_v_protocol, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_server_hostname) { e = (*v)(p->__pyx_v_server_hostname, a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_ssl) { e = (*v)(p->__pyx_v_ssl, a); if (e) return e; } if (p->__pyx_v_ssl_waiter) { e = (*v)(p->__pyx_v_ssl_waiter, a); if (e) return e; } if (p->__pyx_v_sslcontext) { e = (*v)(p->__pyx_v_sslcontext, a); if (e) return e; } if (p->__pyx_v_tr) { e = (*v)(((PyObject*)p->__pyx_v_tr), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } if (p->__pyx_t_2) { e = (*v)(p->__pyx_t_2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_6_create_connection(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)o; tmp = ((PyObject*)p->__pyx_v_ai_local); p->__pyx_v_ai_local = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ai_remote); p->__pyx_v_ai_remote = ((struct __pyx_obj_6uvloop_4loop_AddrInfo *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_app_protocol); p->__pyx_v_app_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_exc); p->__pyx_v_exc = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_exceptions); p->__pyx_v_exceptions = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_f1); p->__pyx_v_f1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_f2); p->__pyx_v_f2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_family); p->__pyx_v_family = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fileno); p->__pyx_v_fileno = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_flags); p->__pyx_v_flags = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fs); p->__pyx_v_fs = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_genexpr); p->__pyx_v_genexpr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_host); p->__pyx_v_host = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_local_addr); p->__pyx_v_local_addr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_model); p->__pyx_v_model = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_port); p->__pyx_v_port = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto); p->__pyx_v_proto = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol); p->__pyx_v_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_server_hostname); p->__pyx_v_server_hostname = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl); p->__pyx_v_ssl = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl_waiter); p->__pyx_v_ssl_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sslcontext); p->__pyx_v_sslcontext = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tr); p->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_TCPTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_2); p->__pyx_t_2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_6_create_connection = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_6_create_connection", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_6_create_connection, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_6_create_connection, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_6_create_connection, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_6_create_connection, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_genexpr[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_genexpr = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_7_genexpr(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_exc); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_7_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_exc) { e = (*v)(p->__pyx_v_exc, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_7_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_exc); p->__pyx_v_exc = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_7_genexpr = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_7_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_7_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_7_genexpr, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_7_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_7_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_genexpr[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_genexpr = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_8_genexpr(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_exc); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_8_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_exc) { e = (*v)(p->__pyx_v_exc, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_8_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_exc); p->__pyx_v_exc = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_8_genexpr = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_8_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_8_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_8_genexpr, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_8_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_8_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_unix_server[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_unix_server = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_unix_server > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_unix_server[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_unix_server]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_backlog); Py_CLEAR(p->__pyx_v_exc); Py_CLEAR(p->__pyx_v_fileno); Py_CLEAR(p->__pyx_v_msg); Py_CLEAR(p->__pyx_v_path); Py_CLEAR(p->__pyx_v_pipe); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_server); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_ssl); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_unix_server < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_9_create_unix_server[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_9_create_unix_server++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)o; if (p->__pyx_v_backlog) { e = (*v)(p->__pyx_v_backlog, a); if (e) return e; } if (p->__pyx_v_exc) { e = (*v)(p->__pyx_v_exc, a); if (e) return e; } if (p->__pyx_v_fileno) { e = (*v)(p->__pyx_v_fileno, a); if (e) return e; } if (p->__pyx_v_msg) { e = (*v)(p->__pyx_v_msg, a); if (e) return e; } if (p->__pyx_v_pipe) { e = (*v)(((PyObject*)p->__pyx_v_pipe), a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_server) { e = (*v)(((PyObject*)p->__pyx_v_server), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_ssl) { e = (*v)(p->__pyx_v_ssl, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_9_create_unix_server(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server *)o; tmp = ((PyObject*)p->__pyx_v_backlog); p->__pyx_v_backlog = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_exc); p->__pyx_v_exc = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fileno); p->__pyx_v_fileno = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_msg); p->__pyx_v_msg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_pipe); p->__pyx_v_pipe = ((struct __pyx_obj_6uvloop_4loop_UnixServer *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_server); p->__pyx_v_server = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl); p->__pyx_v_ssl = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_unix_server = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_9_create_unix_server", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_9_create_unix_server, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_9_create_unix_server, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_9_create_unix_server, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_9_create_unix_server, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_app_protocol); Py_CLEAR(p->__pyx_v_fileno); Py_CLEAR(p->__pyx_v_path); Py_CLEAR(p->__pyx_v_protocol); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_server_hostname); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_ssl); Py_CLEAR(p->__pyx_v_ssl_waiter); Py_CLEAR(p->__pyx_v_sslcontext); Py_CLEAR(p->__pyx_v_tr); Py_CLEAR(p->__pyx_v_waiter); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); Py_CLEAR(p->__pyx_t_2); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)o; if (p->__pyx_v_app_protocol) { e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e; } if (p->__pyx_v_fileno) { e = (*v)(p->__pyx_v_fileno, a); if (e) return e; } if (p->__pyx_v_path) { e = (*v)(p->__pyx_v_path, a); if (e) return e; } if (p->__pyx_v_protocol) { e = (*v)(p->__pyx_v_protocol, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_server_hostname) { e = (*v)(p->__pyx_v_server_hostname, a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_ssl) { e = (*v)(p->__pyx_v_ssl, a); if (e) return e; } if (p->__pyx_v_ssl_waiter) { e = (*v)(p->__pyx_v_ssl_waiter, a); if (e) return e; } if (p->__pyx_v_sslcontext) { e = (*v)(p->__pyx_v_sslcontext, a); if (e) return e; } if (p->__pyx_v_tr) { e = (*v)(((PyObject*)p->__pyx_v_tr), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } if (p->__pyx_t_2) { e = (*v)(p->__pyx_t_2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection *)o; tmp = ((PyObject*)p->__pyx_v_app_protocol); p->__pyx_v_app_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fileno); p->__pyx_v_fileno = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_path); p->__pyx_v_path = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol); p->__pyx_v_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_server_hostname); p->__pyx_v_server_hostname = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl); p->__pyx_v_ssl = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl_waiter); p->__pyx_v_ssl_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sslcontext); p->__pyx_v_sslcontext = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_tr); p->__pyx_v_tr = ((struct __pyx_obj_6uvloop_4loop_UnixTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_2); p->__pyx_t_2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_10_create_unix_connection", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_sock_sendall[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_sock_sendall = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_sock_sendall > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_sock_sendall[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_sock_sendall]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_data); Py_CLEAR(p->__pyx_v_fut); Py_CLEAR(p->__pyx_v_handle); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sock); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_sock_sendall < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_11_sock_sendall[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_11_sock_sendall++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)o; if (p->__pyx_v_data) { e = (*v)(p->__pyx_v_data, a); if (e) return e; } if (p->__pyx_v_fut) { e = (*v)(p->__pyx_v_fut, a); if (e) return e; } if (p->__pyx_v_handle) { e = (*v)(((PyObject*)p->__pyx_v_handle), a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_11_sock_sendall(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall *)o; tmp = ((PyObject*)p->__pyx_v_data); p->__pyx_v_data = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fut); p->__pyx_v_fut = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_handle); p->__pyx_v_handle = ((struct __pyx_obj_6uvloop_4loop_Handle *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_11_sock_sendall = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_11_sock_sendall", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_11_sock_sendall, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_11_sock_sendall, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_11_sock_sendall, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_11_sock_sendall, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_sock_connect[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_sock_connect = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_sock_connect(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_sock_connect > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_sock_connect[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_sock_connect]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_12_sock_connect(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v__); Py_CLEAR(p->__pyx_v_address); Py_CLEAR(p->__pyx_v_fut); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sock); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_sock_connect < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_12_sock_connect[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_12_sock_connect++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_12_sock_connect(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)o; if (p->__pyx_v__) { e = (*v)(p->__pyx_v__, a); if (e) return e; } if (p->__pyx_v_address) { e = (*v)(p->__pyx_v_address, a); if (e) return e; } if (p->__pyx_v_fut) { e = (*v)(p->__pyx_v_fut, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_12_sock_connect(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect *)o; tmp = ((PyObject*)p->__pyx_v__); p->__pyx_v__ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_address); p->__pyx_v_address = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fut); p->__pyx_v_fut = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_12_sock_connect = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_12_sock_connect", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_12_sock_connect, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_12_sock_connect, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_12_sock_connect, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_12_sock_connect, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_app_protocol); Py_CLEAR(p->__pyx_v_fileno); Py_CLEAR(p->__pyx_v_protocol); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_ssl); Py_CLEAR(p->__pyx_v_transport); Py_CLEAR(p->__pyx_v_transport_waiter); Py_CLEAR(p->__pyx_v_waiter); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)o; if (p->__pyx_v_app_protocol) { e = (*v)(p->__pyx_v_app_protocol, a); if (e) return e; } if (p->__pyx_v_fileno) { e = (*v)(p->__pyx_v_fileno, a); if (e) return e; } if (p->__pyx_v_protocol) { e = (*v)(p->__pyx_v_protocol, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_ssl) { e = (*v)(p->__pyx_v_ssl, a); if (e) return e; } if (p->__pyx_v_transport) { e = (*v)(((PyObject*)p->__pyx_v_transport), a); if (e) return e; } if (p->__pyx_v_transport_waiter) { e = (*v)(p->__pyx_v_transport_waiter, a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket *)o; tmp = ((PyObject*)p->__pyx_v_app_protocol); p->__pyx_v_app_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_fileno); p->__pyx_v_fileno = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol); p->__pyx_v_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ssl); p->__pyx_v_ssl = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_transport); p->__pyx_v_transport = ((struct __pyx_obj_6uvloop_4loop_UVStream *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_transport_waiter); p->__pyx_v_transport_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_13_connect_accepted_socket", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_14___subprocess_run[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_14___subprocess_run = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14___subprocess_run > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_14___subprocess_run[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14___subprocess_run]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v___uvloop_sleep_after_fork); Py_CLEAR(p->__pyx_v_args); Py_CLEAR(p->__pyx_v_bufsize); Py_CLEAR(p->__pyx_v_close_fds); Py_CLEAR(p->__pyx_v_creationflags); Py_CLEAR(p->__pyx_v_cwd); Py_CLEAR(p->__pyx_v_env); Py_CLEAR(p->__pyx_v_executable); Py_CLEAR(p->__pyx_v_pass_fds); Py_CLEAR(p->__pyx_v_preexec_fn); Py_CLEAR(p->__pyx_v_proc); Py_CLEAR(p->__pyx_v_protocol); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_restore_signals); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_shell); Py_CLEAR(p->__pyx_v_start_new_session); Py_CLEAR(p->__pyx_v_startupinfo); Py_CLEAR(p->__pyx_v_stderr); Py_CLEAR(p->__pyx_v_stdin); Py_CLEAR(p->__pyx_v_stdout); Py_CLEAR(p->__pyx_v_universal_newlines); Py_CLEAR(p->__pyx_v_waiter); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); Py_CLEAR(p->__pyx_t_2); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14___subprocess_run < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_14___subprocess_run[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_14___subprocess_run++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)o; if (p->__pyx_v___uvloop_sleep_after_fork) { e = (*v)(p->__pyx_v___uvloop_sleep_after_fork, a); if (e) return e; } if (p->__pyx_v_args) { e = (*v)(p->__pyx_v_args, a); if (e) return e; } if (p->__pyx_v_bufsize) { e = (*v)(p->__pyx_v_bufsize, a); if (e) return e; } if (p->__pyx_v_close_fds) { e = (*v)(p->__pyx_v_close_fds, a); if (e) return e; } if (p->__pyx_v_creationflags) { e = (*v)(p->__pyx_v_creationflags, a); if (e) return e; } if (p->__pyx_v_cwd) { e = (*v)(p->__pyx_v_cwd, a); if (e) return e; } if (p->__pyx_v_env) { e = (*v)(p->__pyx_v_env, a); if (e) return e; } if (p->__pyx_v_executable) { e = (*v)(p->__pyx_v_executable, a); if (e) return e; } if (p->__pyx_v_pass_fds) { e = (*v)(p->__pyx_v_pass_fds, a); if (e) return e; } if (p->__pyx_v_preexec_fn) { e = (*v)(p->__pyx_v_preexec_fn, a); if (e) return e; } if (p->__pyx_v_proc) { e = (*v)(((PyObject*)p->__pyx_v_proc), a); if (e) return e; } if (p->__pyx_v_protocol) { e = (*v)(p->__pyx_v_protocol, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_restore_signals) { e = (*v)(p->__pyx_v_restore_signals, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_shell) { e = (*v)(p->__pyx_v_shell, a); if (e) return e; } if (p->__pyx_v_start_new_session) { e = (*v)(p->__pyx_v_start_new_session, a); if (e) return e; } if (p->__pyx_v_startupinfo) { e = (*v)(p->__pyx_v_startupinfo, a); if (e) return e; } if (p->__pyx_v_stderr) { e = (*v)(p->__pyx_v_stderr, a); if (e) return e; } if (p->__pyx_v_stdin) { e = (*v)(p->__pyx_v_stdin, a); if (e) return e; } if (p->__pyx_v_stdout) { e = (*v)(p->__pyx_v_stdout, a); if (e) return e; } if (p->__pyx_v_universal_newlines) { e = (*v)(p->__pyx_v_universal_newlines, a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } if (p->__pyx_t_2) { e = (*v)(p->__pyx_t_2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_14___subprocess_run(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run *)o; tmp = ((PyObject*)p->__pyx_v___uvloop_sleep_after_fork); p->__pyx_v___uvloop_sleep_after_fork = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_args); p->__pyx_v_args = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_bufsize); p->__pyx_v_bufsize = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_close_fds); p->__pyx_v_close_fds = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_creationflags); p->__pyx_v_creationflags = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_cwd); p->__pyx_v_cwd = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_env); p->__pyx_v_env = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_executable); p->__pyx_v_executable = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_pass_fds); p->__pyx_v_pass_fds = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_preexec_fn); p->__pyx_v_preexec_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proc); p->__pyx_v_proc = ((struct __pyx_obj_6uvloop_4loop_UVProcessTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol); p->__pyx_v_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_restore_signals); p->__pyx_v_restore_signals = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_shell); p->__pyx_v_shell = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_start_new_session); p->__pyx_v_start_new_session = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_startupinfo); p->__pyx_v_startupinfo = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_stderr); p->__pyx_v_stderr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_stdin); p->__pyx_v_stdin = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_stdout); p->__pyx_v_stdout = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_universal_newlines); p->__pyx_v_universal_newlines = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_2); p->__pyx_t_2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_14___subprocess_run = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_14___subprocess_run", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_14___subprocess_run, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_14___subprocess_run, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_14___subprocess_run, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_14___subprocess_run, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_pipe); Py_CLEAR(p->__pyx_v_proto); Py_CLEAR(p->__pyx_v_proto_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_transp); Py_CLEAR(p->__pyx_v_waiter); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); Py_CLEAR(p->__pyx_t_2); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)o; if (p->__pyx_v_pipe) { e = (*v)(p->__pyx_v_pipe, a); if (e) return e; } if (p->__pyx_v_proto) { e = (*v)(p->__pyx_v_proto, a); if (e) return e; } if (p->__pyx_v_proto_factory) { e = (*v)(p->__pyx_v_proto_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_transp) { e = (*v)(((PyObject*)p->__pyx_v_transp), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } if (p->__pyx_t_2) { e = (*v)(p->__pyx_t_2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe *)o; tmp = ((PyObject*)p->__pyx_v_pipe); p->__pyx_v_pipe = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto); p->__pyx_v_proto = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto_factory); p->__pyx_v_proto_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_transp); p->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_2); p->__pyx_t_2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_15_connect_read_pipe", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_pipe); Py_CLEAR(p->__pyx_v_proto); Py_CLEAR(p->__pyx_v_proto_factory); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_transp); Py_CLEAR(p->__pyx_v_waiter); Py_CLEAR(p->__pyx_t_0); Py_CLEAR(p->__pyx_t_1); Py_CLEAR(p->__pyx_t_2); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)o; if (p->__pyx_v_pipe) { e = (*v)(p->__pyx_v_pipe, a); if (e) return e; } if (p->__pyx_v_proto) { e = (*v)(p->__pyx_v_proto, a); if (e) return e; } if (p->__pyx_v_proto_factory) { e = (*v)(p->__pyx_v_proto_factory, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_transp) { e = (*v)(((PyObject*)p->__pyx_v_transp), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } if (p->__pyx_t_1) { e = (*v)(p->__pyx_t_1, a); if (e) return e; } if (p->__pyx_t_2) { e = (*v)(p->__pyx_t_2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe *)o; tmp = ((PyObject*)p->__pyx_v_pipe); p->__pyx_v_pipe = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto); p->__pyx_v_proto = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto_factory); p->__pyx_v_proto_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_transp); p->__pyx_v_transp = ((struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_1); p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_2); p->__pyx_t_2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_16_connect_write_pipe", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_allow_broadcast); Py_CLEAR(p->__pyx_v_ctx); Py_CLEAR(p->__pyx_v_ex); Py_CLEAR(p->__pyx_v_excs); Py_CLEAR(p->__pyx_v_family); Py_CLEAR(p->__pyx_v_flags); Py_CLEAR(p->__pyx_v_genexpr); Py_CLEAR(p->__pyx_v_lads); Py_CLEAR(p->__pyx_v_local_addr); Py_CLEAR(p->__pyx_v_opts); Py_CLEAR(p->__pyx_v_problems); Py_CLEAR(p->__pyx_v_proto); Py_CLEAR(p->__pyx_v_protocol); Py_CLEAR(p->__pyx_v_protocol_factory); Py_CLEAR(p->__pyx_v_rads); Py_CLEAR(p->__pyx_v_remote_addr); Py_CLEAR(p->__pyx_v_reuse_address); Py_CLEAR(p->__pyx_v_reuse_port); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sock); Py_CLEAR(p->__pyx_v_socket); Py_CLEAR(p->__pyx_v_udp); Py_CLEAR(p->__pyx_v_waiter); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)o; if (p->__pyx_v_allow_broadcast) { e = (*v)(p->__pyx_v_allow_broadcast, a); if (e) return e; } if (p->__pyx_v_ctx) { e = (*v)(p->__pyx_v_ctx, a); if (e) return e; } if (p->__pyx_v_ex) { e = (*v)(p->__pyx_v_ex, a); if (e) return e; } if (p->__pyx_v_excs) { e = (*v)(p->__pyx_v_excs, a); if (e) return e; } if (p->__pyx_v_family) { e = (*v)(p->__pyx_v_family, a); if (e) return e; } if (p->__pyx_v_flags) { e = (*v)(p->__pyx_v_flags, a); if (e) return e; } if (p->__pyx_v_genexpr) { e = (*v)(p->__pyx_v_genexpr, a); if (e) return e; } if (p->__pyx_v_lads) { e = (*v)(p->__pyx_v_lads, a); if (e) return e; } if (p->__pyx_v_local_addr) { e = (*v)(p->__pyx_v_local_addr, a); if (e) return e; } if (p->__pyx_v_opts) { e = (*v)(p->__pyx_v_opts, a); if (e) return e; } if (p->__pyx_v_proto) { e = (*v)(p->__pyx_v_proto, a); if (e) return e; } if (p->__pyx_v_protocol) { e = (*v)(p->__pyx_v_protocol, a); if (e) return e; } if (p->__pyx_v_protocol_factory) { e = (*v)(p->__pyx_v_protocol_factory, a); if (e) return e; } if (p->__pyx_v_rads) { e = (*v)(p->__pyx_v_rads, a); if (e) return e; } if (p->__pyx_v_remote_addr) { e = (*v)(p->__pyx_v_remote_addr, a); if (e) return e; } if (p->__pyx_v_reuse_address) { e = (*v)(p->__pyx_v_reuse_address, a); if (e) return e; } if (p->__pyx_v_reuse_port) { e = (*v)(p->__pyx_v_reuse_port, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_sock) { e = (*v)(p->__pyx_v_sock, a); if (e) return e; } if (p->__pyx_v_socket) { e = (*v)(p->__pyx_v_socket, a); if (e) return e; } if (p->__pyx_v_udp) { e = (*v)(((PyObject*)p->__pyx_v_udp), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)o; tmp = ((PyObject*)p->__pyx_v_allow_broadcast); p->__pyx_v_allow_broadcast = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ctx); p->__pyx_v_ctx = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_ex); p->__pyx_v_ex = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_excs); p->__pyx_v_excs = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_family); p->__pyx_v_family = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_flags); p->__pyx_v_flags = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_genexpr); p->__pyx_v_genexpr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_lads); p->__pyx_v_lads = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_local_addr); p->__pyx_v_local_addr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_opts); p->__pyx_v_opts = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_proto); p->__pyx_v_proto = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol); p->__pyx_v_protocol = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_protocol_factory); p->__pyx_v_protocol_factory = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_rads); p->__pyx_v_rads = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_remote_addr); p->__pyx_v_remote_addr = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_reuse_address); p->__pyx_v_reuse_address = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_reuse_port); p->__pyx_v_reuse_port = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sock); p->__pyx_v_sock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_socket); p->__pyx_v_socket = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_udp); p->__pyx_v_udp = ((struct __pyx_obj_6uvloop_4loop_UDPTransport *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_17_create_datagram_endpoint", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_genexpr[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_genexpr = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_genexpr[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_18_genexpr(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_k); Py_CLEAR(p->__pyx_v_v); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_18_genexpr[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_k) { e = (*v)(p->__pyx_v_k, a); if (e) return e; } if (p->__pyx_v_v) { e = (*v)(p->__pyx_v_v, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_18_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_k); p->__pyx_v_k = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_v); p->__pyx_v_v = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_18_genexpr = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_18_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_18_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_18_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_18_genexpr, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_18_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_18_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_agen); Py_CLEAR(p->__pyx_v_closing_agens); Py_CLEAR(p->__pyx_v_result); Py_CLEAR(p->__pyx_v_results); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_shutdown_coro); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)o; if (p->__pyx_v_agen) { e = (*v)(p->__pyx_v_agen, a); if (e) return e; } if (p->__pyx_v_closing_agens) { e = (*v)(p->__pyx_v_closing_agens, a); if (e) return e; } if (p->__pyx_v_result) { e = (*v)(p->__pyx_v_result, a); if (e) return e; } if (p->__pyx_v_results) { e = (*v)(p->__pyx_v_results, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_shutdown_coro) { e = (*v)(p->__pyx_v_shutdown_coro, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens *)o; tmp = ((PyObject*)p->__pyx_v_agen); p->__pyx_v_agen = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_closing_agens); p->__pyx_v_closing_agens = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_result); p->__pyx_v_result = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_results); p->__pyx_v_results = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_shutdown_coro); p->__pyx_v_shutdown_coro = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_19_shutdown_asyncgens", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_20_wait_closed[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_20_wait_closed = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20_wait_closed(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20_wait_closed > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_20_wait_closed[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20_wait_closed]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_20_wait_closed(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_waiter); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20_wait_closed < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_20_wait_closed[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_20_wait_closed++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_20_wait_closed(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } if (p->__pyx_v_waiter) { e = (*v)(p->__pyx_v_waiter, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_20_wait_closed(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_Server *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_waiter); p->__pyx_v_waiter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_20_wait_closed = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_20_wait_closed", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20_wait_closed), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_20_wait_closed, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_20_wait_closed, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_20_wait_closed, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_20_wait_closed, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_21___iter__[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_21___iter__ = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_21___iter__[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21___iter__]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_21___iter__(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_21___iter__[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_21___iter__(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_BaseFuture *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_21___iter__ = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_21___iter__", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_21___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_21___iter__, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_21___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_21___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_22___await__[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_22___await__ = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22___await__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22___await__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_22___await__[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22___await__]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_22___await__(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22___await__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_22___await__[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_22___await__++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_22___await__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_22___await__(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_6uvloop_4loop_BaseFuture *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_22___await__ = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_22___await__", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___await__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_22___await__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_22___await__, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_22___await__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_22___await__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(PyObject *o) { struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v__set_state); Py_CLEAR(p->__pyx_v_dest_loop); Py_CLEAR(p->__pyx_v_destination); Py_CLEAR(p->__pyx_v_source); Py_CLEAR(p->__pyx_v_source_loop); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)o; if (p->__pyx_v__set_state) { e = (*v)(p->__pyx_v__set_state, a); if (e) return e; } if (p->__pyx_v_dest_loop) { e = (*v)(p->__pyx_v_dest_loop, a); if (e) return e; } if (p->__pyx_v_destination) { e = (*v)(p->__pyx_v_destination, a); if (e) return e; } if (p->__pyx_v_source) { e = (*v)(p->__pyx_v_source, a); if (e) return e; } if (p->__pyx_v_source_loop) { e = (*v)(p->__pyx_v_source_loop, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future(PyObject *o) { PyObject* tmp; struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *p = (struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future *)o; tmp = ((PyObject*)p->__pyx_v__set_state); p->__pyx_v__set_state = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_dest_loop); p->__pyx_v_dest_loop = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_destination); p->__pyx_v_destination = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_source); p->__pyx_v_source = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_source_loop); p->__pyx_v_source_loop = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future, /*tp_traverse*/ __pyx_tp_clear_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 *__pyx_freelist_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1[8]; static int __pyx_freecount_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 = 0; static PyObject *__pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1)))) { o = (PyObject*)__pyx_freelist_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1[--__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1]; memset(o, 0, sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1)); (void) PyObject_INIT(o, t); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1(PyObject *o) { if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1)))) { __pyx_freelist_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1[__pyx_freecount_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1++] = ((struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static PyTypeObject __pyx_type_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 = { PyVarObject_HEAD_INIT(0, 0) "uvloop.loop.__pyx_scope_struct_24__test_coroutine_1", /*tp_name*/ sizeof(struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "loop", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_0_0_0_0, __pyx_k_0_0_0_0, sizeof(__pyx_k_0_0_0_0), 0, 1, 0, 0}, {&__pyx_kp_u_18_7_7_7, __pyx_k_18_7_7_7, sizeof(__pyx_k_18_7_7_7), 0, 1, 0, 0}, {&__pyx_kp_u_AF_INET6_address_must_be_tuple, __pyx_k_AF_INET6_address_must_be_tuple, sizeof(__pyx_k_AF_INET6_address_must_be_tuple), 0, 1, 0, 0}, {&__pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4, __pyx_k_AF_INET6_must_be_a_tuple_of_2_4, sizeof(__pyx_k_AF_INET6_must_be_a_tuple_of_2_4), 0, 1, 0, 0}, {&__pyx_kp_u_AF_INET_address_must_be_tuple, __pyx_k_AF_INET_address_must_be_tuple, sizeof(__pyx_k_AF_INET_address_must_be_tuple), 0, 1, 0, 0}, {&__pyx_kp_u_AF_INET_address_must_be_tuple_of, __pyx_k_AF_INET_address_must_be_tuple_of, sizeof(__pyx_k_AF_INET_address_must_be_tuple_of), 0, 1, 0, 0}, {&__pyx_kp_u_AF_UNSPEC_in_DNS_results, __pyx_k_AF_UNSPEC_in_DNS_results, sizeof(__pyx_k_AF_UNSPEC_in_DNS_results), 0, 1, 0, 0}, {&__pyx_kp_u_A_Stream_Socket_was_expected_got, __pyx_k_A_Stream_Socket_was_expected_got, sizeof(__pyx_k_A_Stream_Socket_was_expected_got), 0, 1, 0, 0}, {&__pyx_kp_u_A_UDP_Socket_was_expected_got_r, __pyx_k_A_UDP_Socket_was_expected_got_r, sizeof(__pyx_k_A_UDP_Socket_was_expected_got_r), 0, 1, 0, 0}, {&__pyx_kp_u_A_UNIX_Domain_Stream_Socket_was, __pyx_k_A_UNIX_Domain_Stream_Socket_was, sizeof(__pyx_k_A_UNIX_Domain_Stream_Socket_was), 0, 1, 0, 0}, {&__pyx_kp_u_A_callable_object_or_None_is_exp, __pyx_k_A_callable_object_or_None_is_exp, sizeof(__pyx_k_A_callable_object_or_None_is_exp), 0, 1, 0, 0}, {&__pyx_kp_u_A_future_is_required_for_destina, __pyx_k_A_future_is_required_for_destina, sizeof(__pyx_k_A_future_is_required_for_destina), 0, 1, 0, 0}, {&__pyx_kp_u_A_future_is_required_for_source, __pyx_k_A_future_is_required_for_source, sizeof(__pyx_k_A_future_is_required_for_source), 0, 1, 0, 0}, {&__pyx_kp_u_AddrInfoRequest_callback_called, __pyx_k_AddrInfoRequest_callback_called, sizeof(__pyx_k_AddrInfoRequest_callback_called), 0, 1, 0, 0}, {&__pyx_kp_u_AddrInfo_data_is_NULL, __pyx_k_AddrInfo_data_is_NULL, sizeof(__pyx_k_AddrInfo_data_is_NULL), 0, 1, 0, 0}, {&__pyx_kp_u_Address_r_is_already_in_use, __pyx_k_Address_r_is_already_in_use, sizeof(__pyx_k_Address_r_is_already_in_use), 0, 1, 0, 0}, {&__pyx_kp_u_Already_paused, __pyx_k_Already_paused, sizeof(__pyx_k_Already_paused), 0, 1, 0, 0}, {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_kp_u_Bad_exception_data_from_child_r, __pyx_k_Bad_exception_data_from_child_r, sizeof(__pyx_k_Bad_exception_data_from_child_r), 0, 1, 0, 0}, {&__pyx_n_s_BaseException, __pyx_k_BaseException, sizeof(__pyx_k_BaseException), 0, 0, 1, 1}, {&__pyx_n_s_BaseFuture___await, __pyx_k_BaseFuture___await, sizeof(__pyx_k_BaseFuture___await), 0, 0, 1, 1}, {&__pyx_n_s_BaseFuture___iter, __pyx_k_BaseFuture___iter, sizeof(__pyx_k_BaseFuture___iter), 0, 0, 1, 1}, {&__pyx_n_s_BaseProtocol, __pyx_k_BaseProtocol, sizeof(__pyx_k_BaseProtocol), 0, 0, 1, 1}, {&__pyx_n_s_BlockingIOError, __pyx_k_BlockingIOError, sizeof(__pyx_k_BlockingIOError), 0, 0, 1, 1}, {&__pyx_n_s_BrokenPipeError, __pyx_k_BrokenPipeError, sizeof(__pyx_k_BrokenPipeError), 0, 0, 1, 1}, {&__pyx_n_u_CANCELLED, __pyx_k_CANCELLED, sizeof(__pyx_k_CANCELLED), 0, 1, 0, 1}, {&__pyx_kp_u_Callback_handles_8, __pyx_k_Callback_handles_8, sizeof(__pyx_k_Callback_handles_8), 0, 1, 0, 0}, {&__pyx_n_s_CancelledError, __pyx_k_CancelledError, sizeof(__pyx_k_CancelledError), 0, 0, 1, 1}, {&__pyx_kp_u_Cannot_call_write_after_write_eo, __pyx_k_Cannot_call_write_after_write_eo, sizeof(__pyx_k_Cannot_call_write_after_write_eo), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_call_writelines_after_wri, __pyx_k_Cannot_call_writelines_after_wri, sizeof(__pyx_k_Cannot_call_writelines_after_wri), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_close_a_running_event_loo, __pyx_k_Cannot_close_a_running_event_loo, sizeof(__pyx_k_Cannot_close_a_running_event_loo), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_pause_reading_when_closin, __pyx_k_Cannot_pause_reading_when_closin, sizeof(__pyx_k_Cannot_pause_reading_when_closin), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_run_the_event_loop_while, __pyx_k_Cannot_run_the_event_loop_while, sizeof(__pyx_k_Cannot_run_the_event_loop_while), 0, 1, 0, 0}, {&__pyx_kp_u_Connect_call_failed_s, __pyx_k_Connect_call_failed_s, sizeof(__pyx_k_Connect_call_failed_s), 0, 1, 0, 0}, {&__pyx_n_s_ConnectionAbortedError, __pyx_k_ConnectionAbortedError, sizeof(__pyx_k_ConnectionAbortedError), 0, 0, 1, 1}, {&__pyx_n_s_ConnectionRefusedError, __pyx_k_ConnectionRefusedError, sizeof(__pyx_k_ConnectionRefusedError), 0, 0, 1, 1}, {&__pyx_n_s_ConnectionResetError, __pyx_k_ConnectionResetError, sizeof(__pyx_k_ConnectionResetError), 0, 0, 1, 1}, {&__pyx_n_s_Counter, __pyx_k_Counter, sizeof(__pyx_k_Counter), 0, 0, 1, 1}, {&__pyx_n_s_DEVNULL, __pyx_k_DEVNULL, sizeof(__pyx_k_DEVNULL), 0, 0, 1, 1}, {&__pyx_n_u_EAI_ADDRFAMILY, __pyx_k_EAI_ADDRFAMILY, sizeof(__pyx_k_EAI_ADDRFAMILY), 0, 1, 0, 1}, {&__pyx_n_u_EAI_AGAIN, __pyx_k_EAI_AGAIN, sizeof(__pyx_k_EAI_AGAIN), 0, 1, 0, 1}, {&__pyx_n_u_EAI_BADFLAGS, __pyx_k_EAI_BADFLAGS, sizeof(__pyx_k_EAI_BADFLAGS), 0, 1, 0, 1}, {&__pyx_n_u_EAI_BADHINTS, __pyx_k_EAI_BADHINTS, sizeof(__pyx_k_EAI_BADHINTS), 0, 1, 0, 1}, {&__pyx_n_u_EAI_CANCELED, __pyx_k_EAI_CANCELED, sizeof(__pyx_k_EAI_CANCELED), 0, 1, 0, 1}, {&__pyx_n_u_EAI_FAIL, __pyx_k_EAI_FAIL, sizeof(__pyx_k_EAI_FAIL), 0, 1, 0, 1}, {&__pyx_n_u_EAI_FAMILY, __pyx_k_EAI_FAMILY, sizeof(__pyx_k_EAI_FAMILY), 0, 1, 0, 1}, {&__pyx_n_u_EAI_MEMORY, __pyx_k_EAI_MEMORY, sizeof(__pyx_k_EAI_MEMORY), 0, 1, 0, 1}, {&__pyx_n_u_EAI_NODATA, __pyx_k_EAI_NODATA, sizeof(__pyx_k_EAI_NODATA), 0, 1, 0, 1}, {&__pyx_n_u_EAI_NONAME, __pyx_k_EAI_NONAME, sizeof(__pyx_k_EAI_NONAME), 0, 1, 0, 1}, {&__pyx_n_u_EAI_OVERFLOW, __pyx_k_EAI_OVERFLOW, sizeof(__pyx_k_EAI_OVERFLOW), 0, 1, 0, 1}, {&__pyx_n_u_EAI_PROTOCOL, __pyx_k_EAI_PROTOCOL, sizeof(__pyx_k_EAI_PROTOCOL), 0, 1, 0, 1}, {&__pyx_n_u_EAI_SERVICE, __pyx_k_EAI_SERVICE, sizeof(__pyx_k_EAI_SERVICE), 0, 1, 0, 1}, {&__pyx_n_u_EAI_SOCKTYPE, __pyx_k_EAI_SOCKTYPE, sizeof(__pyx_k_EAI_SOCKTYPE), 0, 1, 0, 1}, {&__pyx_kp_u_Errors_logged, __pyx_k_Errors_logged, sizeof(__pyx_k_Errors_logged), 0, 1, 0, 0}, {&__pyx_kp_u_Event_loop_is_closed, __pyx_k_Event_loop_is_closed, sizeof(__pyx_k_Event_loop_is_closed), 0, 1, 0, 0}, {&__pyx_kp_u_Event_loop_stopped_before_Future, __pyx_k_Event_loop_stopped_before_Future, sizeof(__pyx_k_Event_loop_stopped_before_Future), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_in___repr___r_value_ty, __pyx_k_Exception_in___repr___r_value_ty, sizeof(__pyx_k_Exception_in___repr___r_value_ty), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_in_callback, __pyx_k_Exception_in_callback, sizeof(__pyx_k_Exception_in_callback), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_in_default_exception_h, __pyx_k_Exception_in_default_exception_h, sizeof(__pyx_k_Exception_in_default_exception_h), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_in_default_exception_h_2, __pyx_k_Exception_in_default_exception_h_2, sizeof(__pyx_k_Exception_in_default_exception_h_2), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_is_not_set, __pyx_k_Exception_is_not_set, sizeof(__pyx_k_Exception_is_not_set), 0, 1, 0, 0}, {&__pyx_kp_u_Exception_occurred_in_preexec_fn, __pyx_k_Exception_occurred_in_preexec_fn, sizeof(__pyx_k_Exception_occurred_in_preexec_fn), 0, 1, 0, 0}, {&__pyx_kp_u_Executing_r_took_3f_seconds, __pyx_k_Executing_r_took_3f_seconds, sizeof(__pyx_k_Executing_r_took_3f_seconds), 0, 1, 0, 0}, {&__pyx_n_u_FINISHED, __pyx_k_FINISHED, sizeof(__pyx_k_FINISHED), 0, 1, 0, 1}, {&__pyx_kp_u_Fatal_error_on_server, __pyx_k_Fatal_error_on_server, sizeof(__pyx_k_Fatal_error_on_server), 0, 1, 0, 0}, {&__pyx_kp_u_Fatal_error_on_transport, __pyx_k_Fatal_error_on_transport, sizeof(__pyx_k_Fatal_error_on_transport), 0, 1, 0, 0}, {&__pyx_kp_u_Fatal_write_error_on_datagram_tr, __pyx_k_Fatal_write_error_on_datagram_tr, sizeof(__pyx_k_Fatal_write_error_on_datagram_tr), 0, 1, 0, 0}, {&__pyx_n_s_FileExistsError, __pyx_k_FileExistsError, sizeof(__pyx_k_FileExistsError), 0, 0, 1, 1}, {&__pyx_n_s_FileNotFoundError, __pyx_k_FileNotFoundError, sizeof(__pyx_k_FileNotFoundError), 0, 0, 1, 1}, {&__pyx_kp_u_File_descriptor_r_is_used_by_tra, __pyx_k_File_descriptor_r_is_used_by_tra, sizeof(__pyx_k_File_descriptor_r_is_used_by_tra), 0, 1, 0, 0}, {&__pyx_n_s_Future, __pyx_k_Future, sizeof(__pyx_k_Future), 0, 0, 1, 1}, {&__pyx_kp_u_Handle_loop_is_None_in_Handle, __pyx_k_Handle_loop_is_None_in_Handle, sizeof(__pyx_k_Handle_loop_is_None_in_Handle), 0, 1, 0, 0}, {&__pyx_kp_u_IPv4_sockaddr_must_be_2_tuple, __pyx_k_IPv4_sockaddr_must_be_2_tuple, sizeof(__pyx_k_IPv4_sockaddr_must_be_2_tuple), 0, 1, 0, 0}, {&__pyx_n_s_InterruptedError, __pyx_k_InterruptedError, sizeof(__pyx_k_InterruptedError), 0, 0, 1, 1}, {&__pyx_n_s_InvalidStateError, __pyx_k_InvalidStateError, sizeof(__pyx_k_InvalidStateError), 0, 0, 1, 1}, {&__pyx_kp_u_Invalid_address_must_be_None_or, __pyx_k_Invalid_address_must_be_None_or, sizeof(__pyx_k_Invalid_address_must_be_None_or), 0, 1, 0, 0}, {&__pyx_n_s_IsADirectoryError, __pyx_k_IsADirectoryError, sizeof(__pyx_k_IsADirectoryError), 0, 0, 1, 1}, {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_kp_u_Listen_errors, __pyx_k_Listen_errors, sizeof(__pyx_k_Listen_errors), 0, 1, 0, 0}, {&__pyx_n_s_LookupError, __pyx_k_LookupError, sizeof(__pyx_k_LookupError), 0, 0, 1, 1}, {&__pyx_n_s_Loop___subprocess_run, __pyx_k_Loop___subprocess_run, sizeof(__pyx_k_Loop___subprocess_run), 0, 0, 1, 1}, {&__pyx_n_s_Loop__getaddrinfo_locals_callbac, __pyx_k_Loop__getaddrinfo_locals_callbac, sizeof(__pyx_k_Loop__getaddrinfo_locals_callbac), 0, 0, 1, 1}, {&__pyx_n_s_Loop__getnameinfo_locals_callbac, __pyx_k_Loop__getnameinfo_locals_callbac, sizeof(__pyx_k_Loop__getnameinfo_locals_callbac), 0, 0, 1, 1}, {&__pyx_kp_u_Loop__read_from_self, __pyx_k_Loop__read_from_self, sizeof(__pyx_k_Loop__read_from_self), 0, 1, 0, 0}, {&__pyx_kp_u_Loop__sock_accept, __pyx_k_Loop__sock_accept, sizeof(__pyx_k_Loop__sock_accept), 0, 1, 0, 0}, {&__pyx_kp_u_Loop__sock_connect, __pyx_k_Loop__sock_connect, sizeof(__pyx_k_Loop__sock_connect), 0, 1, 0, 0}, {&__pyx_n_s_Loop__sock_connect_locals_lambda, __pyx_k_Loop__sock_connect_locals_lambda, sizeof(__pyx_k_Loop__sock_connect_locals_lambda), 0, 0, 1, 1}, {&__pyx_kp_u_Loop__sock_recv, __pyx_k_Loop__sock_recv, sizeof(__pyx_k_Loop__sock_recv), 0, 1, 0, 0}, {&__pyx_kp_u_Loop__sock_sendall, __pyx_k_Loop__sock_sendall, sizeof(__pyx_k_Loop__sock_sendall), 0, 1, 0, 0}, {&__pyx_kp_u_Loop__stop, __pyx_k_Loop__stop, sizeof(__pyx_k_Loop__stop), 0, 1, 0, 0}, {&__pyx_n_s_Loop_connect_accepted_socket, __pyx_k_Loop_connect_accepted_socket, sizeof(__pyx_k_Loop_connect_accepted_socket), 0, 0, 1, 1}, {&__pyx_n_s_Loop_connect_read_pipe, __pyx_k_Loop_connect_read_pipe, sizeof(__pyx_k_Loop_connect_read_pipe), 0, 0, 1, 1}, {&__pyx_n_s_Loop_connect_write_pipe, __pyx_k_Loop_connect_write_pipe, sizeof(__pyx_k_Loop_connect_write_pipe), 0, 0, 1, 1}, {&__pyx_n_s_Loop_create_connection, __pyx_k_Loop_create_connection, sizeof(__pyx_k_Loop_create_connection), 0, 0, 1, 1}, {&__pyx_n_s_Loop_create_datagram_endpoint, __pyx_k_Loop_create_datagram_endpoint, sizeof(__pyx_k_Loop_create_datagram_endpoint), 0, 0, 1, 1}, {&__pyx_n_s_Loop_create_server, __pyx_k_Loop_create_server, sizeof(__pyx_k_Loop_create_server), 0, 0, 1, 1}, {&__pyx_n_s_Loop_create_unix_connection, __pyx_k_Loop_create_unix_connection, sizeof(__pyx_k_Loop_create_unix_connection), 0, 0, 1, 1}, {&__pyx_n_s_Loop_create_unix_server, __pyx_k_Loop_create_unix_server, sizeof(__pyx_k_Loop_create_unix_server), 0, 0, 1, 1}, {&__pyx_kp_u_Loop_debug_info, __pyx_k_Loop_debug_info, sizeof(__pyx_k_Loop_debug_info), 0, 1, 0, 0}, {&__pyx_n_s_Loop_getnameinfo, __pyx_k_Loop_getnameinfo, sizeof(__pyx_k_Loop_getnameinfo), 0, 0, 1, 1}, {&__pyx_n_s_Loop_shutdown_asyncgens, __pyx_k_Loop_shutdown_asyncgens, sizeof(__pyx_k_Loop_shutdown_asyncgens), 0, 0, 1, 1}, {&__pyx_n_s_Loop_sock_connect, __pyx_k_Loop_sock_connect, sizeof(__pyx_k_Loop_sock_connect), 0, 0, 1, 1}, {&__pyx_n_s_Loop_sock_sendall, __pyx_k_Loop_sock_sendall, sizeof(__pyx_k_Loop_sock_sendall), 0, 0, 1, 1}, {&__pyx_kp_u_Loop_time, __pyx_k_Loop_time, sizeof(__pyx_k_Loop_time), 0, 1, 0, 0}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_kp_u_Multiple_exceptions, __pyx_k_Multiple_exceptions, sizeof(__pyx_k_Multiple_exceptions), 0, 1, 0, 0}, {&__pyx_n_s_NSIG, __pyx_k_NSIG, sizeof(__pyx_k_NSIG), 0, 0, 1, 1}, {&__pyx_kp_u_Neither_host_port_nor_sock_were, __pyx_k_Neither_host_port_nor_sock_were, sizeof(__pyx_k_Neither_host_port_nor_sock_were), 0, 1, 0, 0}, {&__pyx_kp_u_Non_thread_safe_operation_invoke, __pyx_k_Non_thread_safe_operation_invoke, sizeof(__pyx_k_Non_thread_safe_operation_invoke), 0, 1, 0, 0}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_kp_u_Not_paused, __pyx_k_Not_paused, sizeof(__pyx_k_Not_paused), 0, 1, 0, 0}, {&__pyx_kp_u_Number_of_signals, __pyx_k_Number_of_signals, sizeof(__pyx_k_Number_of_signals), 0, 1, 0, 0}, {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1}, {&__pyx_n_s_O_RDWR, __pyx_k_O_RDWR, sizeof(__pyx_k_O_RDWR), 0, 0, 1, 1}, {&__pyx_kp_u_Object_created_at_most_recent_ca, __pyx_k_Object_created_at_most_recent_ca, sizeof(__pyx_k_Object_created_at_most_recent_ca), 0, 1, 0, 0}, {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1}, {&__pyx_n_u_PENDING, __pyx_k_PENDING, sizeof(__pyx_k_PENDING), 0, 1, 0, 1}, {&__pyx_n_s_PIPE, __pyx_k_PIPE, sizeof(__pyx_k_PIPE), 0, 0, 1, 1}, {&__pyx_n_u_PYTHONASYNCIODEBUG, __pyx_k_PYTHONASYNCIODEBUG, sizeof(__pyx_k_PYTHONASYNCIODEBUG), 0, 1, 0, 1}, {&__pyx_n_s_PermissionError, __pyx_k_PermissionError, sizeof(__pyx_k_PermissionError), 0, 0, 1, 1}, {&__pyx_kp_u_Polls_debug_info, __pyx_k_Polls_debug_info, sizeof(__pyx_k_Polls_debug_info), 0, 1, 0, 0}, {&__pyx_n_s_ProcessLookupError, __pyx_k_ProcessLookupError, sizeof(__pyx_k_ProcessLookupError), 0, 0, 1, 1}, {&__pyx_kp_u_Process_info, __pyx_k_Process_info, sizeof(__pyx_k_Process_info), 0, 1, 0, 0}, {&__pyx_kp_u_Process_memory, __pyx_k_Process_memory, sizeof(__pyx_k_Process_memory), 0, 1, 0, 0}, {&__pyx_n_s_Protocol, __pyx_k_Protocol, sizeof(__pyx_k_Protocol), 0, 0, 1, 1}, {&__pyx_kp_u_Racing_with_another_loop_to_spaw, __pyx_k_Racing_with_another_loop_to_spaw, sizeof(__pyx_k_Racing_with_another_loop_to_spaw), 0, 1, 0, 0}, {&__pyx_n_s_ReadSubprocessPipeProto, __pyx_k_ReadSubprocessPipeProto, sizeof(__pyx_k_ReadSubprocessPipeProto), 0, 0, 1, 1}, {&__pyx_n_s_ReadSubprocessPipeProto_data_rec, __pyx_k_ReadSubprocessPipeProto_data_rec, sizeof(__pyx_k_ReadSubprocessPipeProto_data_rec), 0, 0, 1, 1}, {&__pyx_kp_u_Read_EOF_failed_callbacks, __pyx_k_Read_EOF_failed_callbacks, sizeof(__pyx_k_Read_EOF_failed_callbacks), 0, 1, 0, 0}, {&__pyx_kp_u_Read_EOFs, __pyx_k_Read_EOFs, sizeof(__pyx_k_Read_EOFs), 0, 1, 0, 0}, {&__pyx_kp_u_Read_callbacks, __pyx_k_Read_callbacks, sizeof(__pyx_k_Read_callbacks), 0, 1, 0, 0}, {&__pyx_kp_u_Read_callbacks_failed, __pyx_k_Read_callbacks_failed, sizeof(__pyx_k_Read_callbacks_failed), 0, 1, 0, 0}, {&__pyx_kp_u_Read_errors, __pyx_k_Read_errors, sizeof(__pyx_k_Read_errors), 0, 1, 0, 0}, {&__pyx_kp_u_Read_events, __pyx_k_Read_events, sizeof(__pyx_k_Read_events), 0, 1, 0, 0}, {&__pyx_kp_u_Read_failed_callbacks, __pyx_k_Read_failed_callbacks, sizeof(__pyx_k_Read_failed_callbacks), 0, 1, 0, 0}, {&__pyx_n_s_ResourceWarning, __pyx_k_ResourceWarning, sizeof(__pyx_k_ResourceWarning), 0, 0, 1, 1}, {&__pyx_kp_u_Result_is_not_ready, __pyx_k_Result_is_not_ready, sizeof(__pyx_k_Result_is_not_ready), 0, 1, 0, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeWarning, __pyx_k_RuntimeWarning, sizeof(__pyx_k_RuntimeWarning), 0, 0, 1, 1}, {&__pyx_n_s_SIG_DFL, __pyx_k_SIG_DFL, sizeof(__pyx_k_SIG_DFL), 0, 0, 1, 1}, {&__pyx_n_u_SO_REUSEPORT, __pyx_k_SO_REUSEPORT, sizeof(__pyx_k_SO_REUSEPORT), 0, 1, 0, 1}, {&__pyx_n_s_SSLContext, __pyx_k_SSLContext, sizeof(__pyx_k_SSLContext), 0, 0, 1, 1}, {&__pyx_n_s_SSLProtocol, __pyx_k_SSLProtocol, sizeof(__pyx_k_SSLProtocol), 0, 0, 1, 1}, {&__pyx_n_s_STDOUT, __pyx_k_STDOUT, sizeof(__pyx_k_STDOUT), 0, 0, 1, 1}, {&__pyx_n_s_Server_wait_closed, __pyx_k_Server_wait_closed, sizeof(__pyx_k_Server_wait_closed), 0, 0, 1, 1}, {&__pyx_kp_u_Shutdown_errors, __pyx_k_Shutdown_errors, sizeof(__pyx_k_Shutdown_errors), 0, 1, 0, 0}, {&__pyx_kp_u_Sock_ops_successfull_on_1st_try, __pyx_k_Sock_ops_successfull_on_1st_try, sizeof(__pyx_k_Sock_ops_successfull_on_1st_try), 0, 1, 0, 0}, {&__pyx_kp_u_Socket_try_writes, __pyx_k_Socket_try_writes, sizeof(__pyx_k_Socket_try_writes), 0, 1, 0, 0}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_kp_u_StopIteration_interacts_badly_wi, __pyx_k_StopIteration_interacts_badly_wi, sizeof(__pyx_k_StopIteration_interacts_badly_wi), 0, 1, 0, 0}, {&__pyx_kp_u_StreamWriteContext_close_py_buf, __pyx_k_StreamWriteContext_close_py_buf, sizeof(__pyx_k_StreamWriteContext_close_py_buf), 0, 1, 0, 0}, {&__pyx_kp_u_StreamWriteContext_close_uv_buf, __pyx_k_StreamWriteContext_close_uv_buf, sizeof(__pyx_k_StreamWriteContext_close_uv_buf), 0, 1, 0, 0}, {&__pyx_kp_u_Streams_debug_info, __pyx_k_Streams_debug_info, sizeof(__pyx_k_Streams_debug_info), 0, 1, 0, 0}, {&__pyx_n_s_SubprocessError, __pyx_k_SubprocessError, sizeof(__pyx_k_SubprocessError), 0, 0, 1, 1}, {&__pyx_n_s_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 0, 1, 1}, {&__pyx_kp_u_Task__step, __pyx_k_Task__step, sizeof(__pyx_k_Task__step), 0, 1, 0, 0}, {&__pyx_kp_u_Task_got_bad_yield_r, __pyx_k_Task_got_bad_yield_r, sizeof(__pyx_k_Task_got_bad_yield_r), 0, 1, 0, 0}, {&__pyx_kp_u_Task_r_got_Future_r_attached_to, __pyx_k_Task_r_got_Future_r_attached_to, sizeof(__pyx_k_Task_r_got_Future_r_attached_to), 0, 1, 0, 0}, {&__pyx_n_s_ThreadPoolExecutor, __pyx_k_ThreadPoolExecutor, sizeof(__pyx_k_ThreadPoolExecutor), 0, 0, 1, 1}, {&__pyx_n_s_TimeoutError, __pyx_k_TimeoutError, sizeof(__pyx_k_TimeoutError), 0, 0, 1, 1}, {&__pyx_kp_u_Timer_handles_8, __pyx_k_Timer_handles_8, sizeof(__pyx_k_Timer_handles_8), 0, 1, 0, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_u_UDPTransport_family_is_undefined, __pyx_k_UDPTransport_family_is_undefined, sizeof(__pyx_k_UDPTransport_family_is_undefined), 0, 1, 0, 0}, {&__pyx_kp_u_UDPTransport_family_is_undefined_2, __pyx_k_UDPTransport_family_is_undefined_2, sizeof(__pyx_k_UDPTransport_family_is_undefined_2), 0, 1, 0, 0}, {&__pyx_kp_u_UVHandles_python_libuv_total, __pyx_k_UVHandles_python_libuv_total, sizeof(__pyx_k_UVHandles_python_libuv_total), 0, 1, 0, 0}, {&__pyx_kp_u_UVProcessTransport__call_connect, __pyx_k_UVProcessTransport__call_connect, sizeof(__pyx_k_UVProcessTransport__call_connect), 0, 1, 0, 0}, {&__pyx_kp_u_UVProcess__close_after_spawn_cal, __pyx_k_UVProcess__close_after_spawn_cal, sizeof(__pyx_k_UVProcess__close_after_spawn_cal), 0, 1, 0, 0}, {&__pyx_kp_u_UVStream__try_write_called_with, __pyx_k_UVStream__try_write_called_with, sizeof(__pyx_k_UVStream__try_write_called_with), 0, 1, 0, 0}, {&__pyx_kp_u_UVStream_shutdown_callback_calle, __pyx_k_UVStream_shutdown_callback_calle, sizeof(__pyx_k_UVStream_shutdown_callback_calle), 0, 1, 0, 0}, {&__pyx_kp_u_UVStream_write_callback_called_w, __pyx_k_UVStream_write_callback_called_w, sizeof(__pyx_k_UVStream_write_callback_called_w), 0, 1, 0, 0}, {&__pyx_kp_u_UVTransport__call_connection_los, __pyx_k_UVTransport__call_connection_los, sizeof(__pyx_k_UVTransport__call_connection_los), 0, 1, 0, 0}, {&__pyx_kp_u_UVTransport__call_connection_mad, __pyx_k_UVTransport__call_connection_mad, sizeof(__pyx_k_UVTransport__call_connection_mad), 0, 1, 0, 0}, {&__pyx_kp_u_UVTransport__start_reading, __pyx_k_UVTransport__start_reading, sizeof(__pyx_k_UVTransport__start_reading), 0, 1, 0, 0}, {&__pyx_kp_u_Unable_to_deallocate_request_for, __pyx_k_Unable_to_deallocate_request_for, sizeof(__pyx_k_Unable_to_deallocate_request_for), 0, 1, 0, 0}, {&__pyx_kp_u_Unhandled_error_in_exception_han, __pyx_k_Unhandled_error_in_exception_han, sizeof(__pyx_k_Unhandled_error_in_exception_han), 0, 1, 0, 0}, {&__pyx_kp_u_Unhandled_exception_in_event_loo, __pyx_k_Unhandled_exception_in_event_loo, sizeof(__pyx_k_Unhandled_exception_in_event_loo), 0, 1, 0, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_WeakSet, __pyx_k_WeakSet, sizeof(__pyx_k_WeakSet), 0, 0, 1, 1}, {&__pyx_n_s_WeakValueDictionary, __pyx_k_WeakValueDictionary, sizeof(__pyx_k_WeakValueDictionary), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto, __pyx_k_WriteSubprocessPipeProto, sizeof(__pyx_k_WriteSubprocessPipeProto), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto___init, __pyx_k_WriteSubprocessPipeProto___init, sizeof(__pyx_k_WriteSubprocessPipeProto___init), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto___repr, __pyx_k_WriteSubprocessPipeProto___repr, sizeof(__pyx_k_WriteSubprocessPipeProto___repr), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto_connect, __pyx_k_WriteSubprocessPipeProto_connect, sizeof(__pyx_k_WriteSubprocessPipeProto_connect), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto_connect_2, __pyx_k_WriteSubprocessPipeProto_connect_2, sizeof(__pyx_k_WriteSubprocessPipeProto_connect_2), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto_pause_w, __pyx_k_WriteSubprocessPipeProto_pause_w, sizeof(__pyx_k_WriteSubprocessPipeProto_pause_w), 0, 0, 1, 1}, {&__pyx_n_s_WriteSubprocessPipeProto_resume, __pyx_k_WriteSubprocessPipeProto_resume, sizeof(__pyx_k_WriteSubprocessPipeProto_resume), 0, 0, 1, 1}, {&__pyx_kp_u_Write_callbacks_failed, __pyx_k_Write_callbacks_failed, sizeof(__pyx_k_Write_callbacks_failed), 0, 1, 0, 0}, {&__pyx_kp_u_Write_contexts_8, __pyx_k_Write_contexts_8, sizeof(__pyx_k_Write_contexts_8), 0, 1, 0, 0}, {&__pyx_kp_u_Write_errors, __pyx_k_Write_errors, sizeof(__pyx_k_Write_errors), 0, 1, 0, 0}, {&__pyx_kp_u_Write_events, __pyx_k_Write_events, sizeof(__pyx_k_Write_events), 0, 1, 0, 0}, {&__pyx_kp_u_Write_failed_callbacks, __pyx_k_Write_failed_callbacks, sizeof(__pyx_k_Write_failed_callbacks), 0, 1, 0, 0}, {&__pyx_kp_u_Write_without_poll, __pyx_k_Write_without_poll, sizeof(__pyx_k_Write_without_poll), 0, 1, 0, 0}, {&__pyx_kp_u_You_must_set_server_hostname_whe, __pyx_k_You_must_set_server_hostname_whe, sizeof(__pyx_k_You_must_set_server_hostname_whe), 0, 1, 0, 0}, {&__pyx_kp_u__103, __pyx_k__103, sizeof(__pyx_k__103), 0, 1, 0, 0}, {&__pyx_kp_u__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 1, 0, 0}, {&__pyx_kp_u__112, __pyx_k__112, sizeof(__pyx_k__112), 0, 1, 0, 0}, {&__pyx_kp_u__113, __pyx_k__113, sizeof(__pyx_k__113), 0, 1, 0, 0}, {&__pyx_kp_u__120, __pyx_k__120, sizeof(__pyx_k__120), 0, 1, 0, 0}, {&__pyx_kp_b__146, __pyx_k__146, sizeof(__pyx_k__146), 0, 0, 0, 0}, {&__pyx_kp_b__157, __pyx_k__157, sizeof(__pyx_k__157), 0, 0, 0, 0}, {&__pyx_n_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 1}, {&__pyx_kp_b__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 0, 0}, {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0}, {&__pyx_kp_u__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 1, 0, 0}, {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0}, {&__pyx_kp_u__75, __pyx_k__75, sizeof(__pyx_k__75), 0, 1, 0, 0}, {&__pyx_kp_u__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 1, 0, 0}, {&__pyx_kp_u__97, __pyx_k__97, sizeof(__pyx_k__97), 0, 1, 0, 0}, {&__pyx_kp_u_abort_init__closed_is_set, __pyx_k_abort_init__closed_is_set, sizeof(__pyx_k_abort_init__closed_is_set), 0, 1, 0, 0}, {&__pyx_kp_u_abort_init__inited_is_set, __pyx_k_abort_init__inited_is_set, sizeof(__pyx_k_abort_init__inited_is_set), 0, 1, 0, 0}, {&__pyx_n_s_accept, __pyx_k_accept, sizeof(__pyx_k_accept), 0, 0, 1, 1}, {&__pyx_n_s_aclose, __pyx_k_aclose, sizeof(__pyx_k_aclose), 0, 0, 1, 1}, {&__pyx_kp_u_active_TimerHandle_is_deallacati, __pyx_k_active_TimerHandle_is_deallacati, sizeof(__pyx_k_active_TimerHandle_is_deallacati), 0, 1, 0, 0}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_add_done_callback, __pyx_k_add_done_callback, sizeof(__pyx_k_add_done_callback), 0, 0, 1, 1}, {&__pyx_n_s_addr, __pyx_k_addr, sizeof(__pyx_k_addr), 0, 0, 1, 1}, {&__pyx_n_s_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 0, 1, 1}, {&__pyx_kp_u_alive_closed, __pyx_k_alive_closed, sizeof(__pyx_k_alive_closed), 0, 1, 0, 0}, {&__pyx_kp_u_all_args_must_be_str_or_bytes, __pyx_k_all_args_must_be_str_or_bytes, sizeof(__pyx_k_all_args_must_be_str_or_bytes), 0, 1, 0, 0}, {&__pyx_kp_u_all_environment_values_must_be_b, __pyx_k_all_environment_values_must_be_b, sizeof(__pyx_k_all_environment_values_must_be_b), 0, 1, 0, 0}, {&__pyx_kp_u_all_environment_vars_must_be_byt, __pyx_k_all_environment_vars_must_be_byt, sizeof(__pyx_k_all_environment_vars_must_be_byt), 0, 1, 0, 0}, {&__pyx_n_s_all_tasks, __pyx_k_all_tasks, sizeof(__pyx_k_all_tasks), 0, 0, 1, 1}, {&__pyx_n_s_allow_broadcast, __pyx_k_allow_broadcast, sizeof(__pyx_k_allow_broadcast), 0, 0, 1, 1}, {&__pyx_kp_u_an_error_occurred_during_closing, __pyx_k_an_error_occurred_during_closing, sizeof(__pyx_k_an_error_occurred_during_closing), 0, 1, 0, 0}, {&__pyx_n_s_app_transport, __pyx_k_app_transport, sizeof(__pyx_k_app_transport), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_u_asyncgen, __pyx_k_asyncgen, sizeof(__pyx_k_asyncgen), 0, 1, 0, 1}, {&__pyx_n_s_asyncgen_finalizer_hook, __pyx_k_asyncgen_finalizer_hook, sizeof(__pyx_k_asyncgen_finalizer_hook), 0, 0, 1, 1}, {&__pyx_n_s_asyncgen_firstiter_hook, __pyx_k_asyncgen_firstiter_hook, sizeof(__pyx_k_asyncgen_firstiter_hook), 0, 0, 1, 1}, {&__pyx_kp_u_asynchronous_generator_r_was_sch, __pyx_k_asynchronous_generator_r_was_sch, sizeof(__pyx_k_asynchronous_generator_r_was_sch), 0, 1, 0, 0}, {&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_base_events, __pyx_k_asyncio_base_events, sizeof(__pyx_k_asyncio_base_events), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_future_blocking, __pyx_k_asyncio_future_blocking, sizeof(__pyx_k_asyncio_future_blocking), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_futures, __pyx_k_asyncio_futures, sizeof(__pyx_k_asyncio_futures), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_log, __pyx_k_asyncio_log, sizeof(__pyx_k_asyncio_log), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_sslproto, __pyx_k_asyncio_sslproto, sizeof(__pyx_k_asyncio_sslproto), 0, 0, 1, 1}, {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1}, {&__pyx_n_s_await, __pyx_k_await, sizeof(__pyx_k_await), 0, 0, 1, 1}, {&__pyx_n_u_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 1, 0, 1}, {&__pyx_n_s_backlog, __pyx_k_backlog, sizeof(__pyx_k_backlog), 0, 0, 1, 1}, {&__pyx_kp_b_bin_sh, __pyx_k_bin_sh, sizeof(__pyx_k_bin_sh), 0, 0, 0, 0}, {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1}, {&__pyx_n_s_blocking, __pyx_k_blocking, sizeof(__pyx_k_blocking), 0, 0, 1, 1}, {&__pyx_kp_u_buffer_size_is_not_0_after_a_su, __pyx_k_buffer_size_is_not_0_after_a_su, sizeof(__pyx_k_buffer_size_is_not_0_after_a_su), 0, 1, 0, 0}, {&__pyx_n_s_bufsize, __pyx_k_bufsize, sizeof(__pyx_k_bufsize), 0, 0, 1, 1}, {&__pyx_kp_u_bufsize_must_be_0, __pyx_k_bufsize_must_be_0, sizeof(__pyx_k_bufsize_must_be_0), 0, 1, 0, 0}, {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1}, {&__pyx_kp_b_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 0, 0}, {&__pyx_n_s_call_check_cancel, __pyx_k_call_check_cancel, sizeof(__pyx_k_call_check_cancel), 0, 0, 1, 1}, {&__pyx_n_s_call_exception_handler, __pyx_k_call_exception_handler, sizeof(__pyx_k_call_exception_handler), 0, 0, 1, 1}, {&__pyx_n_s_call_later, __pyx_k_call_later, sizeof(__pyx_k_call_later), 0, 0, 1, 1}, {&__pyx_n_s_call_set_state, __pyx_k_call_set_state, sizeof(__pyx_k_call_set_state), 0, 0, 1, 1}, {&__pyx_n_s_call_soon, __pyx_k_call_soon, sizeof(__pyx_k_call_soon), 0, 0, 1, 1}, {&__pyx_n_s_call_soon_threadsafe, __pyx_k_call_soon_threadsafe, sizeof(__pyx_k_call_soon_threadsafe), 0, 0, 1, 1}, {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1}, {&__pyx_kp_u_called_after_destroying_the_UVH, __pyx_k_called_after_destroying_the_UVH, sizeof(__pyx_k_called_after_destroying_the_UVH), 0, 1, 0, 0}, {&__pyx_kp_u_called_with_handle_data_NULL, __pyx_k_called_with_handle_data_NULL, sizeof(__pyx_k_called_with_handle_data_NULL), 0, 1, 0, 0}, {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1}, {&__pyx_kp_u_cancel_request_data_is_NULL, __pyx_k_cancel_request_data_is_NULL, sizeof(__pyx_k_cancel_request_data_is_NULL), 0, 1, 0, 0}, {&__pyx_kp_u_cancel_request_data_is_not_UVRe, __pyx_k_cancel_request_data_is_not_UVRe, sizeof(__pyx_k_cancel_request_data_is_not_UVRe), 0, 1, 0, 0}, {&__pyx_kp_u_cancel_request_is_NULL, __pyx_k_cancel_request_is_NULL, sizeof(__pyx_k_cancel_request_is_NULL), 0, 1, 0, 0}, {&__pyx_n_s_cancelled, __pyx_k_cancelled, sizeof(__pyx_k_cancelled), 0, 0, 1, 1}, {&__pyx_n_u_cancelled, __pyx_k_cancelled, sizeof(__pyx_k_cancelled), 0, 1, 0, 1}, {&__pyx_kp_u_cannot_apply_subprocess_STDOUT, __pyx_k_cannot_apply_subprocess_STDOUT, sizeof(__pyx_k_cannot_apply_subprocess_STDOUT), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_convert_sockaddr_into_Pyt, __pyx_k_cannot_convert_sockaddr_into_Pyt, sizeof(__pyx_k_cannot_convert_sockaddr_into_Pyt), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_open_a_UDP_handle_invalid, __pyx_k_cannot_open_a_UDP_handle_invalid, sizeof(__pyx_k_cannot_open_a_UDP_handle_invalid), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_spawn_a_process_args_are, __pyx_k_cannot_spawn_a_process_args_are, sizeof(__pyx_k_cannot_spawn_a_process_args_are), 0, 1, 0, 0}, {&__pyx_n_s_cast, __pyx_k_cast, sizeof(__pyx_k_cast), 0, 0, 1, 1}, {&__pyx_n_s_cause, __pyx_k_cause, sizeof(__pyx_k_cause), 0, 0, 1, 1}, {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1}, {&__pyx_n_s_chain_future_locals__call_check, __pyx_k_chain_future_locals__call_check, sizeof(__pyx_k_chain_future_locals__call_check), 0, 0, 1, 1}, {&__pyx_n_s_chain_future_locals__call_set_s, __pyx_k_chain_future_locals__call_set_s, sizeof(__pyx_k_chain_future_locals__call_set_s), 0, 0, 1, 1}, {&__pyx_n_s_chain_future_locals__set_state, __pyx_k_chain_future_locals__set_state, sizeof(__pyx_k_chain_future_locals__set_state), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_kp_u_close__handle_data_is_NULL, __pyx_k_close__handle_data_is_NULL, sizeof(__pyx_k_close__handle_data_is_NULL), 0, 1, 0, 0}, {&__pyx_kp_u_close__handle_data_is_not_UVHa, __pyx_k_close__handle_data_is_not_UVHa, sizeof(__pyx_k_close__handle_data_is_not_UVHa), 0, 1, 0, 0}, {&__pyx_n_s_close_fds, __pyx_k_close_fds, sizeof(__pyx_k_close_fds), 0, 0, 1, 1}, {&__pyx_kp_u_close_uv_is_closing_is_true, __pyx_k_close_uv_is_closing_is_true, sizeof(__pyx_k_close_uv_is_closing_is_true), 0, 1, 0, 0}, {&__pyx_kp_u_closed_reading_x, __pyx_k_closed_reading_x, sizeof(__pyx_k_closed_reading_x), 0, 1, 0, 0}, {&__pyx_kp_u_closed_x, __pyx_k_closed_x, sizeof(__pyx_k_closed_x), 0, 1, 0, 0}, {&__pyx_n_s_cmd, __pyx_k_cmd, sizeof(__pyx_k_cmd), 0, 0, 1, 1}, {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_n_s_concurrent, __pyx_k_concurrent, sizeof(__pyx_k_concurrent), 0, 0, 1, 1}, {&__pyx_kp_u_concurrent_allocations, __pyx_k_concurrent_allocations, sizeof(__pyx_k_concurrent_allocations), 0, 1, 0, 0}, {&__pyx_n_s_concurrent_futures, __pyx_k_concurrent_futures, sizeof(__pyx_k_concurrent_futures), 0, 0, 1, 1}, {&__pyx_kp_u_concurrent_futures_Future_is_exp, __pyx_k_concurrent_futures_Future_is_exp, sizeof(__pyx_k_concurrent_futures_Future_is_exp), 0, 1, 0, 0}, {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1}, {&__pyx_n_s_connect_accepted_socket, __pyx_k_connect_accepted_socket, sizeof(__pyx_k_connect_accepted_socket), 0, 0, 1, 1}, {&__pyx_kp_u_connect_failed, __pyx_k_connect_failed, sizeof(__pyx_k_connect_failed), 0, 1, 0, 0}, {&__pyx_n_s_connect_read_pipe, __pyx_k_connect_read_pipe, sizeof(__pyx_k_connect_read_pipe), 0, 0, 1, 1}, {&__pyx_n_s_connect_write_pipe, __pyx_k_connect_write_pipe, sizeof(__pyx_k_connect_write_pipe), 0, 0, 1, 1}, {&__pyx_n_s_connection_lost, __pyx_k_connection_lost, sizeof(__pyx_k_connection_lost), 0, 0, 1, 1}, {&__pyx_n_s_connection_made, __pyx_k_connection_made, sizeof(__pyx_k_connection_made), 0, 0, 1, 1}, {&__pyx_n_u_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 1, 0, 1}, {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1}, {&__pyx_n_s_coro, __pyx_k_coro, sizeof(__pyx_k_coro), 0, 0, 1, 1}, {&__pyx_n_s_coroutines, __pyx_k_coroutines, sizeof(__pyx_k_coroutines), 0, 0, 1, 1}, {&__pyx_kp_u_coroutines_cannot_be_used_with_a, __pyx_k_coroutines_cannot_be_used_with_a, sizeof(__pyx_k_coroutines_cannot_be_used_with_a), 0, 1, 0, 0}, {&__pyx_kp_u_coroutines_cannot_be_used_with_r, __pyx_k_coroutines_cannot_be_used_with_r, sizeof(__pyx_k_coroutines_cannot_be_used_with_r), 0, 1, 0, 0}, {&__pyx_kp_u_could_not_bind_to_local_addr, __pyx_k_could_not_bind_to_local_addr, sizeof(__pyx_k_could_not_bind_to_local_addr), 0, 1, 0, 0}, {&__pyx_kp_u_could_not_bind_to_remote_addr, __pyx_k_could_not_bind_to_remote_addr, sizeof(__pyx_k_could_not_bind_to_remote_addr), 0, 1, 0, 0}, {&__pyx_kp_u_could_not_close_attached_file_ob, __pyx_k_could_not_close_attached_file_ob, sizeof(__pyx_k_could_not_close_attached_file_ob), 0, 1, 0, 0}, {&__pyx_n_s_create_connection, __pyx_k_create_connection, sizeof(__pyx_k_create_connection), 0, 0, 1, 1}, {&__pyx_n_s_create_connection_locals_genexpr, __pyx_k_create_connection_locals_genexpr, sizeof(__pyx_k_create_connection_locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_create_datagram_endpoint, __pyx_k_create_datagram_endpoint, sizeof(__pyx_k_create_datagram_endpoint), 0, 0, 1, 1}, {&__pyx_n_s_create_datagram_endpoint_locals, __pyx_k_create_datagram_endpoint_locals, sizeof(__pyx_k_create_datagram_endpoint_locals), 0, 0, 1, 1}, {&__pyx_n_s_create_future, __pyx_k_create_future, sizeof(__pyx_k_create_future), 0, 0, 1, 1}, {&__pyx_n_s_create_server, __pyx_k_create_server, sizeof(__pyx_k_create_server), 0, 0, 1, 1}, {&__pyx_n_s_create_task, __pyx_k_create_task, sizeof(__pyx_k_create_task), 0, 0, 1, 1}, {&__pyx_n_s_create_unix_connection, __pyx_k_create_unix_connection, sizeof(__pyx_k_create_unix_connection), 0, 0, 1, 1}, {&__pyx_n_s_create_unix_server, __pyx_k_create_unix_server, sizeof(__pyx_k_create_unix_server), 0, 0, 1, 1}, {&__pyx_kp_u_created_at, __pyx_k_created_at, sizeof(__pyx_k_created_at), 0, 1, 0, 0}, {&__pyx_n_s_creationflags, __pyx_k_creationflags, sizeof(__pyx_k_creationflags), 0, 0, 1, 1}, {&__pyx_kp_u_creationflags_is_not_supported, __pyx_k_creationflags_is_not_supported, sizeof(__pyx_k_creationflags_is_not_supported), 0, 1, 0, 0}, {&__pyx_n_s_current_tasks, __pyx_k_current_tasks, sizeof(__pyx_k_current_tasks), 0, 0, 1, 1}, {&__pyx_n_s_cwd, __pyx_k_cwd, sizeof(__pyx_k_cwd), 0, 0, 1, 1}, {&__pyx_kp_u_cwd_must_be_a_str_or_bytes_objec, __pyx_k_cwd_must_be_a_str_or_bytes_objec, sizeof(__pyx_k_cwd_must_be_a_str_or_bytes_objec), 0, 1, 0, 0}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_data_received, __pyx_k_data_received, sizeof(__pyx_k_data_received), 0, 0, 1, 1}, {&__pyx_n_s_datagram_received, __pyx_k_datagram_received, sizeof(__pyx_k_datagram_received), 0, 0, 1, 1}, {&__pyx_kp_u_dealloc____handle_is_NULL__cl, __pyx_k_dealloc____handle_is_NULL__cl, sizeof(__pyx_k_dealloc____handle_is_NULL__cl), 0, 1, 0, 0}, {&__pyx_kp_u_deallocating_a_running_event_loo, __pyx_k_deallocating_a_running_event_loo, sizeof(__pyx_k_deallocating_a_running_event_loo), 0, 1, 0, 0}, {&__pyx_kp_u_deallocating_an_open_event_loop, __pyx_k_deallocating_an_open_event_loop, sizeof(__pyx_k_deallocating_an_open_event_loop), 0, 1, 0, 0}, {&__pyx_n_s_debug_wrapper, __pyx_k_debug_wrapper, sizeof(__pyx_k_debug_wrapper), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, {&__pyx_n_s_default_exception_handler, __pyx_k_default_exception_handler, sizeof(__pyx_k_default_exception_handler), 0, 0, 1, 1}, {&__pyx_n_s_default_int_handler, __pyx_k_default_int_handler, sizeof(__pyx_k_default_int_handler), 0, 0, 1, 1}, {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1}, {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1}, {&__pyx_n_s_destination, __pyx_k_destination, sizeof(__pyx_k_destination), 0, 0, 1, 1}, {&__pyx_n_s_detach, __pyx_k_detach, sizeof(__pyx_k_detach), 0, 0, 1, 1}, {&__pyx_n_s_devnull, __pyx_k_devnull, sizeof(__pyx_k_devnull), 0, 0, 1, 1}, {&__pyx_n_s_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 0, 1, 1}, {&__pyx_n_s_discard, __pyx_k_discard, sizeof(__pyx_k_discard), 0, 0, 1, 1}, {&__pyx_n_s_disconnected, __pyx_k_disconnected, sizeof(__pyx_k_disconnected), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_done, __pyx_k_done, sizeof(__pyx_k_done), 0, 0, 1, 1}, {&__pyx_n_s_dup, __pyx_k_dup, sizeof(__pyx_k_dup), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_ensure_future, __pyx_k_ensure_future, sizeof(__pyx_k_ensure_future), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 1}, {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1}, {&__pyx_n_s_eof_received, __pyx_k_eof_received, sizeof(__pyx_k_eof_received), 0, 0, 1, 1}, {&__pyx_kp_u_epected_AF_INET_or_AF_INET6_fami, __pyx_k_epected_AF_INET_or_AF_INET6_fami, sizeof(__pyx_k_epected_AF_INET_or_AF_INET6_fami), 0, 1, 0, 0}, {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_error_received, __pyx_k_error_received, sizeof(__pyx_k_error_received), 0, 0, 1, 1}, {&__pyx_kp_u_error_status_in_uv_stream_t_list, __pyx_k_error_status_in_uv_stream_t_list, sizeof(__pyx_k_error_status_in_uv_stream_t_list), 0, 1, 0, 0}, {&__pyx_kp_u_error_status_in_uv_stream_t_read, __pyx_k_error_status_in_uv_stream_t_read, sizeof(__pyx_k_error_status_in_uv_stream_t_read), 0, 1, 0, 0}, {&__pyx_kp_u_error_status_in_uv_stream_t_shut, __pyx_k_error_status_in_uv_stream_t_shut, sizeof(__pyx_k_error_status_in_uv_stream_t_shut), 0, 1, 0, 0}, {&__pyx_kp_u_error_status_in_uv_stream_t_writ, __pyx_k_error_status_in_uv_stream_t_writ, sizeof(__pyx_k_error_status_in_uv_stream_t_writ), 0, 1, 0, 0}, {&__pyx_kp_u_error_while_attempting_to_bind_o, __pyx_k_error_while_attempting_to_bind_o, sizeof(__pyx_k_error_while_attempting_to_bind_o), 0, 1, 0, 0}, {&__pyx_n_s_ex, __pyx_k_ex, sizeof(__pyx_k_ex), 0, 0, 1, 1}, {&__pyx_n_s_exc, __pyx_k_exc, sizeof(__pyx_k_exc), 0, 0, 1, 1}, {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1}, {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1}, {&__pyx_n_u_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 1, 0, 1}, {&__pyx_n_s_executable, __pyx_k_executable, sizeof(__pyx_k_executable), 0, 0, 1, 1}, {&__pyx_n_s_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_extract_stack, __pyx_k_extract_stack, sizeof(__pyx_k_extract_stack), 0, 0, 1, 1}, {&__pyx_n_s_family, __pyx_k_family, sizeof(__pyx_k_family), 0, 0, 1, 1}, {&__pyx_kp_u_fatal_Could_not_advance__StreamW, __pyx_k_fatal_Could_not_advance__StreamW, sizeof(__pyx_k_fatal_Could_not_advance__StreamW), 0, 1, 0, 0}, {&__pyx_kp_u_fatal_sent_0_in_advance_uv_buf, __pyx_k_fatal_sent_0_in_advance_uv_buf, sizeof(__pyx_k_fatal_sent_0_in_advance_uv_buf), 0, 1, 0, 0}, {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1}, {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1}, {&__pyx_n_s_finalizer, __pyx_k_finalizer, sizeof(__pyx_k_finalizer), 0, 0, 1, 1}, {&__pyx_n_s_firstiter, __pyx_k_firstiter, sizeof(__pyx_k_firstiter), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1}, {&__pyx_n_s_force_close, __pyx_k_force_close, sizeof(__pyx_k_force_close), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_format_list, __pyx_k_format_list, sizeof(__pyx_k_format_list), 0, 0, 1, 1}, {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1}, {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1}, {&__pyx_n_s_fut, __pyx_k_fut, sizeof(__pyx_k_fut), 0, 0, 1, 1}, {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1}, {&__pyx_n_s_futures, __pyx_k_futures, sizeof(__pyx_k_futures), 0, 0, 1, 1}, {&__pyx_n_s_gaierror, __pyx_k_gaierror, sizeof(__pyx_k_gaierror), 0, 0, 1, 1}, {&__pyx_n_s_gather, __pyx_k_gather, sizeof(__pyx_k_gather), 0, 0, 1, 1}, {&__pyx_n_s_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_asyncgen_hooks, __pyx_k_get_asyncgen_hooks, sizeof(__pyx_k_get_asyncgen_hooks), 0, 0, 1, 1}, {&__pyx_n_u_get_asyncgen_hooks, __pyx_k_get_asyncgen_hooks, sizeof(__pyx_k_get_asyncgen_hooks), 0, 1, 0, 1}, {&__pyx_n_s_get_coroutine_wrapper, __pyx_k_get_coroutine_wrapper, sizeof(__pyx_k_get_coroutine_wrapper), 0, 0, 1, 1}, {&__pyx_n_s_get_debug, __pyx_k_get_debug, sizeof(__pyx_k_get_debug), 0, 0, 1, 1}, {&__pyx_n_s_get_event_loop, __pyx_k_get_event_loop, sizeof(__pyx_k_get_event_loop), 0, 0, 1, 1}, {&__pyx_n_s_get_extra_info, __pyx_k_get_extra_info, sizeof(__pyx_k_get_extra_info), 0, 0, 1, 1}, {&__pyx_n_s_get_inheritable, __pyx_k_get_inheritable, sizeof(__pyx_k_get_inheritable), 0, 0, 1, 1}, {&__pyx_n_u_get_running_loop, __pyx_k_get_running_loop, sizeof(__pyx_k_get_running_loop), 0, 1, 0, 1}, {&__pyx_n_s_getaddrinfo, __pyx_k_getaddrinfo, sizeof(__pyx_k_getaddrinfo), 0, 0, 1, 1}, {&__pyx_kp_u_getaddrinfo_returned_empty_list, __pyx_k_getaddrinfo_returned_empty_list, sizeof(__pyx_k_getaddrinfo_returned_empty_list), 0, 1, 0, 0}, {&__pyx_kp_u_getaddrinfo_returned_empty_list_2, __pyx_k_getaddrinfo_returned_empty_list_2, sizeof(__pyx_k_getaddrinfo_returned_empty_list_2), 0, 1, 0, 0}, {&__pyx_n_s_getframe, __pyx_k_getframe, sizeof(__pyx_k_getframe), 0, 0, 1, 1}, {&__pyx_n_s_getnameinfo, __pyx_k_getnameinfo, sizeof(__pyx_k_getnameinfo), 0, 0, 1, 1}, {&__pyx_kp_u_getnameinfo_argument_1_must_be_a, __pyx_k_getnameinfo_argument_1_must_be_a, sizeof(__pyx_k_getnameinfo_argument_1_must_be_a), 0, 1, 0, 0}, {&__pyx_n_s_getpeername, __pyx_k_getpeername, sizeof(__pyx_k_getpeername), 0, 0, 1, 1}, {&__pyx_n_s_getservbyname, __pyx_k_getservbyname, sizeof(__pyx_k_getservbyname), 0, 0, 1, 1}, {&__pyx_kp_u_getsockaddrarg_flowinfo_must_be, __pyx_k_getsockaddrarg_flowinfo_must_be, sizeof(__pyx_k_getsockaddrarg_flowinfo_must_be), 0, 1, 0, 0}, {&__pyx_kp_u_getsockaddrarg_scope_id_must_be, __pyx_k_getsockaddrarg_scope_id_must_be, sizeof(__pyx_k_getsockaddrarg_scope_id_must_be), 0, 1, 0, 0}, {&__pyx_n_s_getsockname, __pyx_k_getsockname, sizeof(__pyx_k_getsockname), 0, 0, 1, 1}, {&__pyx_n_s_getsockopt, __pyx_k_getsockopt, sizeof(__pyx_k_getsockopt), 0, 0, 1, 1}, {&__pyx_n_s_gettimeout, __pyx_k_gettimeout, sizeof(__pyx_k_gettimeout), 0, 0, 1, 1}, {&__pyx_n_u_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 0, 1}, {&__pyx_kp_u_handle_data_is_NULL_in___close_a, __pyx_k_handle_data_is_NULL_in___close_a, sizeof(__pyx_k_handle_data_is_NULL_in___close_a), 0, 1, 0, 0}, {&__pyx_kp_u_handle_loop_data_is_NULL_in___en, __pyx_k_handle_loop_data_is_NULL_in___en, sizeof(__pyx_k_handle_loop_data_is_NULL_in___en), 0, 1, 0, 0}, {&__pyx_kp_u_handle_loop_is_NULL_in___ensure, __pyx_k_handle_loop_is_NULL_in___ensure, sizeof(__pyx_k_handle_loop_is_NULL_in___ensure), 0, 1, 0, 0}, {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1}, {&__pyx_kp_u_high_r_must_be_low_r_must_be_0, __pyx_k_high_r_must_be_low_r_must_be_0, sizeof(__pyx_k_high_r_must_be_low_r_must_be_0), 0, 1, 0, 0}, {&__pyx_kp_s_home_travis_build_MagicStack_uv, __pyx_k_home_travis_build_MagicStack_uv, sizeof(__pyx_k_home_travis_build_MagicStack_uv), 0, 0, 1, 0}, {&__pyx_kp_s_home_travis_build_MagicStack_uv_2, __pyx_k_home_travis_build_MagicStack_uv_2, sizeof(__pyx_k_home_travis_build_MagicStack_uv_2), 0, 0, 1, 0}, {&__pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_k_home_travis_build_MagicStack_uv_3, sizeof(__pyx_k_home_travis_build_MagicStack_uv_3), 0, 0, 1, 0}, {&__pyx_n_s_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 0, 1, 1}, {&__pyx_kp_u_host_and_port_was_not_specified, __pyx_k_host_and_port_was_not_specified, sizeof(__pyx_k_host_and_port_was_not_specified), 0, 1, 0, 0}, {&__pyx_kp_u_host_must_be_a_str_or_bytes, __pyx_k_host_must_be_a_str_or_bytes, sizeof(__pyx_k_host_must_be_a_str_or_bytes), 0, 1, 0, 0}, {&__pyx_kp_u_host_must_be_a_string_or_bytes_o, __pyx_k_host_must_be_a_string_or_bytes_o, sizeof(__pyx_k_host_must_be_a_string_or_bytes_o), 0, 1, 0, 0}, {&__pyx_kp_u_host_port_and_sock_can_not_be_sp, __pyx_k_host_port_and_sock_can_not_be_sp, sizeof(__pyx_k_host_port_and_sock_can_not_be_sp), 0, 1, 0, 0}, {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, {&__pyx_n_s_ident, __pyx_k_ident, sizeof(__pyx_k_ident), 0, 0, 1, 1}, {&__pyx_n_u_idna, __pyx_k_idna, sizeof(__pyx_k_idna), 0, 1, 0, 1}, {&__pyx_n_s_ignore_environment, __pyx_k_ignore_environment, sizeof(__pyx_k_ignore_environment), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1}, {&__pyx_kp_u_integer_argument_expected_got, __pyx_k_integer_argument_expected_got, sizeof(__pyx_k_integer_argument_expected_got), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_Handle_cb_type, __pyx_k_invalid_Handle_cb_type, sizeof(__pyx_k_invalid_Handle_cb_type), 0, 1, 0, 0}, {&__pyx_kp_u_invalid__init_protocol_call, __pyx_k_invalid__init_protocol_call, sizeof(__pyx_k_invalid__init_protocol_call), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_data_in_writebuf_an_inst, __pyx_k_invalid_data_in_writebuf_an_inst, sizeof(__pyx_k_invalid_data_in_writebuf_an_inst), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_socket_family_expected_A, __pyx_k_invalid_socket_family_expected_A, sizeof(__pyx_k_invalid_socket_family_expected_A), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_stderr_argument_value_r, __pyx_k_invalid_stderr_argument_value_r, sizeof(__pyx_k_invalid_stderr_argument_value_r), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_stdin_argument_value_r, __pyx_k_invalid_stdin_argument_value_r, sizeof(__pyx_k_invalid_stdin_argument_value_r), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_stdout_argument_value_r, __pyx_k_invalid_stdout_argument_value_r, sizeof(__pyx_k_invalid_stdout_argument_value_r), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_waiter_object_r_expected, __pyx_k_invalid_waiter_object_r_expected, sizeof(__pyx_k_invalid_waiter_object_r_expected), 0, 1, 0, 0}, {&__pyx_kp_u_is_alive_but__handle_data_is_no, __pyx_k_is_alive_but__handle_data_is_no, sizeof(__pyx_k_is_alive_but__handle_data_is_no), 0, 1, 0, 0}, {&__pyx_kp_u_is_alive_but__handle_is_NULL, __pyx_k_is_alive_but__handle_is_NULL, sizeof(__pyx_k_is_alive_but__handle_is_NULL), 0, 1, 0, 0}, {&__pyx_kp_u_is_alive_but__handle_loop_is_no, __pyx_k_is_alive_but__handle_loop_is_no, sizeof(__pyx_k_is_alive_but__handle_loop_is_no), 0, 1, 0, 0}, {&__pyx_kp_u_is_alive_but__loop_is_None, __pyx_k_is_alive_but__loop_is_None, sizeof(__pyx_k_is_alive_but__loop_is_None), 0, 1, 0, 0}, {&__pyx_n_s_is_closed, __pyx_k_is_closed, sizeof(__pyx_k_is_closed), 0, 0, 1, 1}, {&__pyx_kp_u_is_not_supposed_to_be_instantia, __pyx_k_is_not_supposed_to_be_instantia, sizeof(__pyx_k_is_not_supposed_to_be_instantia), 0, 1, 0, 0}, {&__pyx_kp_u_is_open_in___dealloc___with_loo, __pyx_k_is_open_in___dealloc___with_loo, sizeof(__pyx_k_is_open_in___dealloc___with_loo), 0, 1, 0, 0}, {&__pyx_n_s_is_running, __pyx_k_is_running, sizeof(__pyx_k_is_running), 0, 0, 1, 1}, {&__pyx_n_s_iscoroutine, __pyx_k_iscoroutine, sizeof(__pyx_k_iscoroutine), 0, 0, 1, 1}, {&__pyx_n_s_iscoroutinefunction, __pyx_k_iscoroutinefunction, sizeof(__pyx_k_iscoroutinefunction), 0, 0, 1, 1}, {&__pyx_n_u_isfuture, __pyx_k_isfuture, sizeof(__pyx_k_isfuture), 0, 1, 0, 1}, {&__pyx_n_s_isgenerator, __pyx_k_isgenerator, sizeof(__pyx_k_isgenerator), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1}, {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, {&__pyx_n_s_local_addr, __pyx_k_local_addr, sizeof(__pyx_k_local_addr), 0, 0, 1, 1}, {&__pyx_kp_u_local_addr_must_be_a_tuple_of_ho, __pyx_k_local_addr_must_be_a_tuple_of_ho, sizeof(__pyx_k_local_addr_must_be_a_tuple_of_ho), 0, 1, 0, 0}, {&__pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2, __pyx_k_local_addr_must_be_a_tuple_of_ho_2, sizeof(__pyx_k_local_addr_must_be_a_tuple_of_ho_2), 0, 1, 0, 0}, {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, {&__pyx_n_s_log_destroy_pending, __pyx_k_log_destroy_pending, sizeof(__pyx_k_log_destroy_pending), 0, 0, 1, 1}, {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1}, {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1}, {&__pyx_n_s_loop_2, __pyx_k_loop_2, sizeof(__pyx_k_loop_2), 0, 0, 1, 1}, {&__pyx_kp_u_loop__exec_queued_writes, __pyx_k_loop__exec_queued_writes, sizeof(__pyx_k_loop__exec_queued_writes), 0, 1, 0, 0}, {&__pyx_kp_u_loop__on_idle, __pyx_k_loop__on_idle, sizeof(__pyx_k_loop__on_idle), 0, 1, 0, 0}, {&__pyx_kp_u_loop__queued_streams_are_not_emp, __pyx_k_loop__queued_streams_are_not_emp, sizeof(__pyx_k_loop__queued_streams_are_not_emp), 0, 1, 0, 0}, {&__pyx_kp_u_loop_set_debug_False_cannot_unse, __pyx_k_loop_set_debug_False_cannot_unse, sizeof(__pyx_k_loop_set_debug_False_cannot_unse), 0, 1, 0, 0}, {&__pyx_kp_u_loop_set_debug_True_cannot_set_d, __pyx_k_loop_set_debug_True_cannot_set_d, sizeof(__pyx_k_loop_set_debug_True_cannot_set_d), 0, 1, 0, 0}, {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1}, {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_main_thread, __pyx_k_main_thread, sizeof(__pyx_k_main_thread), 0, 0, 1, 1}, {&__pyx_n_s_memoryview, __pyx_k_memoryview, sizeof(__pyx_k_memoryview), 0, 0, 1, 1}, {&__pyx_n_u_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 1, 0, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_monotonic, __pyx_k_monotonic, sizeof(__pyx_k_monotonic), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_kp_u_new_callbacks_were_queued_during, __pyx_k_new_callbacks_were_queued_during, sizeof(__pyx_k_new_callbacks_were_queued_during), 0, 1, 0, 0}, {&__pyx_n_s_new_future, __pyx_k_new_future, sizeof(__pyx_k_new_future), 0, 0, 1, 1}, {&__pyx_kp_u_new_poll_handles_were_queued_dur, __pyx_k_new_poll_handles_were_queued_dur, sizeof(__pyx_k_new_poll_handles_were_queued_dur), 0, 1, 0, 0}, {&__pyx_kp_u_new_timers_were_queued_during_lo, __pyx_k_new_timers_were_queued_during_lo, sizeof(__pyx_k_new_timers_were_queued_during_lo), 0, 1, 0, 0}, {&__pyx_kp_u_no_path_and_sock_were_specified, __pyx_k_no_path_and_sock_were_specified, sizeof(__pyx_k_no_path_and_sock_were_specified), 0, 1, 0, 0}, {&__pyx_n_s_noop, __pyx_k_noop, sizeof(__pyx_k_noop), 0, 0, 1, 1}, {&__pyx_n_s_noop_2, __pyx_k_noop_2, sizeof(__pyx_k_noop_2), 0, 0, 1, 1}, {&__pyx_kp_u_not_holding_the_import_lock, __pyx_k_not_holding_the_import_lock, sizeof(__pyx_k_not_holding_the_import_lock), 0, 1, 0, 0}, {&__pyx_kp_u_object_created_at_most_recent_ca, __pyx_k_object_created_at_most_recent_ca, sizeof(__pyx_k_object_created_at_most_recent_ca), 0, 1, 0, 0}, {&__pyx_kp_u_objs_handles, __pyx_k_objs_handles, sizeof(__pyx_k_objs_handles), 0, 1, 0, 0}, {&__pyx_n_s_on_ssl_connected, __pyx_k_on_ssl_connected, sizeof(__pyx_k_on_ssl_connected), 0, 0, 1, 1}, {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, {&__pyx_kp_u_open__StreamWriteContext_is_bein, __pyx_k_open__StreamWriteContext_is_bein, sizeof(__pyx_k_open__StreamWriteContext_is_bein), 0, 1, 0, 0}, {&__pyx_kp_u_open__UDPSendContext_is_being_de, __pyx_k_open__UDPSendContext_is_being_de, sizeof(__pyx_k_open__UDPSendContext_is_being_de), 0, 1, 0, 0}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1}, {&__pyx_n_s_pass_fds, __pyx_k_pass_fds, sizeof(__pyx_k_pass_fds), 0, 0, 1, 1}, {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, {&__pyx_kp_u_path_and_sock_can_not_be_specifi, __pyx_k_path_and_sock_can_not_be_specifi, sizeof(__pyx_k_path_and_sock_can_not_be_specifi), 0, 1, 0, 0}, {&__pyx_kp_u_path_was_not_specified_and_no_so, __pyx_k_path_was_not_specified_and_no_so, sizeof(__pyx_k_path_was_not_specified_and_no_so), 0, 1, 0, 0}, {&__pyx_n_s_pause_writing, __pyx_k_pause_writing, sizeof(__pyx_k_pause_writing), 0, 0, 1, 1}, {&__pyx_n_u_peername, __pyx_k_peername, sizeof(__pyx_k_peername), 0, 1, 0, 1}, {&__pyx_n_s_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 0, 1, 1}, {&__pyx_n_u_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 1, 0, 1}, {&__pyx_n_s_pipe_connection_lost, __pyx_k_pipe_connection_lost, sizeof(__pyx_k_pipe_connection_lost), 0, 0, 1, 1}, {&__pyx_n_s_pipe_data_received, __pyx_k_pipe_data_received, sizeof(__pyx_k_pipe_data_received), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_popleft, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1}, {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1}, {&__pyx_kp_u_port_must_be_a_str_bytes_or_int, __pyx_k_port_must_be_a_str_bytes_or_int, sizeof(__pyx_k_port_must_be_a_str_bytes_or_int), 0, 1, 0, 0}, {&__pyx_n_s_preexec_fn, __pyx_k_preexec_fn, sizeof(__pyx_k_preexec_fn), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_proc, __pyx_k_proc, sizeof(__pyx_k_proc), 0, 0, 1, 1}, {&__pyx_n_s_process_exited, __pyx_k_process_exited, sizeof(__pyx_k_process_exited), 0, 0, 1, 1}, {&__pyx_n_s_program, __pyx_k_program, sizeof(__pyx_k_program), 0, 0, 1, 1}, {&__pyx_n_s_proto, __pyx_k_proto, sizeof(__pyx_k_proto), 0, 0, 1, 1}, {&__pyx_n_s_proto_factory, __pyx_k_proto_factory, sizeof(__pyx_k_proto_factory), 0, 0, 1, 1}, {&__pyx_n_u_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 1, 0, 1}, {&__pyx_n_s_protocol_factory, __pyx_k_protocol_factory, sizeof(__pyx_k_protocol_factory), 0, 0, 1, 1}, {&__pyx_kp_u_protocol_is_not_set_cannot_call, __pyx_k_protocol_is_not_set_cannot_call, sizeof(__pyx_k_protocol_is_not_set_cannot_call), 0, 1, 0, 0}, {&__pyx_kp_u_protocol_is_required, __pyx_k_protocol_is_required, sizeof(__pyx_k_protocol_is_required), 0, 1, 0, 0}, {&__pyx_kp_u_protocol_pause_writing_failed, __pyx_k_protocol_pause_writing_failed, sizeof(__pyx_k_protocol_pause_writing_failed), 0, 1, 0, 0}, {&__pyx_kp_u_protocol_resume_writing_failed, __pyx_k_protocol_resume_writing_failed, sizeof(__pyx_k_protocol_resume_writing_failed), 0, 1, 0, 0}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_u_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 0, 1}, {&__pyx_kp_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 0}, {&__pyx_kp_u_r_fileno_returned_non_integer, __pyx_k_r_fileno_returned_non_integer, sizeof(__pyx_k_r_fileno_returned_non_integer), 0, 1, 0, 0}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1}, {&__pyx_n_s_recv, __pyx_k_recv, sizeof(__pyx_k_recv), 0, 0, 1, 1}, {&__pyx_n_s_remote_addr, __pyx_k_remote_addr, sizeof(__pyx_k_remote_addr), 0, 0, 1, 1}, {&__pyx_kp_u_remote_addr_must_be_a_tuple_of_h, __pyx_k_remote_addr_must_be_a_tuple_of_h, sizeof(__pyx_k_remote_addr_must_be_a_tuple_of_h), 0, 1, 0, 0}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_remove_done_callback, __pyx_k_remove_done_callback, sizeof(__pyx_k_remove_done_callback), 0, 0, 1, 1}, {&__pyx_n_s_remove_signal_handler, __pyx_k_remove_signal_handler, sizeof(__pyx_k_remove_signal_handler), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_restore_signals, __pyx_k_restore_signals, sizeof(__pyx_k_restore_signals), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_n_s_resume_writing, __pyx_k_resume_writing, sizeof(__pyx_k_resume_writing), 0, 0, 1, 1}, {&__pyx_n_s_return_exceptions, __pyx_k_return_exceptions, sizeof(__pyx_k_return_exceptions), 0, 0, 1, 1}, {&__pyx_n_s_reuse_address, __pyx_k_reuse_address, sizeof(__pyx_k_reuse_address), 0, 0, 1, 1}, {&__pyx_n_s_reuse_port, __pyx_k_reuse_port, sizeof(__pyx_k_reuse_port), 0, 0, 1, 1}, {&__pyx_kp_u_reuse_port_not_supported_by_sock, __pyx_k_reuse_port_not_supported_by_sock, sizeof(__pyx_k_reuse_port_not_supported_by_sock), 0, 1, 0, 0}, {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, {&__pyx_n_s_run_forever, __pyx_k_run_forever, sizeof(__pyx_k_run_forever), 0, 0, 1, 1}, {&__pyx_n_s_run_until_complete_locals_lambda, __pyx_k_run_until_complete_locals_lambda, sizeof(__pyx_k_run_until_complete_locals_lambda), 0, 0, 1, 1}, {&__pyx_kp_u_running_closed_debug, __pyx_k_running_closed_debug, sizeof(__pyx_k_running_closed_debug), 0, 1, 0, 0}, {&__pyx_kp_u_s_fd_s_pipe_r, __pyx_k_s_fd_s_pipe_r, sizeof(__pyx_k_s_fd_s_pipe_r), 0, 1, 0, 0}, {&__pyx_kp_u_s_sockets_r, __pyx_k_s_sockets_r, sizeof(__pyx_k_s_sockets_r), 0, 1, 0, 0}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_server_hostname, __pyx_k_server_hostname, sizeof(__pyx_k_server_hostname), 0, 0, 1, 1}, {&__pyx_kp_u_server_hostname_is_only_meaningf, __pyx_k_server_hostname_is_only_meaningf, sizeof(__pyx_k_server_hostname_is_only_meaningf), 0, 1, 0, 0}, {&__pyx_kp_u_service_proto_not_found, __pyx_k_service_proto_not_found, sizeof(__pyx_k_service_proto_not_found), 0, 1, 0, 0}, {&__pyx_n_s_set_asyncgen_hooks, __pyx_k_set_asyncgen_hooks, sizeof(__pyx_k_set_asyncgen_hooks), 0, 0, 1, 1}, {&__pyx_n_s_set_coroutine_wrapper, __pyx_k_set_coroutine_wrapper, sizeof(__pyx_k_set_coroutine_wrapper), 0, 0, 1, 1}, {&__pyx_n_s_set_debug, __pyx_k_set_debug, sizeof(__pyx_k_set_debug), 0, 0, 1, 1}, {&__pyx_n_s_set_exception, __pyx_k_set_exception, sizeof(__pyx_k_set_exception), 0, 0, 1, 1}, {&__pyx_n_s_set_inheritable, __pyx_k_set_inheritable, sizeof(__pyx_k_set_inheritable), 0, 0, 1, 1}, {&__pyx_n_s_set_result, __pyx_k_set_result, sizeof(__pyx_k_set_result), 0, 0, 1, 1}, {&__pyx_n_u_set_running_loop, __pyx_k_set_running_loop, sizeof(__pyx_k_set_running_loop), 0, 1, 0, 1}, {&__pyx_n_s_set_running_or_notify_cancel, __pyx_k_set_running_or_notify_cancel, sizeof(__pyx_k_set_running_or_notify_cancel), 0, 0, 1, 1}, {&__pyx_n_s_set_state, __pyx_k_set_state, sizeof(__pyx_k_set_state), 0, 0, 1, 1}, {&__pyx_n_s_set_wakeup_fd, __pyx_k_set_wakeup_fd, sizeof(__pyx_k_set_wakeup_fd), 0, 0, 1, 1}, {&__pyx_kp_u_set_wakeup_fd_only_works_in_main, __pyx_k_set_wakeup_fd_only_works_in_main, sizeof(__pyx_k_set_wakeup_fd_only_works_in_main), 0, 1, 0, 0}, {&__pyx_n_s_setblocking, __pyx_k_setblocking, sizeof(__pyx_k_setblocking), 0, 0, 1, 1}, {&__pyx_n_s_shell, __pyx_k_shell, sizeof(__pyx_k_shell), 0, 0, 1, 1}, {&__pyx_kp_u_shell_must_be_False, __pyx_k_shell_must_be_False, sizeof(__pyx_k_shell_must_be_False), 0, 1, 0, 0}, {&__pyx_kp_u_shell_must_be_True, __pyx_k_shell_must_be_True, sizeof(__pyx_k_shell_must_be_True), 0, 1, 0, 0}, {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1}, {&__pyx_n_s_shutdown_asyncgens, __pyx_k_shutdown_asyncgens, sizeof(__pyx_k_shutdown_asyncgens), 0, 0, 1, 1}, {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1}, {&__pyx_kp_u_sig_cannot_be_caught, __pyx_k_sig_cannot_be_caught, sizeof(__pyx_k_sig_cannot_be_caught), 0, 1, 0, 0}, {&__pyx_kp_u_sig_must_be_an_int_not_r, __pyx_k_sig_must_be_an_int_not_r, sizeof(__pyx_k_sig_must_be_an_int_not_r), 0, 1, 0, 0}, {&__pyx_kp_u_sig_out_of_range_1, __pyx_k_sig_out_of_range_1, sizeof(__pyx_k_sig_out_of_range_1), 0, 1, 0, 0}, {&__pyx_n_s_sighandler_noop, __pyx_k_sighandler_noop, sizeof(__pyx_k_sighandler_noop), 0, 0, 1, 1}, {&__pyx_n_s_signal, __pyx_k_signal, sizeof(__pyx_k_signal), 0, 0, 1, 1}, {&__pyx_n_s_signum, __pyx_k_signum, sizeof(__pyx_k_signum), 0, 0, 1, 1}, {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1}, {&__pyx_n_s_sock, __pyx_k_sock, sizeof(__pyx_k_sock), 0, 0, 1, 1}, {&__pyx_n_s_sock_connect, __pyx_k_sock_connect, sizeof(__pyx_k_sock_connect), 0, 0, 1, 1}, {&__pyx_n_s_sock_sendall, __pyx_k_sock_sendall, sizeof(__pyx_k_sock_sendall), 0, 0, 1, 1}, {&__pyx_n_s_sockaddr, __pyx_k_sockaddr, sizeof(__pyx_k_sockaddr), 0, 0, 1, 1}, {&__pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3, __pyx_k_sockaddr_must_be_a_tuple_of_2_3, sizeof(__pyx_k_sockaddr_must_be_a_tuple_of_2_3), 0, 1, 0, 0}, {&__pyx_kp_u_sockaddr_resolved_to_multiple_ad, __pyx_k_sockaddr_resolved_to_multiple_ad, sizeof(__pyx_k_sockaddr_resolved_to_multiple_ad), 0, 1, 0, 0}, {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1}, {&__pyx_n_u_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 1, 0, 1}, {&__pyx_kp_u_socket_modifier_keyword_argument, __pyx_k_socket_modifier_keyword_argument, sizeof(__pyx_k_socket_modifier_keyword_argument), 0, 1, 0, 0}, {&__pyx_n_s_socketpair, __pyx_k_socketpair, sizeof(__pyx_k_socketpair), 0, 0, 1, 1}, {&__pyx_n_s_sockets, __pyx_k_sockets, sizeof(__pyx_k_sockets), 0, 0, 1, 1}, {&__pyx_n_u_sockname, __pyx_k_sockname, sizeof(__pyx_k_sockname), 0, 1, 0, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_u_source_traceback, __pyx_k_source_traceback, sizeof(__pyx_k_source_traceback), 0, 1, 0, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, {&__pyx_n_s_ssl, __pyx_k_ssl, sizeof(__pyx_k_ssl), 0, 0, 1, 1}, {&__pyx_kp_u_ssl_argument_must_be_an_SSLConte, __pyx_k_ssl_argument_must_be_an_SSLConte, sizeof(__pyx_k_ssl_argument_must_be_an_SSLConte), 0, 1, 0, 0}, {&__pyx_kp_u_ssl_is_expected_to_be_None_or_an, __pyx_k_ssl_is_expected_to_be_None_or_an, sizeof(__pyx_k_ssl_is_expected_to_be_None_or_an), 0, 1, 0, 0}, {&__pyx_n_s_sslproto, __pyx_k_sslproto, sizeof(__pyx_k_sslproto), 0, 0, 1, 1}, {&__pyx_kp_u_start_init_can_only_be_called, __pyx_k_start_init_can_only_be_called, sizeof(__pyx_k_start_init_can_only_be_called), 0, 1, 0, 0}, {&__pyx_n_s_start_new_session, __pyx_k_start_new_session, sizeof(__pyx_k_start_new_session), 0, 0, 1, 1}, {&__pyx_n_s_startupinfo, __pyx_k_startupinfo, sizeof(__pyx_k_startupinfo), 0, 0, 1, 1}, {&__pyx_kp_u_startupinfo_is_not_supported, __pyx_k_startupinfo_is_not_supported, sizeof(__pyx_k_startupinfo_is_not_supported), 0, 1, 0, 0}, {&__pyx_n_s_std_signal, __pyx_k_std_signal, sizeof(__pyx_k_std_signal), 0, 0, 1, 1}, {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1}, {&__pyx_n_s_stdin, __pyx_k_stdin, sizeof(__pyx_k_stdin), 0, 0, 1, 1}, {&__pyx_n_s_stdio_fut, __pyx_k_stdio_fut, sizeof(__pyx_k_stdio_fut), 0, 0, 1, 1}, {&__pyx_n_s_stdio_inited, __pyx_k_stdio_inited, sizeof(__pyx_k_stdio_inited), 0, 0, 1, 1}, {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1}, {&__pyx_kp_u_step_already_done_r_r, __pyx_k_step_already_done_r_r, sizeof(__pyx_k_step_already_done_r_r), 0, 1, 0, 0}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_kp_u_stream_is_open_after_UVStream__t, __pyx_k_stream_is_open_after_UVStream__t, sizeof(__pyx_k_stream_is_open_after_UVStream__t), 0, 1, 0, 0}, {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1}, {&__pyx_n_s_submit, __pyx_k_submit, sizeof(__pyx_k_submit), 0, 0, 1, 1}, {&__pyx_n_s_subprocess, __pyx_k_subprocess, sizeof(__pyx_k_subprocess), 0, 0, 1, 1}, {&__pyx_kp_u_subprocess_STDOUT_is_supported_o, __pyx_k_subprocess_STDOUT_is_supported_o, sizeof(__pyx_k_subprocess_STDOUT_is_supported_o), 0, 1, 0, 0}, {&__pyx_n_s_subprocess_run, __pyx_k_subprocess_run, sizeof(__pyx_k_subprocess_run), 0, 0, 1, 1}, {&__pyx_n_s_subtract, __pyx_k_subtract, sizeof(__pyx_k_subtract), 0, 0, 1, 1}, {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_kp_u_task_factory_must_be_a_callable, __pyx_k_task_factory_must_be_a_callable, sizeof(__pyx_k_task_factory_must_be_a_callable), 0, 1, 0, 0}, {&__pyx_n_u_tcp, __pyx_k_tcp, sizeof(__pyx_k_tcp), 0, 1, 0, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_test_coroutine_1, __pyx_k_test_coroutine_1, sizeof(__pyx_k_test_coroutine_1), 0, 0, 1, 1}, {&__pyx_kp_u_the_socket_must_be_non_blocking, __pyx_k_the_socket_must_be_non_blocking, sizeof(__pyx_k_the_socket_must_be_non_blocking), 0, 1, 0, 0}, {&__pyx_kp_u_this_event_loop_is_already_runni, __pyx_k_this_event_loop_is_already_runni, sizeof(__pyx_k_this_event_loop_is_already_runni), 0, 1, 0, 0}, {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_n_s_traceback_2, __pyx_k_traceback_2, sizeof(__pyx_k_traceback_2), 0, 0, 1, 1}, {&__pyx_n_s_transport, __pyx_k_transport, sizeof(__pyx_k_transport), 0, 0, 1, 1}, {&__pyx_n_u_transport, __pyx_k_transport, sizeof(__pyx_k_transport), 0, 1, 0, 1}, {&__pyx_kp_u_try_write_sent_all_data_and_ret, __pyx_k_try_write_sent_all_data_and_ret, sizeof(__pyx_k_try_write_sent_all_data_and_ret), 0, 1, 0, 0}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_n_u_udp, __pyx_k_udp, sizeof(__pyx_k_udp), 0, 1, 0, 1}, {&__pyx_kp_u_unable_to_listen_no_protocol_fac, __pyx_k_unable_to_listen_no_protocol_fac, sizeof(__pyx_k_unable_to_listen_no_protocol_fac), 0, 1, 0, 0}, {&__pyx_kp_u_unable_to_perform_operation_on_r, __pyx_k_unable_to_perform_operation_on_r, sizeof(__pyx_k_unable_to_perform_operation_on_r), 0, 1, 0, 0}, {&__pyx_kp_u_unable_to_perform_send_operation, __pyx_k_unable_to_perform_send_operation, sizeof(__pyx_k_unable_to_perform_send_operation), 0, 1, 0, 0}, {&__pyx_kp_u_unable_to_start_the_loop_it_was, __pyx_k_unable_to_start_the_loop_it_was, sizeof(__pyx_k_unable_to_start_the_loop_it_was), 0, 1, 0, 0}, {&__pyx_kp_u_unclosed_resource_r, __pyx_k_unclosed_resource_r, sizeof(__pyx_k_unclosed_resource_r), 0, 1, 0, 0}, {&__pyx_kp_u_unclosed_resource_r_2, __pyx_k_unclosed_resource_r_2, sizeof(__pyx_k_unclosed_resource_r_2), 0, 1, 0, 0}, {&__pyx_kp_u_unexpected_address_family, __pyx_k_unexpected_address_family, sizeof(__pyx_k_unexpected_address_family), 0, 1, 0, 0}, {&__pyx_n_s_universal_newlines, __pyx_k_universal_newlines, sizeof(__pyx_k_universal_newlines), 0, 0, 1, 1}, {&__pyx_kp_u_universal_newlines_must_be_False, __pyx_k_universal_newlines_must_be_False, sizeof(__pyx_k_universal_newlines_must_be_False), 0, 1, 0, 0}, {&__pyx_kp_u_unknown_Future_state, __pyx_k_unknown_Future_state, sizeof(__pyx_k_unknown_Future_state), 0, 1, 0, 0}, {&__pyx_kp_u_unopened_TCPServer, __pyx_k_unopened_TCPServer, sizeof(__pyx_k_unopened_TCPServer), 0, 1, 0, 0}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_kp_u_uv_close_handle_cb_handle_loop, __pyx_k_uv_close_handle_cb_handle_loop, sizeof(__pyx_k_uv_close_handle_cb_handle_loop), 0, 1, 0, 0}, {&__pyx_kp_u_uv_handle_t_current_freed_total, __pyx_k_uv_handle_t_current_freed_total, sizeof(__pyx_k_uv_handle_t_current_freed_total), 0, 1, 0, 0}, {&__pyx_kp_u_uv_udp_receive_callback_addr_is, __pyx_k_uv_udp_receive_callback_addr_is, sizeof(__pyx_k_uv_udp_receive_callback_addr_is), 0, 1, 0, 0}, {&__pyx_kp_u_uvloop_Future_supports_only_uvlo, __pyx_k_uvloop_Future_supports_only_uvlo, sizeof(__pyx_k_uvloop_Future_supports_only_uvlo), 0, 1, 0, 0}, {&__pyx_n_s_uvloop_loop, __pyx_k_uvloop_loop, sizeof(__pyx_k_uvloop_loop), 0, 0, 1, 1}, {&__pyx_n_s_uvloop_sleep_after_fork, __pyx_k_uvloop_sleep_after_fork, sizeof(__pyx_k_uvloop_sleep_after_fork), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1}, {&__pyx_n_s_wait_closed, __pyx_k_wait_closed, sizeof(__pyx_k_wait_closed), 0, 0, 1, 1}, {&__pyx_n_s_waiter, __pyx_k_waiter, sizeof(__pyx_k_waiter), 0, 0, 1, 1}, {&__pyx_kp_u_waiter_is_not_None_in__call_conn, __pyx_k_waiter_is_not_None_in__call_conn, sizeof(__pyx_k_waiter_is_not_None_in__call_conn), 0, 1, 0, 0}, {&__pyx_n_s_wakeup, __pyx_k_wakeup, sizeof(__pyx_k_wakeup), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_n_u_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 1, 0, 1}, {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1}, {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1}, {&__pyx_kp_u_without_no_gc_clear_loop_was_se, __pyx_k_without_no_gc_clear_loop_was_se, sizeof(__pyx_k_without_no_gc_clear_loop_was_se), 0, 1, 0, 0}, {&__pyx_n_s_wrap_future, __pyx_k_wrap_future, sizeof(__pyx_k_wrap_future), 0, 0, 1, 1}, {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, {&__pyx_kp_u_yield_from_wasn_t_used_with_futu, __pyx_k_yield_from_wasn_t_used_with_futu, sizeof(__pyx_k_yield_from_wasn_t_used_with_futu), 0, 1, 0, 0}, {&__pyx_kp_u_yield_was_used_instead_of_yield, __pyx_k_yield_was_used_instead_of_yield, sizeof(__pyx_k_yield_was_used_instead_of_yield), 0, 1, 0, 0}, {&__pyx_kp_u_yield_was_used_instead_of_yield_2, __pyx_k_yield_was_used_instead_of_yield_2, sizeof(__pyx_k_yield_was_used_instead_of_yield_2), 0, 1, 0, 0}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 13, __pyx_L1_error) __pyx_builtin_PermissionError = __Pyx_GetBuiltinName(__pyx_n_s_PermissionError); if (!__pyx_builtin_PermissionError) __PYX_ERR(0, 16, __pyx_L1_error) __pyx_builtin_BlockingIOError = __Pyx_GetBuiltinName(__pyx_n_s_BlockingIOError); if (!__pyx_builtin_BlockingIOError) __PYX_ERR(0, 19, __pyx_L1_error) __pyx_builtin_BrokenPipeError = __Pyx_GetBuiltinName(__pyx_n_s_BrokenPipeError); if (!__pyx_builtin_BrokenPipeError) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_builtin_ConnectionAbortedError = __Pyx_GetBuiltinName(__pyx_n_s_ConnectionAbortedError); if (!__pyx_builtin_ConnectionAbortedError) __PYX_ERR(0, 25, __pyx_L1_error) __pyx_builtin_ConnectionRefusedError = __Pyx_GetBuiltinName(__pyx_n_s_ConnectionRefusedError); if (!__pyx_builtin_ConnectionRefusedError) __PYX_ERR(0, 28, __pyx_L1_error) __pyx_builtin_ConnectionResetError = __Pyx_GetBuiltinName(__pyx_n_s_ConnectionResetError); if (!__pyx_builtin_ConnectionResetError) __PYX_ERR(0, 31, __pyx_L1_error) __pyx_builtin_FileExistsError = __Pyx_GetBuiltinName(__pyx_n_s_FileExistsError); if (!__pyx_builtin_FileExistsError) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_builtin_FileNotFoundError = __Pyx_GetBuiltinName(__pyx_n_s_FileNotFoundError); if (!__pyx_builtin_FileNotFoundError) __PYX_ERR(0, 37, __pyx_L1_error) __pyx_builtin_InterruptedError = __Pyx_GetBuiltinName(__pyx_n_s_InterruptedError); if (!__pyx_builtin_InterruptedError) __PYX_ERR(0, 40, __pyx_L1_error) __pyx_builtin_IsADirectoryError = __Pyx_GetBuiltinName(__pyx_n_s_IsADirectoryError); if (!__pyx_builtin_IsADirectoryError) __PYX_ERR(0, 43, __pyx_L1_error) __pyx_builtin_ProcessLookupError = __Pyx_GetBuiltinName(__pyx_n_s_ProcessLookupError); if (!__pyx_builtin_ProcessLookupError) __PYX_ERR(0, 46, __pyx_L1_error) __pyx_builtin_TimeoutError = __Pyx_GetBuiltinName(__pyx_n_s_TimeoutError); if (!__pyx_builtin_TimeoutError) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 76, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 151, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 209, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(1, 260, __pyx_L1_error) __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(1, 296, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 524, __pyx_L1_error) __pyx_builtin_memoryview = __Pyx_GetBuiltinName(__pyx_n_s_memoryview); if (!__pyx_builtin_memoryview) __PYX_ERR(1, 729, __pyx_L1_error) __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(1, 838, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(1, 901, __pyx_L1_error) __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(1, 909, __pyx_L1_error) __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(1, 1234, __pyx_L1_error) __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) __PYX_ERR(1, 1471, __pyx_L1_error) __pyx_builtin_ResourceWarning = __Pyx_GetBuiltinName(__pyx_n_s_ResourceWarning); if (!__pyx_builtin_ResourceWarning) __PYX_ERR(1, 2507, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 2529, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(2, 209, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(3, 215, __pyx_L1_error) __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(4, 152, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(5, 163, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(5, 204, __pyx_L1_error) __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(6, 218, __pyx_L1_error) __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(6, 233, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "uvloop/loop.pyx":147 * def __init__(self): * self.set_debug((not sys_ignore_environment * and bool(os_environ.get('PYTHONASYNCIODEBUG')))) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_PYTHONASYNCIODEBUG); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "uvloop/loop.pyx":151 * def __dealloc__(self): * if self._running == 1: * raise RuntimeError('deallocating a running event loop!') # <<<<<<<<<<<<<< * if self._closed == 0: * aio_logger.error("deallocating an open event loop") */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_deallocating_a_running_event_loo); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "uvloop/loop.pyx":153 * raise RuntimeError('deallocating a running event loop!') * if self._closed == 0: * aio_logger.error("deallocating an open event loop") # <<<<<<<<<<<<<< * return * PyMem_RawFree(self.uvloop) */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_deallocating_an_open_event_loop); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "uvloop/loop.pyx":205 * cdef _setup_signals(self): * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) # <<<<<<<<<<<<<< * self._csock.setblocking(False) * try: */ __pyx_tuple__4 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "uvloop/loop.pyx":206 * self._ssock, self._csock = socket_socketpair() * self._ssock.setblocking(False) * self._csock.setblocking(False) # <<<<<<<<<<<<<< * try: * signal_set_wakeup_fd(self._csock.fileno()) */ __pyx_tuple__5 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "uvloop/loop.pyx":231 * for sig in list(self._signal_handlers): * self.remove_signal_handler(sig) * signal_set_wakeup_fd(-1) # <<<<<<<<<<<<<< * self._remove_reader(self._ssock.fileno()) * self._ssock.close() */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "uvloop/loop.pyx":239 * while True: * try: * data = self._ssock.recv(4096) # <<<<<<<<<<<<<< * if not data: * break */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_int_4096); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "uvloop/loop.pyx":352 * * if self._closed == 1: * raise RuntimeError('unable to start the loop; it was closed') # <<<<<<<<<<<<<< * * if self._running == 1: */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_unable_to_start_the_loop_it_was); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "uvloop/loop.pyx":355 * * if self._running == 1: * raise RuntimeError('this event loop is already running.') # <<<<<<<<<<<<<< * * if (aio_get_running_loop is not None and */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_this_event_loop_is_already_runni); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "uvloop/loop.pyx":359 * if (aio_get_running_loop is not None and * aio_get_running_loop() is not None): * raise RuntimeError( # <<<<<<<<<<<<<< * 'Cannot run the event loop while another loop is running') * */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Cannot_run_the_event_loop_while); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "uvloop/loop.pyx":381 * finally: * if aio_set_running_loop is not None: * aio_set_running_loop(None) # <<<<<<<<<<<<<< * * self.handler_check__exec_writes.stop() */ __pyx_tuple__11 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); __pyx_tuple__12 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "uvloop/loop.pyx":399 * * if self._running == 1: * raise RuntimeError("Cannot close a running event loop") # <<<<<<<<<<<<<< * * if self._closed == 1: */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Cannot_close_a_running_event_loo); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "uvloop/loop.pyx":488 * if UVLOOP_DEBUG: * if len(self._queued_streams) != queued_len: * raise RuntimeError( # <<<<<<<<<<<<<< * 'loop._queued_streams are not empty after ' * '_exec_queued_writes') */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_loop__queued_streams_are_not_emp); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "uvloop/loop.pyx":532 * cdef inline _check_closed(self): * if self._closed == 1: * raise RuntimeError('Event loop is closed') # <<<<<<<<<<<<<< * * cdef inline _check_thread(self): */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Event_loop_is_closed); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "uvloop/loop.pyx":539 * cdef long thread_id = PyThread_get_thread_ident() * if thread_id != self._thread_id: * raise RuntimeError( # <<<<<<<<<<<<<< * "Non-thread-safe operation invoked on an event loop other " * "than the current one") */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Non_thread_safe_operation_invoke); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "uvloop/loop.pyx":635 * port = str(port).encode() * if port is not None and not isinstance(port, bytes): * raise TypeError('port must be a str, bytes or int') # <<<<<<<<<<<<<< * * if isinstance(host, str): */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_port_must_be_a_str_bytes_or_int); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "uvloop/loop.pyx":638 * * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * if host is not None: * if not isinstance(host, bytes): */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_u_idna); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "uvloop/loop.pyx":641 * if host is not None: * if not isinstance(host, bytes): * raise TypeError('host must be a str or bytes') # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_host_must_be_a_str_or_bytes); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "uvloop/loop.pyx":645 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if AddrInfo.isinstance(result): * try: */ __pyx_tuple__20 = PyTuple_Pack(3, __pyx_n_s_result, __pyx_n_s_data, __pyx_n_s_ex); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv, __pyx_n_s_callback, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(1, 645, __pyx_L1_error) /* "uvloop/loop.pyx":669 * fut = self._new_future() * * def callback(result): # <<<<<<<<<<<<<< * if isinstance(result, tuple): * fut.set_result(result) */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv, __pyx_n_s_callback, 669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 669, __pyx_L1_error) /* "uvloop/loop.pyx":725 * * if n == len(data): * fut.set_result(None) # <<<<<<<<<<<<<< * self._remove_writer(fd) * else: */ __pyx_tuple__24 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "uvloop/loop.pyx":754 * try: * conn, address = sock.accept() * conn.setblocking(False) # <<<<<<<<<<<<<< * except (BlockingIOError, InterruptedError): * # There is an active reader for _sock_accept, so */ __pyx_tuple__25 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "uvloop/loop.pyx":791 * fut.set_exception(exc) * else: * fut.set_result(None) # <<<<<<<<<<<<<< * * cdef _sock_connect_cb(self, fut, sock, address): */ __pyx_tuple__26 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "uvloop/loop.pyx":808 * fut.set_exception(exc) * else: * fut.set_result(None) # <<<<<<<<<<<<<< * * cdef _sock_set_reuseport(self, int fd): */ __pyx_tuple__27 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "uvloop/loop.pyx":849 * current_wrapper, RuntimeWarning) * else: * sys_set_coroutine_wrapper(None) # <<<<<<<<<<<<<< * self._coroutine_wrapper_set = False * */ __pyx_tuple__28 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); /* "uvloop/loop.pyx":909 * ################### OS * * print('---- Process info: -----') # <<<<<<<<<<<<<< * print('Process memory: {}'.format(rusage.ru_maxrss)) * print('Number of signals: {}'.format(rusage.ru_nsignals)) */ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Process_info); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); /* "uvloop/loop.pyx":912 * print('Process memory: {}'.format(rusage.ru_maxrss)) * print('Number of signals: {}'.format(rusage.ru_nsignals)) * print('') # <<<<<<<<<<<<<< * * ################### Loop */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u__30); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "uvloop/loop.pyx":916 * ################### Loop * * print('--- Loop debug info: ---') # <<<<<<<<<<<<<< * print('Loop time: {}'.format(self.time())) * print('Errors logged: {}'.format( */ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Loop_debug_info); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); /* "uvloop/loop.pyx":929 * print() * * print(' alive | closed |') # <<<<<<<<<<<<<< * print('UVHandles python | libuv | total') * print(' objs | handles |') */ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_alive_closed); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); /* "uvloop/loop.pyx":930 * * print(' alive | closed |') * print('UVHandles python | libuv | total') # <<<<<<<<<<<<<< * print(' objs | handles |') * print('-------------------------------+---------+---------') */ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_UVHandles_python_libuv_total); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "uvloop/loop.pyx":931 * print(' alive | closed |') * print('UVHandles python | libuv | total') * print(' objs | handles |') # <<<<<<<<<<<<<< * print('-------------------------------+---------+---------') * for name in sorted(self._debug_handles_total): */ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_objs_handles); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "uvloop/loop.pyx":932 * print('UVHandles python | libuv | total') * print(' objs | handles |') * print('-------------------------------+---------+---------') # <<<<<<<<<<<<<< * for name in sorted(self._debug_handles_total): * print(' {: <18} {: >7} | {: >7} | {: >7}'.format( */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u__36); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "uvloop/loop.pyx":947 * print() * * print('--- Streams debug info: ---') # <<<<<<<<<<<<<< * print('Write errors: {}'.format( * self._debug_stream_write_errors_total)) */ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Streams_debug_info); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); /* "uvloop/loop.pyx":975 * print() * * print('--- Polls debug info: ---') # <<<<<<<<<<<<<< * print('Read events: {}'.format( * self._poll_read_events_total)) */ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Polls_debug_info); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); /* "uvloop/loop.pyx":986 * print() * * print('--- Sock ops successfull on 1st try: ---') # <<<<<<<<<<<<<< * print('Socket try-writes: {}'.format( * self._sock_try_write_total)) */ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Sock_ops_successfull_on_1st_try); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); /* "uvloop/loop.pyx":1160 * """ * if factory is not None and not callable(factory): * raise TypeError('task factory must be a callable or None') # <<<<<<<<<<<<<< * self._task_factory = factory * */ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_task_factory_must_be_a_callable); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); /* "uvloop/loop.pyx":1201 * future.remove_done_callback(done_cb) * if not future.done(): * raise RuntimeError('Event loop stopped before Future completed.') # <<<<<<<<<<<<<< * * return future.result() */ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Event_loop_stopped_before_Future); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); /* "uvloop/loop.pyx":1224 * * if not isinstance(sockaddr, tuple): * raise TypeError('getnameinfo() argument 1 must be a tuple') # <<<<<<<<<<<<<< * * sl = len(sockaddr) */ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_getnameinfo_argument_1_must_be_a); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); /* "uvloop/loop.pyx":1229 * * if sl < 2 or sl > 4: * raise ValueError('sockaddr must be a tuple of 2, 3 or 4 values') # <<<<<<<<<<<<<< * * if sl > 2: */ __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_sockaddr_must_be_a_tuple_of_2_3); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 1229, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); /* "uvloop/loop.pyx":1234 * flowinfo = sockaddr[2] * if flowinfo < 0 or flowinfo > 0xfffff: * raise OverflowError( # <<<<<<<<<<<<<< * 'getsockaddrarg: flowinfo must be 0-1048575.') * else: */ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_getsockaddrarg_flowinfo_must_be); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 1234, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); /* "uvloop/loop.pyx":1242 * scope_id = sockaddr[3] * if scope_id < 0 or scope_id > 2 ** 32: * raise OverflowError( # <<<<<<<<<<<<<< * 'getsockaddrarg: scope_id must be unsigned 32 bit integer') * else: */ __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_getsockaddrarg_scope_id_must_be); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); /* "uvloop/loop.pyx":1258 * * if ai.ai_next: * raise OSError("sockaddr resolved to multiple addresses") # <<<<<<<<<<<<<< * * if ai.ai_family == uv.AF_INET: */ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_sockaddr_resolved_to_multiple_ad); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); /* "uvloop/loop.pyx":1262 * if ai.ai_family == uv.AF_INET: * if sl > 2: * raise OSError("IPv4 sockaddr must be 2 tuple") # <<<<<<<<<<<<<< * elif ai.ai_family == uv.AF_INET6: * # Modify some fields in `ai` */ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_IPv4_sockaddr_must_be_2_tuple); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); /* "uvloop/loop.pyx":1322 * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * return await self.create_unix_server( */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_host_port_and_sock_can_not_be_sp); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); /* "uvloop/loop.pyx":1330 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * * if host is not None or port is not None: */ __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_ssl_argument_must_be_an_SSLConte); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); /* "uvloop/loop.pyx":1334 * if host is not None or port is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * */ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_host_port_and_sock_can_not_be_sp); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); /* "uvloop/loop.pyx":1339 * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( # <<<<<<<<<<<<<< * 'reuse_port not supported by socket module') * */ __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_reuse_port_not_supported_by_sock); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); /* "uvloop/loop.pyx":1361 * while addrinfo != NULL: * if addrinfo.ai_family == uv.AF_UNSPEC: * raise RuntimeError('AF_UNSPEC in DNS results') # <<<<<<<<<<<<<< * * tcp = self._create_server( */ __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_AF_UNSPEC_in_DNS_results); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); /* "uvloop/loop.pyx":1377 * else: * if sock is None: * raise ValueError('Neither host/port nor sock were specified') # <<<<<<<<<<<<<< * if not _is_sock_stream(sock.type): * raise ValueError( */ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_Neither_host_port_nor_sock_were); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); /* "uvloop/loop.pyx":1435 * if sock is not None and sock.family == uv.AF_UNIX: * if host is not None or port is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * return await self.create_unix_connection( */ __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_host_port_and_sock_can_not_be_sp); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); /* "uvloop/loop.pyx":1446 * if server_hostname is None: * if not host: * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<< * 'when using ssl without a host') * server_hostname = host */ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_You_must_set_server_hostname_whe); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); /* "uvloop/loop.pyx":1457 * else: * if server_hostname is not None: * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<< * * if host is not None or port is not None: */ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_server_hostname_is_only_meaningf); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); /* "uvloop/loop.pyx":1461 * if host is not None or port is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'host/port and sock can not be specified at the same time') * */ __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_host_port_and_sock_can_not_be_sp); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 1461, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); /* "uvloop/loop.pyx":1486 * if not isinstance(local_addr, (tuple, list)) or \ * len(local_addr) != 2: * raise ValueError( # <<<<<<<<<<<<<< * 'local_addr must be a tuple of host and port') * */ __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_local_addr_must_be_a_tuple_of_ho); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); /* "uvloop/loop.pyx":1512 * ai_remote = f1.result() * if ai_remote.data is NULL: * raise OSError('getaddrinfo() returned empty list') # <<<<<<<<<<<<<< * rai = ai_remote.data * */ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_getaddrinfo_returned_empty_list); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); /* "uvloop/loop.pyx":1518 * ai_local = f2.result() * if ai_local.data is NULL: * raise OSError( # <<<<<<<<<<<<<< * 'getaddrinfo() returned empty list for local_addr') * lai = ai_local.data */ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_getaddrinfo_returned_empty_list_2); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); /* "uvloop/loop.pyx":1575 * else: * if sock is None: * raise ValueError( # <<<<<<<<<<<<<< * 'host and port was not specified and no sock specified') * if not _is_sock_stream(sock.type): */ __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_host_and_port_was_not_specified); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); /* "uvloop/loop.pyx":1651 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * * if path is not None: */ __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_ssl_argument_must_be_an_SSLConte); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 1651, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); /* "uvloop/loop.pyx":1655 * if path is not None: * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'path and sock can not be specified at the same time') * */ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_path_and_sock_can_not_be_specifi); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); /* "uvloop/loop.pyx":1681 * else: * if sock is None: * raise ValueError( # <<<<<<<<<<<<<< * 'path was not specified, and no sock specified') * */ __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_path_was_not_specified_and_no_so); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); /* "uvloop/loop.pyx":1726 * if ssl: * if server_hostname is None: * raise ValueError('You must set server_hostname ' # <<<<<<<<<<<<<< * 'when using ssl without a host') * */ __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_You_must_set_server_hostname_whe); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 1726, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); /* "uvloop/loop.pyx":1736 * else: * if server_hostname is not None: * raise ValueError('server_hostname is only meaningful with ssl') # <<<<<<<<<<<<<< * * if path is not None: */ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_server_hostname_is_only_meaningf); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 1736, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); /* "uvloop/loop.pyx":1743 * * if sock is not None: * raise ValueError( # <<<<<<<<<<<<<< * 'path and sock can not be specified at the same time') * */ __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_path_and_sock_can_not_be_specifi); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 1743, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); /* "uvloop/loop.pyx":1757 * else: * if sock is None: * raise ValueError('no path and sock were specified') # <<<<<<<<<<<<<< * * if sock.family != uv.AF_UNIX or not _is_sock_stream(sock.type): */ __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_no_path_and_sock_were_specified); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 1757, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); /* "uvloop/loop.pyx":1795 * `call_exception_handler()`. * """ * message = context.get('message') # <<<<<<<<<<<<<< * if not message: * message = 'Unhandled exception in event loop' */ __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_u_message); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(1, 1795, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); /* "uvloop/loop.pyx":1799 * message = 'Unhandled exception in event loop' * * exception = context.get('exception') # <<<<<<<<<<<<<< * if exception is not None: * exc_info = (type(exception), exception, exception.__traceback__) */ __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_u_exception); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); /* "uvloop/loop.pyx":1875 * # in the default implementation, as well as for subclassed * # event loops with overloaded "default_exception_handler". * aio_logger.error('Exception in default exception handler', # <<<<<<<<<<<<<< * exc_info=True) * else: */ __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_Exception_in_default_exception_h); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 1875, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); /* "uvloop/loop.pyx":1892 * # Guard 'default_exception_handler' in case it is * # overloaded. * aio_logger.error('Exception in default exception handler ' # <<<<<<<<<<<<<< * 'while handling an unexpected error ' * 'in custom exception handler', */ __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_Exception_in_default_exception_h_2); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 1892, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); /* "uvloop/loop.pyx":1935 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_the_socket_must_be_non_blocking); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(1, 1935, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); /* "uvloop/loop.pyx":1966 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * if not data: */ __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_the_socket_must_be_non_blocking); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(1, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); /* "uvloop/loop.pyx":2014 * * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_the_socket_must_be_non_blocking); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(1, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); /* "uvloop/loop.pyx":2034 * """ * if self._debug and sock.gettimeout() != 0: * raise ValueError("the socket must be non-blocking") # <<<<<<<<<<<<<< * * fut = self._new_future() */ __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_the_socket_must_be_non_blocking); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 2034, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); /* "uvloop/loop.pyx":2061 * * if ssl is not None and not isinstance(ssl, ssl_SSLContext): * raise TypeError('ssl argument must be an SSLContext or None') # <<<<<<<<<<<<<< * if not _is_sock_stream(sock.type): * raise ValueError( */ __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_ssl_argument_must_be_an_SSLConte); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 2061, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); /* "uvloop/loop.pyx":2091 * * if transport is None: * raise ValueError( # <<<<<<<<<<<<<< * 'invalid socket family, expected AF_UNIX, AF_INET or AF_INET6') * */ __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_invalid_socket_family_expected_A); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); /* "uvloop/loop.pyx":2102 * def run_in_executor(self, executor, func, *args): * if aio_iscoroutine(func) or aio_iscoroutinefunction(func): * raise TypeError("coroutines cannot be used with run_in_executor()") # <<<<<<<<<<<<<< * * self._check_closed() */ __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_coroutines_cannot_be_used_with_r); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(1, 2102, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); /* "uvloop/loop.pyx":2148 * * if universal_newlines: * raise ValueError("universal_newlines must be False") # <<<<<<<<<<<<<< * if bufsize != 0: * raise ValueError("bufsize must be 0") */ __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_universal_newlines_must_be_False); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); /* "uvloop/loop.pyx":2150 * raise ValueError("universal_newlines must be False") * if bufsize != 0: * raise ValueError("bufsize must be 0") # <<<<<<<<<<<<<< * if startupinfo is not None: * raise ValueError('startupinfo is not supported') */ __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_bufsize_must_be_0); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 2150, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); /* "uvloop/loop.pyx":2152 * raise ValueError("bufsize must be 0") * if startupinfo is not None: * raise ValueError('startupinfo is not supported') # <<<<<<<<<<<<<< * if creationflags != 0: * raise ValueError('creationflags is not supported') */ __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_startupinfo_is_not_supported); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__91); __Pyx_GIVEREF(__pyx_tuple__91); /* "uvloop/loop.pyx":2154 * raise ValueError('startupinfo is not supported') * if creationflags != 0: * raise ValueError('creationflags is not supported') # <<<<<<<<<<<<<< * * if executable is not None: */ __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_creationflags_is_not_supported); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); /* "uvloop/loop.pyx":2185 * * if not shell: * raise ValueError("shell must be True") # <<<<<<<<<<<<<< * * args = [cmd] */ __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_shell_must_be_True); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 2185, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); /* "uvloop/loop.pyx":2198 * * if shell: * raise ValueError("shell must be False") # <<<<<<<<<<<<<< * * args = list((program,) + args) */ __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_shell_must_be_False); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); /* "uvloop/loop.pyx":2269 * self._setup_signals() * if self._signal_handlers is None: * raise ValueError('set_wakeup_fd only works in main thread') # <<<<<<<<<<<<<< * * if (aio_iscoroutine(callback) */ __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_set_wakeup_fd_only_works_in_main); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); /* "uvloop/loop.pyx":2273 * if (aio_iscoroutine(callback) * or aio_iscoroutinefunction(callback)): * raise TypeError("coroutines cannot be used " # <<<<<<<<<<<<<< * "with add_signal_handler()") * */ __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_coroutines_cannot_be_used_with_a); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); /* "uvloop/loop.pyx":2385 * 'socket modifier keyword arguments can not be used ' * 'when sock is specified. ({})'.format(problems)) * sock.setblocking(False) # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, uv.AF_UNSPEC) */ __pyx_tuple__98 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 2385, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); /* "uvloop/loop.pyx":2394 * reuse_port = bool(reuse_port) * if reuse_port and not has_SO_REUSEPORT: * raise ValueError( # <<<<<<<<<<<<<< * 'reuse_port not supported by socket module') * */ __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u_reuse_port_not_supported_by_sock); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 2394, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); /* "uvloop/loop.pyx":2401 * if (not isinstance(local_addr, (tuple, list)) or * len(local_addr) != 2): * raise TypeError( # <<<<<<<<<<<<<< * 'local_addr must be a tuple of (host, port)') * lads = await self._getaddrinfo( */ __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_u_local_addr_must_be_a_tuple_of_ho_2); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 2401, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); /* "uvloop/loop.pyx":2412 * if (not isinstance(remote_addr, (tuple, list)) or * len(remote_addr) != 2): * raise TypeError( # <<<<<<<<<<<<<< * 'remote_addr must be a tuple of (host, port)') * rads = await self._getaddrinfo( */ __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_u_remote_addr_must_be_a_tuple_of_h); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 2412, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); /* "uvloop/loop.pyx":2428 * else: * if family not in (uv.AF_INET, uv.AF_INET6): * raise ValueError('unexpected address family') # <<<<<<<<<<<<<< * udp = UDPTransport.__new__(UDPTransport) * udp._init(self, family) */ __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_u_unexpected_address_family); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(1, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); /* "uvloop/loop.pyx":2437 * socket = udp._get_socket() * if family == uv.AF_INET6: * socket.bind(('::', 0)) # <<<<<<<<<<<<<< * else: * socket.bind(('0.0.0.0', 0)) */ __pyx_tuple__104 = PyTuple_Pack(2, __pyx_kp_u__103, __pyx_int_0); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 2437, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); __pyx_tuple__105 = PyTuple_Pack(1, __pyx_tuple__104); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(1, 2437, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__105); __Pyx_GIVEREF(__pyx_tuple__105); /* "uvloop/loop.pyx":2439 * socket.bind(('::', 0)) * else: * socket.bind(('0.0.0.0', 0)) # <<<<<<<<<<<<<< * else: * lai = (lads).data */ __pyx_tuple__106 = PyTuple_Pack(2, __pyx_kp_u_0_0_0_0, __pyx_int_0); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); __pyx_tuple__107 = PyTuple_Pack(1, __pyx_tuple__106); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); /* "uvloop/loop.pyx":2547 * if loop._recv_buffer_in_use == 1: * buf.len = 0 * exc = RuntimeError('concurrent allocations') # <<<<<<<<<<<<<< * loop._handle_exception(exc) * return */ __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_u_concurrent_allocations); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(1, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__108); __Pyx_GIVEREF(__pyx_tuple__108); /* "uvloop/cbhandles.pyx":15 * loop._debug_cb_handles_count += 1 * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_tuple__109 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(8, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); /* "uvloop/cbhandles.pyx":21 * self.loop._debug_cb_handles_count -= 1 * if self.loop is None: * raise RuntimeError('Handle.loop is None in Handle.__dealloc__') # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_u_Handle_loop_is_None_in_Handle); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(8, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__110); __Pyx_GIVEREF(__pyx_tuple__110); /* "uvloop/cbhandles.pyx":136 * * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * * self.timer = UVTimer.new( */ __pyx_tuple__114 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); /* "uvloop/cbhandles.pyx":154 * self.loop._debug_cb_timer_handles_count -= 1 * if self.closed == 0: * raise RuntimeError('active TimerHandle is deallacating') # <<<<<<<<<<<<<< * * cdef _cancel(self): */ __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u_active_TimerHandle_is_deallacati); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(8, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__115); __Pyx_GIVEREF(__pyx_tuple__115); /* "uvloop/handles/handle.pyx":109 * self._handle.data = self * if self._loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * self._loop._debug_uv_handles_total += 1 */ __pyx_tuple__116 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(2, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__116); __Pyx_GIVEREF(__pyx_tuple__116); /* "uvloop/handles/handle.pyx":285 * if UVLOOP_DEBUG: * if handle.loop is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * 'handle.loop is NULL in __ensure_handle_data') * */ __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_u_handle_loop_is_NULL_in___ensure); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(2, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__117); __Pyx_GIVEREF(__pyx_tuple__117); /* "uvloop/handles/handle.pyx":289 * * if handle.loop.data is NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * 'handle.loop.data is NULL in __ensure_handle_data') * */ __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_u_handle_loop_data_is_NULL_in___en); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(2, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); /* "uvloop/handles/handle.pyx":321 * if UVLOOP_DEBUG: * if handle.loop == NULL or handle.loop.data == NULL: * raise RuntimeError( # <<<<<<<<<<<<<< * '__uv_close_handle_cb: handle.loop is invalid') * (handle.loop.data)._debug_uv_handles_freed += 1 */ __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_u_uv_close_handle_cb_handle_loop); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(2, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__119); __Pyx_GIVEREF(__pyx_tuple__119); /* "uvloop/handles/basetransport.pyx":120 * if self._waiter is not None: * if not self._waiter.cancelled(): * self._waiter.set_result(True) # <<<<<<<<<<<<<< * self._waiter = None * */ __pyx_tuple__121 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__121); __Pyx_GIVEREF(__pyx_tuple__121); /* "uvloop/handles/basetransport.pyx":126 * cdef Py_ssize_t _loop_ready_len * if self._protocol is None: * raise RuntimeError( # <<<<<<<<<<<<<< * 'protocol is not set, cannot call connection_made()') * */ __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_u_protocol_is_not_set_cannot_call); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(3, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__122); __Pyx_GIVEREF(__pyx_tuple__122); /* "uvloop/handles/basetransport.pyx":221 * self._loop._track_transport(self) * if self._protocol is None: * raise RuntimeError('invalid _init_protocol call') # <<<<<<<<<<<<<< * self._schedule_call_connection_made() * */ __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_invalid__init_protocol_call); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(3, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__123); __Pyx_GIVEREF(__pyx_tuple__123); /* "uvloop/handles/basetransport.pyx":262 * * def abort(self): * self._force_close(None) # <<<<<<<<<<<<<< * * def close(self): */ __pyx_tuple__124 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(3, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__124); __Pyx_GIVEREF(__pyx_tuple__124); /* "uvloop/handles/stream.pyx":36 * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: * raise RuntimeError( # <<<<<<<<<<<<<< * '_StreamWriteContext.close: uv_bufs != NULL and ' * 'py_bufs_sml_inuse is True') */ __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_StreamWriteContext_close_uv_buf); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(15, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__125); __Pyx_GIVEREF(__pyx_tuple__125); /* "uvloop/handles/stream.pyx":47 * if UVLOOP_DEBUG: * if self.py_bufs_sml_inuse: * raise RuntimeError( # <<<<<<<<<<<<<< * '_StreamWriteContext.close: py_bufs != NULL and ' * 'py_bufs_sml_inuse is True') */ __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_u_StreamWriteContext_close_py_buf); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(15, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__126); __Pyx_GIVEREF(__pyx_tuple__126); /* "uvloop/handles/stream.pyx":92 * if UVLOOP_DEBUG: * if sent < 0: * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') # <<<<<<<<<<<<<< * * raise RuntimeError('fatal: Could not advance _StreamWriteContext') */ __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_fatal_sent_0_in_advance_uv_buf); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(15, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__127); __Pyx_GIVEREF(__pyx_tuple__127); /* "uvloop/handles/stream.pyx":94 * raise RuntimeError('fatal: sent < 0 in advance_uv_buf') * * raise RuntimeError('fatal: Could not advance _StreamWriteContext') # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_fatal_Could_not_advance__StreamW); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(15, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); /* "uvloop/handles/stream.pyx":198 * # Because we do an INCREF in _StreamWriteContext.new, * # __dealloc__ shouldn't ever happen with `self.closed == 1` * raise RuntimeError( # <<<<<<<<<<<<<< * 'open _StreamWriteContext is being deallocated') * */ __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_u_open__StreamWriteContext_is_bein); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(15, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); /* "uvloop/handles/stream.pyx":315 * * if (self._handle).write_queue_size != 0: * raise RuntimeError( # <<<<<<<<<<<<<< * 'UVStream._try_write called with data in uv buffers') * */ __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_u_UVStream__try_write_called_with); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(15, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__130); __Pyx_GIVEREF(__pyx_tuple__130); /* "uvloop/handles/stream.pyx":374 * * if not PyBytes_CheckExact(data): * data = memoryview(data).cast('b') # <<<<<<<<<<<<<< * * dlen = len(data) */ __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_u_b); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(15, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); /* "uvloop/handles/stream.pyx":396 * if UVLOOP_DEBUG: * if self._buffer_size != 0 or self._buffer != []: * raise RuntimeError( # <<<<<<<<<<<<<< * '_buffer_size is not 0 after a successful _exec_write') * */ __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_buffer_size_is_not_0_after_a_su); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(15, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__132); __Pyx_GIVEREF(__pyx_tuple__132); /* "uvloop/handles/stream.pyx":442 * if not self._closing: * # This should never happen. * raise RuntimeError( # <<<<<<<<<<<<<< * 'stream is open after UVStream._try_write ' * 'returned None') */ __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_stream_is_open_after_UVStream__t); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(15, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__133); __Pyx_GIVEREF(__pyx_tuple__133); /* "uvloop/handles/stream.pyx":458 * if UVLOOP_DEBUG: * if sent == len(data): * raise RuntimeError( # <<<<<<<<<<<<<< * '_try_write sent all data and returned ' * 'non-zero') */ __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_try_write_sent_all_data_and_ret); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(15, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__134); __Pyx_GIVEREF(__pyx_tuple__134); /* "uvloop/handles/stream.pyx":594 * * if protocol is None: * raise TypeError('protocol is required') # <<<<<<<<<<<<<< * * self._set_protocol(protocol) */ __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_protocol_is_required); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(15, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__135); __Pyx_GIVEREF(__pyx_tuple__135); /* "uvloop/handles/stream.pyx":635 * * if self._eof: * raise RuntimeError('Cannot call write() after write_eof()') # <<<<<<<<<<<<<< * if not buf: * return */ __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_Cannot_call_write_after_write_eo); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(15, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__136); __Pyx_GIVEREF(__pyx_tuple__136); /* "uvloop/handles/stream.pyx":647 * * if self._eof: * raise RuntimeError('Cannot call writelines() after write_eof()') # <<<<<<<<<<<<<< * if self._conn_lost: * self._conn_lost += 1 */ __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_Cannot_call_writelines_after_wri); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(15, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__137); __Pyx_GIVEREF(__pyx_tuple__137); /* "uvloop/handles/stream.pyx":671 * * if self._closing: * raise RuntimeError('Cannot pause_reading() when closing') # <<<<<<<<<<<<<< * if not self._is_reading(): * raise RuntimeError('Already paused') */ __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_Cannot_pause_reading_when_closin); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(15, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__138); __Pyx_GIVEREF(__pyx_tuple__138); /* "uvloop/handles/stream.pyx":673 * raise RuntimeError('Cannot pause_reading() when closing') * if not self._is_reading(): * raise RuntimeError('Already paused') # <<<<<<<<<<<<<< * self._stop_reading() * */ __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_u_Already_paused); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(15, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); /* "uvloop/handles/stream.pyx":680 * * if self._is_reading(): * raise RuntimeError('Not paused') # <<<<<<<<<<<<<< * if self._closing: * return */ __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_Not_paused); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(15, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__140); __Pyx_GIVEREF(__pyx_tuple__140); /* "uvloop/handles/streamserver.pyx":33 * * if self.protocol_factory is None: * raise RuntimeError('unable to listen(); no protocol_factory') # <<<<<<<<<<<<<< * * if self.opened != 1: */ __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_unable_to_listen_no_protocol_fac); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(16, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); /* "uvloop/handles/streamserver.pyx":36 * * if self.opened != 1: * raise RuntimeError('unopened TCPServer') # <<<<<<<<<<<<<< * * err = uv.uv_listen( self._handle, */ __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_unopened_TCPServer); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(16, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__142); __Pyx_GIVEREF(__pyx_tuple__142); /* "uvloop/handles/process.pyx":56 * # GIL should help us to avoid that.) * self._abort_init() * raise RuntimeError( # <<<<<<<<<<<<<< * 'Racing with another loop to spawn a process.') * */ __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_Racing_with_another_loop_to_spaw); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); /* "uvloop/handles/process.pyx":83 * # See CPython/posixmodule.c for details * self._abort_init() * raise RuntimeError('not holding the import lock') # <<<<<<<<<<<<<< * * if err < 0: */ __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_u_not_holding_the_import_lock); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(5, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__144); __Pyx_GIVEREF(__pyx_tuple__144); /* "uvloop/handles/process.pyx":126 * * if debug_flags & __PROCESS_DEBUG_SLEEP_AFTER_FORK: * time_sleep(1) # <<<<<<<<<<<<<< * * if preexec_fn is not None and errpipe_data: */ __pyx_tuple__145 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(5, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__145); __Pyx_GIVEREF(__pyx_tuple__145); /* "uvloop/handles/process.pyx":132 * # process must be dead now. * try: * exc_name, exc_msg = errpipe_data.split(b':', 1) # <<<<<<<<<<<<<< * exc_name = exc_name.decode() * exc_msg = exc_msg.decode() */ __pyx_tuple__147 = PyTuple_Pack(2, __pyx_kp_b__146, __pyx_int_1); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(5, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); /* "uvloop/handles/process.pyx":143 * subprocess_SubprocessError) * * exc = subprocess_SubprocessError( # <<<<<<<<<<<<<< * 'Exception occurred in preexec_fn.') * exc.__cause__ = exc_cls(exc_msg) */ __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_Exception_occurred_in_preexec_fn); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(5, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__148); __Pyx_GIVEREF(__pyx_tuple__148); /* "uvloop/handles/process.pyx":165 * with open(self._errpipe_write, 'wb') as f: * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') # <<<<<<<<<<<<<< * f.write(str(ex.args[0]).encode()) * finally: */ __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_b__146); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(5, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); /* "uvloop/handles/process.pyx":163 * except BaseException as ex: * try: * with open(self._errpipe_write, 'wb') as f: # <<<<<<<<<<<<<< * f.write(str(ex.__class__.__name__).encode()) * f.write(b':') */ __pyx_tuple__150 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(5, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__150); __Pyx_GIVEREF(__pyx_tuple__150); /* "uvloop/handles/process.pyx":176 * cdef _close_after_spawn(self, int fd): * if self._fds_to_close is None: * raise RuntimeError( # <<<<<<<<<<<<<< * 'UVProcess._close_after_spawn called after uv_spawn') * self._fds_to_close.add(fd) */ __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_UVProcess__close_after_spawn_cal); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(5, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__151); __Pyx_GIVEREF(__pyx_tuple__151); /* "uvloop/handles/process.pyx":233 * cwd = PyUnicode_EncodeFSDefault(cwd) * if not isinstance(cwd, bytes): * raise ValueError('cwd must be a str or bytes object') # <<<<<<<<<<<<<< * self.__cwd = cwd * self.options.cwd = PyBytes_AsString(self.__cwd) */ __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_u_cwd_must_be_a_str_or_bytes_objec); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(5, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); /* "uvloop/handles/process.pyx":247 * * if an < 1: * raise ValueError('cannot spawn a process: args are empty') # <<<<<<<<<<<<<< * * self.__args = args.copy() */ __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_u_cannot_spawn_a_process_args_are); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(5, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__153); __Pyx_GIVEREF(__pyx_tuple__153); /* "uvloop/handles/process.pyx":255 * self.__args[i] = PyUnicode_EncodeFSDefault(arg) * elif not isinstance(arg, bytes): * raise TypeError('all args must be str or bytes') # <<<<<<<<<<<<<< * * path = self.__args[0] */ __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_u_all_args_must_be_str_or_bytes); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(5, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__154); __Pyx_GIVEREF(__pyx_tuple__154); /* "uvloop/handles/process.pyx":270 * key = PyUnicode_EncodeFSDefault(key) * elif not isinstance(key, bytes): * raise TypeError( # <<<<<<<<<<<<<< * 'all environment vars must be bytes or str') * */ __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_u_all_environment_vars_must_be_byt); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(5, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__155); __Pyx_GIVEREF(__pyx_tuple__155); /* "uvloop/handles/process.pyx":276 * val = PyUnicode_EncodeFSDefault(val) * elif not isinstance(val, bytes): * raise TypeError( # <<<<<<<<<<<<<< * 'all environment values must be bytes or str') * */ __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_u_all_environment_values_must_be_b); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(5, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__156); __Pyx_GIVEREF(__pyx_tuple__156); /* "uvloop/handles/process.pyx":334 * self._loop.call_soon(self._protocol.process_exited) * else: * self._pending_calls.append((_CALL_PROCESS_EXITED, None, None)) # <<<<<<<<<<<<<< * * self._try_finish() */ __pyx_tuple__158 = PyTuple_Pack(3, __pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(5, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); /* "uvloop/handles/process.pyx":409 * io[0] = self._file_devnull() * elif _stdout == subprocess_STDOUT: * raise ValueError( # <<<<<<<<<<<<<< * 'subprocess.STDOUT is supported only by stderr parameter') * else: */ __pyx_tuple__159 = PyTuple_Pack(1, __pyx_kp_u_subprocess_STDOUT_is_supported_o); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(5, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__159); __Pyx_GIVEREF(__pyx_tuple__159); /* "uvloop/handles/process.pyx":438 * io[1] = self._file_devnull() * elif _stdout == subprocess_STDOUT: * raise ValueError( # <<<<<<<<<<<<<< * 'subprocess.STDOUT is supported only by stderr parameter') * else: */ __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_u_subprocess_STDOUT_is_supported_o); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(5, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__160); __Pyx_GIVEREF(__pyx_tuple__160); /* "uvloop/handles/process.pyx":461 * if io[1] is None: * # shouldn't ever happen * raise RuntimeError('cannot apply subprocess.STDOUT') # <<<<<<<<<<<<<< * * newfd = os_dup(io[1]) */ __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_u_cannot_apply_subprocess_STDOUT); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(5, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__161); __Pyx_GIVEREF(__pyx_tuple__161); /* "uvloop/handles/process.pyx":492 * else: * if waiter is not None and not waiter.cancelled(): * waiter.set_result(True) # <<<<<<<<<<<<<< * * self._stdio_ready = 1 */ __pyx_tuple__162 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(5, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); /* "uvloop/handles/process.pyx":521 * self._loop.call_soon(self._protocol.connection_lost, None) * else: * self._pending_calls.append((_CALL_CONNECTION_LOST, None, None)) # <<<<<<<<<<<<<< * * def __stdio_inited(self, waiter, stdio_fut): */ __pyx_tuple__163 = PyTuple_Pack(3, __pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(5, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__163); __Pyx_GIVEREF(__pyx_tuple__163); /* "uvloop/dns.pyx":19 * return socket_getservbyname(port, 'udp') * * raise OSError('service/proto not found') # <<<<<<<<<<<<<< * * */ __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_u_service_proto_not_found); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(19, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__164); __Pyx_GIVEREF(__pyx_tuple__164); /* "uvloop/dns.pyx":60 * ) * * raise RuntimeError("cannot convert sockaddr into Python object") # <<<<<<<<<<<<<< * * */ __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_u_cannot_convert_sockaddr_into_Pyt); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(19, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__165); __Pyx_GIVEREF(__pyx_tuple__165); /* "uvloop/dns.pyx":73 * if family == uv.AF_INET: * if not isinstance(addr, tuple): * raise TypeError('AF_INET address must be tuple') # <<<<<<<<<<<<<< * if len(addr) != 2: * raise ValueError('AF_INET address must be tuple of (host, port)') */ __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_AF_INET_address_must_be_tuple); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(19, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__166); __Pyx_GIVEREF(__pyx_tuple__166); /* "uvloop/dns.pyx":75 * raise TypeError('AF_INET address must be tuple') * if len(addr) != 2: * raise ValueError('AF_INET address must be tuple of (host, port)') # <<<<<<<<<<<<<< * host, port = addr * if isinstance(host, str): */ __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_u_AF_INET_address_must_be_tuple_of); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(19, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__167); __Pyx_GIVEREF(__pyx_tuple__167); /* "uvloop/dns.pyx":78 * host, port = addr * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * if not isinstance(host, (bytes, bytearray)): * raise TypeError('host must be a string or bytes object') */ __pyx_tuple__168 = PyTuple_Pack(1, __pyx_n_u_idna); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(19, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__168); __Pyx_GIVEREF(__pyx_tuple__168); /* "uvloop/dns.pyx":80 * host = host.encode('idna') * if not isinstance(host, (bytes, bytearray)): * raise TypeError('host must be a string or bytes object') # <<<<<<<<<<<<<< * * port = __port_to_int(port, None) */ __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_host_must_be_a_string_or_bytes_o); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(19, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__169); __Pyx_GIVEREF(__pyx_tuple__169); /* "uvloop/dns.pyx":90 * elif family == uv.AF_INET6: * if not isinstance(addr, tuple): * raise TypeError('AF_INET6 address must be tuple') # <<<<<<<<<<<<<< * * addr_len = len(addr) */ __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_AF_INET6_address_must_be_tuple); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(19, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__170); __Pyx_GIVEREF(__pyx_tuple__170); /* "uvloop/dns.pyx":94 * addr_len = len(addr) * if addr_len < 2 or addr_len > 4: * raise ValueError( # <<<<<<<<<<<<<< * 'AF_INET6 must be a tuple of 2-4 parameters: ' * '(host, port, flowinfo?, scope_id?)') */ __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_AF_INET6_must_be_a_tuple_of_2_4); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(19, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__171); __Pyx_GIVEREF(__pyx_tuple__171); /* "uvloop/dns.pyx":100 * host = addr[0] * if isinstance(host, str): * host = host.encode('idna') # <<<<<<<<<<<<<< * * port = __port_to_int(addr[1], None) */ __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_u_idna); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(19, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__172); __Pyx_GIVEREF(__pyx_tuple__172); /* "uvloop/dns.pyx":206 * * if self.data is NULL: * raise RuntimeError('AddrInfo.data is NULL') # <<<<<<<<<<<<<< * * ptr = self.data */ __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_u_AddrInfo_data_is_NULL); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(19, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__173); __Pyx_GIVEREF(__pyx_tuple__173); /* "uvloop/dns.pyx":318 * * if resolver.data is NULL: * aio_logger.error( # <<<<<<<<<<<<<< * 'AddrInfoRequest callback called with NULL resolver.data') * return */ __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_AddrInfoRequest_callback_called); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(19, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__174); __Pyx_GIVEREF(__pyx_tuple__174); /* "uvloop/handles/udp.pyx":48 * if UVLOOP_DEBUG: * if not self.closed: * raise RuntimeError( # <<<<<<<<<<<<<< * 'open _UDPSendContext is being deallocated') * self.udp = None */ __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_u_open__UDPSendContext_is_being_de); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(20, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__175); __Pyx_GIVEREF(__pyx_tuple__175); /* "uvloop/handles/udp.pyx":187 * cdef _new_socket(self): * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError( # <<<<<<<<<<<<<< * 'UDPTransport.family is undefined; cannot create python socket') * */ __pyx_tuple__176 = PyTuple_Pack(1, __pyx_kp_u_UDPTransport_family_is_undefined); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(20, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__176); __Pyx_GIVEREF(__pyx_tuple__176); /* "uvloop/handles/udp.pyx":198 * * if self._family not in (uv.AF_INET, uv.AF_INET6): * raise RuntimeError('UDPTransport.family is undefined; cannot send') # <<<<<<<<<<<<<< * * if self._address_set and addr is not None: */ __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_UDPTransport_family_is_undefined_2); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(20, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__177); __Pyx_GIVEREF(__pyx_tuple__177); /* "uvloop/handles/udp.pyx":217 * ctx.addr = self._address * else: * raise RuntimeError( # <<<<<<<<<<<<<< * 'unable to perform send operation: no address') * else: */ __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_u_unable_to_perform_send_operation); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(20, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__178); __Pyx_GIVEREF(__pyx_tuple__178); /* "uvloop/handles/udp.pyx":328 * if pyaddr is None: * udp._fatal_error( * RuntimeError( # <<<<<<<<<<<<<< * 'uv_udp.receive callback: addr is NULL and nread >= 0'), * False) */ __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_u_uv_udp_receive_callback_addr_is); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(20, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__179); __Pyx_GIVEREF(__pyx_tuple__179); /* "uvloop/future.pyx":40 * loop = aio_get_event_loop() * if not isinstance(loop, Loop): * raise TypeError('uvloop.Future supports only uvloop.Loop') # <<<<<<<<<<<<<< * * self._state = _FUT_PENDING */ __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_u_uvloop_Future_supports_only_uvlo); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(6, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__180); __Pyx_GIVEREF(__pyx_tuple__180); /* "uvloop/future.pyx":51 * * if loop._debug: * self._source_traceback = tb_extract_stack(sys_getframe(0)) # <<<<<<<<<<<<<< * else: * self._source_traceback = None */ __pyx_tuple__181 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__181); __Pyx_GIVEREF(__pyx_tuple__181); /* "uvloop/future.pyx":98 * raise aio_CancelledError * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Result is not ready.') # <<<<<<<<<<<<<< * self._log_traceback = False * if self._exception is not None: */ __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_u_Result_is_not_ready); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(6, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__182); __Pyx_GIVEREF(__pyx_tuple__182); /* "uvloop/future.pyx":112 * return 'FINISHED' * else: * raise RuntimeError('unknown Future state') # <<<<<<<<<<<<<< * * property _state: */ __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_unknown_Future_state); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(6, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__183); __Pyx_GIVEREF(__pyx_tuple__183); /* "uvloop/future.pyx":159 * raise aio_CancelledError * if self._state != _FUT_FINISHED: * raise aio_InvalidStateError('Exception is not set.') # <<<<<<<<<<<<<< * self._log_traceback = False * return self._exception */ __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_Exception_is_not_set); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(6, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__184); __Pyx_GIVEREF(__pyx_tuple__184); /* "uvloop/future.pyx":219 * exception = exception() * if type(exception) is StopIteration: * raise TypeError("StopIteration interacts badly with generators " # <<<<<<<<<<<<<< * "and cannot be raised into a Future") * self._exception = exception */ __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_u_StopIteration_interacts_badly_wi); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(6, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__185); __Pyx_GIVEREF(__pyx_tuple__185); /* "uvloop/future.pyx":233 * * if self._state == _FUT_PENDING: * raise AssertionError("yield from wasn't used with future") # <<<<<<<<<<<<<< * * return self._result_impl() # May raise too. */ __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_u_yield_from_wasn_t_used_with_futu); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(6, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__186); __Pyx_GIVEREF(__pyx_tuple__186); /* "uvloop/future.pyx":244 * * if self._state == _FUT_PENDING: * raise AssertionError("yield from wasn't used with future") # <<<<<<<<<<<<<< * * return self._result_impl() # May raise too. */ __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_yield_from_wasn_t_used_with_futu); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(6, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__187); __Pyx_GIVEREF(__pyx_tuple__187); /* "uvloop/future.pyx":372 * # We use the `send` method directly, because coroutines * # don't have `__iter__` and `__next__` methods. * result = meth(None) # <<<<<<<<<<<<<< * else: * result = meth(exc) */ __pyx_tuple__188 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(6, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__188); __Pyx_GIVEREF(__pyx_tuple__188); /* "uvloop/chain_futs.pyx":49 * """ * if not isfuture(source) and not isinstance(source, cc_Future): * raise TypeError('A future is required for source argument') # <<<<<<<<<<<<<< * if not isfuture(destination) and not isinstance(destination, cc_Future): * raise TypeError('A future is required for destination argument') */ __pyx_tuple__189 = PyTuple_Pack(1, __pyx_kp_u_A_future_is_required_for_source); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(22, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__189); __Pyx_GIVEREF(__pyx_tuple__189); /* "uvloop/chain_futs.pyx":51 * raise TypeError('A future is required for source argument') * if not isfuture(destination) and not isinstance(destination, cc_Future): * raise TypeError('A future is required for destination argument') # <<<<<<<<<<<<<< * * source_loop = None */ __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_u_A_future_is_required_for_destina); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(22, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__190); __Pyx_GIVEREF(__pyx_tuple__190); /* "uvloop/chain_futs.pyx":66 * dest_loop = destination._loop * * def _set_state(future, other): # <<<<<<<<<<<<<< * if isfuture(future): * _copy_future_state(other, future) */ __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_future, __pyx_n_s_other); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(22, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__191); __Pyx_GIVEREF(__pyx_tuple__191); __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_2, __pyx_n_s_set_state, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(22, 66, __pyx_L1_error) /* "uvloop/chain_futs.pyx":72 * _set_concurrent_future_state(future, other) * * def _call_check_cancel(destination): # <<<<<<<<<<<<<< * if destination.cancelled(): * if source_loop is None or source_loop is dest_loop: */ __pyx_tuple__193 = PyTuple_Pack(1, __pyx_n_s_destination); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(22, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__193); __Pyx_GIVEREF(__pyx_tuple__193); __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_2, __pyx_n_s_call_check_cancel, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(22, 72, __pyx_L1_error) /* "uvloop/chain_futs.pyx":79 * source_loop.call_soon_threadsafe(source.cancel) * * def _call_set_state(source): # <<<<<<<<<<<<<< * if dest_loop is None or dest_loop is source_loop: * _set_state(destination, source) */ __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_source); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(22, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__195); __Pyx_GIVEREF(__pyx_tuple__195); __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_2, __pyx_n_s_call_set_state, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(22, 79, __pyx_L1_error) /* "uvloop/handles/process.pyx":636 * class WriteSubprocessPipeProto(aio_BaseProtocol): * * def __init__(self, proc, fd): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: */ __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_proc, __pyx_n_s_fd); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(5, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__197); __Pyx_GIVEREF(__pyx_tuple__197); __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_init, 636, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(5, 636, __pyx_L1_error) /* "uvloop/handles/process.pyx":647 * self.disconnected = False * * def connection_made(self, transport): # <<<<<<<<<<<<<< * self.pipe = transport * */ __pyx_tuple__199 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_transport); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(5, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__199); __Pyx_GIVEREF(__pyx_tuple__199); __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_connection_made, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(5, 647, __pyx_L1_error) /* "uvloop/handles/process.pyx":650 * self.pipe = transport * * def __repr__(self): # <<<<<<<<<<<<<< * return ('<%s fd=%s pipe=%r>' * % (self.__class__.__name__, self.fd, self.pipe)) */ __pyx_tuple__201 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(5, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__201); __Pyx_GIVEREF(__pyx_tuple__201); __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_repr, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(5, 650, __pyx_L1_error) /* "uvloop/handles/process.pyx":654 * % (self.__class__.__name__, self.fd, self.pipe)) * * def connection_lost(self, exc): # <<<<<<<<<<<<<< * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) */ __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_exc); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(5, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__203); __Pyx_GIVEREF(__pyx_tuple__203); __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_connection_lost, 654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(5, 654, __pyx_L1_error) /* "uvloop/handles/process.pyx":659 * self.proc = None * * def pause_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.pause_writing() * */ __pyx_tuple__205 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(5, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__205); __Pyx_GIVEREF(__pyx_tuple__205); __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_pause_writing, 659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(5, 659, __pyx_L1_error) /* "uvloop/handles/process.pyx":662 * (self.proc)._protocol.pause_writing() * * def resume_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.resume_writing() * */ __pyx_tuple__207 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(5, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__207); __Pyx_GIVEREF(__pyx_tuple__207); __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_resume_writing, 662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(5, 662, __pyx_L1_error) /* "uvloop/handles/process.pyx":669 * aio_Protocol): * * def data_received(self, data): # <<<<<<<<<<<<<< * (self.proc)._pipe_data_received(self.fd, data) * */ __pyx_tuple__209 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(5, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__209); __Pyx_GIVEREF(__pyx_tuple__209); __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_3, __pyx_n_s_data_received, 669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(5, 669, __pyx_L1_error) /* "uvloop/future.pyx":458 * * * if sys.version_info >= (3, 6): # <<<<<<<<<<<<<< * # In Python 3.6 Task and Future are implemented in C and * # are already fast. */ __pyx_tuple__211 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_6); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(6, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__211); __Pyx_GIVEREF(__pyx_tuple__211); /* "uvloop/chain_futs.pyx":89 * * * def _wrap_future(future, *, loop=None): # <<<<<<<<<<<<<< * # Don't use this function -- it's here for tests purposes only * # and can be removed in future versions of uvloop. */ __pyx_tuple__212 = PyTuple_Pack(4, __pyx_n_s_future, __pyx_n_s_loop, __pyx_n_s_create_future, __pyx_n_s_new_future); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(22, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__212); __Pyx_GIVEREF(__pyx_tuple__212); __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(1, 1, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv_2, __pyx_n_s_wrap_future, 89, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(22, 89, __pyx_L1_error) /* "uvloop/loop.pyx":2636 * * * def _sighandler_noop(signum, frame): # <<<<<<<<<<<<<< * """Dummy signal handler.""" * pass */ __pyx_tuple__214 = PyTuple_Pack(2, __pyx_n_s_signum, __pyx_n_s_frame); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(1, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__214); __Pyx_GIVEREF(__pyx_tuple__214); __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv, __pyx_n_s_sighandler_noop, 2636, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(1, 2636, __pyx_L1_error) /* "uvloop/loop.pyx":2643 * ########### Stuff for tests: * * async def _test_coroutine_1(): # <<<<<<<<<<<<<< * return 42 */ __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_travis_build_MagicStack_uv, __pyx_n_s_test_coroutine_1, 2643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(1, 2643, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error); __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_50000 = PyInt_FromLong(50000L); if (unlikely(!__pyx_int_50000)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_1048575 = PyInt_FromLong(1048575L); if (unlikely(!__pyx_int_1048575)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_4294967296 = PyInt_FromString((char *)"4294967296", 0, 0); if (unlikely(!__pyx_int_4294967296)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initloop(void); /*proto*/ PyMODINIT_FUNC initloop(void) #else PyMODINIT_FUNC PyInit_loop(void); /*proto*/ PyMODINIT_FUNC PyInit_loop(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; long __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_loop(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("loop", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error) #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_uvloop__loop) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "uvloop.loop")) { if (unlikely(PyDict_SetItemString(modules, "uvloop.loop", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) /*--- Global init code ---*/ __pyx_v_6uvloop_4loop_aio_get_event_loop = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_CancelledError = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_InvalidStateError = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_TimeoutError = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_Future = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_Task = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_ensure_future = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_gather = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_wait = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_logger = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_iscoroutine = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_iscoroutinefunction = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_BaseProtocol = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_Protocol = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_SSLProtocol = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_debug_wrapper = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_isfuture = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_get_running_loop = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_aio_set_running_loop = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_col_deque = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_col_Iterable = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_col_Counter = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_cc_Future = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_errno_EINVAL = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_ft_partial = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_gc_disable = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_iter_chain = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_inspect_isgenerator = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_gaierror = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_error = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_timeout = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_socket = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_socketpair = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_socket_getservbyname = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_name = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_environ = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_dup = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_set_inheritable = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_get_inheritable = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_close = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_open = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_devnull = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_O_RDWR = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_pipe = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_os_read = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_sys_ignore_environment = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_sys_exc_info = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_sys_getframe = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_ssl_SSLContext = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_subprocess_SubprocessError = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_signal_signal = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_signal_set_wakeup_fd = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_signal_default_int_handler = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_signal_SIG_DFL = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_time_sleep = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_time_monotonic = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_tb_extract_stack = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_tb_format_list = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_warnings_warn = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_weakref_WeakValueDictionary = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_weakref_WeakSet = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_uvloop_Future = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_future_factory = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop_task_factory = Py_None; Py_INCREF(Py_None); __pyx_v_6uvloop_4loop___forking_loop = ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ __pyx_vtabptr_6uvloop_4loop_UVHandle = &__pyx_vtable_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVHandle._start_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_8UVHandle__start_init; __pyx_vtable_6uvloop_4loop_UVHandle._abort_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__abort_init; __pyx_vtable_6uvloop_4loop_UVHandle._finish_init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__finish_init; __pyx_vtable_6uvloop_4loop_UVHandle._is_alive = (int (*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__is_alive; __pyx_vtable_6uvloop_4loop_UVHandle._ensure_alive = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__ensure_alive; __pyx_vtable_6uvloop_4loop_UVHandle._error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_8UVHandle__error; __pyx_vtable_6uvloop_4loop_UVHandle._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_8UVHandle__fatal_error; __pyx_vtable_6uvloop_4loop_UVHandle._warn_unclosed = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__warn_unclosed; __pyx_vtable_6uvloop_4loop_UVHandle._free = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__free; __pyx_vtable_6uvloop_4loop_UVHandle._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVHandle__close; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(2, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVHandle.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(2, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVHandle", (PyObject *)&__pyx_type_6uvloop_4loop_UVHandle) < 0) __PYX_ERR(2, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVHandle = &__pyx_type_6uvloop_4loop_UVHandle; __pyx_vtabptr_6uvloop_4loop_UVSocketHandle = &__pyx_vtable_6uvloop_4loop_UVSocketHandle; __pyx_vtable_6uvloop_4loop_UVSocketHandle.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVSocketHandle.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__close; __pyx_vtable_6uvloop_4loop_UVSocketHandle._fileno = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno; __pyx_vtable_6uvloop_4loop_UVSocketHandle._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__new_socket; __pyx_vtable_6uvloop_4loop_UVSocketHandle._get_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_14UVSocketHandle__get_socket; __pyx_vtable_6uvloop_4loop_UVSocketHandle._attach_fileobj = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, PyObject *))__pyx_f_6uvloop_4loop_14UVSocketHandle__attach_fileobj; __pyx_vtable_6uvloop_4loop_UVSocketHandle._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_14UVSocketHandle__open; __pyx_type_6uvloop_4loop_UVSocketHandle.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(2, 213, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVSocketHandle.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVSocketHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(2, 213, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVSocketHandle", (PyObject *)&__pyx_type_6uvloop_4loop_UVSocketHandle) < 0) __PYX_ERR(2, 213, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVSocketHandle = &__pyx_type_6uvloop_4loop_UVSocketHandle; __pyx_vtabptr_6uvloop_4loop_UVAsync = &__pyx_vtable_6uvloop_4loop_UVAsync; __pyx_vtable_6uvloop_4loop_UVAsync.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVAsync._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVAsync *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *))__pyx_f_6uvloop_4loop_7UVAsync__init; __pyx_vtable_6uvloop_4loop_UVAsync.send = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVAsync *))__pyx_f_6uvloop_4loop_7UVAsync_send; __pyx_vtable_6uvloop_4loop_UVAsync.new = (struct __pyx_obj_6uvloop_4loop_UVAsync *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *))__pyx_f_6uvloop_4loop_7UVAsync_new; __pyx_type_6uvloop_4loop_UVAsync.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(9, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVAsync.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVAsync.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(9, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVAsync", (PyObject *)&__pyx_type_6uvloop_4loop_UVAsync) < 0) __PYX_ERR(9, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVAsync = &__pyx_type_6uvloop_4loop_UVAsync; __pyx_vtabptr_6uvloop_4loop_UVTimer = &__pyx_vtable_6uvloop_4loop_UVTimer; __pyx_vtable_6uvloop_4loop_UVTimer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVTimer._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *, struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t))__pyx_f_6uvloop_4loop_7UVTimer__init; __pyx_vtable_6uvloop_4loop_UVTimer.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *))__pyx_f_6uvloop_4loop_7UVTimer_stop; __pyx_vtable_6uvloop_4loop_UVTimer.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVTimer *))__pyx_f_6uvloop_4loop_7UVTimer_start; __pyx_vtable_6uvloop_4loop_UVTimer.new = (struct __pyx_obj_6uvloop_4loop_UVTimer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, __pyx_t_6uvloop_4loop_method_t, PyObject *, uint64_t))__pyx_f_6uvloop_4loop_7UVTimer_new; __pyx_type_6uvloop_4loop_UVTimer.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(12, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVTimer.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVTimer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(12, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVTimer", (PyObject *)&__pyx_type_6uvloop_4loop_UVTimer) < 0) __PYX_ERR(12, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVTimer = &__pyx_type_6uvloop_4loop_UVTimer; __pyx_vtabptr_6uvloop_4loop_UVIdle = &__pyx_vtable_6uvloop_4loop_UVIdle; __pyx_vtable_6uvloop_4loop_UVIdle.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVIdle._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVIdle__init; __pyx_vtable_6uvloop_4loop_UVIdle.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *))__pyx_f_6uvloop_4loop_6UVIdle_stop; __pyx_vtable_6uvloop_4loop_UVIdle.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVIdle *))__pyx_f_6uvloop_4loop_6UVIdle_start; __pyx_vtable_6uvloop_4loop_UVIdle.new = (struct __pyx_obj_6uvloop_4loop_UVIdle *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVIdle_new; __pyx_type_6uvloop_4loop_UVIdle.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(10, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVIdle.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVIdle.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(10, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVIdle", (PyObject *)&__pyx_type_6uvloop_4loop_UVIdle) < 0) __PYX_ERR(10, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVIdle = &__pyx_type_6uvloop_4loop_UVIdle; __pyx_vtabptr_6uvloop_4loop_UVBaseTransport = &__pyx_vtable_6uvloop_4loop_UVBaseTransport; __pyx_vtable_6uvloop_4loop_UVBaseTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle; __pyx_vtable_6uvloop_4loop_UVBaseTransport.__pyx_base.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_15UVBaseTransport__fatal_error; __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_write_buffer_limits = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_opt_args_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits *__pyx_optional_args))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_write_buffer_limits; __pyx_vtable_6uvloop_4loop_UVBaseTransport._maybe_pause_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_pause_protocol; __pyx_vtable_6uvloop_4loop_UVBaseTransport._maybe_resume_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__maybe_resume_protocol; __pyx_vtable_6uvloop_4loop_UVBaseTransport._schedule_call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_made; __pyx_vtable_6uvloop_4loop_UVBaseTransport._schedule_call_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__schedule_call_connection_lost; __pyx_vtable_6uvloop_4loop_UVBaseTransport._wakeup_waiter = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__wakeup_waiter; __pyx_vtable_6uvloop_4loop_UVBaseTransport._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_made; __pyx_vtable_6uvloop_4loop_UVBaseTransport._call_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__call_connection_lost; __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_server = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_server; __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_waiter = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_waiter; __pyx_vtable_6uvloop_4loop_UVBaseTransport._set_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__set_protocol; __pyx_vtable_6uvloop_4loop_UVBaseTransport._init_protocol = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__init_protocol; __pyx_vtable_6uvloop_4loop_UVBaseTransport._add_extra_info = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_15UVBaseTransport__add_extra_info; __pyx_vtable_6uvloop_4loop_UVBaseTransport._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__get_write_buffer_size; __pyx_vtable_6uvloop_4loop_UVBaseTransport._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__is_reading; __pyx_vtable_6uvloop_4loop_UVBaseTransport._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__start_reading; __pyx_vtable_6uvloop_4loop_UVBaseTransport._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_15UVBaseTransport__stop_reading; __pyx_type_6uvloop_4loop_UVBaseTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVSocketHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(3, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVBaseTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVBaseTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(3, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVBaseTransport", (PyObject *)&__pyx_type_6uvloop_4loop_UVBaseTransport) < 0) __PYX_ERR(3, 2, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_UVBaseTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UVBaseTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UVBaseTransport, __weakref__); __pyx_ptype_6uvloop_4loop_UVBaseTransport = &__pyx_type_6uvloop_4loop_UVBaseTransport; __pyx_vtabptr_6uvloop_4loop_Loop = &__pyx_vtable_6uvloop_4loop_Loop; __pyx_vtable_6uvloop_4loop_Loop._init_debug_fields = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__init_debug_fields; __pyx_vtable_6uvloop_4loop_Loop._on_wake = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__on_wake; __pyx_vtable_6uvloop_4loop_Loop._on_idle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__on_idle; __pyx_vtable_6uvloop_4loop_Loop.__pyx___run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode))__pyx_f_6uvloop_4loop_4Loop___run; __pyx_vtable_6uvloop_4loop_Loop._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uv_run_mode))__pyx_f_6uvloop_4loop_4Loop__run; __pyx_vtable_6uvloop_4loop_Loop._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__close; __pyx_vtable_6uvloop_4loop_Loop._stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__stop; __pyx_vtable_6uvloop_4loop_Loop._time = (uint64_t (*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__time; __pyx_vtable_6uvloop_4loop_Loop._queue_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_4Loop__queue_write; __pyx_vtable_6uvloop_4loop_Loop._exec_queued_writes = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__exec_queued_writes; __pyx_vtable_6uvloop_4loop_Loop._call_soon = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__call_soon; __pyx_vtable_6uvloop_4loop_Loop._call_soon_handle = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__call_soon_handle; __pyx_vtable_6uvloop_4loop_Loop._call_later = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, uint64_t, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__call_later; __pyx_vtable_6uvloop_4loop_Loop._handle_exception = (void (*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__handle_exception; __pyx_vtable_6uvloop_4loop_Loop._new_future = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__new_future; __pyx_vtable_6uvloop_4loop_Loop._check_signal = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__check_signal; __pyx_vtable_6uvloop_4loop_Loop._check_closed = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__check_closed; __pyx_vtable_6uvloop_4loop_Loop._check_thread = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__check_thread; __pyx_vtable_6uvloop_4loop_Loop._getaddrinfo = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, int, int, int, int, int))__pyx_f_6uvloop_4loop_4Loop__getaddrinfo; __pyx_vtable_6uvloop_4loop_Loop._getnameinfo = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_4Loop__getnameinfo; __pyx_vtable_6uvloop_4loop_Loop._create_server = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct sockaddr *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, int, PyObject *))__pyx_f_6uvloop_4loop_4Loop__create_server; __pyx_vtable_6uvloop_4loop_Loop._track_transport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_4Loop__track_transport; __pyx_vtable_6uvloop_4loop_Loop._ensure_fd_no_transport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__ensure_fd_no_transport; __pyx_vtable_6uvloop_4loop_Loop._add_reader = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__add_reader; __pyx_vtable_6uvloop_4loop_Loop._remove_reader = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__remove_reader; __pyx_vtable_6uvloop_4loop_Loop._add_writer = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_4Loop__add_writer; __pyx_vtable_6uvloop_4loop_Loop._remove_writer = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__remove_writer; __pyx_vtable_6uvloop_4loop_Loop._sock_recv = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_recv; __pyx_vtable_6uvloop_4loop_Loop._sock_sendall = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_sendall; __pyx_vtable_6uvloop_4loop_Loop._sock_accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_accept; __pyx_vtable_6uvloop_4loop_Loop._sock_connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_connect; __pyx_vtable_6uvloop_4loop_Loop._sock_connect_cb = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__sock_connect_cb; __pyx_vtable_6uvloop_4loop_Loop._sock_set_reuseport = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_4Loop__sock_set_reuseport; __pyx_vtable_6uvloop_4loop_Loop._setup_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__setup_signals; __pyx_vtable_6uvloop_4loop_Loop._shutdown_signals = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__shutdown_signals; __pyx_vtable_6uvloop_4loop_Loop._handle_signal = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__handle_signal; __pyx_vtable_6uvloop_4loop_Loop._read_from_self = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_4Loop__read_from_self; __pyx_vtable_6uvloop_4loop_Loop._process_self_data = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *))__pyx_f_6uvloop_4loop_4Loop__process_self_data; __pyx_vtable_6uvloop_4loop_Loop._set_coroutine_wrapper = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_4Loop__set_coroutine_wrapper; if (PyType_Ready(&__pyx_type_6uvloop_4loop_Loop) < 0) __PYX_ERR(1, 63, __pyx_L1_error) __pyx_type_6uvloop_4loop_Loop.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Loop.tp_dict, __pyx_vtabptr_6uvloop_4loop_Loop) < 0) __PYX_ERR(1, 63, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "Loop", (PyObject *)&__pyx_type_6uvloop_4loop_Loop) < 0) __PYX_ERR(1, 63, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_Loop.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_Loop.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_Loop, __weakref__); __pyx_ptype_6uvloop_4loop_Loop = &__pyx_type_6uvloop_4loop_Loop; __pyx_vtabptr_6uvloop_4loop_Handle = &__pyx_vtable_6uvloop_4loop_Handle; __pyx_vtable_6uvloop_4loop_Handle._set_loop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *, struct __pyx_obj_6uvloop_4loop_Loop *))__pyx_f_6uvloop_4loop_6Handle__set_loop; __pyx_vtable_6uvloop_4loop_Handle._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6Handle__run; __pyx_vtable_6uvloop_4loop_Handle._cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6Handle__cancel; if (PyType_Ready(&__pyx_type_6uvloop_4loop_Handle) < 0) __PYX_ERR(8, 3, __pyx_L1_error) __pyx_type_6uvloop_4loop_Handle.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Handle.tp_dict, __pyx_vtabptr_6uvloop_4loop_Handle) < 0) __PYX_ERR(8, 3, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "Handle", (PyObject *)&__pyx_type_6uvloop_4loop_Handle) < 0) __PYX_ERR(8, 3, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_Handle.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_Handle.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_Handle, __weakref__); __pyx_ptype_6uvloop_4loop_Handle = &__pyx_type_6uvloop_4loop_Handle; __pyx_vtabptr_6uvloop_4loop_TimerHandle = &__pyx_vtable_6uvloop_4loop_TimerHandle; __pyx_vtable_6uvloop_4loop_TimerHandle._run = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TimerHandle *))__pyx_f_6uvloop_4loop_11TimerHandle__run; __pyx_vtable_6uvloop_4loop_TimerHandle._cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TimerHandle *))__pyx_f_6uvloop_4loop_11TimerHandle__cancel; if (PyType_Ready(&__pyx_type_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(8, 126, __pyx_L1_error) __pyx_type_6uvloop_4loop_TimerHandle.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TimerHandle.tp_dict, __pyx_vtabptr_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(8, 126, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "TimerHandle", (PyObject *)&__pyx_type_6uvloop_4loop_TimerHandle) < 0) __PYX_ERR(8, 126, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_TimerHandle.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_TimerHandle.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_TimerHandle, __weakref__); __pyx_ptype_6uvloop_4loop_TimerHandle = &__pyx_type_6uvloop_4loop_TimerHandle; __pyx_vtabptr_6uvloop_4loop_UVCheck = &__pyx_vtable_6uvloop_4loop_UVCheck; __pyx_vtable_6uvloop_4loop_UVCheck.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVCheck._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *, struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_7UVCheck__init; __pyx_vtable_6uvloop_4loop_UVCheck.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *))__pyx_f_6uvloop_4loop_7UVCheck_stop; __pyx_vtable_6uvloop_4loop_UVCheck.start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVCheck *))__pyx_f_6uvloop_4loop_7UVCheck_start; __pyx_vtable_6uvloop_4loop_UVCheck.new = (struct __pyx_obj_6uvloop_4loop_UVCheck *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_7UVCheck_new; __pyx_type_6uvloop_4loop_UVCheck.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(11, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVCheck.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVCheck.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(11, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVCheck", (PyObject *)&__pyx_type_6uvloop_4loop_UVCheck) < 0) __PYX_ERR(11, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVCheck = &__pyx_type_6uvloop_4loop_UVCheck; __pyx_vtabptr_6uvloop_4loop_UVPoll = &__pyx_vtable_6uvloop_4loop_UVPoll; __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_6UVPoll__fatal_error; __pyx_vtable_6uvloop_4loop_UVPoll.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_6UVPoll__close; __pyx_vtable_6uvloop_4loop_UVPoll._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_6UVPoll__init; __pyx_vtable_6uvloop_4loop_UVPoll._poll_start = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, int))__pyx_f_6uvloop_4loop_6UVPoll__poll_start; __pyx_vtable_6uvloop_4loop_UVPoll._poll_stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll__poll_stop; __pyx_vtable_6uvloop_4loop_UVPoll.is_active = (int (*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_is_active; __pyx_vtable_6uvloop_4loop_UVPoll.start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVPoll_start_reading; __pyx_vtable_6uvloop_4loop_UVPoll.start_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *, struct __pyx_obj_6uvloop_4loop_Handle *))__pyx_f_6uvloop_4loop_6UVPoll_start_writing; __pyx_vtable_6uvloop_4loop_UVPoll.stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop_reading; __pyx_vtable_6uvloop_4loop_UVPoll.stop_writing = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop_writing; __pyx_vtable_6uvloop_4loop_UVPoll.stop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVPoll *))__pyx_f_6uvloop_4loop_6UVPoll_stop; __pyx_vtable_6uvloop_4loop_UVPoll.new = (struct __pyx_obj_6uvloop_4loop_UVPoll *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, int))__pyx_f_6uvloop_4loop_6UVPoll_new; __pyx_type_6uvloop_4loop_UVPoll.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(13, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVPoll.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVPoll.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(13, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVPoll", (PyObject *)&__pyx_type_6uvloop_4loop_UVPoll) < 0) __PYX_ERR(13, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVPoll = &__pyx_type_6uvloop_4loop_UVPoll; __pyx_vtabptr_6uvloop_4loop_UVStream = &__pyx_vtable_6uvloop_4loop_UVStream; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base.__pyx_base.__pyx_base._close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *))__pyx_f_6uvloop_4loop_8UVStream__close; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__get_write_buffer_size; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__is_reading; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__start_reading; __pyx_vtable_6uvloop_4loop_UVStream.__pyx_base._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_8UVStream__stop_reading; __pyx_vtable_6uvloop_4loop_UVStream._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__init; __pyx_vtable_6uvloop_4loop_UVStream._exec_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__exec_write; __pyx_vtable_6uvloop_4loop_UVStream._shutdown = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__shutdown; __pyx_vtable_6uvloop_4loop_UVStream._accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__accept; __pyx_vtable_6uvloop_4loop_UVStream._close_on_read_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__close_on_read_error; __pyx_vtable_6uvloop_4loop_UVStream.__pyx___reading_started = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream___reading_started; __pyx_vtable_6uvloop_4loop_UVStream.__pyx___reading_stopped = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream___reading_stopped; __pyx_vtable_6uvloop_4loop_UVStream._write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__write; __pyx_vtable_6uvloop_4loop_UVStream._try_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__try_write; __pyx_vtable_6uvloop_4loop_UVStream._on_accept = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_accept; __pyx_vtable_6uvloop_4loop_UVStream._on_read = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__on_read; __pyx_vtable_6uvloop_4loop_UVStream._on_eof = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_eof; __pyx_vtable_6uvloop_4loop_UVStream._on_write = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *))__pyx_f_6uvloop_4loop_8UVStream__on_write; __pyx_vtable_6uvloop_4loop_UVStream._on_connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_8UVStream__on_connect; __pyx_type_6uvloop_4loop_UVStream.tp_base = __pyx_ptype_6uvloop_4loop_UVBaseTransport; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVStream) < 0) __PYX_ERR(15, 208, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVStream.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVStream.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVStream) < 0) __PYX_ERR(15, 208, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVStream", (PyObject *)&__pyx_type_6uvloop_4loop_UVStream) < 0) __PYX_ERR(15, 208, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_UVStream.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UVStream.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UVStream, __pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_UVStream = &__pyx_type_6uvloop_4loop_UVStream; __pyx_vtabptr_6uvloop_4loop_UVStreamServer = &__pyx_vtable_6uvloop_4loop_UVStreamServer; __pyx_vtable_6uvloop_4loop_UVStreamServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVSocketHandle; __pyx_vtable_6uvloop_4loop_UVStreamServer.__pyx_base.__pyx_base._fatal_error = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVHandle *, PyObject *, PyObject *, struct __pyx_opt_args_6uvloop_4loop_8UVHandle__fatal_error *__pyx_optional_args))__pyx_f_6uvloop_4loop_14UVStreamServer__fatal_error; __pyx_vtable_6uvloop_4loop_UVStreamServer._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_14UVStreamServer__init; __pyx_vtable_6uvloop_4loop_UVStreamServer._mark_as_open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_14UVStreamServer__mark_as_open; __pyx_vtable_6uvloop_4loop_UVStreamServer.listen = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *))__pyx_f_6uvloop_4loop_14UVStreamServer_listen; __pyx_vtable_6uvloop_4loop_UVStreamServer._on_listen = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_14UVStreamServer__on_listen; __pyx_vtable_6uvloop_4loop_UVStreamServer._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_14UVStreamServer__make_new_transport; __pyx_type_6uvloop_4loop_UVStreamServer.tp_base = __pyx_ptype_6uvloop_4loop_UVSocketHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(16, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVStreamServer.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVStreamServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(16, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVStreamServer", (PyObject *)&__pyx_type_6uvloop_4loop_UVStreamServer) < 0) __PYX_ERR(16, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVStreamServer = &__pyx_type_6uvloop_4loop_UVStreamServer; __pyx_vtabptr_6uvloop_4loop_TCPServer = &__pyx_vtable_6uvloop_4loop_TCPServer; __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStreamServer; __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_9TCPServer__new_socket; __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_9TCPServer__open; __pyx_vtable_6uvloop_4loop_TCPServer.__pyx_base._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9TCPServer__make_new_transport; __pyx_vtable_6uvloop_4loop_TCPServer.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPServer *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_9TCPServer_bind *__pyx_optional_args))__pyx_f_6uvloop_4loop_9TCPServer_bind; __pyx_vtable_6uvloop_4loop_TCPServer.new = (struct __pyx_obj_6uvloop_4loop_TCPServer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *, unsigned int))__pyx_f_6uvloop_4loop_9TCPServer_new; __pyx_type_6uvloop_4loop_TCPServer.tp_base = __pyx_ptype_6uvloop_4loop_UVStreamServer; if (PyType_Ready(&__pyx_type_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(4, 57, __pyx_L1_error) __pyx_type_6uvloop_4loop_TCPServer.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TCPServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(4, 57, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "TCPServer", (PyObject *)&__pyx_type_6uvloop_4loop_TCPServer) < 0) __PYX_ERR(4, 57, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_TCPServer = &__pyx_type_6uvloop_4loop_TCPServer; __pyx_vtabptr_6uvloop_4loop_TCPTransport = &__pyx_vtable_6uvloop_4loop_TCPTransport; __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream; __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_12TCPTransport__new_socket; __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_12TCPTransport__open; __pyx_vtable_6uvloop_4loop_TCPTransport.__pyx_base.__pyx_base._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12TCPTransport__call_connection_made; __pyx_vtable_6uvloop_4loop_TCPTransport.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *, struct __pyx_opt_args_6uvloop_4loop_12TCPTransport_bind *__pyx_optional_args))__pyx_f_6uvloop_4loop_12TCPTransport_bind; __pyx_vtable_6uvloop_4loop_TCPTransport.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_TCPTransport *, struct sockaddr *))__pyx_f_6uvloop_4loop_12TCPTransport_connect; __pyx_vtable_6uvloop_4loop_TCPTransport.new = (struct __pyx_obj_6uvloop_4loop_TCPTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_12TCPTransport_new; __pyx_type_6uvloop_4loop_TCPTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream; if (PyType_Ready(&__pyx_type_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(4, 97, __pyx_L1_error) __pyx_type_6uvloop_4loop_TCPTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_TCPTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(4, 97, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "TCPTransport", (PyObject *)&__pyx_type_6uvloop_4loop_TCPTransport) < 0) __PYX_ERR(4, 97, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_TCPTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_TCPTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_TCPTransport, __pyx_base.__pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_TCPTransport = &__pyx_type_6uvloop_4loop_TCPTransport; __pyx_vtabptr_6uvloop_4loop_UnixServer = &__pyx_vtable_6uvloop_4loop_UnixServer; __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStreamServer; __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_10UnixServer__new_socket; __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_10UnixServer__open; __pyx_vtable_6uvloop_4loop_UnixServer.__pyx_base._make_new_transport = (struct __pyx_obj_6uvloop_4loop_UVStream *(*)(struct __pyx_obj_6uvloop_4loop_UVStreamServer *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer__make_new_transport; __pyx_vtable_6uvloop_4loop_UnixServer.bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UnixServer *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer_bind; __pyx_vtable_6uvloop_4loop_UnixServer.new = (struct __pyx_obj_6uvloop_4loop_UnixServer *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_10UnixServer_new; __pyx_type_6uvloop_4loop_UnixServer.tp_base = __pyx_ptype_6uvloop_4loop_UVStreamServer; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(17, 38, __pyx_L1_error) __pyx_type_6uvloop_4loop_UnixServer.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UnixServer.tp_dict, __pyx_vtabptr_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(17, 38, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UnixServer", (PyObject *)&__pyx_type_6uvloop_4loop_UnixServer) < 0) __PYX_ERR(17, 38, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UnixServer = &__pyx_type_6uvloop_4loop_UnixServer; __pyx_vtabptr_6uvloop_4loop_UnixTransport = &__pyx_vtable_6uvloop_4loop_UnixTransport; __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream; __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_13UnixTransport__new_socket; __pyx_vtable_6uvloop_4loop_UnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_13UnixTransport__open; __pyx_vtable_6uvloop_4loop_UnixTransport.new = (struct __pyx_obj_6uvloop_4loop_UnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_13UnixTransport_new; __pyx_vtable_6uvloop_4loop_UnixTransport.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UnixTransport *, char *))__pyx_f_6uvloop_4loop_13UnixTransport_connect; __pyx_type_6uvloop_4loop_UnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(17, 77, __pyx_L1_error) __pyx_type_6uvloop_4loop_UnixTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(17, 77, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UnixTransport", (PyObject *)&__pyx_type_6uvloop_4loop_UnixTransport) < 0) __PYX_ERR(17, 77, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_UnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UnixTransport, __pyx_base.__pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_UnixTransport = &__pyx_type_6uvloop_4loop_UnixTransport; __pyx_vtabptr_6uvloop_4loop_ReadUnixTransport = &__pyx_vtable_6uvloop_4loop_ReadUnixTransport; __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream; __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_17ReadUnixTransport__new_socket; __pyx_vtable_6uvloop_4loop_ReadUnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_17ReadUnixTransport__open; __pyx_vtable_6uvloop_4loop_ReadUnixTransport.new = (struct __pyx_obj_6uvloop_4loop_ReadUnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_17ReadUnixTransport_new; __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream; if (PyType_Ready(&__pyx_type_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(17, 102, __pyx_L1_error) __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_ReadUnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(17, 102, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "ReadUnixTransport", (PyObject *)&__pyx_type_6uvloop_4loop_ReadUnixTransport) < 0) __PYX_ERR(17, 102, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_ReadUnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_ReadUnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_ReadUnixTransport, __pyx_base.__pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_ReadUnixTransport = &__pyx_type_6uvloop_4loop_ReadUnixTransport; __pyx_vtabptr_6uvloop_4loop_WriteUnixTransport = &__pyx_vtable_6uvloop_4loop_WriteUnixTransport; __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVStream; __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_18WriteUnixTransport__new_socket; __pyx_vtable_6uvloop_4loop_WriteUnixTransport.__pyx_base.__pyx_base.__pyx_base._open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *, int))__pyx_f_6uvloop_4loop_18WriteUnixTransport__open; __pyx_vtable_6uvloop_4loop_WriteUnixTransport.new = (struct __pyx_obj_6uvloop_4loop_WriteUnixTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, struct __pyx_obj_6uvloop_4loop_Server *, PyObject *))__pyx_f_6uvloop_4loop_18WriteUnixTransport_new; __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVStream; if (PyType_Ready(&__pyx_type_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(17, 145, __pyx_L1_error) __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_WriteUnixTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(17, 145, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "WriteUnixTransport", (PyObject *)&__pyx_type_6uvloop_4loop_WriteUnixTransport) < 0) __PYX_ERR(17, 145, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_WriteUnixTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_WriteUnixTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_WriteUnixTransport, __pyx_base.__pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_WriteUnixTransport = &__pyx_type_6uvloop_4loop_WriteUnixTransport; __pyx_vtabptr_6uvloop_4loop_UVProcess = &__pyx_vtable_6uvloop_4loop_UVProcess; __pyx_vtable_6uvloop_4loop_UVProcess.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVHandle; __pyx_vtable_6uvloop_4loop_UVProcess._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init; __pyx_vtable_6uvloop_4loop_UVProcess._after_fork = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *))__pyx_f_6uvloop_4loop_9UVProcess__after_fork; __pyx_vtable_6uvloop_4loop_UVProcess.__pyx___to_cstring_array = (char **(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess___to_cstring_array; __pyx_vtable_6uvloop_4loop_UVProcess._init_args = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_args; __pyx_vtable_6uvloop_4loop_UVProcess._init_env = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_env; __pyx_vtable_6uvloop_4loop_UVProcess._init_files = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_files; __pyx_vtable_6uvloop_4loop_UVProcess._init_options = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_9UVProcess__init_options; __pyx_vtable_6uvloop_4loop_UVProcess._close_after_spawn = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int))__pyx_f_6uvloop_4loop_9UVProcess__close_after_spawn; __pyx_vtable_6uvloop_4loop_UVProcess._on_exit = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int))__pyx_f_6uvloop_4loop_9UVProcess__on_exit; __pyx_vtable_6uvloop_4loop_UVProcess._kill = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int))__pyx_f_6uvloop_4loop_9UVProcess__kill; __pyx_type_6uvloop_4loop_UVProcess.tp_base = __pyx_ptype_6uvloop_4loop_UVHandle; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(5, 2, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVProcess.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVProcess.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(5, 2, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVProcess", (PyObject *)&__pyx_type_6uvloop_4loop_UVProcess) < 0) __PYX_ERR(5, 2, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVProcess = &__pyx_type_6uvloop_4loop_UVProcess; __pyx_vtabptr_6uvloop_4loop_UVProcessTransport = &__pyx_vtable_6uvloop_4loop_UVProcessTransport; __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVProcess; __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base._init_files = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__init_files; __pyx_vtable_6uvloop_4loop_UVProcessTransport.__pyx_base._on_exit = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcess *, int64_t, int))__pyx_f_6uvloop_4loop_18UVProcessTransport__on_exit; __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_redirect_stdio = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_redirect_stdio; __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_devnull = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_devnull; __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_inpipe = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_inpipe; __pyx_vtable_6uvloop_4loop_UVProcessTransport._file_outpipe = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__file_outpipe; __pyx_vtable_6uvloop_4loop_UVProcessTransport._check_proc = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__check_proc; __pyx_vtable_6uvloop_4loop_UVProcessTransport._pipe_connection_lost = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_connection_lost; __pyx_vtable_6uvloop_4loop_UVProcessTransport._pipe_data_received = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, int, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__pipe_data_received; __pyx_vtable_6uvloop_4loop_UVProcessTransport._call_connection_made = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport__call_connection_made; __pyx_vtable_6uvloop_4loop_UVProcessTransport._try_finish = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVProcessTransport *))__pyx_f_6uvloop_4loop_18UVProcessTransport__try_finish; __pyx_vtable_6uvloop_4loop_UVProcessTransport.new = (struct __pyx_obj_6uvloop_4loop_UVProcessTransport *(*)(struct __pyx_obj_6uvloop_4loop_Loop *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_18UVProcessTransport_new; __pyx_type_6uvloop_4loop_UVProcessTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVProcess; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(5, 314, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVProcessTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVProcessTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(5, 314, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVProcessTransport", (PyObject *)&__pyx_type_6uvloop_4loop_UVProcessTransport) < 0) __PYX_ERR(5, 314, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVProcessTransport = &__pyx_type_6uvloop_4loop_UVProcessTransport; __pyx_vtabptr_6uvloop_4loop_UVRequest = &__pyx_vtable_6uvloop_4loop_UVRequest; __pyx_vtable_6uvloop_4loop_UVRequest.on_done = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVRequest *))__pyx_f_6uvloop_4loop_9UVRequest_on_done; __pyx_vtable_6uvloop_4loop_UVRequest.cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVRequest *))__pyx_f_6uvloop_4loop_9UVRequest_cancel; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(18, 1, __pyx_L1_error) __pyx_type_6uvloop_4loop_UVRequest.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UVRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(18, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UVRequest", (PyObject *)&__pyx_type_6uvloop_4loop_UVRequest) < 0) __PYX_ERR(18, 1, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_UVRequest = &__pyx_type_6uvloop_4loop_UVRequest; __pyx_vtabptr_6uvloop_4loop_UDPTransport = &__pyx_vtable_6uvloop_4loop_UDPTransport; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVBaseTransport; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base.__pyx_base._new_socket = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVSocketHandle *))__pyx_f_6uvloop_4loop_12UDPTransport__new_socket; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._get_write_buffer_size = (size_t (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__get_write_buffer_size; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._is_reading = (int (*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__is_reading; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._start_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__start_reading; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx_base._stop_reading = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UVBaseTransport *))__pyx_f_6uvloop_4loop_12UDPTransport__stop_reading; __pyx_vtable_6uvloop_4loop_UDPTransport._init = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct __pyx_obj_6uvloop_4loop_Loop *, unsigned int))__pyx_f_6uvloop_4loop_12UDPTransport__init; __pyx_vtable_6uvloop_4loop_UDPTransport._set_remote_address = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, size_t))__pyx_f_6uvloop_4loop_12UDPTransport__set_remote_address; __pyx_vtable_6uvloop_4loop_UDPTransport._bind = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_12UDPTransport__bind; __pyx_vtable_6uvloop_4loop_UDPTransport.open = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int, int))__pyx_f_6uvloop_4loop_12UDPTransport_open; __pyx_vtable_6uvloop_4loop_UDPTransport._set_broadcast = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, int))__pyx_f_6uvloop_4loop_12UDPTransport__set_broadcast; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx___receiving_started = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *))__pyx_f_6uvloop_4loop_12UDPTransport___receiving_started; __pyx_vtable_6uvloop_4loop_UDPTransport.__pyx___receiving_stopped = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *))__pyx_f_6uvloop_4loop_12UDPTransport___receiving_stopped; __pyx_vtable_6uvloop_4loop_UDPTransport._send = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__send; __pyx_vtable_6uvloop_4loop_UDPTransport._on_receive = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *, PyObject *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__on_receive; __pyx_vtable_6uvloop_4loop_UDPTransport._on_sent = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *))__pyx_f_6uvloop_4loop_12UDPTransport__on_sent; __pyx_type_6uvloop_4loop_UDPTransport.tp_base = __pyx_ptype_6uvloop_4loop_UVBaseTransport; if (PyType_Ready(&__pyx_type_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(20, 54, __pyx_L1_error) __pyx_type_6uvloop_4loop_UDPTransport.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_UDPTransport.tp_dict, __pyx_vtabptr_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(20, 54, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "UDPTransport", (PyObject *)&__pyx_type_6uvloop_4loop_UDPTransport) < 0) __PYX_ERR(20, 54, __pyx_L1_error) if (__pyx_type_6uvloop_4loop_UDPTransport.tp_weaklistoffset == 0) __pyx_type_6uvloop_4loop_UDPTransport.tp_weaklistoffset = offsetof(struct __pyx_obj_6uvloop_4loop_UDPTransport, __pyx_base.__weakref__); __pyx_ptype_6uvloop_4loop_UDPTransport = &__pyx_type_6uvloop_4loop_UDPTransport; __pyx_vtabptr_6uvloop_4loop_Server = &__pyx_vtable_6uvloop_4loop_Server; __pyx_vtable_6uvloop_4loop_Server._add_server = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *, struct __pyx_obj_6uvloop_4loop_UVStreamServer *))__pyx_f_6uvloop_4loop_6Server__add_server; __pyx_vtable_6uvloop_4loop_Server._wakeup = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__wakeup; __pyx_vtable_6uvloop_4loop_Server._attach = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__attach; __pyx_vtable_6uvloop_4loop_Server._detach = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_Server *))__pyx_f_6uvloop_4loop_6Server__detach; if (PyType_Ready(&__pyx_type_6uvloop_4loop_Server) < 0) __PYX_ERR(21, 1, __pyx_L1_error) __pyx_type_6uvloop_4loop_Server.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_Server.tp_dict, __pyx_vtabptr_6uvloop_4loop_Server) < 0) __PYX_ERR(21, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "Server", (PyObject *)&__pyx_type_6uvloop_4loop_Server) < 0) __PYX_ERR(21, 1, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_Server = &__pyx_type_6uvloop_4loop_Server; __pyx_vtabptr_6uvloop_4loop__StreamWriteContext = &__pyx_vtable_6uvloop_4loop__StreamWriteContext; __pyx_vtable_6uvloop_4loop__StreamWriteContext.free_bufs = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_free_bufs; __pyx_vtable_6uvloop_4loop__StreamWriteContext.close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_close; __pyx_vtable_6uvloop_4loop__StreamWriteContext.advance_uv_buf = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__StreamWriteContext *, size_t))__pyx_f_6uvloop_4loop_19_StreamWriteContext_advance_uv_buf; __pyx_vtable_6uvloop_4loop__StreamWriteContext.new = (struct __pyx_obj_6uvloop_4loop__StreamWriteContext *(*)(struct __pyx_obj_6uvloop_4loop_UVStream *, PyObject *))__pyx_f_6uvloop_4loop_19_StreamWriteContext_new; if (PyType_Ready(&__pyx_type_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(15, 5, __pyx_L1_error) __pyx_type_6uvloop_4loop__StreamWriteContext.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__StreamWriteContext.tp_dict, __pyx_vtabptr_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(15, 5, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "_StreamWriteContext", (PyObject *)&__pyx_type_6uvloop_4loop__StreamWriteContext) < 0) __PYX_ERR(15, 5, __pyx_L1_error) __pyx_ptype_6uvloop_4loop__StreamWriteContext = &__pyx_type_6uvloop_4loop__StreamWriteContext; __pyx_vtabptr_6uvloop_4loop__TCPConnectRequest = &__pyx_vtable_6uvloop_4loop__TCPConnectRequest; __pyx_vtable_6uvloop_4loop__TCPConnectRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest; __pyx_vtable_6uvloop_4loop__TCPConnectRequest.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__TCPConnectRequest *, struct sockaddr *))__pyx_f_6uvloop_4loop_18_TCPConnectRequest_connect; __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest; if (PyType_Ready(&__pyx_type_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(4, 171, __pyx_L1_error) __pyx_type_6uvloop_4loop__TCPConnectRequest.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__TCPConnectRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(4, 171, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "_TCPConnectRequest", (PyObject *)&__pyx_type_6uvloop_4loop__TCPConnectRequest) < 0) __PYX_ERR(4, 171, __pyx_L1_error) __pyx_ptype_6uvloop_4loop__TCPConnectRequest = &__pyx_type_6uvloop_4loop__TCPConnectRequest; __pyx_vtabptr_6uvloop_4loop__PipeConnectRequest = &__pyx_vtable_6uvloop_4loop__PipeConnectRequest; __pyx_vtable_6uvloop_4loop__PipeConnectRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest; __pyx_vtable_6uvloop_4loop__PipeConnectRequest.connect = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__PipeConnectRequest *, char *))__pyx_f_6uvloop_4loop_19_PipeConnectRequest_connect; __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest; if (PyType_Ready(&__pyx_type_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(17, 176, __pyx_L1_error) __pyx_type_6uvloop_4loop__PipeConnectRequest.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__PipeConnectRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(17, 176, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "_PipeConnectRequest", (PyObject *)&__pyx_type_6uvloop_4loop__PipeConnectRequest) < 0) __PYX_ERR(17, 176, __pyx_L1_error) __pyx_ptype_6uvloop_4loop__PipeConnectRequest = &__pyx_type_6uvloop_4loop__PipeConnectRequest; __pyx_vtabptr_6uvloop_4loop_AddrInfo = &__pyx_vtable_6uvloop_4loop_AddrInfo; __pyx_vtable_6uvloop_4loop_AddrInfo.set_data = (void (*)(struct __pyx_obj_6uvloop_4loop_AddrInfo *, struct addrinfo *))__pyx_f_6uvloop_4loop_8AddrInfo_set_data; __pyx_vtable_6uvloop_4loop_AddrInfo.unpack = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_AddrInfo *))__pyx_f_6uvloop_4loop_8AddrInfo_unpack; __pyx_vtable_6uvloop_4loop_AddrInfo.isinstance = (int (*)(PyObject *))__pyx_f_6uvloop_4loop_8AddrInfo_isinstance; if (PyType_Ready(&__pyx_type_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(19, 185, __pyx_L1_error) __pyx_type_6uvloop_4loop_AddrInfo.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_AddrInfo.tp_dict, __pyx_vtabptr_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(19, 185, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "AddrInfo", (PyObject *)&__pyx_type_6uvloop_4loop_AddrInfo) < 0) __PYX_ERR(19, 185, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_AddrInfo = &__pyx_type_6uvloop_4loop_AddrInfo; __pyx_vtabptr_6uvloop_4loop_AddrInfoRequest = &__pyx_vtable_6uvloop_4loop_AddrInfoRequest; __pyx_vtable_6uvloop_4loop_AddrInfoRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest; __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest; if (PyType_Ready(&__pyx_type_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(19, 229, __pyx_L1_error) __pyx_type_6uvloop_4loop_AddrInfoRequest.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_AddrInfoRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(19, 229, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "AddrInfoRequest", (PyObject *)&__pyx_type_6uvloop_4loop_AddrInfoRequest) < 0) __PYX_ERR(19, 229, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_AddrInfoRequest = &__pyx_type_6uvloop_4loop_AddrInfoRequest; __pyx_vtabptr_6uvloop_4loop_NameInfoRequest = &__pyx_vtable_6uvloop_4loop_NameInfoRequest; __pyx_vtable_6uvloop_4loop_NameInfoRequest.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_UVRequest; __pyx_vtable_6uvloop_4loop_NameInfoRequest.query = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_NameInfoRequest *, struct sockaddr *, int))__pyx_f_6uvloop_4loop_15NameInfoRequest_query; __pyx_type_6uvloop_4loop_NameInfoRequest.tp_base = __pyx_ptype_6uvloop_4loop_UVRequest; if (PyType_Ready(&__pyx_type_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(19, 288, __pyx_L1_error) __pyx_type_6uvloop_4loop_NameInfoRequest.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_NameInfoRequest.tp_dict, __pyx_vtabptr_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(19, 288, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "NameInfoRequest", (PyObject *)&__pyx_type_6uvloop_4loop_NameInfoRequest) < 0) __PYX_ERR(19, 288, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_NameInfoRequest = &__pyx_type_6uvloop_4loop_NameInfoRequest; __pyx_vtabptr_6uvloop_4loop__UDPSendContext = &__pyx_vtable_6uvloop_4loop__UDPSendContext; __pyx_vtable_6uvloop_4loop__UDPSendContext.close = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop__UDPSendContext *))__pyx_f_6uvloop_4loop_15_UDPSendContext_close; __pyx_vtable_6uvloop_4loop__UDPSendContext.new = (struct __pyx_obj_6uvloop_4loop__UDPSendContext *(*)(struct __pyx_obj_6uvloop_4loop_UDPTransport *, PyObject *))__pyx_f_6uvloop_4loop_15_UDPSendContext_new; if (PyType_Ready(&__pyx_type_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(20, 3, __pyx_L1_error) __pyx_type_6uvloop_4loop__UDPSendContext.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop__UDPSendContext.tp_dict, __pyx_vtabptr_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(20, 3, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "_UDPSendContext", (PyObject *)&__pyx_type_6uvloop_4loop__UDPSendContext) < 0) __PYX_ERR(20, 3, __pyx_L1_error) __pyx_ptype_6uvloop_4loop__UDPSendContext = &__pyx_type_6uvloop_4loop__UDPSendContext; __pyx_vtabptr_6uvloop_4loop_BaseFuture = &__pyx_vtable_6uvloop_4loop_BaseFuture; __pyx_vtable_6uvloop_4loop_BaseFuture._schedule_callbacks = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *))__pyx_f_6uvloop_4loop_10BaseFuture__schedule_callbacks; __pyx_vtable_6uvloop_4loop_BaseFuture._add_done_callback = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *))__pyx_f_6uvloop_4loop_10BaseFuture__add_done_callback; __pyx_vtable_6uvloop_4loop_BaseFuture._done = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *))__pyx_f_6uvloop_4loop_10BaseFuture__done; __pyx_vtable_6uvloop_4loop_BaseFuture._cancel = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *))__pyx_f_6uvloop_4loop_10BaseFuture__cancel; __pyx_vtable_6uvloop_4loop_BaseFuture._result_impl = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *))__pyx_f_6uvloop_4loop_10BaseFuture__result_impl; __pyx_vtable_6uvloop_4loop_BaseFuture._str_state = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *))__pyx_f_6uvloop_4loop_10BaseFuture__str_state; __pyx_vtable_6uvloop_4loop_BaseFuture.set_result = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6uvloop_4loop_10BaseFuture_set_result; __pyx_vtable_6uvloop_4loop_BaseFuture.set_exception = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseFuture *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6uvloop_4loop_10BaseFuture_set_exception; if (PyType_Ready(&__pyx_type_6uvloop_4loop_BaseFuture) < 0) __PYX_ERR(6, 24, __pyx_L1_error) __pyx_type_6uvloop_4loop_BaseFuture.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_BaseFuture.tp_dict, __pyx_vtabptr_6uvloop_4loop_BaseFuture) < 0) __PYX_ERR(6, 24, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BaseFuture", (PyObject *)&__pyx_type_6uvloop_4loop_BaseFuture) < 0) __PYX_ERR(6, 24, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_BaseFuture = &__pyx_type_6uvloop_4loop_BaseFuture; __pyx_vtabptr_6uvloop_4loop_BaseTask = &__pyx_vtable_6uvloop_4loop_BaseTask; __pyx_vtable_6uvloop_4loop_BaseTask.__pyx_base = *__pyx_vtabptr_6uvloop_4loop_BaseFuture; __pyx_vtable_6uvloop_4loop_BaseTask._raise_wrong_loop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__raise_wrong_loop; __pyx_vtable_6uvloop_4loop_BaseTask._raise_yield = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__raise_yield; __pyx_vtable_6uvloop_4loop_BaseTask._raise_generator = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__raise_generator; __pyx_vtable_6uvloop_4loop_BaseTask._raise_else = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__raise_else; __pyx_vtable_6uvloop_4loop_BaseTask._skip_oneloop = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *))__pyx_f_6uvloop_4loop_8BaseTask__skip_oneloop; __pyx_vtable_6uvloop_4loop_BaseTask._fast_step = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__fast_step; __pyx_vtable_6uvloop_4loop_BaseTask._fast_wakeup = (PyObject *(*)(struct __pyx_obj_6uvloop_4loop_BaseTask *, PyObject *))__pyx_f_6uvloop_4loop_8BaseTask__fast_wakeup; __pyx_type_6uvloop_4loop_BaseTask.tp_base = __pyx_ptype_6uvloop_4loop_BaseFuture; if (PyType_Ready(&__pyx_type_6uvloop_4loop_BaseTask) < 0) __PYX_ERR(6, 249, __pyx_L1_error) __pyx_type_6uvloop_4loop_BaseTask.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_6uvloop_4loop_BaseTask.tp_dict, __pyx_vtabptr_6uvloop_4loop_BaseTask) < 0) __PYX_ERR(6, 249, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "BaseTask", (PyObject *)&__pyx_type_6uvloop_4loop_BaseTask) < 0) __PYX_ERR(6, 249, __pyx_L1_error) __pyx_ptype_6uvloop_4loop_BaseTask = &__pyx_type_6uvloop_4loop_BaseTask; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo) < 0) __PYX_ERR(1, 625, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct___getaddrinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct___getaddrinfo; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo) < 0) __PYX_ERR(1, 665, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_1__getnameinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct_1__getnameinfo; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect) < 0) __PYX_ERR(1, 766, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_2__sock_connect = &__pyx_type_6uvloop_4loop___pyx_scope_struct_2__sock_connect; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_3_run_until_complete) < 0) __PYX_ERR(1, 1167, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_3_run_until_complete.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_3_run_until_complete = &__pyx_type_6uvloop_4loop___pyx_scope_struct_3_run_until_complete; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_4_getnameinfo) < 0) __PYX_ERR(1, 1217, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_4_getnameinfo.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_4_getnameinfo = &__pyx_type_6uvloop_4loop___pyx_scope_struct_4_getnameinfo; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_5_create_server) < 0) __PYX_ERR(1, 1271, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_5_create_server.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_5_create_server = &__pyx_type_6uvloop_4loop___pyx_scope_struct_5_create_server; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_6_create_connection) < 0) __PYX_ERR(1, 1399, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_6_create_connection.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_6_create_connection = &__pyx_type_6uvloop_4loop___pyx_scope_struct_6_create_connection; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(1, 1567, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_7_genexpr.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_7_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_7_genexpr; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(1, 1572, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_8_genexpr.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_8_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_8_genexpr; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_unix_server) < 0) __PYX_ERR(1, 1627, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_unix_server.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_9_create_unix_server = &__pyx_type_6uvloop_4loop___pyx_scope_struct_9_create_unix_server; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection) < 0) __PYX_ERR(1, 1712, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection = &__pyx_type_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_11_sock_sendall) < 0) __PYX_ERR(1, 1949, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_11_sock_sendall.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_11_sock_sendall = &__pyx_type_6uvloop_4loop___pyx_scope_struct_11_sock_sendall; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_12_sock_connect) < 0) __PYX_ERR(1, 2028, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_12_sock_connect.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_12_sock_connect = &__pyx_type_6uvloop_4loop___pyx_scope_struct_12_sock_connect; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket) < 0) __PYX_ERR(1, 2046, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket = &__pyx_type_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_14___subprocess_run) < 0) __PYX_ERR(1, 2119, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_14___subprocess_run.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_14___subprocess_run = &__pyx_type_6uvloop_4loop___pyx_scope_struct_14___subprocess_run; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe) < 0) __PYX_ERR(1, 2205, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe = &__pyx_type_6uvloop_4loop___pyx_scope_struct_15_connect_read_pipe; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe) < 0) __PYX_ERR(1, 2231, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe = &__pyx_type_6uvloop_4loop___pyx_scope_struct_16_connect_write_pipe; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint) < 0) __PYX_ERR(1, 2330, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint = &__pyx_type_6uvloop_4loop___pyx_scope_struct_17_create_datagram_endpoint; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(1, 2381, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_18_genexpr.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_18_genexpr = &__pyx_type_6uvloop_4loop___pyx_scope_struct_18_genexpr; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens) < 0) __PYX_ERR(1, 2511, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens = &__pyx_type_6uvloop_4loop___pyx_scope_struct_19_shutdown_asyncgens; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_20_wait_closed) < 0) __PYX_ERR(21, 35, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_20_wait_closed.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_20_wait_closed = &__pyx_type_6uvloop_4loop___pyx_scope_struct_20_wait_closed; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_21___iter__) < 0) __PYX_ERR(6, 227, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_21___iter__.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_21___iter__ = &__pyx_type_6uvloop_4loop___pyx_scope_struct_21___iter__; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_22___await__) < 0) __PYX_ERR(6, 238, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_22___await__.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_22___await__ = &__pyx_type_6uvloop_4loop___pyx_scope_struct_22___await__; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future) < 0) __PYX_ERR(22, 41, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future = &__pyx_type_6uvloop_4loop___pyx_scope_struct_23___pyx_f_6uvloop_4loop__chain_future; if (PyType_Ready(&__pyx_type_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1) < 0) __PYX_ERR(1, 2643, __pyx_L1_error) __pyx_type_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1.tp_print = 0; __pyx_ptype_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1 = &__pyx_type_6uvloop_4loop___pyx_scope_struct_24__test_coroutine_1; /*--- Type import code ---*/ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", #if CYTHON_COMPILING_IN_PYPY sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(23, 9, __pyx_L1_error) __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(24, 8, __pyx_L1_error) __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(25, 15, __pyx_L1_error) /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) #endif /* "uvloop/loop.pyx":3 * # cython: language_level=3, embedsignature=True * * import asyncio # <<<<<<<<<<<<<< * cimport cython * */ __pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/loop.pyx":32 * from cpython cimport PyErr_CheckSignals * * from . import _noop # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_noop); __Pyx_GIVEREF(__pyx_n_s_noop); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_noop); __pyx_t_2 = __Pyx_Import(__pyx_n_s__30, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_noop); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_noop, __pyx_t_1) < 0) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":1 * import asyncio, asyncio.log, asyncio.base_events, \ # <<<<<<<<<<<<<< * asyncio.sslproto, asyncio.coroutines, \ * asyncio.futures */ __pyx_t_2 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_log, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_base_events, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":2 * import asyncio, asyncio.log, asyncio.base_events, \ * asyncio.sslproto, asyncio.coroutines, \ # <<<<<<<<<<<<<< * asyncio.futures * import collections */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_sslproto, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_coroutines, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 2, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":3 * import asyncio, asyncio.log, asyncio.base_events, \ * asyncio.sslproto, asyncio.coroutines, \ * asyncio.futures # <<<<<<<<<<<<<< * import collections * import concurrent.futures */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_asyncio_futures, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_2) < 0) __PYX_ERR(26, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":4 * asyncio.sslproto, asyncio.coroutines, \ * asyncio.futures * import collections # <<<<<<<<<<<<<< * import concurrent.futures * import errno */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(26, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":5 * asyncio.futures * import collections * import concurrent.futures # <<<<<<<<<<<<<< * import errno * import functools */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_concurrent_futures, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_concurrent, __pyx_t_2) < 0) __PYX_ERR(26, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":6 * import collections * import concurrent.futures * import errno # <<<<<<<<<<<<<< * import functools * import gc */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_errno, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_errno, __pyx_t_2) < 0) __PYX_ERR(26, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":7 * import concurrent.futures * import errno * import functools # <<<<<<<<<<<<<< * import gc * import inspect */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_functools, __pyx_t_2) < 0) __PYX_ERR(26, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":8 * import errno * import functools * import gc # <<<<<<<<<<<<<< * import inspect * import itertools */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_gc, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_gc, __pyx_t_2) < 0) __PYX_ERR(26, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":9 * import functools * import gc * import inspect # <<<<<<<<<<<<<< * import itertools * import os */ __pyx_t_2 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_2) < 0) __PYX_ERR(26, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":10 * import gc * import inspect * import itertools # <<<<<<<<<<<<<< * import os * import signal as std_signal */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_2) < 0) __PYX_ERR(26, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":11 * import inspect * import itertools * import os # <<<<<<<<<<<<<< * import signal as std_signal * import socket */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(26, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":12 * import itertools * import os * import signal as std_signal # <<<<<<<<<<<<<< * import socket * import subprocess */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_signal, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_std_signal, __pyx_t_2) < 0) __PYX_ERR(26, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":13 * import os * import signal as std_signal * import socket # <<<<<<<<<<<<<< * import subprocess * import ssl */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_socket, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_2) < 0) __PYX_ERR(26, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":14 * import signal as std_signal * import socket * import subprocess # <<<<<<<<<<<<<< * import ssl * import sys */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_subprocess, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_2) < 0) __PYX_ERR(26, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":15 * import socket * import subprocess * import ssl # <<<<<<<<<<<<<< * import sys * import threading */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_ssl, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ssl, __pyx_t_2) < 0) __PYX_ERR(26, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":16 * import subprocess * import ssl * import sys # <<<<<<<<<<<<<< * import threading * import traceback */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(26, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":17 * import ssl * import sys * import threading # <<<<<<<<<<<<<< * import traceback * import time */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_2) < 0) __PYX_ERR(26, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":18 * import sys * import threading * import traceback # <<<<<<<<<<<<<< * import time * import warnings */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_traceback_2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback_2, __pyx_t_2) < 0) __PYX_ERR(26, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":19 * import threading * import traceback * import time # <<<<<<<<<<<<<< * import warnings * import weakref */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(26, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":20 * import traceback * import time * import warnings # <<<<<<<<<<<<<< * import weakref * */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) __PYX_ERR(26, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":21 * import time * import warnings * import weakref # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) __PYX_ERR(26, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":24 * * * cdef aio_get_event_loop = asyncio.get_event_loop # <<<<<<<<<<<<<< * cdef aio_CancelledError = asyncio.CancelledError * cdef aio_InvalidStateError = asyncio.InvalidStateError */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_get_event_loop); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_get_event_loop, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":25 * * cdef aio_get_event_loop = asyncio.get_event_loop * cdef aio_CancelledError = asyncio.CancelledError # <<<<<<<<<<<<<< * cdef aio_InvalidStateError = asyncio.InvalidStateError * cdef aio_TimeoutError = asyncio.TimeoutError */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CancelledError); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_CancelledError); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_CancelledError, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":26 * cdef aio_get_event_loop = asyncio.get_event_loop * cdef aio_CancelledError = asyncio.CancelledError * cdef aio_InvalidStateError = asyncio.InvalidStateError # <<<<<<<<<<<<<< * cdef aio_TimeoutError = asyncio.TimeoutError * cdef aio_Future = asyncio.Future */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidStateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_InvalidStateError); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_InvalidStateError, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":27 * cdef aio_CancelledError = asyncio.CancelledError * cdef aio_InvalidStateError = asyncio.InvalidStateError * cdef aio_TimeoutError = asyncio.TimeoutError # <<<<<<<<<<<<<< * cdef aio_Future = asyncio.Future * cdef aio_Task = asyncio.Task */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TimeoutError); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_TimeoutError); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_TimeoutError, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":28 * cdef aio_InvalidStateError = asyncio.InvalidStateError * cdef aio_TimeoutError = asyncio.TimeoutError * cdef aio_Future = asyncio.Future # <<<<<<<<<<<<<< * cdef aio_Task = asyncio.Task * cdef aio_ensure_future = asyncio.ensure_future */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Future); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Future, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":29 * cdef aio_TimeoutError = asyncio.TimeoutError * cdef aio_Future = asyncio.Future * cdef aio_Task = asyncio.Task # <<<<<<<<<<<<<< * cdef aio_ensure_future = asyncio.ensure_future * cdef aio_gather = asyncio.gather */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Task); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Task); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Task, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":30 * cdef aio_Future = asyncio.Future * cdef aio_Task = asyncio.Task * cdef aio_ensure_future = asyncio.ensure_future # <<<<<<<<<<<<<< * cdef aio_gather = asyncio.gather * cdef aio_wait = asyncio.wait */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ensure_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_ensure_future); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_ensure_future, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":31 * cdef aio_Task = asyncio.Task * cdef aio_ensure_future = asyncio.ensure_future * cdef aio_gather = asyncio.gather # <<<<<<<<<<<<<< * cdef aio_wait = asyncio.wait * cdef aio_logger = asyncio.log.logger */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_gather); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_gather); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_gather, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":32 * cdef aio_ensure_future = asyncio.ensure_future * cdef aio_gather = asyncio.gather * cdef aio_wait = asyncio.wait # <<<<<<<<<<<<<< * cdef aio_logger = asyncio.log.logger * cdef aio_iscoroutine = asyncio.iscoroutine */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_wait); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_wait, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":33 * cdef aio_gather = asyncio.gather * cdef aio_wait = asyncio.wait * cdef aio_logger = asyncio.log.logger # <<<<<<<<<<<<<< * cdef aio_iscoroutine = asyncio.iscoroutine * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_logger); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_logger, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":34 * cdef aio_wait = asyncio.wait * cdef aio_logger = asyncio.log.logger * cdef aio_iscoroutine = asyncio.iscoroutine # <<<<<<<<<<<<<< * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction * cdef aio_BaseProtocol = asyncio.BaseProtocol */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iscoroutine); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_iscoroutine); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_iscoroutine, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":35 * cdef aio_logger = asyncio.log.logger * cdef aio_iscoroutine = asyncio.iscoroutine * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction # <<<<<<<<<<<<<< * cdef aio_BaseProtocol = asyncio.BaseProtocol * cdef aio_Protocol = asyncio.Protocol */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iscoroutinefunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_iscoroutinefunction, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":36 * cdef aio_iscoroutine = asyncio.iscoroutine * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction * cdef aio_BaseProtocol = asyncio.BaseProtocol # <<<<<<<<<<<<<< * cdef aio_Protocol = asyncio.Protocol * cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BaseProtocol); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_BaseProtocol, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":37 * cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction * cdef aio_BaseProtocol = asyncio.BaseProtocol * cdef aio_Protocol = asyncio.Protocol # <<<<<<<<<<<<<< * cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol * cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_Protocol); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_Protocol, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":38 * cdef aio_BaseProtocol = asyncio.BaseProtocol * cdef aio_Protocol = asyncio.Protocol * cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol # <<<<<<<<<<<<<< * cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sslproto); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SSLProtocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_SSLProtocol); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_SSLProtocol, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":39 * cdef aio_Protocol = asyncio.Protocol * cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol * cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper # <<<<<<<<<<<<<< * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_coroutines); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_debug_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_debug_wrapper); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_debug_wrapper, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":40 * cdef aio_SSLProtocol = asyncio.sslproto.SSLProtocol * cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) # <<<<<<<<<<<<<< * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_isfuture, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_isfuture); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_isfuture, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":41 * cdef aio_debug_wrapper = asyncio.coroutines.debug_wrapper * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) # <<<<<<<<<<<<<< * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_get_running_loop, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_get_running_loop); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_get_running_loop, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":42 * cdef aio_isfuture = getattr(asyncio, 'isfuture', None) * cdef aio_get_running_loop = getattr(asyncio, '_get_running_loop', None) * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) # <<<<<<<<<<<<<< * * cdef col_deque = collections.deque */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_asyncio); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_set_running_loop, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_aio_set_running_loop); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_aio_set_running_loop, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":44 * cdef aio_set_running_loop = getattr(asyncio, '_set_running_loop', None) * * cdef col_deque = collections.deque # <<<<<<<<<<<<<< * cdef col_Iterable = collections.Iterable * cdef col_Counter = collections.Counter */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_deque); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_deque, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":45 * * cdef col_deque = collections.deque * cdef col_Iterable = collections.Iterable # <<<<<<<<<<<<<< * cdef col_Counter = collections.Counter * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_Iterable); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_Iterable, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":46 * cdef col_deque = collections.deque * cdef col_Iterable = collections.Iterable * cdef col_Counter = collections.Counter # <<<<<<<<<<<<<< * * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_col_Counter); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_col_Counter, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":48 * cdef col_Counter = collections.Counter * * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor # <<<<<<<<<<<<<< * cdef cc_Future = concurrent.futures.Future * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_cc_ThreadPoolExecutor, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":49 * * cdef cc_ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor * cdef cc_Future = concurrent.futures.Future # <<<<<<<<<<<<<< * * cdef errno_EINVAL = errno.EINVAL */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_concurrent); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_cc_Future); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_cc_Future, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":51 * cdef cc_Future = concurrent.futures.Future * * cdef errno_EINVAL = errno.EINVAL # <<<<<<<<<<<<<< * * cdef ft_partial = functools.partial */ __pyx_t_1 = __Pyx_PyInt_From_int(EINVAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_errno_EINVAL); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_errno_EINVAL, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":53 * cdef errno_EINVAL = errno.EINVAL * * cdef ft_partial = functools.partial # <<<<<<<<<<<<<< * * cdef gc_disable = gc.disable */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_functools); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ft_partial); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ft_partial, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":55 * cdef ft_partial = functools.partial * * cdef gc_disable = gc.disable # <<<<<<<<<<<<<< * * cdef iter_chain = itertools.chain */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_disable); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_gc_disable); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_gc_disable, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":57 * cdef gc_disable = gc.disable * * cdef iter_chain = itertools.chain # <<<<<<<<<<<<<< * cdef inspect_isgenerator = inspect.isgenerator * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_iter_chain); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_iter_chain, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":58 * * cdef iter_chain = itertools.chain * cdef inspect_isgenerator = inspect.isgenerator # <<<<<<<<<<<<<< * * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT') */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isgenerator); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_inspect_isgenerator); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_inspect_isgenerator, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":60 * cdef inspect_isgenerator = inspect.isgenerator * * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT') # <<<<<<<<<<<<<< * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0) * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_HasAttr(__pyx_t_1, __pyx_n_u_SO_REUSEPORT); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(26, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_has_SO_REUSEPORT = __pyx_t_3; /* "uvloop/includes/stdlib.pxi":61 * * cdef int has_SO_REUSEPORT = hasattr(socket, 'SO_REUSEPORT') * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0) # <<<<<<<<<<<<<< * * cdef socket_gaierror = socket.gaierror */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_SO_REUSEPORT, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_SO_REUSEPORT = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":63 * cdef int SO_REUSEPORT = getattr(socket, 'SO_REUSEPORT', 0) * * cdef socket_gaierror = socket.gaierror # <<<<<<<<<<<<<< * cdef socket_error = socket.error * cdef socket_timeout = socket.timeout */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_gaierror); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_gaierror); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_gaierror, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":64 * * cdef socket_gaierror = socket.gaierror * cdef socket_error = socket.error # <<<<<<<<<<<<<< * cdef socket_timeout = socket.timeout * cdef socket_socket = socket.socket */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_error); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_error, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":65 * cdef socket_gaierror = socket.gaierror * cdef socket_error = socket.error * cdef socket_timeout = socket.timeout # <<<<<<<<<<<<<< * cdef socket_socket = socket.socket * cdef socket_socketpair = socket.socketpair */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_timeout); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_timeout, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":66 * cdef socket_error = socket.error * cdef socket_timeout = socket.timeout * cdef socket_socket = socket.socket # <<<<<<<<<<<<<< * cdef socket_socketpair = socket.socketpair * cdef socket_getservbyname = socket.getservbyname */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_socket); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_socket, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":67 * cdef socket_timeout = socket.timeout * cdef socket_socket = socket.socket * cdef socket_socketpair = socket.socketpair # <<<<<<<<<<<<<< * cdef socket_getservbyname = socket.getservbyname * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_socketpair); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_socketpair); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_socketpair, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":68 * cdef socket_socket = socket.socket * cdef socket_socketpair = socket.socketpair * cdef socket_getservbyname = socket.getservbyname # <<<<<<<<<<<<<< * * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getservbyname); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_socket_getservbyname); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_socket_getservbyname, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":70 * cdef socket_getservbyname = socket.getservbyname * * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_ADDRFAMILY, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_ADDRFAMILY = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":71 * * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_AGAIN, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_AGAIN = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":72 * cdef int socket_EAI_ADDRFAMILY = getattr(socket, 'EAI_ADDRFAMILY', -1) * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_BADFLAGS, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_BADFLAGS = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":73 * cdef int socket_EAI_AGAIN = getattr(socket, 'EAI_AGAIN', -1) * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_BADHINTS, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_BADHINTS = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":74 * cdef int socket_EAI_BADFLAGS = getattr(socket, 'EAI_BADFLAGS', -1) * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_CANCELED, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_CANCELED = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":75 * cdef int socket_EAI_BADHINTS = getattr(socket, 'EAI_BADHINTS', -1) * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_FAIL, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_FAIL = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":76 * cdef int socket_EAI_CANCELED = getattr(socket, 'EAI_CANCELED', -1) * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_FAMILY, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_FAMILY = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":77 * cdef int socket_EAI_FAIL = getattr(socket, 'EAI_FAIL', -1) * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_MEMORY, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_MEMORY = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":78 * cdef int socket_EAI_FAMILY = getattr(socket, 'EAI_FAMILY', -1) * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_NODATA, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_NODATA = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":79 * cdef int socket_EAI_MEMORY = getattr(socket, 'EAI_MEMORY', -1) * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_NONAME, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_NONAME = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":80 * cdef int socket_EAI_NODATA = getattr(socket, 'EAI_NODATA', -1) * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_OVERFLOW, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_OVERFLOW = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":81 * cdef int socket_EAI_NONAME = getattr(socket, 'EAI_NONAME', -1) * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1) */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_PROTOCOL, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_PROTOCOL = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":82 * cdef int socket_EAI_OVERFLOW = getattr(socket, 'EAI_OVERFLOW', -1) * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) # <<<<<<<<<<<<<< * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1) * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_GetAttr3(__pyx_t_2, __pyx_n_u_EAI_SERVICE, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_6uvloop_4loop_socket_EAI_SERVICE = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":83 * cdef int socket_EAI_PROTOCOL = getattr(socket, 'EAI_PROTOCOL', -1) * cdef int socket_EAI_SERVICE = getattr(socket, 'EAI_SERVICE', -1) * cdef int socket_EAI_SOCKTYPE = getattr(socket, 'EAI_SOCKTYPE', -1) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_EAI_SOCKTYPE, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_socket_EAI_SOCKTYPE = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":86 * * * cdef str os_name = os.name # <<<<<<<<<<<<<< * cdef os_environ = os.environ * cdef os_dup = os.dup */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(26, 86, __pyx_L1_error) __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_name); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_name, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":87 * * cdef str os_name = os.name * cdef os_environ = os.environ # <<<<<<<<<<<<<< * cdef os_dup = os.dup * cdef os_set_inheritable = os.set_inheritable */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_environ); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_environ); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_environ, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":88 * cdef str os_name = os.name * cdef os_environ = os.environ * cdef os_dup = os.dup # <<<<<<<<<<<<<< * cdef os_set_inheritable = os.set_inheritable * cdef os_get_inheritable = os.get_inheritable */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dup); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_dup); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_dup, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":89 * cdef os_environ = os.environ * cdef os_dup = os.dup * cdef os_set_inheritable = os.set_inheritable # <<<<<<<<<<<<<< * cdef os_get_inheritable = os.get_inheritable * cdef os_close = os.close */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_inheritable); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_set_inheritable); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_set_inheritable, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":90 * cdef os_dup = os.dup * cdef os_set_inheritable = os.set_inheritable * cdef os_get_inheritable = os.get_inheritable # <<<<<<<<<<<<<< * cdef os_close = os.close * cdef os_open = os.open */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_inheritable); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_get_inheritable); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_get_inheritable, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":91 * cdef os_set_inheritable = os.set_inheritable * cdef os_get_inheritable = os.get_inheritable * cdef os_close = os.close # <<<<<<<<<<<<<< * cdef os_open = os.open * cdef os_devnull = os.devnull */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_close); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_close, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":92 * cdef os_get_inheritable = os.get_inheritable * cdef os_close = os.close * cdef os_open = os.open # <<<<<<<<<<<<<< * cdef os_devnull = os.devnull * cdef os_O_RDWR = os.O_RDWR */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_open); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_open, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":93 * cdef os_close = os.close * cdef os_open = os.open * cdef os_devnull = os.devnull # <<<<<<<<<<<<<< * cdef os_O_RDWR = os.O_RDWR * cdef os_pipe = os.pipe */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_devnull); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_devnull); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_devnull, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":94 * cdef os_open = os.open * cdef os_devnull = os.devnull * cdef os_O_RDWR = os.O_RDWR # <<<<<<<<<<<<<< * cdef os_pipe = os.pipe * cdef os_read = os.read */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_O_RDWR); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_O_RDWR); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_O_RDWR, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":95 * cdef os_devnull = os.devnull * cdef os_O_RDWR = os.O_RDWR * cdef os_pipe = os.pipe # <<<<<<<<<<<<<< * cdef os_read = os.read * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pipe); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_pipe); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_pipe, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":96 * cdef os_O_RDWR = os.O_RDWR * cdef os_pipe = os.pipe * cdef os_read = os.read # <<<<<<<<<<<<<< * * cdef sys_ignore_environment = sys.flags.ignore_environment */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_os_read); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_os_read, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":98 * cdef os_read = os.read * * cdef sys_ignore_environment = sys.flags.ignore_environment # <<<<<<<<<<<<<< * cdef sys_exc_info = sys.exc_info * cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ignore_environment); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_ignore_environment); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_ignore_environment, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":99 * * cdef sys_ignore_environment = sys.flags.ignore_environment * cdef sys_exc_info = sys.exc_info # <<<<<<<<<<<<<< * cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper * cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_exc_info); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_exc_info, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":100 * cdef sys_ignore_environment = sys.flags.ignore_environment * cdef sys_exc_info = sys.exc_info * cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper # <<<<<<<<<<<<<< * cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper * cdef sys_getframe = sys._getframe */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set_coroutine_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_set_coroutine_wrapper, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":101 * cdef sys_exc_info = sys.exc_info * cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper * cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper # <<<<<<<<<<<<<< * cdef sys_getframe = sys._getframe * */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get_coroutine_wrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_get_coroutine_wrapper, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":102 * cdef sys_set_coroutine_wrapper = sys.set_coroutine_wrapper * cdef sys_get_coroutine_wrapper = sys.get_coroutine_wrapper * cdef sys_getframe = sys._getframe # <<<<<<<<<<<<<< * * cdef ssl_SSLContext = ssl.SSLContext */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_sys_getframe); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_sys_getframe, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "uvloop/includes/stdlib.pxi":104 * cdef sys_getframe = sys._getframe * * cdef ssl_SSLContext = ssl.SSLContext # <<<<<<<<<<<<<< * * cdef long MAIN_THREAD_ID = threading.main_thread().ident */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ssl); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SSLContext); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_ssl_SSLContext); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_ssl_SSLContext, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":106 * cdef ssl_SSLContext = ssl.SSLContext * * cdef long MAIN_THREAD_ID = threading.main_thread().ident # <<<<<<<<<<<<<< * * cdef int subprocess_PIPE = subprocess.PIPE */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_main_thread); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 106, __pyx_L1_error) } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ident); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_6uvloop_4loop_MAIN_THREAD_ID = ((long)__pyx_t_6); /* "uvloop/includes/stdlib.pxi":108 * cdef long MAIN_THREAD_ID = threading.main_thread().ident * * cdef int subprocess_PIPE = subprocess.PIPE # <<<<<<<<<<<<<< * cdef int subprocess_STDOUT = subprocess.STDOUT * cdef int subprocess_DEVNULL = subprocess.DEVNULL */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_subprocess_PIPE = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":109 * * cdef int subprocess_PIPE = subprocess.PIPE * cdef int subprocess_STDOUT = subprocess.STDOUT # <<<<<<<<<<<<<< * cdef int subprocess_DEVNULL = subprocess.DEVNULL * cdef subprocess_SubprocessError = subprocess.SubprocessError */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_subprocess); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_STDOUT); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_6uvloop_4loop_subprocess_STDOUT = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":110 * cdef int subprocess_PIPE = subprocess.PIPE * cdef int subprocess_STDOUT = subprocess.STDOUT * cdef int subprocess_DEVNULL = subprocess.DEVNULL # <<<<<<<<<<<<<< * cdef subprocess_SubprocessError = subprocess.SubprocessError * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DEVNULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_subprocess_DEVNULL = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":111 * cdef int subprocess_STDOUT = subprocess.STDOUT * cdef int subprocess_DEVNULL = subprocess.DEVNULL * cdef subprocess_SubprocessError = subprocess.SubprocessError # <<<<<<<<<<<<<< * * cdef int signal_NSIG = std_signal.NSIG */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_subprocess); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SubprocessError); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_subprocess_SubprocessError); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_subprocess_SubprocessError, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":113 * cdef subprocess_SubprocessError = subprocess.SubprocessError * * cdef int signal_NSIG = std_signal.NSIG # <<<<<<<<<<<<<< * cdef signal_signal = std_signal.signal * cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_std_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NSIG); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_6uvloop_4loop_signal_NSIG = __pyx_t_4; /* "uvloop/includes/stdlib.pxi":114 * * cdef int signal_NSIG = std_signal.NSIG * cdef signal_signal = std_signal.signal # <<<<<<<<<<<<<< * cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd * cdef signal_default_int_handler = std_signal.default_int_handler */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_std_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_signal); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_signal, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":115 * cdef int signal_NSIG = std_signal.NSIG * cdef signal_signal = std_signal.signal * cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd # <<<<<<<<<<<<<< * cdef signal_default_int_handler = std_signal.default_int_handler * cdef signal_SIG_DFL = std_signal.SIG_DFL */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_std_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_set_wakeup_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_set_wakeup_fd, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":116 * cdef signal_signal = std_signal.signal * cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd * cdef signal_default_int_handler = std_signal.default_int_handler # <<<<<<<<<<<<<< * cdef signal_SIG_DFL = std_signal.SIG_DFL * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_std_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_default_int_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_default_int_handler); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_default_int_handler, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":117 * cdef signal_set_wakeup_fd = std_signal.set_wakeup_fd * cdef signal_default_int_handler = std_signal.default_int_handler * cdef signal_SIG_DFL = std_signal.SIG_DFL # <<<<<<<<<<<<<< * * cdef time_sleep = time.sleep */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_std_signal); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_SIG_DFL); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_signal_SIG_DFL); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_signal_SIG_DFL, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":119 * cdef signal_SIG_DFL = std_signal.SIG_DFL * * cdef time_sleep = time.sleep # <<<<<<<<<<<<<< * cdef time_monotonic = time.monotonic * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_time_sleep); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_time_sleep, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":120 * * cdef time_sleep = time.sleep * cdef time_monotonic = time.monotonic # <<<<<<<<<<<<<< * * cdef tb_extract_stack = traceback.extract_stack */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_monotonic); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_time_monotonic); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_time_monotonic, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":122 * cdef time_monotonic = time.monotonic * * cdef tb_extract_stack = traceback.extract_stack # <<<<<<<<<<<<<< * cdef tb_format_list = traceback.format_list * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extract_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_tb_extract_stack); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_tb_extract_stack, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":123 * * cdef tb_extract_stack = traceback.extract_stack * cdef tb_format_list = traceback.format_list # <<<<<<<<<<<<<< * * cdef warnings_warn = warnings.warn */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_format_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_tb_format_list); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_tb_format_list, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":125 * cdef tb_format_list = traceback.format_list * * cdef warnings_warn = warnings.warn # <<<<<<<<<<<<<< * * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_warnings_warn); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_warnings_warn, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":127 * cdef warnings_warn = warnings.warn * * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary # <<<<<<<<<<<<<< * cdef weakref_WeakSet = weakref.WeakSet * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_WeakValueDictionary); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_weakref_WeakValueDictionary, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/includes/stdlib.pxi":128 * * cdef weakref_WeakValueDictionary = weakref.WeakValueDictionary * cdef weakref_WeakSet = weakref.WeakSet # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WeakSet); if (unlikely(!__pyx_t_5)) __PYX_ERR(26, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_weakref_WeakSet); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_weakref_WeakSet, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/includes/stdlib.pxi":133 * # Cython doesn't clean-up imported objects properly in Py3 mode, * # so we delete refs to all modules manually (except sys) * del asyncio, concurrent, collections, errno # <<<<<<<<<<<<<< * del functools, inspect, itertools, socket, os, threading * del std_signal, subprocess, ssl */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_asyncio) < 0) __PYX_ERR(26, 133, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_concurrent) < 0) __PYX_ERR(26, 133, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_collections) < 0) __PYX_ERR(26, 133, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_errno) < 0) __PYX_ERR(26, 133, __pyx_L1_error) /* "uvloop/includes/stdlib.pxi":134 * # so we delete refs to all modules manually (except sys) * del asyncio, concurrent, collections, errno * del functools, inspect, itertools, socket, os, threading # <<<<<<<<<<<<<< * del std_signal, subprocess, ssl * del time, traceback, warnings, weakref */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_functools) < 0) __PYX_ERR(26, 134, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_inspect) < 0) __PYX_ERR(26, 134, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_itertools) < 0) __PYX_ERR(26, 134, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_socket) < 0) __PYX_ERR(26, 134, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_os) < 0) __PYX_ERR(26, 134, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_threading) < 0) __PYX_ERR(26, 134, __pyx_L1_error) /* "uvloop/includes/stdlib.pxi":135 * del asyncio, concurrent, collections, errno * del functools, inspect, itertools, socket, os, threading * del std_signal, subprocess, ssl # <<<<<<<<<<<<<< * del time, traceback, warnings, weakref */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_std_signal) < 0) __PYX_ERR(26, 135, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_subprocess) < 0) __PYX_ERR(26, 135, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_ssl) < 0) __PYX_ERR(26, 135, __pyx_L1_error) /* "uvloop/includes/stdlib.pxi":136 * del functools, inspect, itertools, socket, os, threading * del std_signal, subprocess, ssl * del time, traceback, warnings, weakref # <<<<<<<<<<<<<< */ if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_time) < 0) __PYX_ERR(26, 136, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_traceback_2) < 0) __PYX_ERR(26, 136, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_warnings) < 0) __PYX_ERR(26, 136, __pyx_L1_error) if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_weakref) < 0) __PYX_ERR(26, 136, __pyx_L1_error) /* "uvloop/loop.pyx":1273 * async def create_server(self, protocol_factory, host=None, port=None, * *, * int family=uv.AF_UNSPEC, # <<<<<<<<<<<<<< * int flags=uv.AI_PASSIVE, * sock=None, */ __pyx_k__49 = AF_UNSPEC; /* "uvloop/loop.pyx":1274 * *, * int family=uv.AF_UNSPEC, * int flags=uv.AI_PASSIVE, # <<<<<<<<<<<<<< * sock=None, * backlog=100, */ __pyx_k__50 = AI_PASSIVE; /* "uvloop/loop.pyx":2120 * * async def __subprocess_run(self, protocol_factory, args, * stdin=subprocess_PIPE, # <<<<<<<<<<<<<< * stdout=subprocess_PIPE, * stderr=subprocess_PIPE, */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_k__86 = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2121 * async def __subprocess_run(self, protocol_factory, args, * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, # <<<<<<<<<<<<<< * stderr=subprocess_PIPE, * universal_newlines=False, */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_k__87 = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/loop.pyx":2122 * stdin=subprocess_PIPE, * stdout=subprocess_PIPE, * stderr=subprocess_PIPE, # <<<<<<<<<<<<<< * universal_newlines=False, * shell=True, */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_6uvloop_4loop_subprocess_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 2122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_k__88 = __pyx_t_5; __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":634 * * * class WriteSubprocessPipeProto(aio_BaseProtocol): # <<<<<<<<<<<<<< * * def __init__(self, proc, fd): */ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_BaseProtocol); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6uvloop_4loop_aio_BaseProtocol); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_n_s_WriteSubprocessPipeProto, __pyx_n_s_WriteSubprocessPipeProto, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "uvloop/handles/process.pyx":636 * class WriteSubprocessPipeProto(aio_BaseProtocol): * * def __init__(self, proc, fd): # <<<<<<<<<<<<<< * if UVLOOP_DEBUG: * if type(proc) is not UVProcessTransport: */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_1__init__, 0, __pyx_n_s_WriteSubprocessPipeProto___init, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(5, 636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":647 * self.disconnected = False * * def connection_made(self, transport): # <<<<<<<<<<<<<< * self.pipe = transport * */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_3connection_made, 0, __pyx_n_s_WriteSubprocessPipeProto_connect, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_connection_made, __pyx_t_7) < 0) __PYX_ERR(5, 647, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":650 * self.pipe = transport * * def __repr__(self): # <<<<<<<<<<<<<< * return ('<%s fd=%s pipe=%r>' * % (self.__class__.__name__, self.fd, self.pipe)) */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_5__repr__, 0, __pyx_n_s_WriteSubprocessPipeProto___repr, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(5, 650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":654 * % (self.__class__.__name__, self.fd, self.pipe)) * * def connection_lost(self, exc): # <<<<<<<<<<<<<< * self.disconnected = True * (self.proc)._pipe_connection_lost(self.fd, exc) */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_7connection_lost, 0, __pyx_n_s_WriteSubprocessPipeProto_connect_2, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_connection_lost, __pyx_t_7) < 0) __PYX_ERR(5, 654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":659 * self.proc = None * * def pause_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.pause_writing() * */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_9pause_writing, 0, __pyx_n_s_WriteSubprocessPipeProto_pause_w, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_pause_writing, __pyx_t_7) < 0) __PYX_ERR(5, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":662 * (self.proc)._protocol.pause_writing() * * def resume_writing(self): # <<<<<<<<<<<<<< * (self.proc)._protocol.resume_writing() * */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_24WriteSubprocessPipeProto_11resume_writing, 0, __pyx_n_s_WriteSubprocessPipeProto_resume, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_resume_writing, __pyx_t_7) < 0) __PYX_ERR(5, 662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":634 * * * class WriteSubprocessPipeProto(aio_BaseProtocol): # <<<<<<<<<<<<<< * * def __init__(self, proc, fd): */ __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_WriteSubprocessPipeProto, __pyx_t_5, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WriteSubprocessPipeProto, __pyx_t_7) < 0) __PYX_ERR(5, 634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":666 * * * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<< * aio_Protocol): * */ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_WriteSubprocessPipeProto); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "uvloop/handles/process.pyx":667 * * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, * aio_Protocol): # <<<<<<<<<<<<<< * * def data_received(self, data): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Protocol); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Protocol); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_6uvloop_4loop_aio_Protocol); __pyx_t_5 = 0; /* "uvloop/handles/process.pyx":666 * * * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<< * aio_Protocol): * */ __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_ReadSubprocessPipeProto, __pyx_n_s_ReadSubprocessPipeProto, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "uvloop/handles/process.pyx":669 * aio_Protocol): * * def data_received(self, data): # <<<<<<<<<<<<<< * (self.proc)._pipe_data_received(self.fd, data) * */ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6uvloop_4loop_23ReadSubprocessPipeProto_1data_received, 0, __pyx_n_s_ReadSubprocessPipeProto_data_rec, NULL, __pyx_n_s_uvloop_loop, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_data_received, __pyx_t_7) < 0) __PYX_ERR(5, 669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "uvloop/handles/process.pyx":666 * * * class ReadSubprocessPipeProto(WriteSubprocessPipeProto, # <<<<<<<<<<<<<< * aio_Protocol): * */ __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_ReadSubprocessPipeProto, __pyx_t_2, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReadSubprocessPipeProto, __pyx_t_7) < 0) __PYX_ERR(5, 666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":452 * * * cdef uvloop_Future = None # <<<<<<<<<<<<<< * * cdef future_factory */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_uvloop_Future); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_uvloop_Future, Py_None); __Pyx_GIVEREF(Py_None); /* "uvloop/future.pyx":458 * * * if sys.version_info >= (3, 6): # <<<<<<<<<<<<<< * # In Python 3.6 Task and Future are implemented in C and * # are already fast. */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__211, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(6, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "uvloop/future.pyx":462 * # are already fast. * * future_factory = aio_Future # <<<<<<<<<<<<<< * task_factory = aio_Task * */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Future); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_future_factory); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_future_factory, __pyx_v_6uvloop_4loop_aio_Future); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Future); /* "uvloop/future.pyx":463 * * future_factory = aio_Future * task_factory = aio_Task # <<<<<<<<<<<<<< * * Future = aio_Future */ __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Task); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_task_factory); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_task_factory, __pyx_v_6uvloop_4loop_aio_Task); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Task); /* "uvloop/future.pyx":465 * task_factory = aio_Task * * Future = aio_Future # <<<<<<<<<<<<<< * * else: */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Future, __pyx_v_6uvloop_4loop_aio_Future) < 0) __PYX_ERR(6, 465, __pyx_L1_error) /* "uvloop/future.pyx":458 * * * if sys.version_info >= (3, 6): # <<<<<<<<<<<<<< * # In Python 3.6 Task and Future are implemented in C and * # are already fast. */ goto __pyx_L2; } /* "uvloop/future.pyx":468 * * else: * class Future(BaseFuture, aio_Future): # <<<<<<<<<<<<<< * # Inherit asyncio.Future.__del__ and __repr__ * pass */ /*else*/ { __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6uvloop_4loop_BaseFuture)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6uvloop_4loop_BaseFuture)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6uvloop_4loop_BaseFuture)); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Future); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Future); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_6uvloop_4loop_aio_Future); __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_Future, __pyx_n_s_Future, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_Future, __pyx_t_2, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Future, __pyx_t_7) < 0) __PYX_ERR(6, 468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":473 * * * class Task(BaseTask, aio_Task): # <<<<<<<<<<<<<< * # Inherit asyncio.Task.__del__ and __repr__ and a bunch * # of class methods. */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6uvloop_4loop_BaseTask)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6uvloop_4loop_BaseTask)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6uvloop_4loop_BaseTask)); __Pyx_INCREF(__pyx_v_6uvloop_4loop_aio_Task); __Pyx_GIVEREF(__pyx_v_6uvloop_4loop_aio_Task); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_6uvloop_4loop_aio_Task); __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_Task, __pyx_n_s_Task, (PyObject *) NULL, __pyx_n_s_uvloop_loop, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_Task, __pyx_t_2, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Task, __pyx_t_7) < 0) __PYX_ERR(6, 473, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":478 * pass * * uvloop_Future = Future # <<<<<<<<<<<<<< * * future_factory = Future */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Future); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_uvloop_Future); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_uvloop_Future, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":480 * uvloop_Future = Future * * future_factory = Future # <<<<<<<<<<<<<< * task_factory = Task * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Future); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_future_factory); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_future_factory, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/future.pyx":481 * * future_factory = Future * task_factory = Task # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Task); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_6uvloop_4loop_task_factory); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop_task_factory, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L2:; /* "uvloop/chain_futs.pyx":89 * * * def _wrap_future(future, *, loop=None): # <<<<<<<<<<<<<< * # Don't use this function -- it's here for tests purposes only * # and can be removed in future versions of uvloop. */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_1_wrap_future, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_wrap_future, __pyx_t_2) < 0) __PYX_ERR(22, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2587 * * # Used in UVProcess * cdef vint __atfork_installed = 0 # <<<<<<<<<<<<<< * cdef vint __forking = 0 * cdef Loop __forking_loop = None */ __pyx_v_6uvloop_4loop___atfork_installed = 0; /* "uvloop/loop.pyx":2588 * # Used in UVProcess * cdef vint __atfork_installed = 0 * cdef vint __forking = 0 # <<<<<<<<<<<<<< * cdef Loop __forking_loop = None * */ __pyx_v_6uvloop_4loop___forking = 0; /* "uvloop/loop.pyx":2589 * cdef vint __atfork_installed = 0 * cdef vint __forking = 0 * cdef Loop __forking_loop = None # <<<<<<<<<<<<<< * * */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_6uvloop_4loop___forking_loop)); __Pyx_DECREF_SET(__pyx_v_6uvloop_4loop___forking_loop, ((struct __pyx_obj_6uvloop_4loop_Loop *)Py_None)); __Pyx_GIVEREF(Py_None); /* "uvloop/loop.pyx":2619 * * # Install PyMem* memory allocators * cdef vint __mem_installed = 0 # <<<<<<<<<<<<<< * cdef __install_pymem(): * global __mem_installed */ __pyx_v_6uvloop_4loop___mem_installed = 0; /* "uvloop/loop.pyx":2636 * * * def _sighandler_noop(signum, frame): # <<<<<<<<<<<<<< * """Dummy signal handler.""" * pass */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_3_sighandler_noop, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sighandler_noop, __pyx_t_2) < 0) __PYX_ERR(1, 2636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":2643 * ########### Stuff for tests: * * async def _test_coroutine_1(): # <<<<<<<<<<<<<< * return 42 */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6uvloop_4loop_5_test_coroutine_1, NULL, __pyx_n_s_uvloop_loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 2643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_coroutine_1, __pyx_t_2) < 0) __PYX_ERR(1, 2643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "uvloop/loop.pyx":1 * # cython: language_level=3, embedsignature=True # <<<<<<<<<<<<<< * * import asyncio */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init uvloop.loop", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init uvloop.loop"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } length = stop - start; if (unlikely(length <= 0)) return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL #include "frameobject.h" static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = PyThreadState_GET(); PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = f->f_localsplus; for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif // CPython < 3.6 #endif // CYTHON_FAST_PYCALL /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); } #endif // CYTHON_FAST_PYCCALL /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* KeywordStringCheck */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* GetModuleGlobalName */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { PyObject *exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; return PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { #endif PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *function = PyMethod_GET_FUNCTION(method); result = __Pyx_PyObject_CallOneArg(function, self); Py_DECREF(method); return result; } } #endif result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int is_tuple, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); } else { if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { __Pyx_UnpackTupleError(tuple, 2); goto bad; } #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } } *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; #if !CYTHON_COMPILING_IN_PYPY if (is_dict) { *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; } #endif *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* PyObjectCallMethod1 */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto done; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {self, arg}; result = __Pyx_PyFunction_FastCall(function, args, 2); goto done; } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {self, arg}; result = __Pyx_PyCFunction_FastCall(function, args, 2); goto done; } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); done: Py_XDECREF(method); return result; } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* None */ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CythonFunction */ static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; result = (*meth)(self, arg0); Py_DECREF(arg0); return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; argc = PyTuple_GET_SIZE(args); new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* None */ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* GetItemInt */ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* CoroutineBase */ #include #include static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); value = Py_None; } #if PY_VERSION_HEX >= 0x030300A0 else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); } #endif else if (unlikely(PyTuple_Check(ev))) { if (PyTuple_GET_SIZE(ev) >= 1) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #else value = PySequence_ITEM(ev, 0); #endif } else { Py_INCREF(Py_None); value = Py_None; } Py_DECREF(ev); } else if (!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { value = ev; } if (likely(value)) { Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) { PyObject *retval; __Pyx_PyThreadState_declare assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } __Pyx_PyThreadState_assign if (value) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(__pyx_tstate->frame); assert(f->f_back == NULL); f->f_back = __pyx_tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON #else if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Coroutine_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) { if (unlikely(!retval && !PyErr_Occurred())) { PyErr_SetNone(PyExc_StopIteration); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Coroutine_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif { if (value == Py_None) ret = Py_TYPE(yf)->tp_iternext(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value); } return __Pyx_Coroutine_MethodReturn(retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Next(yf); } else #endif ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); goto throw_here; } gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); } static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label > 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif { return; } PyObject_GC_UnTrack(self); } __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PyThreadState_declare if (gen->resume_label <= 0) return ; #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Coroutine_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) { PyObject *name = self->gi_name; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) { PyObject *name = self->gi_qualname; if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; Py_XINCREF(module_name); gen->gi_modulename = module_name; PyObject_GC_Track(gen); return gen; } /* PatchModuleWithCoroutine */ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } /* PatchGeneratorABC */ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (!abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_VERSION_HEX >= 0x03030000) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if (0) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } /* Coroutine */ typedef struct { PyObject_HEAD PyObject *coroutine; } __pyx_CoroutineAwaitObject; static void __Pyx_CoroutineAwait_dealloc(PyObject *self) { PyObject_GC_UnTrack(self); Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine); PyObject_GC_Del(self); } static int __Pyx_CoroutineAwait_traverse(__pyx_CoroutineAwaitObject *self, visitproc visit, void *arg) { Py_VISIT(self->coroutine); return 0; } static int __Pyx_CoroutineAwait_clear(__pyx_CoroutineAwaitObject *self) { Py_CLEAR(self->coroutine); return 0; } static PyObject *__Pyx_CoroutineAwait_Next(__pyx_CoroutineAwaitObject *self) { return __Pyx_Generator_Next(self->coroutine); } static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyObject *value) { return __Pyx_Coroutine_Send(self->coroutine, value); } static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) { return __Pyx_Coroutine_Throw(self->coroutine, args); } static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self) { return __Pyx_Coroutine_Close(self->coroutine); } static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) { Py_INCREF(self); return self; } #if !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) { PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead"); return NULL; } #endif static PyMethodDef __pyx_CoroutineAwait_methods[] = { {"send", (PyCFunction) __Pyx_CoroutineAwait_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_CoroutineAwait_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_CoroutineAwait_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, {0, 0, 0, 0} }; static PyTypeObject __pyx_CoroutineAwaitType_type = { PyVarObject_HEAD_INIT(0, 0) "coroutine_wrapper", sizeof(__pyx_CoroutineAwaitObject), 0, (destructor) __Pyx_CoroutineAwait_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, PyDoc_STR("A wrapper object implementing __await__ for coroutines."), (traverseproc) __Pyx_CoroutineAwait_traverse, (inquiry) __Pyx_CoroutineAwait_clear, 0, 0, __Pyx_CoroutineAwait_self, (iternextfunc) __Pyx_CoroutineAwait_Next, __pyx_CoroutineAwait_methods, 0 , 0 , 0, 0, 0, 0, 0, 0, 0, #if !CYTHON_COMPILING_IN_PYPY __Pyx_CoroutineAwait_no_new, #else 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif }; static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { #if CYTHON_COMPILING_IN_CPYTHON __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType); #else __pyx_CoroutineAwaitObject *await = (__pyx_CoroutineAwaitObject*) __pyx_CoroutineAwaitType->tp_new(__pyx_CoroutineAwaitType, __pyx_empty_tuple, NULL); #endif if (unlikely(!await)) return NULL; Py_INCREF(coroutine); await->coroutine = coroutine; #if CYTHON_COMPILING_IN_CPYTHON PyObject_GC_Track(await); #endif return (PyObject*)await; } static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) { if (unlikely(!coroutine || !__Pyx_Coroutine_CheckExact(coroutine))) { PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine"); return NULL; } return __Pyx__Coroutine_await(coroutine); } static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; if (gen->resume_label == 0 && !PyErr_Occurred()) { PyObject_GC_UnTrack(self); #if PY_VERSION_HEX >= 0x03030000 || defined(PyErr_WarnFormat) PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname); PyErr_Clear(); #else {PyObject *msg; char *cmsg; #if CYTHON_COMPILING_IN_PYPY msg = NULL; cmsg = (char*) "coroutine was never awaited"; #else char *cname; PyObject *qualname; #if PY_MAJOR_VERSION >= 3 qualname = PyUnicode_AsUTF8String(gen->gi_qualname); if (likely(qualname)) { cname = PyBytes_AS_STRING(qualname); } else { PyErr_Clear(); cname = (char*) "?"; } msg = PyBytes_FromFormat( #else qualname = gen->gi_qualname; cname = PyString_AS_STRING(qualname); msg = PyString_FromFormat( #endif "coroutine '%.50s' was never awaited", cname); #if PY_MAJOR_VERSION >= 3 Py_XDECREF(qualname); #endif if (unlikely(!msg)) { PyErr_Clear(); cmsg = (char*) "coroutine was never awaited"; } else { #if PY_MAJOR_VERSION >= 3 cmsg = PyBytes_AS_STRING(msg); #else cmsg = PyString_AS_STRING(msg); #endif } #endif if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) PyErr_WriteUnraisable(self); Py_XDECREF(msg);} #endif PyObject_GC_Track(self); } __Pyx_Coroutine_dealloc(self); } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 static PyObject *__Pyx_Coroutine_compare(PyObject *obj, PyObject *other, int op) { PyObject* result; switch (op) { case Py_EQ: result = (other == obj) ? Py_True : Py_False; break; case Py_NE: result = (other != obj) ? Py_True : Py_False; break; default: result = Py_NotImplemented; } Py_INCREF(result); return result; } #endif static PyMethodDef __pyx_Coroutine_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, #if PY_VERSION_HEX < 0x030500B1 {"__await__", (PyCFunction) __Pyx_Coroutine_await, METH_NOARGS, (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")}, #endif {0, 0, 0, 0} }; static PyMemberDef __pyx_Coroutine_memberlist[] = { {(char *) "cr_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "cr_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being awaited, or None")}, {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Coroutine_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the coroutine"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the coroutine"), 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_ASYNC_SLOTS static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = { __Pyx_Coroutine_await, 0, 0, }; #endif static PyTypeObject __pyx_CoroutineType_type = { PyVarObject_HEAD_INIT(0, 0) "coroutine", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_check_and_dealloc, 0, 0, 0, #if CYTHON_USE_ASYNC_SLOTS &__pyx_Coroutine_as_async, #else 0, #endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 __Pyx_Coroutine_compare, #else 0, #endif offsetof(__pyx_CoroutineObject, gi_weakreflist), __Pyx_Coroutine_await, /* tp_iter */ (iternextfunc) __Pyx_Generator_Next, /* tp_iternext */ __pyx_Coroutine_methods, __pyx_Coroutine_memberlist, __pyx_Coroutine_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #else __Pyx_Coroutine_del, #endif 0, #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Coroutine_del, #endif }; static int __pyx_Coroutine_init(void) { __pyx_CoroutineType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_CoroutineType = __Pyx_FetchCommonType(&__pyx_CoroutineType_type); if (unlikely(!__pyx_CoroutineType)) return -1; __pyx_CoroutineAwaitType = __Pyx_FetchCommonType(&__pyx_CoroutineAwaitType_type); if (unlikely(!__pyx_CoroutineAwaitType)) return -1; return 0; } /* GetAwaitIter */ static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) { #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(o)) { Py_INCREF(o); return o; } #endif return __Pyx__Coroutine_GetAwaitableIter(o); } static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) { PyObject *res; #if CYTHON_USE_ASYNC_SLOTS __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); if (likely(am && am->am_await)) { res = (*am->am_await)(obj); } else #endif #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) if (PyCoro_CheckExact(obj)) { Py_INCREF(obj); return obj; } else #endif #if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE) if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) { Py_INCREF(obj); return obj; } else #endif { PyObject *method = __Pyx_PyObject_GetAttrStr(obj, __pyx_n_s_await); if (unlikely(!method)) goto slot_error; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *function = PyMethod_GET_FUNCTION(method); res = __Pyx_PyObject_CallOneArg(function, self); } else res = __Pyx_PyObject_CallNoArg(method); } else #endif res = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); } if (unlikely(!res)) goto bad; if (!PyIter_Check(res)) { PyErr_Format(PyExc_TypeError, "__await__() returned non-iterator of type '%.100s'", Py_TYPE(res)->tp_name); Py_CLEAR(res); } else { int is_coroutine = 0; #ifdef __Pyx_Coroutine_USED is_coroutine |= __Pyx_Coroutine_CheckExact(res); #endif #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) is_coroutine |= PyCoro_CheckExact(res); #endif if (unlikely(is_coroutine)) { /* __await__ must return an *iterator*, not a coroutine or another awaitable (see PEP 492) */ PyErr_SetString(PyExc_TypeError, "__await__() returned a coroutine"); Py_CLEAR(res); } } return res; slot_error: PyErr_Format(PyExc_TypeError, "object %.100s can't be used in 'await' expression", Py_TYPE(obj)->tp_name); bad: return NULL; } /* CoroutineYieldFrom */ static int __Pyx_WarnAIterDeprecation(PyObject *aiter) { int result; #if PY_MAJOR_VERSION >= 3 result = PyErr_WarnFormat( PyExc_PendingDeprecationWarning, 1, "'%.100s' implements legacy __aiter__ protocol; " "__aiter__ should return an asynchronous " "iterator, not awaitable", Py_TYPE(aiter)->tp_name); #else result = PyErr_WarnEx( PyExc_PendingDeprecationWarning, "object implements legacy __aiter__ protocol; " "__aiter__ should return an asynchronous " "iterator, not awaitable", 1); #endif return result != 0; } static CYTHON_INLINE PyObject* __Pyx__Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source, int warn) { PyObject *retval; if (__Pyx_Coroutine_CheckExact(source)) { if (warn && unlikely(__Pyx_WarnAIterDeprecation(source))) { return NULL; } retval = __Pyx_Generator_Next(source); if (retval) { Py_INCREF(source); gen->yieldfrom = source; return retval; } } else { PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source); if (unlikely(!source_gen)) return NULL; if (warn && unlikely(__Pyx_WarnAIterDeprecation(source))) { Py_DECREF(source_gen); return NULL; } if (__Pyx_Coroutine_CheckExact(source_gen)) { retval = __Pyx_Generator_Next(source_gen); } else { retval = Py_TYPE(source_gen)->tp_iternext(source_gen); } if (retval) { gen->yieldfrom = source_gen; return retval; } Py_DECREF(source_gen); } return NULL; } /* ReturnWithStopIteration */ static void __Pyx__ReturnWithStopIteration(PyObject* value) { PyObject *exc, *args; #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON __Pyx_PyThreadState_declare if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1) || unlikely(PyTuple_Check(value))) { args = PyTuple_New(1); if (unlikely(!args)) return; Py_INCREF(value); PyTuple_SET_ITEM(args, 0, value); exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL); Py_DECREF(args); if (!exc) return; } else { Py_INCREF(value); exc = value; } __Pyx_PyThreadState_assign if (!__pyx_tstate->exc_type) { Py_INCREF(PyExc_StopIteration); __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL); return; } #else args = PyTuple_Pack(1, value); if (unlikely(!args)) return; exc = PyObject_Call(PyExc_StopIteration, args, NULL); Py_DECREF(args); if (unlikely(!exc)) return; #endif PyErr_SetObject(PyExc_StopIteration, exc); Py_DECREF(exc); } /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* ArgTypeTest */ static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } /* SetItemInt */ static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return -1; PyErr_Clear(); } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } /* MergeKeywords */ static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { PyObject *iter, *key = NULL, *value = NULL; int source_is_dict, result; Py_ssize_t orig_length, ppos = 0; iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict); if (unlikely(!iter)) { PyObject *args; if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); args = PyTuple_Pack(1, source_mapping); if (likely(args)) { PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); Py_DECREF(args); if (likely(fallback)) { iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict); Py_DECREF(fallback); } } if (unlikely(!iter)) goto bad; } while (1) { result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); if (unlikely(result < 0)) goto bad; if (!result) break; if (unlikely(PyDict_Contains(kwdict, key))) { __Pyx_RaiseDoubleKeywordsError("function", key); result = -1; } else { result = PyDict_SetItem(kwdict, key, value); } Py_DECREF(key); Py_DECREF(value); if (unlikely(result < 0)) goto bad; } Py_XDECREF(iter); return 0; bad: Py_XDECREF(iter); return -1; } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* None */ static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); #else default: Py_RETURN_FALSE; #endif } } if (a == b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } } return PyObject_RichCompare(op1, op2, Py_EQ); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); return PyInt_FromLong(a & b); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } default: return PyLong_Type.tp_as_number->nb_and(op1, op2); } } x = a & b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla & llb; return PyLong_FromLongLong(llx); #endif } #endif return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2); } #endif /* GetAttr3 */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); r = d; Py_INCREF(d); } return r; bad: return NULL; } /* decode_c_bytes */ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { if (unlikely((start < 0) | (stop < 0))) { if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (stop > length) stop = length; length = stop - start; if (unlikely(length <= 0)) return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* SliceObject */ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %.10s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } /* SetVTable */ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* PatchInspect */ static PyObject* __Pyx_patch_inspect(PyObject* module) { #if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) static int inspect_patched = 0; if (unlikely((!inspect_patched) && module)) { module = __Pyx_Coroutine_patch_module( module, "" "old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n" "if old_types is None or not isinstance(old_types, set):\n" " old_types = set()\n" " def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n" " def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n" " cy_isgenerator._cython_generator_types = cython_generator_types\n" " return cy_isgenerator\n" " _module.isgenerator = cy_wrap(_module.isgenerator)\n" "old_types.add(_cython_generator_type)\n" ); inspect_patched = 1; } #else if (0) return __Pyx_Coroutine_patch_module(module, NULL); #endif return module; } /* PatchAsyncIO */ static PyObject* __Pyx_patch_asyncio(PyObject* module) { #if PY_VERSION_HEX < 0x030500B2 &&\ (defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) &&\ (!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO) PyObject *patch_module = NULL; static int asyncio_patched = 0; if (unlikely((!asyncio_patched) && module)) { PyObject *package; package = __Pyx_Import(__pyx_n_s_asyncio_coroutines, NULL, 0); if (package) { patch_module = __Pyx_Coroutine_patch_module( PyObject_GetAttrString(package, "coroutines"), "" "try:\n" " coro_types = _module._COROUTINE_TYPES\n" "except AttributeError: pass\n" "else:\n" " if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types:\n" " coro_types = tuple(coro_types) + (_cython_coroutine_type,)\n" " if _cython_generator_type is not None and _cython_generator_type not in coro_types:\n" " coro_types = tuple(coro_types) + (_cython_generator_type,)\n" "_module._COROUTINE_TYPES = coro_types\n" ); } else { PyErr_Clear(); #if PY_VERSION_HEX < 0x03040200 package = __Pyx_Import(__pyx_n_s_asyncio_tasks, NULL, 0); if (unlikely(!package)) goto asyncio_done; patch_module = __Pyx_Coroutine_patch_module( PyObject_GetAttrString(package, "tasks"), "" "if hasattr(_module, 'iscoroutine'):\n" " old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None)\n" " if old_types is None or not isinstance(old_types, set):\n" " old_types = set()\n" " def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types):\n" " def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj)\n" " cy_iscoroutine._cython_coroutine_types = cython_coroutine_types\n" " return cy_iscoroutine\n" " _module.iscoroutine = cy_wrap(_module.iscoroutine)\n" " if _cython_coroutine_type is not None:\n" " old_types.add(_cython_coroutine_type)\n" " if _cython_generator_type is not None:\n" " old_types.add(_cython_generator_type)\n" ); #endif } Py_DECREF(package); if (unlikely(!patch_module)) goto ignore; #if PY_VERSION_HEX < 0x03040200 asyncio_done: PyErr_Clear(); #endif asyncio_patched = 1; #ifdef __Pyx_Generator_USED { PyObject *inspect_module; if (patch_module) { inspect_module = PyObject_GetAttr(patch_module, __pyx_n_s_inspect); Py_DECREF(patch_module); } else { inspect_module = __Pyx_Import(__pyx_n_s_inspect, NULL, 0); } if (unlikely(!inspect_module)) goto ignore; inspect_module = __Pyx_patch_inspect(inspect_module); if (unlikely(!inspect_module)) { Py_DECREF(module); module = NULL; } Py_XDECREF(inspect_module); } #else if (0) return __Pyx_patch_inspect(module); #endif } return module; ignore: PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else if (0) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL)); #endif return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) { const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(uint64_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(uint64_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(uint64_t) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(uint64_t), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) { const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(uint32_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(uint32_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(uint32_t) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(uint32_t), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) { const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(unsigned short) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(unsigned short) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(unsigned short) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(unsigned short), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_volatile__int(volatile int value) { const volatile int neg_one = (volatile int) -1, const_zero = (volatile int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(volatile int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(volatile int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(volatile int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(volatile int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(volatile int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(volatile int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) { const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int64_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int64_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int64_t) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int64_t), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(unsigned long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(unsigned long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(unsigned long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(unsigned long), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntFromPy */ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) { const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(uint64_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (uint64_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (uint64_t) 0; case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0]) case 2: if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) { return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); } } break; case 3: if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) { return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); } } break; case 4: if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) { return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (uint64_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(uint64_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (uint64_t) 0; case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, +digits[0]) case -2: if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) { return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; case 2: if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) { return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; case -3: if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) { return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; case 3: if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) { return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; case -4: if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) { return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; case 4: if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) { return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]))); } } break; } #endif if (sizeof(uint64_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else uint64_t val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (uint64_t) -1; } } else { uint64_t val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (uint64_t) -1; val = __Pyx_PyInt_As_uint64_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to uint64_t"); return (uint64_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to uint64_t"); return (uint64_t) -1; } /* CIntFromPy */ static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *x) { const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned long) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, digits[0]) case 2: if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT) { return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; case 3: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT) { return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; case 4: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 4 * PyLong_SHIFT) { return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned long) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, +digits[0]) case -2: if (8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) { return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; } #endif if (sizeof(unsigned long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned long) -1; } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (unsigned long) -1; val = __Pyx_PyInt_As_unsigned_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned long"); return (unsigned long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long) -1; } /* CIntFromPy */ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0]) case 2: if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) { return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; case 3: if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) { return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; case 4: if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) { return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned int) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0]) case -2: if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) { return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); } } break; } #endif if (sizeof(unsigned int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned int) -1; } } else { unsigned int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (unsigned int) -1; val = __Pyx_PyInt_As_unsigned_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned int"); return (unsigned int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned int"); return (unsigned int) -1; } /* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (size_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) case -2: if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -3: if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -4: if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; } #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } /* Generator */ static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #else __Pyx_Coroutine_del, #endif 0, #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Coroutine_del, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } /* ModuleImport */ #ifndef __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule static PyObject *__Pyx_ImportModule(const char *name) { PyObject *py_name = 0; PyObject *py_module = 0; py_name = __Pyx_PyIdentifier_FromString(name); if (!py_name) goto bad; py_module = PyImport_Import(py_name); Py_DECREF(py_name); return py_module; bad: Py_XDECREF(py_name); return 0; } #endif /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); py_name = 0; Py_DECREF(py_module); py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (!strict && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", module_name, class_name, basicsize, size); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", module_name, class_name, basicsize, size); goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(py_module); Py_XDECREF(result); return NULL; } #endif /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif #else res = PyNumber_Int(x); #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ uvloop-0.8.1/uvloop/cbhandles.pyx0000664000372000037200000002035113156036740017725 0ustar travistravis00000000000000@cython.no_gc_clear @cython.freelist(DEFAULT_FREELIST_SIZE) cdef class Handle: def __cinit__(self): self.cancelled = 0 self.cb_type = 0 self._source_traceback = None cdef inline _set_loop(self, Loop loop): self.loop = loop if UVLOOP_DEBUG: loop._debug_cb_handles_total += 1 loop._debug_cb_handles_count += 1 if loop._debug: self._source_traceback = tb_extract_stack(sys_getframe(0)) def __dealloc__(self): if UVLOOP_DEBUG and self.loop is not None: self.loop._debug_cb_handles_count -= 1 if self.loop is None: raise RuntimeError('Handle.loop is None in Handle.__dealloc__') def __init__(self): raise TypeError( '{} is not supposed to be instantiated from Python'.format( self.__class__.__name__)) cdef inline _run(self): cdef: int cb_type object callback if self.cancelled: return cb_type = self.cb_type Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, # we guard 'self' manually (since the callback # might cause GC of the handle.) try: if cb_type == 1: callback = self.arg1 args = self.arg2 if args is None: callback() else: callback(*args) elif cb_type == 2: (self.callback)(self.arg1) elif cb_type == 3: (self.callback)(self.arg1, self.arg2) elif cb_type == 4: (self.callback)(self.arg1, self.arg2, self.arg3) elif cb_type == 5: (self.callback)( self.arg1, self.arg2, self.arg3, self.arg4) else: raise RuntimeError('invalid Handle.cb_type: {}'.format( cb_type)) except Exception as ex: if cb_type == 1: msg = 'Exception in callback {}'.format(callback) else: msg = 'Exception in callback {}'.format(self.meth_name) context = { 'message': msg, 'exception': ex, 'handle': self, } if self._source_traceback is not None: context['source_traceback'] = self._source_traceback self.loop.call_exception_handler(context) finally: Py_DECREF(self) cdef _cancel(self): self.cancelled = 1 self.callback = NULL self.arg2 = self.arg3 = self.arg4 = None # Public API def __repr__(self): info = [self.__class__.__name__] if self.cancelled: info.append('cancelled') if self.cb_type == 1: func = self.arg1 if hasattr(func, '__qualname__'): cb_name = getattr(func, '__qualname__') elif hasattr(func, '__name__'): cb_name = getattr(func, '__name__') else: cb_name = repr(func) info.append(cb_name) else: info.append(self.meth_name) if self._source_traceback is not None: frame = self._source_traceback[-1] info.append('created at {}:{}'.format(frame[0], frame[1])) return '<' + ' '.join(info) + '>' def cancel(self): self._cancel() @cython.no_gc_clear @cython.freelist(DEFAULT_FREELIST_SIZE) cdef class TimerHandle: def __cinit__(self, Loop loop, object callback, object args, uint64_t delay): self.loop = loop self.callback = callback self.args = args self.closed = 0 if loop._debug: self._source_traceback = tb_extract_stack(sys_getframe(0)) self.timer = UVTimer.new( loop, self._run, self, delay) self.timer.start() # Only add to loop._timers when `self.timer` is successfully created loop._timers.add(self) if UVLOOP_DEBUG: self.loop._debug_cb_timer_handles_total += 1 self.loop._debug_cb_timer_handles_count += 1 def __dealloc__(self): if UVLOOP_DEBUG: self.loop._debug_cb_timer_handles_count -= 1 if self.closed == 0: raise RuntimeError('active TimerHandle is deallacating') cdef _cancel(self): if self.closed == 1: return self.closed = 1 self.callback = None self.args = None try: self.loop._timers.remove(self) finally: self.timer._close() self.timer = None # let it die asap cdef _run(self): if self.closed == 1: return callback = self.callback args = self.args self._cancel() Py_INCREF(self) # Since _run is a cdef and there's no BoundMethod, # we guard 'self' manually. if self.loop._debug: started = time_monotonic() try: if args is not None: callback(*args) else: callback() except Exception as ex: context = { 'message': 'Exception in callback {}'.format(callback), 'exception': ex, 'handle': self, } if self._source_traceback is not None: context['source_traceback'] = self._source_traceback self.loop.call_exception_handler(context) else: if self.loop._debug: delta = time_monotonic() - started if delta > self.loop.slow_callback_duration: aio_logger.warning( 'Executing %r took %.3f seconds', self, delta) finally: Py_DECREF(self) # Public API def __repr__(self): info = [self.__class__.__name__] if self.closed: info.append('cancelled') func = self.callback if hasattr(func, '__qualname__'): cb_name = getattr(func, '__qualname__') elif hasattr(func, '__name__'): cb_name = getattr(func, '__name__') else: cb_name = repr(func) info.append(cb_name) if self._source_traceback is not None: frame = self._source_traceback[-1] info.append('created at {}:{}'.format(frame[0], frame[1])) return '<' + ' '.join(info) + '>' def cancel(self): self._cancel() cdef new_Handle(Loop loop, object callback, object args): cdef Handle handle handle = Handle.__new__(Handle) handle._set_loop(loop) handle.cb_type = 1 handle.arg1 = callback handle.arg2 = args return handle cdef new_MethodHandle(Loop loop, str name, method_t callback, object ctx): cdef Handle handle handle = Handle.__new__(Handle) handle._set_loop(loop) handle.cb_type = 2 handle.meth_name = name handle.callback = callback handle.arg1 = ctx return handle cdef new_MethodHandle1(Loop loop, str name, method1_t callback, object ctx, object arg): cdef Handle handle handle = Handle.__new__(Handle) handle._set_loop(loop) handle.cb_type = 3 handle.meth_name = name handle.callback = callback handle.arg1 = ctx handle.arg2 = arg return handle cdef new_MethodHandle2(Loop loop, str name, method2_t callback, object ctx, object arg1, object arg2): cdef Handle handle handle = Handle.__new__(Handle) handle._set_loop(loop) handle.cb_type = 4 handle.meth_name = name handle.callback = callback handle.arg1 = ctx handle.arg2 = arg1 handle.arg3 = arg2 return handle cdef new_MethodHandle3(Loop loop, str name, method3_t callback, object ctx, object arg1, object arg2, object arg3): cdef Handle handle handle = Handle.__new__(Handle) handle._set_loop(loop) handle.cb_type = 5 handle.meth_name = name handle.callback = callback handle.arg1 = ctx handle.arg2 = arg1 handle.arg3 = arg2 handle.arg4 = arg3 return handle uvloop-0.8.1/uvloop/__init__.py0000664000372000037200000000143613156036740017354 0ustar travistravis00000000000000import asyncio from asyncio.events import BaseDefaultEventLoopPolicy as __BasePolicy from . import includes as __includes # NOQA from . import _patch # NOQA from .loop import Loop as __BaseLoop, Future # NOQA __all__ = ('new_event_loop', 'EventLoopPolicy') class Loop(__BaseLoop, asyncio.AbstractEventLoop): pass def new_event_loop(): """Return a new event loop.""" return Loop() class EventLoopPolicy(__BasePolicy): """Event loop policy. The preferred way to make your application use uvloop: >>> import asyncio >>> import uvloop >>> asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) >>> asyncio.get_event_loop() """ def _loop_factory(self): return new_event_loop() uvloop-0.8.1/uvloop/dns.pyx0000664000372000037200000002375213156036740016576 0ustar travistravis00000000000000cdef __port_to_int(port, proto): if port is None or port == '' or port == b'': return 0 try: return int(port) except (ValueError, TypeError): pass if isinstance(port, bytes): port = port.decode() if isinstance(port, str) and proto is not None: if proto == uv.IPPROTO_TCP: return socket_getservbyname(port, 'tcp') elif proto == uv.IPPROTO_UDP: return socket_getservbyname(port, 'udp') raise OSError('service/proto not found') cdef __convert_sockaddr_to_pyaddr(const system.sockaddr* addr): # Converts sockaddr structs into what Python socket # module can understand: # - for IPv4 a tuple of (host, port) # - for IPv6 a tuple of (host, port, flowinfo, scope_id) cdef: char buf[128] # INET6_ADDRSTRLEN is usually 46 int err system.sockaddr_in *addr4 system.sockaddr_in6 *addr6 if addr.sa_family == uv.AF_INET: addr4 = addr err = uv.uv_ip4_name(addr4, buf, sizeof(buf)) if err < 0: raise convert_error(err) return ( (buf).decode(), system.ntohs(addr4.sin_port) ) elif addr.sa_family == uv.AF_INET6: addr6 = addr err = uv.uv_ip6_name(addr6, buf, sizeof(buf)) if err < 0: raise convert_error(err) return ( (buf).decode(), system.ntohs(addr6.sin6_port), system.ntohl(addr6.sin6_flowinfo), addr6.sin6_scope_id ) raise RuntimeError("cannot convert sockaddr into Python object") cdef __convert_pyaddr_to_sockaddr(int family, object addr, system.sockaddr* res): cdef: int err int addr_len int scope_id = 0 int flowinfo = 0 if family == uv.AF_INET: if not isinstance(addr, tuple): raise TypeError('AF_INET address must be tuple') if len(addr) != 2: raise ValueError('AF_INET address must be tuple of (host, port)') host, port = addr if isinstance(host, str): host = host.encode('idna') if not isinstance(host, (bytes, bytearray)): raise TypeError('host must be a string or bytes object') port = __port_to_int(port, None) err = uv.uv_ip4_addr(host, port, res) if err < 0: raise convert_error(err) elif family == uv.AF_INET6: if not isinstance(addr, tuple): raise TypeError('AF_INET6 address must be tuple') addr_len = len(addr) if addr_len < 2 or addr_len > 4: raise ValueError( 'AF_INET6 must be a tuple of 2-4 parameters: ' '(host, port, flowinfo?, scope_id?)') host = addr[0] if isinstance(host, str): host = host.encode('idna') port = __port_to_int(addr[1], None) if addr_len > 2: flowinfo = addr[2] if addr_len > 3: scope_id = addr[3] err = uv.uv_ip6_addr(host, port, res) if err < 0: raise convert_error(err) (res).sin6_flowinfo = flowinfo (res).sin6_scope_id = scope_id else: raise ValueError( 'epected AF_INET or AF_INET6 family, got {}'.format(family)) cdef __static_getaddrinfo(object host, object port, int family, int type, int proto, system.sockaddr *addr): if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}: raise LookupError if type == uv.SOCK_STREAM: # Linux only: # getaddrinfo() can raise when socket.type is a bit mask. # So if socket.type is a bit mask of SOCK_STREAM, and say # SOCK_NONBLOCK, we simply return None, which will trigger # a call to getaddrinfo() letting it process this request. proto = uv.IPPROTO_TCP elif type == uv.SOCK_DGRAM: proto = uv.IPPROTO_UDP else: raise LookupError try: port = __port_to_int(port, proto) except: raise LookupError if family == uv.AF_UNSPEC: afs = [uv.AF_INET, uv.AF_INET6] else: afs = [family] for af in afs: try: __convert_pyaddr_to_sockaddr(af, (host, port), addr) except: continue else: return (af, type, proto) raise LookupError cdef __static_getaddrinfo_pyaddr(object host, object port, int family, int type, int proto, int flags): cdef: system.sockaddr_storage addr try: (af, type, proto) = __static_getaddrinfo( host, port, family, type, proto, &addr) except LookupError: return try: pyaddr = __convert_sockaddr_to_pyaddr(&addr) except: return return af, type, proto, '', pyaddr @cython.freelist(DEFAULT_FREELIST_SIZE) cdef class AddrInfo: cdef: system.addrinfo *data def __cinit__(self): self.data = NULL def __dealloc__(self): if self.data is not NULL: uv.uv_freeaddrinfo(self.data) # returns void self.data = NULL cdef void set_data(self, system.addrinfo *data): self.data = data cdef unpack(self): cdef: list result = [] system.addrinfo *ptr if self.data is NULL: raise RuntimeError('AddrInfo.data is NULL') ptr = self.data while ptr != NULL: if ptr.ai_addr.sa_family in (uv.AF_INET, uv.AF_INET6): result.append(( ptr.ai_family, ptr.ai_socktype, ptr.ai_protocol, '' if ptr.ai_canonname is NULL else (ptr.ai_canonname).decode(), __convert_sockaddr_to_pyaddr(ptr.ai_addr) )) ptr = ptr.ai_next return result @staticmethod cdef int isinstance(object other): return type(other) is AddrInfo cdef class AddrInfoRequest(UVRequest): cdef: system.addrinfo hints object callback def __cinit__(self, Loop loop, bytes host, bytes port, int family, int type, int proto, int flags, object callback): cdef: int err char *chost char *cport if host is None: chost = NULL else: chost = host if port is None: cport = NULL else: cport = port if cport is NULL and chost is NULL: self.on_done() msg = system.gai_strerror(socket_EAI_NONAME).decode('utf-8') ex = socket_gaierror(socket_EAI_NONAME, msg) callback(ex) return memset(&self.hints, 0, sizeof(system.addrinfo)) self.hints.ai_flags = flags self.hints.ai_family = family self.hints.ai_socktype = type self.hints.ai_protocol = proto self.request = PyMem_RawMalloc( sizeof(uv.uv_getaddrinfo_t)) if self.request is NULL: self.on_done() raise MemoryError() self.callback = callback self.request.data = self err = uv.uv_getaddrinfo(loop.uvloop, self.request, __on_addrinfo_resolved, chost, cport, &self.hints) if err < 0: self.on_done() callback(convert_error(err)) cdef class NameInfoRequest(UVRequest): cdef: object callback def __cinit__(self, Loop loop, callback): self.request = PyMem_RawMalloc( sizeof(uv.uv_getnameinfo_t)) if self.request is NULL: self.on_done() raise MemoryError() self.callback = callback self.request.data = self cdef query(self, system.sockaddr *addr, int flags): cdef int err err = uv.uv_getnameinfo(self.loop.uvloop, self.request, __on_nameinfo_resolved, addr, flags) if err < 0: self.on_done() self.callback(convert_error(err)) cdef void __on_addrinfo_resolved(uv.uv_getaddrinfo_t *resolver, int status, system.addrinfo *res) with gil: if resolver.data is NULL: aio_logger.error( 'AddrInfoRequest callback called with NULL resolver.data') return cdef: AddrInfoRequest request = resolver.data Loop loop = request.loop object callback = request.callback AddrInfo ai try: if status < 0: callback(convert_error(status)) else: ai = AddrInfo() ai.set_data(res) callback(ai) except Exception as ex: loop._handle_exception(ex) finally: request.on_done() cdef void __on_nameinfo_resolved(uv.uv_getnameinfo_t* req, int status, const char* hostname, const char* service) with gil: cdef: NameInfoRequest request = req.data Loop loop = request.loop object callback = request.callback try: if status < 0: callback(convert_error(status)) else: callback(((hostname).decode(), (service).decode())) except Exception as ex: loop._handle_exception(ex) finally: request.on_done() uvloop-0.8.1/uvloop/loop.pxd0000664000372000037200000001276013156036740016733 0ustar travistravis00000000000000# cython: language_level=3 from .includes cimport uv from .includes cimport system from libc.stdint cimport uint64_t, uint32_t, int64_t include "includes/consts.pxi" cdef extern from *: ctypedef int vint "volatile int" cdef class UVHandle cdef class UVSocketHandle(UVHandle) cdef class UVAsync(UVHandle) cdef class UVTimer(UVHandle) cdef class UVIdle(UVHandle) cdef class UVBaseTransport(UVSocketHandle) ctypedef object (*method_t)(object) ctypedef object (*method1_t)(object, object) ctypedef object (*method2_t)(object, object, object) ctypedef object (*method3_t)(object, object, object, object) cdef class Loop: cdef: uv.uv_loop_t *uvloop bint _coroutine_wrapper_set public slow_callback_duration readonly bint _closed bint _debug bint _running bint _stopping long _thread_id bint _thread_is_main object _task_factory object _exception_handler object _default_executor object _ready set _queued_streams Py_ssize_t _ready_len object _transports dict _signal_handlers object _ssock object _csock set _timers dict _polls UVProcess active_process_handler UVAsync handler_async UVIdle handler_idle UVCheck handler_check__exec_writes object _last_error cdef object __weakref__ object _asyncgens bint _asyncgens_shutdown_called char _recv_buffer[UV_STREAM_RECV_BUF_SIZE] bint _recv_buffer_in_use # DEBUG fields readonly bint _debug_cc # True when compiled with DEBUG. # Only for unittests. readonly object _debug_handles_total readonly object _debug_handles_closed readonly object _debug_handles_current readonly uint64_t _debug_uv_handles_total readonly uint64_t _debug_uv_handles_freed readonly uint64_t _debug_cb_handles_total readonly uint64_t _debug_cb_handles_count readonly uint64_t _debug_cb_timer_handles_total readonly uint64_t _debug_cb_timer_handles_count readonly uint64_t _debug_stream_shutdown_errors_total readonly uint64_t _debug_stream_listen_errors_total readonly uint64_t _debug_stream_read_cb_total readonly uint64_t _debug_stream_read_cb_errors_total readonly uint64_t _debug_stream_read_eof_total readonly uint64_t _debug_stream_read_eof_cb_errors_total readonly uint64_t _debug_stream_read_errors_total readonly uint64_t _debug_stream_write_tries readonly uint64_t _debug_stream_write_errors_total readonly uint64_t _debug_stream_write_ctx_total readonly uint64_t _debug_stream_write_ctx_cnt readonly uint64_t _debug_stream_write_cb_errors_total readonly uint64_t _poll_read_events_total readonly uint64_t _poll_read_cb_errors_total readonly uint64_t _poll_write_events_total readonly uint64_t _poll_write_cb_errors_total readonly uint64_t _sock_try_write_total readonly uint64_t _debug_exception_handler_cnt cdef _init_debug_fields(self) cdef _on_wake(self) cdef _on_idle(self) cdef __run(self, uv.uv_run_mode) cdef _run(self, uv.uv_run_mode) cdef _close(self) cdef _stop(self, exc) cdef uint64_t _time(self) cdef inline _queue_write(self, UVStream stream) cdef _exec_queued_writes(self) cdef inline _call_soon(self, object callback, object args) cdef inline _call_soon_handle(self, Handle handle) cdef _call_later(self, uint64_t delay, object callback, object args) cdef void _handle_exception(self, object ex) cdef inline _new_future(self) cdef inline _check_signal(self, sig) cdef inline _check_closed(self) cdef inline _check_thread(self) cdef _getaddrinfo(self, object host, object port, int family, int type, int proto, int flags, int unpack) cdef _getnameinfo(self, system.sockaddr *addr, int flags) cdef _create_server(self, system.sockaddr *addr, object protocol_factory, Server server, object ssl, bint reuse_port, object backlog) cdef _track_transport(self, UVBaseTransport transport) cdef _ensure_fd_no_transport(self, fd) cdef _add_reader(self, fd, Handle handle) cdef _remove_reader(self, fd) cdef _add_writer(self, fd, Handle handle) cdef _remove_writer(self, fd) cdef _sock_recv(self, fut, sock, n) cdef _sock_sendall(self, fut, sock, data) cdef _sock_accept(self, fut, sock) cdef _sock_connect(self, fut, sock, address) cdef _sock_connect_cb(self, fut, sock, address) cdef _sock_set_reuseport(self, int fd) cdef _setup_signals(self) cdef _shutdown_signals(self) cdef _handle_signal(self, sig) cdef _read_from_self(self) cdef _process_self_data(self, data) cdef _set_coroutine_wrapper(self, bint enabled) include "cbhandles.pxd" include "handles/handle.pxd" include "handles/async_.pxd" include "handles/idle.pxd" include "handles/check.pxd" include "handles/timer.pxd" include "handles/poll.pxd" include "handles/basetransport.pxd" include "handles/stream.pxd" include "handles/streamserver.pxd" include "handles/tcp.pxd" include "handles/pipe.pxd" include "handles/process.pxd" include "request.pxd" include "handles/udp.pxd" include "server.pxd" uvloop-0.8.1/uvloop/chain_futs.pyx0000664000372000037200000000655513156036740020137 0ustar travistravis00000000000000# LICENSE: PSF. # Copied from asyncio 3.5.2. Remove this file when we don't need # to support earlier versions. cdef _set_concurrent_future_state(concurrent, source): """Copy state from a future to a concurrent.futures.Future.""" assert source.done() if source.cancelled(): concurrent.cancel() if not concurrent.set_running_or_notify_cancel(): return exception = source.exception() if exception is not None: concurrent.set_exception(exception) else: result = source.result() concurrent.set_result(result) cdef _copy_future_state(source, dest): """Internal helper to copy state from another Future. The other Future may be a concurrent.futures.Future. """ assert source.done() if dest.cancelled(): return assert not dest.done() if source.cancelled(): dest.cancel() else: exception = source.exception() if exception is not None: dest.set_exception(exception) else: result = source.result() dest.set_result(result) cdef _chain_future(source, destination): """Chain two futures so that when one completes, so does the other. The result (or exception) of source will be copied to destination. If destination is cancelled, source gets cancelled too. Compatible with both asyncio.Future and concurrent.futures.Future. """ if not isfuture(source) and not isinstance(source, cc_Future): raise TypeError('A future is required for source argument') if not isfuture(destination) and not isinstance(destination, cc_Future): raise TypeError('A future is required for destination argument') source_loop = None dest_loop = None if _is_uvloop_future(source): source_loop = (source)._loop elif isfuture(source): source_loop = source._loop if _is_uvloop_future(destination): dest_loop = (destination)._loop elif isfuture(destination): dest_loop = destination._loop def _set_state(future, other): if isfuture(future): _copy_future_state(other, future) else: _set_concurrent_future_state(future, other) def _call_check_cancel(destination): if destination.cancelled(): if source_loop is None or source_loop is dest_loop: source.cancel() else: source_loop.call_soon_threadsafe(source.cancel) def _call_set_state(source): if dest_loop is None or dest_loop is source_loop: _set_state(destination, source) else: dest_loop.call_soon_threadsafe(_set_state, destination, source) destination.add_done_callback(_call_check_cancel) source.add_done_callback(_call_set_state) def _wrap_future(future, *, loop=None): # Don't use this function -- it's here for tests purposes only # and can be removed in future versions of uvloop. if isfuture(future): return future assert isinstance(future, cc_Future), \ 'concurrent.futures.Future is expected, got {!r}'.format(future) if loop is None: loop = aio_get_event_loop() try: create_future = loop.create_future except AttributeError: new_future = aio_Future(loop=loop) else: new_future = create_future() _chain_future(future, new_future) return new_future uvloop-0.8.1/uvloop/server.pyx0000664000372000037200000000314213156036740017307 0ustar travistravis00000000000000cdef class Server: def __cinit__(self, Loop loop): self._loop = loop self._servers = [] self._waiters = [] self._active_count = 0 cdef _add_server(self, UVStreamServer srv): self._servers.append(srv) cdef _wakeup(self): cdef list waiters waiters = self._waiters self._waiters = None for waiter in waiters: if not waiter.done(): waiter.set_result(waiter) cdef _attach(self): assert self._servers is not None self._active_count += 1 cdef _detach(self): assert self._active_count > 0 self._active_count -= 1 if self._active_count == 0 and self._servers is None: self._wakeup() # Public API def __repr__(self): return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) async def wait_closed(self): if self._servers is None or self._waiters is None: return waiter = self._loop._new_future() self._waiters.append(waiter) await waiter def close(self): if self._servers is None: return cdef list servers = self._servers self._servers = None for server in servers: (server)._close() if self._active_count == 0: self._wakeup() property sockets: def __get__(self): cdef list sockets = [] for server in self._servers: sockets.append( (server)._get_socket() ) return sockets uvloop-0.8.1/performance.png0000664000372000037200000006321513156036740016731 0ustar travistravis00000000000000PNG  IHDR H_6tEXtSoftwareAdobe ImageReadyqe<&iTXtXML:com.adobe.xmp PLTEЊSSSkHky bIDATxݍnᕐw KwNWa8 xD" " " " IIIIIHHHHHDDDDD $$$$$@$@$@$@$1b o,$DH.D2؅#F5DGɦZ4t?18 +D2wHv3" "X$seN$C̅F^>mDDHκ$DDrHNDDr\$6I5"9TDDEk۹ HƙH D2Mdj1Ǫ`nX֧D2~šIS$bWx+[ }1 ω]KS"y̬{&Rn-)8xK"y&?7W8 DzMn-|7[Y,sGs ݛZ$OybQxKs"p~hkD] ;#+Il7i%${9]Knk!"2c [ZPݶ TzYtBaߋd53o3;)LoNA"Wu*a`f{?"y =HAcG |au,fAf?͊E E/[|-!0;>#:׉fl@$\B0@[%l^fmn1"~H"!\1a^M,%]H@$+#Dr%I" ?$q^ۧ0Ŋ$$ݦ77ϻc$Sc1.W$ߺaD2ټE⪊sNE2H@$S3H~=ۏ4;c$;:H^pIG cYY:+ɬWd-$Dl!p1?/󚜃K&RY[,;dL=9vȣ$#y*ˍ~6\'%ur@$0ȬH~r076Dzi*1.V$ߛQ$f\"&96!HɆJ#cox|JAaK: pSծDp^@$A$I@$A$$DDH@$A$$DDH@$$$ D" "I$ D"I$$HII@$A$$DD"ϡI\'. ʗIU"H" "X$y~" "H$ux>C߫$ +D2EHH>ɾ_0ʤo" "J$?\O`6D&!ŘSs{bƘoZ`a(MI$J$utŽClҳq HD2v#4\"9tmϔHOD18,8Ob1>%;2k"?0c.v]1)Pxp Z3> HBЍanvnFX9<}!m"?TY6c,|QepgE2;lg{m@$"Y2_*,ni}V$oӀGձ _d]mL兪N}۳Iqk" gsIHv82w[:7" $ T$\"-D"<#ɹMJ[Zɔ@$AH)l*c<[YH$cS>+qVό@$? =1=BN~l?}i"YnL"9-@$ NwT2=).Mm^&yTޛE2mk-qNy/7D )Z"Y0E$/ӐGJV#ꗷuHHɷ3@n܎ %4m}Ⱦ^T[=$] $kT靈^ؚp]n#gU$sQz_fayc/DR "1=m̕ꈖ%kJi7'jV$_zKlini}R$$|MZju\0xt!/¿2F=+kuWUֶIw_$Ғ cgXVʥ6/?y- (^ܖE2N>¤">}/T 9HH6vYHgrZv~l.xK"ben9r;yyHSD}Z'>w_?35_䥓=r/m)VVjt뗽I슩$"I$7dsʁd7Ǿ͋h]ޘ͡Lh9ъɷ6d՛=n͒۬tw~=S9b;VkZɋɇHU DM"9YErM\<+5k"MivE)L<.=zܖ"ou\d\# HV׍H·B.@@H9bOvHH6wYH.V"ccw:$i̖u"967H"W"yص?H<>+!~wO$CP yGHS]i\H~HƏ(*OOD"6/ٺ ynWYT6ɸ\|6ϜDR$H)[$'NܩHoH~jάm8fқ}O+[NXxg>HLFH@$GVcMk/;+KgmHmxB~:JI"dT?E1tK"뇏3B'E2g{m@$KTN6w_j?zXU'+O$ouH |'yGI]Կp0,P~otQ$[>1 |]&i&bq6pr^ۯc$ $G6A sS\H H={#yt1.H"~&Eɸu#*p9D#4#mAB$DS2~{@ƛF@$A$׋#cvmwL" "N$oKp^2D[$@$A$׈dw lC $ХU9 DHW$ED" "P$Б=d2" "P$OD" ""(9DDrH#"HHn|+ID2 o\˳70d DDrH^̱*$DDrH^:+I5"y%G@$A$7u+@$A$׋G"s0<" "I$$II" QD2`$O$^[>H.v9 E" "I$ o_XeN@$A$dMHHHH>!?*6I"y fm@$w";Wΐr9=1]"yRHD2 s$Gǥ1MI$ ͅtB޾8 >K xH^j1Z:Șb1T"THODbac/Ng Ӈmi}HIGBؑwZ$saX1wB/F$m /!$2 7CҥSѯE262_lZxIk]@$4c ki!optc~- 8k 3&li}V$;mG=ɏj*yGrslNĘYCorKE2D2T{hlRv2ɏ{bQ25k3gKdCQ]j/ڞ̵o▽ni}V$sݷrs$|h<]:16M.'剋*Z5Q$gZ$So;5q-ϊ$ %$ôĘK酡W5+UEwKO^jr!fz~eV" [GNIۻ#KG5_Ma=ؔ-D"[iAUPf ^PnZL7SjV$-{zE2mk-qνw.s#ucS"̭V$LX8HnL0@$/H6f r| [}۷||aDta69n+H~HU$tK8ZD2fSYiO}zbwEpK$D[D2*nPnb0xjW^U$.ŷ[ͥW#fjY ׷ _D0~xϥ""YU$U<˰ ⽝m6~+~l ϟoOU$cAúdܣHl-"yz~a6'Erd& 3%Wе={"gjo0EZDžĺI3>"I$_$H6*qKE2w>+S(ۋU2gos'Eri{"I$$*IE26Et:kTyŢsli}Z$/!F@$Hɮ4fmJ: vS$셏N9nSU>%)I@$|d8]G2]䟈  99UU2ǥF@[ZFvԵ +=#fexm~vh?Zqfӝ7>#~,D|W;,]Ď k4HZ.:3 91,$3/am" E cc7~-',S[5'X&QӚ$< MO-EQ*R6Dmmɉ:VZ9Sg);HJ@7}Z䶒I"6$'c$OE+=eY<"n"Y 76$KGӤz\sa3q2 dܮHϚ(j%d~md]7xa]Йp0LVQHƏOrcw#zvkh?K6\D^[G ~V$GmH"9z,V©E/^)vOo;H&w%Ni~" Ur1E2ޛH~^%wrjQ$o# DC.aG[3P$Sd$DDrH~٥k׶ +EU Cn@$A$WdtD6@$$vХmD$ D2I$C CG t$C<I$DҢI"94F" "E$$y0LDDr/(6I5"y1.Hr I"yܮ0B" "F$/$H$fc$zHbG@$A$7$ D" "G"" "H$["s<HHȯ?mD@$A$gոO,&<HH.dxdBG$ D/AƫOV-J\ɳ:R)d6DDHy3Io>DDrHEB*;H$Z1+H@$A$Wd*1HHD$ E2I"" |J$#HH>#*IC"r9=1cL7D"/r~pl6Ե Ŀ-%rBq@|uHv?"yTb1J$xIHT7C QCs(vҺ]$sWI|^$vnyva[Z"$V$ |,Ɔ{8zK+Hzw#c鱪ܯp3-D"ٍH$/+s󟶴npD)-֭" $Y,tq"{sLuuV" tߋHUȉoRJ$ n;ɪ{$)[Z$D-'"Y/- :*V" t߇H֫<#i[ksI|H>Y$I|HޝYP$sSI[.D25\'D"}#MeJ$ n{Ň;X"I$doݲ'=avJ$ n;I$v'H@$A$$DHI" $DH@$$$ D" "I$ DHI$$D"I$A$$II" $DH@$$$I" " $$HHI$$D"I$$HII@$A$$DHI" $DH@$$$HH" "I$ DHI$$D"I$$DDII" $DH@$$$I"I$$ HHI$$D"I$$HI"I$_d?6=EOkli%I|HFqطŴxԶV" WdF3֣I$Z$E(C12bni%I|HQ/]ܣO3ဴH@$" O̷?r7^D"P 7g,,2J$ ޝsvAWuۮn2H@$;_/*SN~2IwE925ȹMܲ9ni%ItUriiT\$S[Z$D-"9lb7wIɲqK+HH^nMH$cSI[we˶3&6H'訌k[$D-EragD2mk-q7"\OHI$W${:&5m%I"swEpK߉H@$"fj0-D"""pg @$E2pXgvJ$ ޝXd_kTcUWLsK+HzwZ$gIr8zK+Hzw[$Sne~e[Z$D_-M?s)LJb)-D"p$1{mW9]\$Obʞ-D"~ۧvN <ӰI$[$/ݴXn~é)5D"kL1"toRJ$$^z׳{$)[Z$ekHoDLL!]뒡P$tTƵ6QP$r׉dJ$sI|F$cό[綊$CM$"Y{kH?2m%9$>/Y6sl,3@D1DHƦ2m%9m"H$lcArkP$ؓHƙʏavJ$sI|B$'?QU]q0-Dp2kHEηJd~-DpR$fL%[#y?LcK+#I$"y6fۗkGA4iN'ni%$Z$/Ŝb,*1p"oҝsו3sI$WHx#7T͞zV" 0FHE:rbg}c[c%թH1kHEK10l(ݤ9ŐLO-D8$wzE _oI8HIG$Ϲ&O;m"/|V$I"d>~I8DHbw"O*a6QD3I8*DDHc$$s]DDHP$ DqL$$|8DD{8A$$)! DgkHHI8*DDH8$$a6$#d"I$$s#I$A$$G6$pYDDH8$$p#1ϘII" uG6$9$88B&DH DB8DD8B$$9$0kHHIn @Dr!s" "I$#~#8B$9q{8A$$q, II" p!$!? h1pČq~V" p! I|H늓$J\Z$tV" p!#dA$Cyi_sD8BYD{ɺ^xȘb1IG؃H`| C*RV" p!I"=dG0rWeqV" p!ìm"=Y aeCK<3*J$#dT$$v ?C{U06+L 9[Z$q #ddx(p٤층HG8M$".%Pώ o}qK+8q얿d!ٛd-D8BB8D&"9wIɲqK+82ѵM$W"n8dH$cSI/ IH؅J$ChZjo,q|8"0ɴHGx_H#"gT~!dC$L$7\$ ljI/ IHN^xW$}ށHG¬m"ɳ_-%Eryf9HG8#I$C <ƱWN2J$#dM$CcNT̽HGP$أH^gtYhX1]W J'Z$q #dC$C%y=L3;&z?J$#dM$ <{$J$OթHGȇMVO\30;IYHb"ٔG@ q0kH8"x5897d>pA$8BQD2vx$qym"/ue$@$q8$$@$r~B8DDHDp!qL$A$$@$rv}yHHIH"kHI" I!H։$$D8Dr"q "I$"yU$_2! D #d" "I$"y#9$sM$q8$_R $@$:$Dx'o" pq8; 8D@$""iIe_" "I$")dq$$!BV8B&DHDHH։$$D Dp! D9$9lnw!II" I! II" p!+q!I"I$"I$fDHI" I"DZ$2$U$9$!*8$$U$9$b2$D DRlHI"I$"q8A$"I$,dC$A$$qGDDHDRfms" "I$")dHr!I"I$"I$U$iDHI" I"GQ8B$$! D8DR9$$q$$88$$$BfDHI" Iq8Cs &^[@$U$#K$!EIDR**DREHIH YEr#dI"I$C$U$:T$8GEHHI" I! HII"I$#dɏ:$$U$䷉d?C1pČ1ߴIHr")d/݈E!6aV" I!։7d .Ɗ\+$U$Y$UrUŰoe+;J$")dc$Tj,JGќ?,͗eJ$"")dWdVMbqDng6oi%2Q$*_-7al$s=HDRE㜌Wd]nAWuÖ3mm%:Tjx]|۞Mʎ[[$q8Q׋dd[7q˦o%_2$*"p BD"-D8*e//|k*DYٛߤdHDRD*_[,S'D2smdlV" II!s!HG$/- :*V" I!H&lH.dfψdZjo,@$9bU$E$uS>OV$$@$"XF$U$Y$ŐLO-D8**$'*{ɦuo$@$,dHI9D8GE#"I$h{C" I"inm]׶ĕHDXGYErw"'"+#1DREr7"'tgXHHHkHHI"q$U$um HII!T$8BV$DI")d!kHHI" "q8$1FREHII"I$M!+II"I$98**$'*DHr"I$l*Hu"I$A$L$wPbU$$8DH YER6T$DDIIC$U$$$GEB6FHHI"q$T4k^DREHIC$m!I" ")d"$$$HI! ^DREHIC$9U$91*DHHI"i?bT$DI""iI II"I$9$BV]EIN$$*eBV$DI")dI]DREHIC$8DREHII"I$l$T$DI""im""I$$!DRB]ER׶$2Q[EYEHIC$ڶ6T$H¯#HZG#)d"y88DRDRErg!+II"I$9΃K2T_E҂DREHI" K$"iI""I$$$DREH* YEHII")d!um HI"I$y /Hr!HI"I$Dko*1DREHI"I$8HHqM$U$$$DREREҬm2""I$$$DRE:HHF$s!!s{b8?`K+$DREREREkdDr v]zHI"""b81B&'"3Z$$**8HI4QGˈ? VvHI"""^DREE2M /?_rcH[&!q#I$U$G$SjfΡ17ݯ-{I#d"I2|9XV!?V"qX")䓽E)6+L 9[Z$$q""҅JCe{~mJ$9T$9I"""\ 7q˾渥Hr!HH ecm""D" 8[Z$:ηU$um H>!s,I#dI/d2""I$/#M9J$9U$U$9?nHu"HƇ"Y2m%G*( YEH 8p!HH YHHH>HI#dIII I69n+8BV,SU$`D9wEpK$9{H H\$HYrK+8BV,ST6[׵-d"F$lcAr#d""ig#dI"ْBcyk+8BVT8'c$Dr^G$U$։$,J?*s<]"x9"h%8BV8GL*;k'"y*n%nD8eB6FR׶kEbo~1"yN-DH YERERE҂DREEyQTىH YLfm[GHHQ$׽_$ѵ""G!g;y^ER׶$8DWERERHHHI")dŲlֶDREHI#dIcg2!HI"ΠkH YEBV,#*DHI!HHHZHHI"+d"X"lHIC$~U$wP4k[L*DH YERBֵM$U$$8B8B2 $$G6)dc$$$DR**g]HHI"qL$>^ER׶$8DWErXF$U$$$DR**l"q"qlX&dI"I$~umH YE=!+II"I$U$U$ZHHI"+d"X&U$`DHr"""i1B$DRȊeBm""I$$$q"I$ۯm")d?1DREHI")dIIHkII"I$9*L$$!n**eDREDHI!HH ٌ&""L9Ɣ$9bU$&r׳B%ۯmI! YHHcI$DR***$'*Dv] 2Ǹ$ۯ˄,dHII"Yk_??=@$9mI?r2';4(II_!+ ٬m]DREHTr"q"qq"I$Wo۷d"nU$q^1DREr"Yf?&DR***6FREHnc^OI_!H YERHH峷&G׶YG*Dr^ζ!nBVN$U$I$9U$q8$|J$'=DW׶bʐˈD28I!HHHZHHG?Sx B~AuL\=+2N_o-!g!B3=nE2"79e Y!d">|,dYB,HBB,d"iAr'YB "y&>O!d! Dr͉T e$} d! YB2ja{},dYBN7c} d!CB23i $d!CB2&|^B B2,d!H#t# B2,d!Hn8z B2,d!Hn!)%'Y " '! B2L$$dYB$| ! B2,d!CBϓ ! Y y!d!CDD  )%)Y򂐅 "ͤ d!1 Bt;L l,dIYQ,2 9g)Y/GL WT|3eBތbA$ZEJ݇V)/CB7dxB]ŬX&ajyuc;+bqpy6bۻ>5t 9_CBrxnk}]rJU^\XU$y[2|[b?r˹5[g~)]u,^ #<49'x^r:mjD&5!ٽ-<}ʣ(nъYn㡪KstJN1Ǖ!Wnc>04)!):NyIl-7x=X& ]Be%-]HWb5#˲{BͩB~Gӻd2<(MoBO,?GY \}o>$s]t%m"PXr}8=1KBRn䵐) BwOJ!4Iq2<*q}캎dέ[Q"Y 4Y$c5]_leȋ")!쒿:Z!Wg\h]D.)ZR^p]ȹirQO !C1F:; >f#MW2ddªg׆~+aCnM/ \}Bݴ|@ևB~iqz׻w=2<qR;,%-Onsn:ZP\~C;J\ 95eHȫB^.!ZM:QwZnCPXr~_ra.d"y\rAEb.(.o͡S}} 2,(X+([rUB rWF<~M:lUDʼn8v^֮v9jR/ 9{k Hp]0]v& v :nZUB K[!>W0W8B^r~X!_4_:;dȵ~מUU :jޖۊ-y, !r˱.,d"yHUZh F]l>roi =FRB];!8 w<+N+ӼZpIQ%gEI)W8$9b==&cWI9[,yX&u!DÓ0 ϫzsn}6 y:Wo9v^2<2)8I3R !,o_AS5t9 ◃ٔ׬p" "3Y|7GFB#x+dHBBwG2H Yp2L$cۯB2!d!M_/d!Hda~! nB$!|,d- A$@$@$@$" " " " " ɯG36́k2OD> ]I8apk.J v\.|$&)gwYi_a8ޛsv;RᅛHIl苲4ɟEyB{II"I$$OT$ DH" "½R$I$A$T$AyX$U$Ό0mZd <؇(<G!fB}wAD2<g^V$wpbr1pMEH;#Vw]zhwWd? sp@ U˭@ݲ 7ps=|xw/;yDu: Dw7[gmGڞɹ<|="39x\[/oduLrgnd*ɹt59j1_.qv'4ml]ީH}݃Zi*G6<:?߾8Gir4._L/ѱ]!!sq )_lgguhӾh> : /A*Œ KmJűqvL^~ PSiz\i)ޗ%8=;',ml]ީH]}Vv!ԟ0$OYcO0{3 n|a,W<[_SvN}ڧ5lɕKai939]@g˭qR'dTk,?srڻdS$;L]^Iyuř_* R٥ [}>I/wE %4I>Nߏ^9SR.]ٻkřDTg:\ }n7}Lt^/6rk]S<.7>qG(?G:^n'C yZ8?z^ջ4|OV{]ީHɝ]Bq7PRZ9[J(z)ǚOV|nB$zCQ߹5_v/yz\e[>`r:ǻt3yZOw8y# /7tucZG粗z2#&]zUwTx5z]rT*DrTtC7qԋdu<w7_D$SW>ekZ,?RN08阤Y]|ToI,#̟j".?;j͗[dj[ZɃR{zgu&oIOu\W$Ã@KӤ&Z"ñav<|n]۹^צ~tte:לnz_X{\x*I"/g%&r4-X75q2<4_BN=<=ai@=9" wp@Cj7\W$]3֛՟ñ;>X(%t(.0SH].+цUkaVG\Ap^n[$ 'q+irK˭(ݒ "9]7ߍUv1V|o͙Mm>ػ.T*Drj\zA$cyʏE򔚋n0Hdq_eEٓ8>qVRnd>cp=8ɥ@1 _~c=H҆wE򔛋kB$drESHR#9]w ibYi\ CEw}c$r5bsOyPl匦iHcdLnW$7<[D8gr6d$,`4YM?wc&.~YGqE}\K.<$k>8/wmIK_hMr+rli{1ErzJRv==ھ=U8ʄLnW$yHLngXjfr\lz8lq0/#.$"y7i}\6=P_R7woMT30ODwzyM1 3V}X||M]sF<^~˝T֐n1ưF$';Hbk^\x*I"#rSٛa~غ:?06r1T߶_n"9yvًk+{RmeJav83]l_l"y3r'嫮O&uwɅR$H.Eu![;ۜʅڏ,.GSo܅dӇfݬ#K6Rl˼ yk3]lGT9k)G:/74X Uǫ!k]2Y,h"Y̶[liA;wɅR$FH|t?k^hP ^o P'[$6lw&/T$W0Y|QlvmL^x3ܫVC,zuJ\٭Hٷ$gӭρl^\/˘| Vq5l.6:uXgu,k>~剤 yQMꘂ%)6>GA<ׯg6:W5ݻu3 ^\St]|"a[7gee~赩o [u`.!ͷy/k$k5pXԭ-v.IA򬷇llH{qF<Պg6H{7)ͦ$1JXuuj4mڍlt0W;(r63n Z_޾TC[u&^ףoोݵ=$4lnLŰcO:vG? 88ݦCn*|s9wyM~h+OՙZO~/,tS4> :P|IzYB5ǂ.߉k p0H"HAҳAA@$=$I@DI@DI@DI@DNn*CÅ $$$$$J $$$$$ H H H H H #d5QjIENDB`uvloop-0.8.1/setup.cfg0000664000372000037200000000004613156037661015537 0ustar travistravis00000000000000[egg_info] tag_build = tag_date = 0 uvloop-0.8.1/setup.py0000664000372000037200000002356313156036740015436 0ustar travistravis00000000000000import os import os.path import re import shutil import subprocess import sys if sys.platform in ('win32', 'cygwin', 'cli'): raise RuntimeError('uvloop does not support Windows at the moment') vi = sys.version_info if vi < (3, 5): raise RuntimeError('uvloop requires Python 3.5 or greater') if vi[:2] == (3, 6): if vi.releaselevel == 'beta' and vi.serial < 3: raise RuntimeError('uvloop requires Python 3.5 or 3.6b3 or greater') from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as build_ext from setuptools.command.sdist import sdist as sdist VERSION = '0.8.1' CFLAGS = ['-O2'] LIBUV_DIR = os.path.join(os.path.dirname(__file__), 'vendor', 'libuv') LIBUV_BUILD_DIR = os.path.join(os.path.dirname(__file__), 'build', 'libuv') def _libuv_build_env(): env = os.environ.copy() cur_cflags = env.get('CFLAGS', '') if not re.search('-O\d', cur_cflags): cur_cflags += ' -O2' env['CFLAGS'] = (cur_cflags + ' -fPIC ' + env.get('ARCHFLAGS', '')) return env def _libuv_autogen(env): if not os.path.exists(os.path.join(LIBUV_DIR, 'configure')): subprocess.run( ['/bin/sh', 'autogen.sh'], cwd=LIBUV_DIR, env=env, check=True) class uvloop_sdist(sdist): def run(self): # Make sure sdist archive contains configure # to avoid the dependency on autotools. _libuv_autogen(_libuv_build_env()) super().run() class uvloop_build_ext(build_ext): user_options = build_ext.user_options + [ ('cython-always', None, 'run cythonize() even if .c files are present'), ('cython-annotate', None, 'Produce a colorized HTML version of the Cython source.'), ('cython-directives=', None, 'Cythion compiler directives'), ('use-system-libuv', None, 'Use the system provided libuv, instead of the bundled one'), ] boolean_options = build_ext.boolean_options + [ 'cython-always', 'cython-annotate', 'use-system-libuv', ] def initialize_options(self): # initialize_options() may be called multiple times on the # same command object, so make sure not to override previously # set options. if getattr(self, '_initialized', False): return super().initialize_options() self.use_system_libuv = False self.cython_always = False self.cython_annotate = None self.cython_directives = None def finalize_options(self): # finalize_options() may be called multiple times on the # same command object, so make sure not to override previously # set options. if getattr(self, '_initialized', False): return need_cythonize = self.cython_always cfiles = {} for extension in self.distribution.ext_modules: for i, sfile in enumerate(extension.sources): if sfile.endswith('.pyx'): prefix, ext = os.path.splitext(sfile) cfile = prefix + '.c' if os.path.exists(cfile) and not self.cython_always: extension.sources[i] = cfile else: if os.path.exists(cfile): cfiles[cfile] = os.path.getmtime(cfile) else: cfiles[cfile] = 0 need_cythonize = True if need_cythonize: try: import Cython except ImportError: raise RuntimeError( 'please install Cython to compile uvloop from source') if Cython.__version__ < '0.24': raise RuntimeError( 'uvloop requires Cython version 0.24 or greater') from Cython.Build import cythonize directives = {} if self.cython_directives: for directive in self.cython_directives.split(','): k, _, v = directive.partition('=') if v.lower() == 'false': v = False if v.lower() == 'true': v = True directives[k] = v self.distribution.ext_modules[:] = cythonize( self.distribution.ext_modules, compiler_directives=directives, annotate=self.cython_annotate) for cfile, timestamp in cfiles.items(): if os.path.getmtime(cfile) != timestamp: # The file was recompiled, patch self._patch_cfile(cfile) super().finalize_options() self._initialized = True def _patch_cfile(self, cfile): # Patch Cython 'async def' coroutines to have a 'tp_iter' # slot, which makes them compatible with 'yield from' without # the `asyncio.coroutine` decorator. with open(cfile, 'rt') as f: src = f.read() src = re.sub( r''' \s* offsetof\(__pyx_CoroutineObject,\s*gi_weakreflist\), \s* 0, \s* 0, \s* __pyx_Coroutine_methods, \s* __pyx_Coroutine_memberlist, \s* __pyx_Coroutine_getsets, ''', r''' offsetof(__pyx_CoroutineObject, gi_weakreflist), __Pyx_Coroutine_await, /* tp_iter */ (iternextfunc) __Pyx_Generator_Next, /* tp_iternext */ __pyx_Coroutine_methods, __pyx_Coroutine_memberlist, __pyx_Coroutine_getsets, ''', src, flags=re.X) # Fix a segfault in Cython. src = re.sub( r''' \s* __Pyx_Coroutine_get_qualname\(__pyx_CoroutineObject\s+\*self\) \s* { \s* Py_INCREF\(self->gi_qualname\); ''', r''' __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) { if (self->gi_qualname == NULL) { return __pyx_empty_unicode; } Py_INCREF(self->gi_qualname); ''', src, flags=re.X) src = re.sub( r''' \s* __Pyx_Coroutine_get_name\(__pyx_CoroutineObject\s+\*self\) \s* { \s* Py_INCREF\(self->gi_name\); ''', r''' __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) { if (self->gi_name == NULL) { return __pyx_empty_unicode; } Py_INCREF(self->gi_name); ''', src, flags=re.X) with open(cfile, 'wt') as f: f.write(src) def build_libuv(self): env = _libuv_build_env() # Make sure configure and friends are present in case # we are building from a git checkout. _libuv_autogen(env) # Copy the libuv tree to build/ so that its build # products don't pollute sdist accidentally. if os.path.exists(LIBUV_BUILD_DIR): shutil.rmtree(LIBUV_BUILD_DIR) shutil.copytree(LIBUV_DIR, LIBUV_BUILD_DIR) # Sometimes pip fails to preserve the timestamps correctly, # in which case, make will try to run autotools again. subprocess.run( ['touch', 'configure.ac', 'aclocal.m4', 'configure', 'Makefile.am', 'Makefile.in'], cwd=LIBUV_BUILD_DIR, env=env, check=True) subprocess.run( ['./configure'], cwd=LIBUV_BUILD_DIR, env=env, check=True) j_flag = '-j{}'.format(os.cpu_count() or 1) c_flag = "CFLAGS={}".format(env['CFLAGS']) subprocess.run( ['make', j_flag, c_flag], cwd=LIBUV_BUILD_DIR, env=env, check=True) def build_extensions(self): if self.use_system_libuv: self.compiler.add_library('uv') if sys.platform == 'darwin' and \ os.path.exists('/opt/local/include'): # Support macports on Mac OS X. self.compiler.add_include_dir('/opt/local/include') else: libuv_lib = os.path.join(LIBUV_BUILD_DIR, '.libs', 'libuv.a') if not os.path.exists(libuv_lib): self.build_libuv() if not os.path.exists(libuv_lib): raise RuntimeError('failed to build libuv') self.extensions[-1].extra_objects.extend([libuv_lib]) self.compiler.add_include_dir(os.path.join(LIBUV_DIR, 'include')) if sys.platform.startswith('linux'): self.compiler.add_library('rt') elif sys.platform.startswith(('freebsd', 'dragonfly')): self.compiler.add_library('kvm') elif sys.platform.startswith('sunos'): self.compiler.add_library('kstat') super().build_extensions() with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f: readme = f.read() setup( name='uvloop', description='Fast implementation of asyncio event loop on top of libuv', long_description=readme, url='http://github.com/MagicStack/uvloop', license='MIT', author='Yury Selivanov', author_email='yury@magic.io', platforms=['*nix'], version=VERSION, packages=['uvloop'], cmdclass={ 'sdist': uvloop_sdist, 'build_ext': uvloop_build_ext }, ext_modules=[ Extension( "uvloop.loop", sources=[ "uvloop/loop.pyx", ], extra_compile_args=CFLAGS ), ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: Apache Software License', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', ], provides=['uvloop'], include_package_data=True, test_suite='tests.suite' ) uvloop-0.8.1/Makefile0000664000372000037200000000177213156036740015362 0ustar travistravis00000000000000.PHONY: _default clean clean-libuv distclean compile debug docs test testinstalled release PYTHON ?= python _default: compile clean: rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd rm -fr build/lib.* build/temp.* build/libuv rm -fr uvloop/*.c uvloop/*.html uvloop/*.so rm -fr uvloop/handles/*.html uvloop/includes/*.html find . -name '__pycache__' | xargs rm -rf clean-libuv: (cd vendor/libuv; git clean -dfX) distclean: clean clean-libuv rm -fr build/ compile: clean $(PYTHON) setup.py build_ext --inplace --cython-always debug: clean $(PYTHON) setup.py build_ext --inplace --debug \ --cython-always \ --cython-annotate \ --cython-directives="linetrace=True" \ --define UVLOOP_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL docs: $(PYTHON) setup.py build_ext --inplace build_sphinx test: PYTHONASYNCIODEBUG=1 $(PYTHON) setup.py test $(PYTHON) setup.py test testinstalled: $(PYTHON) tests/__init__.py release: distclean compile test $(PYTHON) setup.py sdist bdist_wheel upload uvloop-0.8.1/PKG-INFO0000664000372000037200000000655313156037661015024 0ustar travistravis00000000000000Metadata-Version: 1.1 Name: uvloop Version: 0.8.1 Summary: Fast implementation of asyncio event loop on top of libuv Home-page: http://github.com/MagicStack/uvloop Author: Yury Selivanov Author-email: yury@magic.io License: MIT Description-Content-Type: UNKNOWN Description: .. image:: https://travis-ci.org/MagicStack/uvloop.svg?branch=master :target: https://travis-ci.org/MagicStack/uvloop .. image:: https://img.shields.io/pypi/v/uvloop.svg :target: https://pypi.python.org/pypi/uvloop uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. The project documentation can be found `here `_. Please also check out the `wiki `_. Performance ----------- uvloop makes asyncio 2-4x faster. .. image:: performance.png :target: http://magic.io/blog/uvloop-blazing-fast-python-networking/ The above chart shows the performance of an echo server with different message sizes. The *sockets* benchmark uses ``loop.sock_recv()`` and ``loop.sock_sendall()`` methods; the *streams* benchmark uses asyncio high-level streams, created by the ``asyncio.start_server()`` function; and the *protocol* benchmark uses ``loop.create_server()`` with a simple echo protocol. Read more about uvloop `performance `_. Installation ------------ uvloop requires Python 3.5 and is available on PyPI. Use pip to install it:: $ pip install uvloop Using uvloop ------------ To make asyncio use uvloop, you can install the uvloop event loop policy: .. code:: python import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) Alternatively, you can create an instance of the loop manually, using: .. code:: python loop = uvloop.new_event_loop() asyncio.set_event_loop(loop) Development of uvloop --------------------- To build uvloop, you'll need Cython and Python 3.5. The best way is to create a virtual env, so that you'll have ``cython`` and ``python`` commands pointing to the correct tools. 1. ``git clone --recursive git@github.com:MagicStack/uvloop.git`` 2. ``cd uvloop`` 3. ``make`` 4. ``make test`` License ------- uvloop is dual-licensed under MIT and Apache 2.0 licenses. Platform: *nix Classifier: Development Status :: 5 - Production/Stable Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: License :: OSI Approved :: Apache Software License Classifier: License :: OSI Approved :: MIT License Classifier: Intended Audience :: Developers Provides: uvloop uvloop-0.8.1/uvloop.egg-info/0000775000372000037200000000000013156037661016734 5ustar travistravis00000000000000uvloop-0.8.1/uvloop.egg-info/SOURCES.txt0000664000372000037200000003141213156037661020621 0ustar travistravis00000000000000LICENSE-APACHE LICENSE-MIT MANIFEST.in Makefile README.rst performance.png setup.py docs/conf.py docs/index.rst docs/api/index.rst docs/dev/index.rst docs/user/index.rst examples/bench/echoclient.py examples/bench/echoserver.py examples/bench/rlserver.py tests/__init__.py tests/test_aiohttp.py tests/test_base.py tests/test_cython.py tests/test_dns.py tests/test_executors.py tests/test_futures.py tests/test_pipes.py tests/test_process.py tests/test_signals.py tests/test_sockets.py tests/test_tasks.py tests/test_tcp.py tests/test_testbase.py tests/test_udp.py tests/test_unix.py tests/certs/ssl_cert.pem tests/certs/ssl_key.pem uvloop/__init__.py uvloop/_noop.py uvloop/_patch.py uvloop/_testbase.py uvloop/cbhandles.pxd uvloop/cbhandles.pyx uvloop/chain_futs.pyx uvloop/dns.pyx uvloop/errors.pyx uvloop/future.pyx uvloop/loop.c uvloop/loop.pxd uvloop/loop.pyx uvloop/request.pxd uvloop/request.pyx uvloop/server.pxd uvloop/server.pyx uvloop.egg-info/PKG-INFO uvloop.egg-info/SOURCES.txt uvloop.egg-info/dependency_links.txt uvloop.egg-info/top_level.txt uvloop/handles/async_.pxd uvloop/handles/async_.pyx uvloop/handles/basetransport.pxd uvloop/handles/basetransport.pyx uvloop/handles/check.pxd uvloop/handles/check.pyx uvloop/handles/handle.pxd uvloop/handles/handle.pyx uvloop/handles/idle.pxd uvloop/handles/idle.pyx uvloop/handles/pipe.pxd uvloop/handles/pipe.pyx uvloop/handles/poll.pxd uvloop/handles/poll.pyx uvloop/handles/process.pxd uvloop/handles/process.pyx uvloop/handles/stream.pxd uvloop/handles/stream.pyx uvloop/handles/streamserver.pxd uvloop/handles/streamserver.pyx uvloop/handles/tcp.pxd uvloop/handles/tcp.pyx uvloop/handles/timer.pxd uvloop/handles/timer.pyx uvloop/handles/udp.pxd uvloop/handles/udp.pyx uvloop/includes/__init__.py uvloop/includes/compat.h uvloop/includes/consts.pxi uvloop/includes/debug.h uvloop/includes/debug.pxd uvloop/includes/python.pxd uvloop/includes/stdlib.pxi uvloop/includes/system.pxd uvloop/includes/uv.pxd vendor/libuv/.git vendor/libuv/.gitignore vendor/libuv/.mailmap vendor/libuv/AUTHORS vendor/libuv/CONTRIBUTING.md vendor/libuv/ChangeLog vendor/libuv/LICENSE vendor/libuv/MAINTAINERS.md vendor/libuv/Makefile.am vendor/libuv/Makefile.in vendor/libuv/Makefile.mingw vendor/libuv/README.md vendor/libuv/SUPPORTED_PLATFORMS.md vendor/libuv/aclocal.m4 vendor/libuv/android-configure vendor/libuv/appveyor.yml vendor/libuv/ar-lib vendor/libuv/autogen.sh vendor/libuv/checksparse.sh vendor/libuv/common.gypi vendor/libuv/compile vendor/libuv/config.guess vendor/libuv/config.sub vendor/libuv/configure vendor/libuv/configure.ac vendor/libuv/depcomp vendor/libuv/gyp_uv.py vendor/libuv/install-sh vendor/libuv/libuv.nsi vendor/libuv/libuv.pc.in vendor/libuv/ltmain.sh vendor/libuv/missing vendor/libuv/uv.gyp vendor/libuv/vcbuild.bat vendor/libuv/autom4te.cache/output.0 vendor/libuv/autom4te.cache/output.1 vendor/libuv/autom4te.cache/requests vendor/libuv/autom4te.cache/traces.0 vendor/libuv/autom4te.cache/traces.1 vendor/libuv/include/android-ifaddrs.h vendor/libuv/include/pthread-barrier.h vendor/libuv/include/stdint-msvc2008.h vendor/libuv/include/tree.h vendor/libuv/include/uv-aix.h vendor/libuv/include/uv-bsd.h vendor/libuv/include/uv-darwin.h vendor/libuv/include/uv-errno.h vendor/libuv/include/uv-linux.h vendor/libuv/include/uv-os390.h vendor/libuv/include/uv-sunos.h vendor/libuv/include/uv-threadpool.h vendor/libuv/include/uv-unix.h vendor/libuv/include/uv-version.h vendor/libuv/include/uv-win.h vendor/libuv/include/uv.h vendor/libuv/m4/.gitignore vendor/libuv/m4/as_case.m4 vendor/libuv/m4/libtool.m4 vendor/libuv/m4/libuv-check-flags.m4 vendor/libuv/m4/libuv-extra-automake-flags.m4 vendor/libuv/m4/ltoptions.m4 vendor/libuv/m4/ltsugar.m4 vendor/libuv/m4/ltversion.m4 vendor/libuv/m4/lt~obsolete.m4 vendor/libuv/samples/.gitignore vendor/libuv/samples/socks5-proxy/.gitignore vendor/libuv/samples/socks5-proxy/LICENSE vendor/libuv/samples/socks5-proxy/Makefile vendor/libuv/samples/socks5-proxy/build.gyp vendor/libuv/samples/socks5-proxy/client.c vendor/libuv/samples/socks5-proxy/defs.h vendor/libuv/samples/socks5-proxy/getopt.c vendor/libuv/samples/socks5-proxy/main.c vendor/libuv/samples/socks5-proxy/s5.c vendor/libuv/samples/socks5-proxy/s5.h vendor/libuv/samples/socks5-proxy/server.c vendor/libuv/samples/socks5-proxy/util.c vendor/libuv/src/fs-poll.c vendor/libuv/src/heap-inl.h vendor/libuv/src/inet.c vendor/libuv/src/queue.h vendor/libuv/src/threadpool.c vendor/libuv/src/uv-common.c vendor/libuv/src/uv-common.h vendor/libuv/src/version.c vendor/libuv/src/unix/aix.c vendor/libuv/src/unix/android-ifaddrs.c vendor/libuv/src/unix/async.c vendor/libuv/src/unix/atomic-ops.h vendor/libuv/src/unix/core.c vendor/libuv/src/unix/darwin-proctitle.c vendor/libuv/src/unix/darwin.c vendor/libuv/src/unix/dl.c vendor/libuv/src/unix/freebsd.c vendor/libuv/src/unix/fs.c vendor/libuv/src/unix/fsevents.c vendor/libuv/src/unix/getaddrinfo.c vendor/libuv/src/unix/getnameinfo.c vendor/libuv/src/unix/internal.h vendor/libuv/src/unix/kqueue.c vendor/libuv/src/unix/linux-core.c vendor/libuv/src/unix/linux-inotify.c vendor/libuv/src/unix/linux-syscalls.c vendor/libuv/src/unix/linux-syscalls.h vendor/libuv/src/unix/loop-watcher.c vendor/libuv/src/unix/loop.c vendor/libuv/src/unix/netbsd.c vendor/libuv/src/unix/openbsd.c vendor/libuv/src/unix/os390-syscalls.c vendor/libuv/src/unix/os390-syscalls.h vendor/libuv/src/unix/os390.c vendor/libuv/src/unix/pipe.c vendor/libuv/src/unix/poll.c vendor/libuv/src/unix/process.c vendor/libuv/src/unix/proctitle.c vendor/libuv/src/unix/pthread-barrier.c vendor/libuv/src/unix/pthread-fixes.c vendor/libuv/src/unix/signal.c vendor/libuv/src/unix/spinlock.h vendor/libuv/src/unix/stream.c vendor/libuv/src/unix/sunos.c vendor/libuv/src/unix/tcp.c vendor/libuv/src/unix/thread.c vendor/libuv/src/unix/timer.c vendor/libuv/src/unix/tty.c vendor/libuv/src/unix/udp.c vendor/libuv/src/win/async.c vendor/libuv/src/win/atomicops-inl.h vendor/libuv/src/win/core.c vendor/libuv/src/win/detect-wakeup.c vendor/libuv/src/win/dl.c vendor/libuv/src/win/error.c vendor/libuv/src/win/fs-event.c vendor/libuv/src/win/fs.c vendor/libuv/src/win/getaddrinfo.c vendor/libuv/src/win/getnameinfo.c vendor/libuv/src/win/handle-inl.h vendor/libuv/src/win/handle.c vendor/libuv/src/win/internal.h vendor/libuv/src/win/loop-watcher.c vendor/libuv/src/win/pipe.c vendor/libuv/src/win/poll.c vendor/libuv/src/win/process-stdio.c vendor/libuv/src/win/process.c vendor/libuv/src/win/req-inl.h vendor/libuv/src/win/req.c vendor/libuv/src/win/signal.c vendor/libuv/src/win/snprintf.c vendor/libuv/src/win/stream-inl.h vendor/libuv/src/win/stream.c vendor/libuv/src/win/tcp.c vendor/libuv/src/win/thread.c vendor/libuv/src/win/timer.c vendor/libuv/src/win/tty.c vendor/libuv/src/win/udp.c vendor/libuv/src/win/util.c vendor/libuv/src/win/winapi.c vendor/libuv/src/win/winapi.h vendor/libuv/src/win/winsock.c vendor/libuv/src/win/winsock.h vendor/libuv/test/benchmark-async-pummel.c vendor/libuv/test/benchmark-async.c vendor/libuv/test/benchmark-fs-stat.c vendor/libuv/test/benchmark-getaddrinfo.c vendor/libuv/test/benchmark-list.h vendor/libuv/test/benchmark-loop-count.c vendor/libuv/test/benchmark-million-async.c vendor/libuv/test/benchmark-million-timers.c vendor/libuv/test/benchmark-multi-accept.c vendor/libuv/test/benchmark-ping-pongs.c vendor/libuv/test/benchmark-pound.c vendor/libuv/test/benchmark-pump.c vendor/libuv/test/benchmark-sizes.c vendor/libuv/test/benchmark-spawn.c vendor/libuv/test/benchmark-tcp-write-batch.c vendor/libuv/test/benchmark-thread.c vendor/libuv/test/benchmark-udp-pummel.c vendor/libuv/test/blackhole-server.c vendor/libuv/test/dns-server.c vendor/libuv/test/echo-server.c vendor/libuv/test/run-benchmarks.c vendor/libuv/test/run-tests.c vendor/libuv/test/runner-unix.c vendor/libuv/test/runner-unix.h vendor/libuv/test/runner-win.c vendor/libuv/test/runner-win.h vendor/libuv/test/runner.c vendor/libuv/test/runner.h vendor/libuv/test/task.h vendor/libuv/test/test-active.c vendor/libuv/test/test-async-null-cb.c vendor/libuv/test/test-async.c vendor/libuv/test/test-barrier.c vendor/libuv/test/test-callback-order.c vendor/libuv/test/test-callback-stack.c vendor/libuv/test/test-close-fd.c vendor/libuv/test/test-close-order.c vendor/libuv/test/test-condvar.c vendor/libuv/test/test-connection-fail.c vendor/libuv/test/test-cwd-and-chdir.c vendor/libuv/test/test-default-loop-close.c vendor/libuv/test/test-delayed-accept.c vendor/libuv/test/test-dlerror.c vendor/libuv/test/test-eintr-handling.c vendor/libuv/test/test-embed.c vendor/libuv/test/test-emfile.c vendor/libuv/test/test-error.c vendor/libuv/test/test-fail-always.c vendor/libuv/test/test-fs-event.c vendor/libuv/test/test-fs-poll.c vendor/libuv/test/test-fs.c vendor/libuv/test/test-get-currentexe.c vendor/libuv/test/test-get-loadavg.c vendor/libuv/test/test-get-memory.c vendor/libuv/test/test-get-passwd.c vendor/libuv/test/test-getaddrinfo.c vendor/libuv/test/test-getnameinfo.c vendor/libuv/test/test-getsockname.c vendor/libuv/test/test-handle-fileno.c vendor/libuv/test/test-homedir.c vendor/libuv/test/test-hrtime.c vendor/libuv/test/test-idle.c vendor/libuv/test/test-ip4-addr.c vendor/libuv/test/test-ip6-addr.c vendor/libuv/test/test-ipc-send-recv.c vendor/libuv/test/test-ipc.c vendor/libuv/test/test-list.h vendor/libuv/test/test-loop-alive.c vendor/libuv/test/test-loop-close.c vendor/libuv/test/test-loop-configure.c vendor/libuv/test/test-loop-handles.c vendor/libuv/test/test-loop-stop.c vendor/libuv/test/test-loop-time.c vendor/libuv/test/test-multiple-listen.c vendor/libuv/test/test-mutexes.c vendor/libuv/test/test-osx-select.c vendor/libuv/test/test-pass-always.c vendor/libuv/test/test-ping-pong.c vendor/libuv/test/test-pipe-bind-error.c vendor/libuv/test/test-pipe-close-stdout-read-stdin.c vendor/libuv/test/test-pipe-connect-error.c vendor/libuv/test/test-pipe-connect-multiple.c vendor/libuv/test/test-pipe-connect-prepare.c vendor/libuv/test/test-pipe-getsockname.c vendor/libuv/test/test-pipe-pending-instances.c vendor/libuv/test/test-pipe-sendmsg.c vendor/libuv/test/test-pipe-server-close.c vendor/libuv/test/test-pipe-set-non-blocking.c vendor/libuv/test/test-platform-output.c vendor/libuv/test/test-poll-close-doesnt-corrupt-stack.c vendor/libuv/test/test-poll-close.c vendor/libuv/test/test-poll-closesocket.c vendor/libuv/test/test-poll.c vendor/libuv/test/test-process-title.c vendor/libuv/test/test-queue-foreach-delete.c vendor/libuv/test/test-ref.c vendor/libuv/test/test-run-nowait.c vendor/libuv/test/test-run-once.c vendor/libuv/test/test-semaphore.c vendor/libuv/test/test-shutdown-close.c vendor/libuv/test/test-shutdown-eof.c vendor/libuv/test/test-shutdown-twice.c vendor/libuv/test/test-signal-multiple-loops.c vendor/libuv/test/test-signal.c vendor/libuv/test/test-socket-buffer-size.c vendor/libuv/test/test-spawn.c vendor/libuv/test/test-stdio-over-pipes.c vendor/libuv/test/test-tcp-alloc-cb-fail.c vendor/libuv/test/test-tcp-bind-error.c vendor/libuv/test/test-tcp-bind6-error.c vendor/libuv/test/test-tcp-close-accept.c vendor/libuv/test/test-tcp-close-while-connecting.c vendor/libuv/test/test-tcp-close.c vendor/libuv/test/test-tcp-connect-error-after-write.c vendor/libuv/test/test-tcp-connect-error.c vendor/libuv/test/test-tcp-connect-timeout.c vendor/libuv/test/test-tcp-connect6-error.c vendor/libuv/test/test-tcp-create-socket-early.c vendor/libuv/test/test-tcp-flags.c vendor/libuv/test/test-tcp-oob.c vendor/libuv/test/test-tcp-open.c vendor/libuv/test/test-tcp-read-stop.c vendor/libuv/test/test-tcp-shutdown-after-write.c vendor/libuv/test/test-tcp-try-write.c vendor/libuv/test/test-tcp-unexpected-read.c vendor/libuv/test/test-tcp-write-after-connect.c vendor/libuv/test/test-tcp-write-fail.c vendor/libuv/test/test-tcp-write-queue-order.c vendor/libuv/test/test-tcp-write-to-half-open-connection.c vendor/libuv/test/test-tcp-writealot.c vendor/libuv/test/test-thread-equal.c vendor/libuv/test/test-thread.c vendor/libuv/test/test-threadpool-cancel.c vendor/libuv/test/test-threadpool.c vendor/libuv/test/test-timer-again.c vendor/libuv/test/test-timer-from-check.c vendor/libuv/test/test-timer.c vendor/libuv/test/test-tmpdir.c vendor/libuv/test/test-tty.c vendor/libuv/test/test-udp-alloc-cb-fail.c vendor/libuv/test/test-udp-bind.c vendor/libuv/test/test-udp-create-socket-early.c vendor/libuv/test/test-udp-dgram-too-big.c vendor/libuv/test/test-udp-ipv6.c vendor/libuv/test/test-udp-multicast-interface.c vendor/libuv/test/test-udp-multicast-interface6.c vendor/libuv/test/test-udp-multicast-join.c vendor/libuv/test/test-udp-multicast-join6.c vendor/libuv/test/test-udp-multicast-ttl.c vendor/libuv/test/test-udp-open.c vendor/libuv/test/test-udp-options.c vendor/libuv/test/test-udp-send-and-recv.c vendor/libuv/test/test-udp-send-immediate.c vendor/libuv/test/test-udp-send-unreachable.c vendor/libuv/test/test-udp-try-send.c vendor/libuv/test/test-walk-handles.c vendor/libuv/test/test-watcher-cross-stop.c vendor/libuv/test/fixtures/empty_file vendor/libuv/test/fixtures/load_error.nodeuvloop-0.8.1/uvloop.egg-info/dependency_links.txt0000664000372000037200000000000113156037654023004 0ustar travistravis00000000000000 uvloop-0.8.1/uvloop.egg-info/PKG-INFO0000664000372000037200000000655313156037654020044 0ustar travistravis00000000000000Metadata-Version: 1.1 Name: uvloop Version: 0.8.1 Summary: Fast implementation of asyncio event loop on top of libuv Home-page: http://github.com/MagicStack/uvloop Author: Yury Selivanov Author-email: yury@magic.io License: MIT Description-Content-Type: UNKNOWN Description: .. image:: https://travis-ci.org/MagicStack/uvloop.svg?branch=master :target: https://travis-ci.org/MagicStack/uvloop .. image:: https://img.shields.io/pypi/v/uvloop.svg :target: https://pypi.python.org/pypi/uvloop uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. The project documentation can be found `here `_. Please also check out the `wiki `_. Performance ----------- uvloop makes asyncio 2-4x faster. .. image:: performance.png :target: http://magic.io/blog/uvloop-blazing-fast-python-networking/ The above chart shows the performance of an echo server with different message sizes. The *sockets* benchmark uses ``loop.sock_recv()`` and ``loop.sock_sendall()`` methods; the *streams* benchmark uses asyncio high-level streams, created by the ``asyncio.start_server()`` function; and the *protocol* benchmark uses ``loop.create_server()`` with a simple echo protocol. Read more about uvloop `performance `_. Installation ------------ uvloop requires Python 3.5 and is available on PyPI. Use pip to install it:: $ pip install uvloop Using uvloop ------------ To make asyncio use uvloop, you can install the uvloop event loop policy: .. code:: python import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) Alternatively, you can create an instance of the loop manually, using: .. code:: python loop = uvloop.new_event_loop() asyncio.set_event_loop(loop) Development of uvloop --------------------- To build uvloop, you'll need Cython and Python 3.5. The best way is to create a virtual env, so that you'll have ``cython`` and ``python`` commands pointing to the correct tools. 1. ``git clone --recursive git@github.com:MagicStack/uvloop.git`` 2. ``cd uvloop`` 3. ``make`` 4. ``make test`` License ------- uvloop is dual-licensed under MIT and Apache 2.0 licenses. Platform: *nix Classifier: Development Status :: 5 - Production/Stable Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: License :: OSI Approved :: Apache Software License Classifier: License :: OSI Approved :: MIT License Classifier: Intended Audience :: Developers Provides: uvloop uvloop-0.8.1/uvloop.egg-info/top_level.txt0000664000372000037200000000000713156037654021465 0ustar travistravis00000000000000uvloop uvloop-0.8.1/examples/0000775000372000037200000000000013156037661015534 5ustar travistravis00000000000000uvloop-0.8.1/examples/bench/0000775000372000037200000000000013156037661016613 5ustar travistravis00000000000000uvloop-0.8.1/examples/bench/echoclient.py0000664000372000037200000000460013156036740021277 0ustar travistravis00000000000000# Copied with minimal modifications from curio # https://github.com/dabeaz/curio import argparse import time from concurrent.futures import ProcessPoolExecutor from socket import * if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--msize', default=1000, type=int, help='message size in bytes') parser.add_argument('--mpr', default=1, type=int, help='messages per request') parser.add_argument('--num', default=200000, type=int, help='number of messages') parser.add_argument('--times', default=1, type=int, help='number of times to run the test') parser.add_argument('--workers', default=3, type=int, help='number of workers') parser.add_argument('--addr', default='127.0.0.1:25000', type=str, help='address:port of echoserver') args = parser.parse_args() unix = False if args.addr.startswith('file:'): unix = True addr = args.addr[5:] else: addr = args.addr.split(':') addr[1] = int(addr[1]) addr = tuple(addr) print('will connect to: {}'.format(addr)) MSGSIZE = args.msize REQSIZE = MSGSIZE * args.mpr msg = b'x'*(MSGSIZE - 1) + b'\n' if args.mpr: msg *= args.mpr def run_test(n): print('Sending', NMESSAGES, 'messages') if args.mpr: n //= args.mpr if unix: sock = socket(AF_UNIX, SOCK_STREAM) else: sock = socket(AF_INET, SOCK_STREAM) try: sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) except (OSError, NameError): pass sock.connect(addr) while n > 0: sock.sendall(msg) nrecv = 0 while nrecv < REQSIZE: resp = sock.recv(REQSIZE) if not resp: raise SystemExit() nrecv += len(resp) n -= 1 TIMES = args.times N = args.workers NMESSAGES = args.num start = time.time() for _ in range(TIMES): with ProcessPoolExecutor(max_workers=N) as e: for _ in range(N): e.submit(run_test, NMESSAGES) end = time.time() duration = end-start print(NMESSAGES*N*TIMES,'in', duration) print(NMESSAGES*N*TIMES/duration, 'requests/sec') uvloop-0.8.1/examples/bench/echoserver.py0000664000372000037200000001033013156036740021324 0ustar travistravis00000000000000import argparse import asyncio import gc import os.path import socket as socket_module from socket import * PRINT = 0 async def echo_server(loop, address, unix): if unix: sock = socket(AF_UNIX, SOCK_STREAM) else: sock = socket(AF_INET, SOCK_STREAM) sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) sock.bind(address) sock.listen(5) sock.setblocking(False) if PRINT: print('Server listening at', address) with sock: while True: client, addr = await loop.sock_accept(sock) if PRINT: print('Connection from', addr) loop.create_task(echo_client(loop, client)) async def echo_client(loop, client): try: client.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) except (OSError, NameError): pass with client: while True: data = await loop.sock_recv(client, 1000000) if not data: break await loop.sock_sendall(client, data) if PRINT: print('Connection closed') async def echo_client_streams(reader, writer): sock = writer.get_extra_info('socket') try: sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) except (OSError, NameError): pass if PRINT: print('Connection from', sock.getpeername()) while True: data = await reader.read(1000000) if not data: break writer.write(data) if PRINT: print('Connection closed') writer.close() class EchoProtocol(asyncio.Protocol): def connection_made(self, transport): self.transport = transport def connection_lost(self, exc): self.transport = None def data_received(self, data): self.transport.write(data) async def print_debug(loop): while True: print(chr(27) + "[2J") # clear screen loop.print_debug_info() await asyncio.sleep(0.5, loop=loop) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--uvloop', default=False, action='store_true') parser.add_argument('--streams', default=False, action='store_true') parser.add_argument('--proto', default=False, action='store_true') parser.add_argument('--addr', default='127.0.0.1:25000', type=str) parser.add_argument('--print', default=False, action='store_true') args = parser.parse_args() if args.uvloop: import uvloop loop = uvloop.new_event_loop() print('using UVLoop') else: loop = asyncio.new_event_loop() print('using asyncio loop') asyncio.set_event_loop(loop) loop.set_debug(False) if args.print: PRINT = 1 if hasattr(loop, 'print_debug_info'): loop.create_task(print_debug(loop)) PRINT = 0 unix = False if args.addr.startswith('file:'): unix = True addr = args.addr[5:] if os.path.exists(addr): os.remove(addr) else: addr = args.addr.split(':') addr[1] = int(addr[1]) addr = tuple(addr) print('serving on: {}'.format(addr)) if args.streams: if args.proto: print('cannot use --stream and --proto simultaneously') exit(1) print('using asyncio/streams') if unix: coro = asyncio.start_unix_server(echo_client_streams, addr, loop=loop) else: coro = asyncio.start_server(echo_client_streams, *addr, loop=loop) srv = loop.run_until_complete(coro) elif args.proto: if args.streams: print('cannot use --stream and --proto simultaneously') exit(1) print('using simple protocol') if unix: coro = loop.create_unix_server(EchoProtocol, addr) else: coro = loop.create_server(EchoProtocol, *addr) srv = loop.run_until_complete(coro) else: print('using sock_recv/sock_sendall') loop.create_task(echo_server(loop, addr, unix)) try: loop.run_forever() finally: if hasattr(loop, 'print_debug_info'): gc.collect() print(chr(27) + "[2J") loop.print_debug_info() loop.close() uvloop-0.8.1/examples/bench/rlserver.py0000664000372000037200000000452013156036740021027 0ustar travistravis00000000000000import argparse import asyncio import gc import os.path import socket as socket_module from socket import * PRINT = 0 async def echo_client_streams(reader, writer): sock = writer.get_extra_info('socket') try: sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) except (OSError, NameError): pass if PRINT: print('Connection from', sock.getpeername()) while True: data = await reader.readline() if not data: break writer.write(data) if PRINT: print('Connection closed') writer.close() async def print_debug(loop): while True: print(chr(27) + "[2J") # clear screen loop.print_debug_info() await asyncio.sleep(0.5, loop=loop) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--uvloop', default=False, action='store_true') parser.add_argument('--addr', default='127.0.0.1:25000', type=str) parser.add_argument('--print', default=False, action='store_true') args = parser.parse_args() if args.uvloop: import uvloop loop = uvloop.new_event_loop() print('using UVLoop') else: loop = asyncio.new_event_loop() print('using asyncio loop') asyncio.set_event_loop(loop) loop.set_debug(False) if args.print: PRINT = 1 if hasattr(loop, 'print_debug_info'): loop.create_task(print_debug(loop)) PRINT = 0 unix = False if args.addr.startswith('file:'): unix = True addr = args.addr[5:] if os.path.exists(addr): os.remove(addr) else: addr = args.addr.split(':') addr[1] = int(addr[1]) addr = tuple(addr) print('readline performance test') print('serving on: {}'.format(addr)) print('using asyncio/streams') if unix: coro = asyncio.start_unix_server(echo_client_streams, addr, loop=loop, limit=256000) else: coro = asyncio.start_server(echo_client_streams, *addr, loop=loop, limit=256000) srv = loop.run_until_complete(coro) try: loop.run_forever() finally: if hasattr(loop, 'print_debug_info'): gc.collect() print(chr(27) + "[2J") loop.print_debug_info() loop.close()