[Python-modules-commits] [uvloop] 01/04: Import uvloop_0.8.0+ds1.orig.tar.gz

Piotr Ożarowski piotr at moszumanska.debian.org
Thu Mar 2 19:58:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository uvloop.

commit 6b1a9d786ba20706ffac9ec60f73346cf5cfb6a0
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Thu Mar 2 19:41:34 2017 +0100

    Import uvloop_0.8.0+ds1.orig.tar.gz
---
 PKG-INFO                    |    89 +-
 setup.cfg                   |     1 -
 setup.py                    |    12 +-
 tests/test_base.py          |   101 +
 tests/test_tcp.py           |     2 +-
 tests/test_unix.py          |    11 +-
 uvloop.egg-info/PKG-INFO    |    89 +-
 uvloop.egg-info/SOURCES.txt |     2 +
 uvloop/includes/stdlib.pxi  |     1 +
 uvloop/loop.c               | 34284 ++++++++++++++++++++++--------------------
 uvloop/loop.pxd             |     3 +
 uvloop/loop.pyx             |    63 +-
 12 files changed, 18266 insertions(+), 16392 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index d03a999..21c150f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,14 +1,97 @@
 Metadata-Version: 1.1
 Name: uvloop
-Version: 0.6.7
+Version: 0.8.0
 Summary: Fast implementation of asyncio event loop on top of libuv
 Home-page: http://github.com/MagicStack/uvloop
 Author: Yury Selivanov
 Author-email: yury at magic.io
 License: MIT
-Description: 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 <http://uvloop.readthedocs.org/>`_.  Please also check out the
+        `wiki <https://github.com/MagicStack/uvloop/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 <http://magic.io/blog/uvloop-blazing-fast-python-networking/>`_.
+        
+        
+        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 at 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 :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/setup.py b/setup.py
index 332a97d..ae9a65a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
 import os
+import os.path
 import re
 import shutil
 import subprocess
@@ -22,7 +23,7 @@ from setuptools.command.build_ext import build_ext as build_ext
 from setuptools.command.sdist import sdist as sdist
 
 
-VERSION = '0.6.7'
+VERSION = '0.8.0'
 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')
@@ -255,7 +256,7 @@ class uvloop_build_ext(build_ext):
 
         if sys.platform.startswith('linux'):
             self.compiler.add_library('rt')
-        elif sys.platform.startswith('freebsd'):
+        elif sys.platform.startswith(('freebsd', 'dragonfly')):
             self.compiler.add_library('kvm')
         elif sys.platform.startswith('sunos'):
             self.compiler.add_library('kstat')
@@ -263,9 +264,14 @@ class uvloop_build_ext(build_ext):
         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',
@@ -287,7 +293,7 @@ setup(
         ),
     ],
     classifiers=[
-        'Development Status :: 4 - Beta',
+        'Development Status :: 5 - Production/Stable',
         'Programming Language :: Python :: 3 :: Only',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
diff --git a/tests/test_base.py b/tests/test_base.py
index 22ee5af..397c64f 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -1,6 +1,7 @@
 import asyncio
 import fcntl
 import logging
+import os
 import threading
 import time
 import uvloop
@@ -170,6 +171,10 @@ class _TestBase:
         self.assertEqual(calls, ['a'])
 
     def test_call_at(self):
+        if os.environ.get('TRAVIS_OS_NAME') == 'osx':
+            # Time seems to be really unpredictable on Travis' macOS.
+            raise unittest.SkipTest('time is not monotonic on Travis/macOS')
+
         i = 0
 
         def cb(inc):
@@ -498,6 +503,102 @@ class _TestBase:
         self.assertFalse(isinstance(task, MyTask))
         self.loop.run_until_complete(task)
 
+    def _compile_agen(self, src):
+        try:
+            g = {}
+            exec(src, globals(), g)
+        except SyntaxError:
+            # Python < 3.6
+            raise unittest.SkipTest()
+        else:
+            return g['waiter']
+
+    def test_shutdown_asyncgens_01(self):
+        finalized = list()
+
+        if not hasattr(self.loop, 'shutdown_asyncgens'):
+            raise unittest.SkipTest()
+
+        waiter = self._compile_agen(
+            '''async def waiter(timeout, finalized, loop):
+                try:
+                    await asyncio.sleep(timeout, loop=loop)
+                    yield 1
+                finally:
+                    await asyncio.sleep(0, loop=loop)
+                    finalized.append(1)
+            ''')
+
+        async def wait():
+            async for _ in waiter(1, finalized, self.loop):
+                pass
+
+        t1 = self.loop.create_task(wait())
+        t2 = self.loop.create_task(wait())
+
+        self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
+
+        self.loop.run_until_complete(self.loop.shutdown_asyncgens())
+        self.assertEqual(finalized, [1, 1])
+
+        # Silence warnings
+        t1.cancel()
+        t2.cancel()
+        self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
+
+    def test_shutdown_asyncgens_02(self):
+        if not hasattr(self.loop, 'shutdown_asyncgens'):
+            raise unittest.SkipTest()
+
+        logged = 0
+
+        def logger(loop, context):
+            nonlocal logged
+            self.assertIn('asyncgen', context)
+            expected = 'an error occurred during closing of asynchronous'
+            if expected in context['message']:
+                logged += 1
+
+        waiter = self._compile_agen('''async def waiter(timeout, loop):
+            try:
+                await asyncio.sleep(timeout, loop=loop)
+                yield 1
+            finally:
+                1 / 0
+        ''')
+
+        async def wait():
+            async for _ in waiter(1, self.loop):
+                pass
+
+        t = self.loop.create_task(wait())
+        self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
+
+        self.loop.set_exception_handler(logger)
+        self.loop.run_until_complete(self.loop.shutdown_asyncgens())
+
+        self.assertEqual(logged, 1)
+
+        # Silence warnings
+        t.cancel()
+        self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
+
+    def test_shutdown_asyncgens_03(self):
+        if not hasattr(self.loop, 'shutdown_asyncgens'):
+            raise unittest.SkipTest()
+
+        waiter = self._compile_agen('''async def waiter():
+            yield 1
+            yield 2
+        ''')
+
+        async def foo():
+            # We specifically want to hit _asyncgen_finalizer_hook
+            # method.
+            await waiter().asend(None)
+
+        self.loop.run_until_complete(foo())
+        self.loop.run_until_complete(asyncio.sleep(0.01, loop=self.loop))
 
 class TestBaseUV(_TestBase, UVTestCase):
 
diff --git a/tests/test_tcp.py b/tests/test_tcp.py
index 8f07cfd..b323a3a 100644
--- a/tests/test_tcp.py
+++ b/tests/test_tcp.py
@@ -845,7 +845,7 @@ class _TestSSL(tb.SSLTestCase):
     def test_create_server_ssl_1(self):
         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
+        TIMEOUT = 10.0    # timeout for this test
 
         A_DATA = b'A' * 1024 * 1024
         B_DATA = b'B' * 1024 * 1024
diff --git a/tests/test_unix.py b/tests/test_unix.py
index 27d5c25..2d39843 100644
--- a/tests/test_unix.py
+++ b/tests/test_unix.py
@@ -501,8 +501,15 @@ class _TestSSL(tb.SSLTestCase):
                     self.loop.call_soon(srv.close)
                     await srv.wait_closed()
 
-        with self._silence_eof_received_warning():
-            self.loop.run_until_complete(start_server())
+        try:
+            with self._silence_eof_received_warning():
+                self.loop.run_until_complete(start_server())
+        except asyncio.TimeoutError:
+            if os.environ.get('TRAVIS_OS_NAME') == 'osx':
+                # XXX: figure out why this fails on macOS on Travis
+                raise unittest.SkipTest('unexplained error on Travis macOS')
+            else:
+                raise
 
         self.assertEqual(CNT, TOTAL_CNT)
 
diff --git a/uvloop.egg-info/PKG-INFO b/uvloop.egg-info/PKG-INFO
index d03a999..21c150f 100644
--- a/uvloop.egg-info/PKG-INFO
+++ b/uvloop.egg-info/PKG-INFO
@@ -1,14 +1,97 @@
 Metadata-Version: 1.1
 Name: uvloop
-Version: 0.6.7
+Version: 0.8.0
 Summary: Fast implementation of asyncio event loop on top of libuv
 Home-page: http://github.com/MagicStack/uvloop
 Author: Yury Selivanov
 Author-email: yury at magic.io
 License: MIT
-Description: 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 <http://uvloop.readthedocs.org/>`_.  Please also check out the
+        `wiki <https://github.com/MagicStack/uvloop/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 <http://magic.io/blog/uvloop-blazing-fast-python-networking/>`_.
+        
+        
+        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 at 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 :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
diff --git a/uvloop.egg-info/SOURCES.txt b/uvloop.egg-info/SOURCES.txt
index d7e01c1..6902df4 100644
--- a/uvloop.egg-info/SOURCES.txt
+++ b/uvloop.egg-info/SOURCES.txt
@@ -194,6 +194,8 @@ 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
diff --git a/uvloop/includes/stdlib.pxi b/uvloop/includes/stdlib.pxi
index 0ba1eb7..84d1f22 100644
--- a/uvloop/includes/stdlib.pxi
+++ b/uvloop/includes/stdlib.pxi
@@ -125,6 +125,7 @@ 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,
diff --git a/uvloop/loop.c b/uvloop/loop.c
index 3f617f9..ca88d36 100644
--- a/uvloop/loop.c
+++ b/uvloop/loop.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.24.1 */
+/* Generated by Cython 0.25.2 */
 
 /* BEGIN: Cython Metadata
 {
@@ -19,7 +19,7 @@ END: Cython Metadata */
 #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_24_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -41,6 +41,11 @@ END: Cython Metadata */
 #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
@@ -49,13 +54,110 @@ END: Cython Metadata */
 #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_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
-  #define CYTHON_USE_PYLONG_INTERNALS 1
+#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"
@@ -91,24 +193,44 @@ END: Cython Metadata */
 #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
@@ -133,6 +255,13 @@ END: Cython Metadata */
   #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
@@ -161,6 +290,7 @@ END: Cython Metadata */
   #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
@@ -199,18 +329,20 @@ END: Cython Metadata */
 #else
   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
 #endif
-#if PY_VERSION_HEX >= 0x030500B1
-#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
-#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
-#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
-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))
+#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
+  #define __Pyx_PyType_AsAsync(obj) NULL
 #endif
 #ifndef CYTHON_RESTRICT
   #if defined(__GNUC__)
@@ -223,10 +355,39 @@ typedef struct {
     #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<class T> 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(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -280,8 +441,8 @@ static CYTHON_INLINE float __PYX_NAN() {
 
 #define __PYX_HAVE__uvloop__loop
 #define __PYX_HAVE_API__uvloop__loop
-#include "stdint.h"
-#include "sys/types.h"
+#include <stdint.h>
+#include <sys/types.h>
 #include "arpa/inet.h"
 #include "sys/socket.h"
 #include "unistd.h"
@@ -289,9 +450,9 @@ static CYTHON_INLINE float __PYX_NAN() {
 #include "includes/compat.h"
 #include "uv.h"
 #include "includes/debug.h"
-#include "string.h"
-#include "errno.h"
-#include "stdio.h"
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
 #include "pythread.h"
 #ifdef _OPENMP
 #include <omp.h>
@@ -301,26 +462,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #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_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#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;
 
@@ -398,7 +539,7 @@ 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_COMPILING_IN_CPYTHON
+#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)
@@ -517,8 +658,6 @@ static const char *__pyx_f[] = {
   "uvloop/future.pyx",
   "uvloop/loop.pxd",
   "uvloop/cbhandles.pyx",
-  "uvloop/cbhandles.pxd",
-  "uvloop/handles/handle.pxd",
   "uvloop/handles/async_.pyx",
   "uvloop/handles/idle.pyx",
   "uvloop/handles/check.pyx",
@@ -592,11 +731,12 @@ 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_wait_closed;
-struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_20___iter__;
-struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_21___await__;
-struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_22___pyx_f_6uvloop_4loop__chain_future;
-struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_23__test_coroutine_1;
+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;
@@ -762,6 +902,8 @@ struct __pyx_obj_6uvloop_4loop_Loop {
   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;
@@ -1306,7 +1448,7 @@ struct __pyx_obj_6uvloop_4loop_BaseTask {
 };
 
 
-/* "uvloop/loop.pyx":614
+/* "uvloop/loop.pyx":625
  *         return result
  * 
  *     cdef _getaddrinfo(self, object host, object port,             # <<<<<<<<<<<<<<
@@ -1320,7 +1462,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct___getaddrinfo {
 };
 
 
-/* "uvloop/loop.pyx":654
+/* "uvloop/loop.pyx":665
  *         return fut
  * 
  *     cdef _getnameinfo(self, system.sockaddr *addr, int flags):             # <<<<<<<<<<<<<<
@@ -1333,7 +1475,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_1__getnameinfo {
 };
 
 
-/* "uvloop/loop.pyx":755
+/* "uvloop/loop.pyx":766
  *             self._remove_reader(fd)
  * 
  *     cdef _sock_connect(self, fut, sock, address):             # <<<<<<<<<<<<<<
@@ -1347,7 +1489,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_2__sock_connect {
 };
 
 
-/* "uvloop/loop.pyx":1150
+/* "uvloop/loop.pyx":1167
  *         return self._task_factory
  * 
  *     def run_until_complete(self, future):             # <<<<<<<<<<<<<<
@@ -1360,7 +1502,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_3_run_until_complete {
 };
 
 
-/* "uvloop/loop.pyx":1200
+/* "uvloop/loop.pyx":1217
  *         return self._getaddrinfo(host, port, family, type, proto, flags, 1)
  * 
  *     async def getnameinfo(self, sockaddr, int flags=0):             # <<<<<<<<<<<<<<
@@ -1381,7 +1523,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_4_getnameinfo {
 };
 
 
-/* "uvloop/loop.pyx":1254
+/* "uvloop/loop.pyx":1271
  *         return await self._getnameinfo(ai.ai_addr, flags)
  * 
  *     async def create_server(self, protocol_factory, host=None, port=None,             # <<<<<<<<<<<<<<
@@ -1413,7 +1555,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_5_create_server {
 };
 
 
-/* "uvloop/loop.pyx":1382
+/* "uvloop/loop.pyx":1399
  *         return server
  * 
  *     async def create_connection(self, protocol_factory, host=None, port=None, *,             # <<<<<<<<<<<<<<
@@ -1463,7 +1605,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_6_create_connection {
 };
 
 
-/* "uvloop/loop.pyx":1550
+/* "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):             # <<<<<<<<<<<<<<
@@ -1477,7 +1619,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_7_genexpr {
 };
 
 
-/* "uvloop/loop.pyx":1555
+/* "uvloop/loop.pyx":1572
  *                 # the various error messages.
  *                 raise OSError('Multiple exceptions: {}'.format(
  *                     ', '.join(str(exc) for exc in exceptions)))             # <<<<<<<<<<<<<<
@@ -1491,7 +1633,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_8_genexpr {
 };
 
 
-/* "uvloop/loop.pyx":1610
+/* "uvloop/loop.pyx":1627
  *             return tr, protocol
  * 
  *     async def create_unix_server(self, protocol_factory, str path=None,             # <<<<<<<<<<<<<<
@@ -1514,7 +1656,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_9_create_unix_server {
 };
 
 
-/* "uvloop/loop.pyx":1695
+/* "uvloop/loop.pyx":1712
  *         return server
  * 
  *     async def create_unix_connection(self, protocol_factory, path, *,             # <<<<<<<<<<<<<<
@@ -1542,7 +1684,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_10_create_unix_connection {
 };
 
 
-/* "uvloop/loop.pyx":1932
+/* "uvloop/loop.pyx":1949
  *         return fut
  * 
  *     async def sock_sendall(self, sock, data):             # <<<<<<<<<<<<<<
@@ -1561,7 +1703,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_11_sock_sendall {
 };
 
 
-/* "uvloop/loop.pyx":2011
+/* "uvloop/loop.pyx":2028
  *         return fut
  * 
  *     async def sock_connect(self, sock, address):             # <<<<<<<<<<<<<<
@@ -1578,7 +1720,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_12_sock_connect {
 };
 
 
-/* "uvloop/loop.pyx":2029
+/* "uvloop/loop.pyx":2046
  *         await fut
  * 
  *     async def connect_accepted_socket(self, protocol_factory, sock, *,             # <<<<<<<<<<<<<<
@@ -1600,7 +1742,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_13_connect_accepted_socket {
 };
 
 
-/* "uvloop/loop.pyx":2102
+/* "uvloop/loop.pyx":2119
  *         self._default_executor = executor
  * 
  *     async def __subprocess_run(self, protocol_factory, args,             # <<<<<<<<<<<<<<
@@ -1639,7 +1781,7 @@ struct __pyx_obj_6uvloop_4loop___pyx_scope_struct_14___subprocess_run {
 };
 
 
-/* "uvloop/loop.pyx":2188
+/* "uvloop/loop.pyx":2205
  *                                      **kwargs)
... 92746 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/uvloop.git



More information about the Python-modules-commits mailing list