Skip to content

Conversation

@sakurai-youhei
Copy link

This is PR for #146.

  • Checked Python versions
docker run -it --rm python:3.7.0b4 bash
docker run -it --rm python:3.6 bash
docker run -it --rm python:3.5 bash
  • How change was checked
pip install cython pytest
git clone --recursive -b issue146 https://github.com/sakurai-youhei/uvloop.git
cd uvloop
make test
  • python:3.7.0b4
    Test seems to be hung up in the middle; Never completed.
test_check_thread (test_base.TestBaseUV) ... /uvloop/tests/test_base.py:247: DeprecationWarning: get_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
/uvloop/tests/test_base.py:247: DeprecationWarning: set_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
Exception in callback <built-in method set_result of _asyncio.Future object at 0x7fd982d62548>
handle: <Handle Future.set_result created at /uvloop/tests/test_base.py:238>
source_traceback: Object created at (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 885, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/uvloop/tests/test_base.py", line 238, in check_in_thread
    loop.call_soon_threadsafe(fut.set_result, None)
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 49, in uvloop.loop.Handle._run
    callback(*args)
  File "uvloop/loop.pyx", line 1154, in uvloop.loop.Loop.call_soon
    def call_soon(self, callback, *args):
TypeError: call_soon() got an unexpected keyword argument 'context'
  • python:3.6
======================================================================
ERROR: test_pipes (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_pipes
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_pipes.py", line 5, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.6/asyncio/test_utils.py", line 36, in <module>
    from test import support
ModuleNotFoundError: No module named 'test'


======================================================================
ERROR: test_process (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_process
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_process.py", line 12, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.6/asyncio/test_utils.py", line 36, in <module>
    from test import support
ModuleNotFoundError: No module named 'test'


======================================================================
ERROR: test_tasks (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_tasks
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_tasks.py", line 5, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.6/asyncio/test_utils.py", line 36, in <module>
    from test import support
ModuleNotFoundError: No module named 'test'


======================================================================
ERROR: test_udp (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_udp
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_udp.py", line 6, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.6/asyncio/test_utils.py", line 36, in <module>
    from test import support
ModuleNotFoundError: No module named 'test'


======================================================================
FAIL: test_cython_coro_is_coroutine (test_cython.TestCythonIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/uvloop/tests/test_cython.py", line 14, in test_cython_coro_is_coroutine
    self.assertEqual(_format_coroutine(coro), '_test_coroutine_1()')
AssertionError: '_test_coroutine_1() done, defined at uvloop/loop.pyx:2834' != '_test_coroutine_1()'
- _test_coroutine_1() done, defined at uvloop/loop.pyx:2834
+ _test_coroutine_1()


----------------------------------------------------------------------
Ran 253 tests in 99.351s

FAILED (failures=1, errors=4, skipped=4)
  • python:3.5
======================================================================
ERROR: test_pipes (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_pipes
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_pipes.py", line 5, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.5/asyncio/test_utils.py", line 36, in <module>
    from test import support
ImportError: No module named 'test'


======================================================================
ERROR: test_process (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_process
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_process.py", line 12, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.5/asyncio/test_utils.py", line 36, in <module>
    from test import support
ImportError: No module named 'test'


======================================================================
ERROR: test_tasks (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_tasks
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_tasks.py", line 5, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.5/asyncio/test_utils.py", line 36, in <module>
    from test import support
ImportError: No module named 'test'


======================================================================
ERROR: test_udp (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_udp
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/uvloop/tests/test_udp.py", line 6, in <module>
    from asyncio import test_utils
  File "/usr/local/lib/python3.5/asyncio/test_utils.py", line 36, in <module>
    from test import support
ImportError: No module named 'test'


======================================================================
FAIL: test_cython_coro_is_coroutine (test_cython.TestCythonIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/uvloop/tests/test_cython.py", line 14, in test_cython_coro_is_coroutine
    self.assertEqual(_format_coroutine(coro), '_test_coroutine_1()')
AssertionError: '_test_coroutine_1() done, defined at uvloop/loop.pyx:2834' != '_test_coroutine_1()'
- _test_coroutine_1() done, defined at uvloop/loop.pyx:2834
+ _test_coroutine_1()


======================================================================
FAIL: test_socket_cancel_sock_sendall (test_sockets.TestUVSockets)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/uvloop/uvloop/_testbase.py", line 98, in tearDown
    self.fail('unexpected calls to loop.call_exception_handler()')
AssertionError: unexpected calls to loop.call_exception_handler()

----------------------------------------------------------------------
Ran 253 tests in 137.185s

FAILED (failures=2, errors=4, skipped=13)

Could you please help further checks? I'm not sure whether the failures are caused by side-effect of the change or not.

Thank you,

@asvetlov
Copy link
Contributor

Please build python from github master.
Docker image is:

  1. Obsolete a little
  2. Has stripped test package.

@sakurai-youhei
Copy link
Author

@asvetlov Thanks, good to know the recent state of Docker image. Here are outputs from python github master (3.8) and 3.7 branch. The same results are brought; Looks like there are more problems other than #146 when running uvloop with 3.7+.

  • 3.8 (excerpt)
root@5015e9fd7c5e:/usr/src/uvloop# python3.8 -VV
Python 3.8.0a0 (heads/master:55bfe69, May 22 2018, 11:11:58)
[GCC 7.3.0]
root@5015e9fd7c5e:/usr/src/uvloop# PYTHON=python3.8 make test
PYTHONASYNCIODEBUG=1 python3.8 setup.py test
running test
...
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/uvloop
...
test_check_thread (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:247: DeprecationWarning: get_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
/usr/src/uvloop/tests/test_base.py:247: DeprecationWarning: set_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
Exception in callback <built-in method set_result of _asyncio.Future object at 0x7f08b7ee8dc8>
handle: <Handle Future.set_result created at /usr/src/uvloop/tests/test_base.py:238>
source_traceback: Object created at (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 885, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.8/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/uvloop/tests/test_base.py", line 238, in check_in_thread
    loop.call_soon_threadsafe(fut.set_result, None)
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 49, in uvloop.loop.Handle._run
    callback(*args)
  File "uvloop/loop.pyx", line 1154, in uvloop.loop.Loop.call_soon
    def call_soon(self, callback, *args):
TypeError: call_soon() got an unexpected keyword argument 'context'
  • 3.7 (full)
root@01d0f68f75fe:/usr/src/uvloop# python3.7 -VV
Python 3.7.0b4+ (heads/3.7:3718f92, May 22 2018, 11:12:01)
[GCC 7.3.0]
root@01d0f68f75fe:/usr/src/uvloop# PYTHON=python3.7 make test
PYTHONASYNCIODEBUG=1 python3.7 setup.py test
running test
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
writing top-level names to uvloop.egg-info/top_level.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
running build_ext
+ libtoolize --copy
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
+ aclocal -I m4
+ autoconf
+ automake --add-missing --copy
configure.ac:38: installing './ar-lib'
configure.ac:25: installing './compile'
configure.ac:22: installing './config.guess'
configure.ac:22: installing './config.sub'
configure.ac:21: installing './install-sh'
configure.ac:21: installing './missing'
Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking if gcc supports -pedantic flag... yes
checking for gcc way to treat warnings as errors... -Werror
checking if gcc supports -fvisibility=hidden... yes
checking if gcc supports -g flag... yes
checking if gcc supports -std=gnu89 flag... yes
checking if gcc supports -Wall flag... yes
checking if gcc supports -Wextra flag... yes
checking if gcc supports -Wno-unused-parameter flag... yes
checking if gcc supports -Wstrict-prototypes flag... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/x86_64-linux-gnu-ld
checking if the linker (/usr/bin/x86_64-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-linux-gnu-ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for dlopen in -ldl... yes
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... yes
checking for perfstat_cpu in -lperfstat... no
checking for pthread_mutex_init in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking for sendfile in -lsendfile... no
checking for socket in -lsocket... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking sys/ahafs_evProds.h usability... no
checking sys/ahafs_evProds.h presence... no
checking for sys/ahafs_evProds.h... no
checking for pkg-config... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/usr/src/uvloop/build/libuv'
  CC       src/libuv_la-fs-poll.lo
  CC       src/libuv_la-inet.lo
  CC       src/libuv_la-threadpool.lo
  CC       src/libuv_la-uv-common.lo
  CC       src/libuv_la-version.lo
  CC       src/unix/libuv_la-async.lo
  CC       src/unix/libuv_la-core.lo
  CC       src/unix/libuv_la-dl.lo
  CC       src/unix/libuv_la-fs.lo
  CC       src/unix/libuv_la-getaddrinfo.lo
  CC       src/unix/libuv_la-getnameinfo.lo
  CC       src/unix/libuv_la-loop-watcher.lo
  CC       src/unix/libuv_la-loop.lo
  CC       src/unix/libuv_la-pipe.lo
  CC       src/unix/libuv_la-poll.lo
  CC       src/unix/libuv_la-process.lo
  CC       src/unix/libuv_la-signal.lo
  CC       src/unix/libuv_la-stream.lo
  CC       src/unix/libuv_la-tcp.lo
  CC       src/unix/libuv_la-thread.lo
  CC       src/unix/libuv_la-timer.lo
  CC       src/unix/libuv_la-tty.lo
  CC       src/unix/libuv_la-udp.lo
  CC       src/unix/libuv_la-linux-core.lo
  CC       src/unix/libuv_la-linux-inotify.lo
  CC       src/unix/libuv_la-linux-syscalls.lo
  CC       src/unix/libuv_la-procfs-exepath.lo
  CC       src/unix/libuv_la-proctitle.lo
  CC       src/unix/libuv_la-sysinfo-loadavg.lo
  CC       src/unix/libuv_la-sysinfo-memory.lo
  CCLD     libuv.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[1]: Leaving directory '/usr/src/uvloop/build/libuv'
building 'uvloop.loop' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/uvloop
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.7m -Ivendor/libuv/include -c uvloop/loop.c -o build/temp.linux-x86_64-3.7/uvloop/loop.o -O2
uvloop/loop.c: In function ‘__pyx_f_6uvloop_4loop_9UVProcess__after_fork’:
uvloop/loop.c:99422:3: warning: ‘PyOS_AfterFork’ is deprecated [-Wdeprecated-declarations]
   PyOS_AfterFork();
   ^~~~~~~~~~~~~~
In file included from /usr/local/include/python3.7m/Python.h:125:0,
                 from uvloop/loop.c:20:
/usr/local/include/python3.7m/intrcheck.h:16:18: note: declared here
 PyAPI_FUNC(void) PyOS_AfterFork(void) Py_DEPRECATED(3.7);
                  ^~~~~~~~~~~~~~
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/uvloop
gcc -pthread -shared build/temp.linux-x86_64-3.7/uvloop/loop.o build/libuv/.libs/libuv.a -lrt -lpthread -o build/lib.linux-x86_64-3.7/uvloop/loop.cpython-37m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.7/uvloop/loop.cpython-37m-x86_64-linux-gnu.so -> uvloop
test_aiohttp_basic_1 (test_aiohttp.Test_AIO_AioHTTP) ... skipped 'no aiohttp module'
test_aiohttp_basic_1 (test_aiohttp.Test_UV_AioHTTP) ... skipped 'no aiohttp module'
test_call_at (test_base.TestBaseAIO) ... ok
test_call_later_1 (test_base.TestBaseAIO) ... ok
test_call_later_2 (test_base.TestBaseAIO) ... ok
test_call_later_negative (test_base.TestBaseAIO) ... ok
test_call_soon (test_base.TestBaseAIO) ... ok
test_call_soon_base_exc (test_base.TestBaseAIO) ... ok
test_calls_debug_reporting (test_base.TestBaseAIO) ... ok
test_check_thread (test_base.TestBaseAIO) ... ok
test_close (test_base.TestBaseAIO) ... ok
test_debug_slow_callbacks (test_base.TestBaseAIO) ... ok
test_debug_slow_task_callbacks (test_base.TestBaseAIO) ... ok
test_debug_slow_timer_callbacks (test_base.TestBaseAIO) ... ok
test_default_exc_handler_broken (test_base.TestBaseAIO) ... /usr/src/uvloop/tests/test_base.py:488: DeprecationWarning: get_coroutine_wrapper is deprecated
  loop.run_forever()
/usr/src/uvloop/tests/test_base.py:488: DeprecationWarning: set_coroutine_wrapper is deprecated
  loop.run_forever()
ok
test_default_exc_handler_callback (test_base.TestBaseAIO) ... ok
test_handle_weakref (test_base.TestBaseAIO) ... ok
test_inf_wait_for (test_base.TestBaseAIO) ... ok
test_now_update (test_base.TestBaseAIO) ... ok
test_run_once_in_executor_plain (test_base.TestBaseAIO) ... ok
test_run_until_complete_error (test_base.TestBaseAIO) ... ok
test_run_until_complete_loop (test_base.TestBaseAIO) ... ok
test_run_until_complete_loop_orphan_future_close_loop (test_base.TestBaseAIO) ... ok
test_run_until_complete_type_error (test_base.TestBaseAIO) ... ok
test_set_debug (test_base.TestBaseAIO) ... ok
test_set_exc_handler_broken (test_base.TestBaseAIO) ... ok
test_set_exc_handler_custom (test_base.TestBaseAIO) ... ok
test_set_task_factory (test_base.TestBaseAIO) ... ok
test_set_task_factory_invalid (test_base.TestBaseAIO) ... ok
test_shutdown_asyncgens_01 (test_base.TestBaseAIO) ... ok
test_shutdown_asyncgens_02 (test_base.TestBaseAIO) ... ok
test_shutdown_asyncgens_03 (test_base.TestBaseAIO) ... ok
test_call_at (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:192: DeprecationWarning: get_coroutine_wrapper is deprecated
  self.loop.run_forever()
/usr/src/uvloop/tests/test_base.py:192: DeprecationWarning: set_coroutine_wrapper is deprecated
  self.loop.run_forever()
ok
test_call_later_1 (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:140: DeprecationWarning: get_coroutine_wrapper is deprecated
  self.loop.run_forever()
/usr/src/uvloop/tests/test_base.py:140: DeprecationWarning: set_coroutine_wrapper is deprecated
  self.loop.run_forever()
ok
test_call_later_2 (test_base.TestBaseUV) ... Task was destroyed but it is pending!
source_traceback: Object created at (most recent call last):
  File "setup.py", line 320, in <module>
    test_suite='tests.suite'
  File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.7/site-packages/setuptools/command/test.py", line 226, in run
    self.run_tests()
  File "/usr/local/lib/python3.7/site-packages/setuptools/command/test.py", line 248, in run_tests
    exit=False,
  File "/usr/local/lib/python3.7/unittest/main.py", line 101, in __init__
    self.runTests()
  File "/usr/local/lib/python3.7/unittest/main.py", line 271, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/local/lib/python3.7/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/local/lib/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/local/lib/python3.7/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
  File "/usr/local/lib/python3.7/unittest/case.py", line 615, in run
    testMethod()
  File "/usr/src/uvloop/tests/test_base.py", line 159, in test_call_later_2
    self.loop.run_until_complete(main())
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 552, in ensure_future
    task = loop.create_task(coro_or_future)
task: <Task pending coro=<_TestBase.test_call_later_2.<locals>.main() running at /usr/src/uvloop/tests/test_base.py:153> created at /usr/local/lib/python3.7/asyncio/tasks.py:552>
Unexpected calls to loop.call_exception_handler():
[{'message': 'Task was destroyed but it is pending!',
  'source_traceback': [<FrameSummary file setup.py, line 320 in <module>>,
                       <FrameSummary file /usr/local/lib/python3.7/site-packages/setuptools/__init__.py, line 129 in setup>,
                       <FrameSummary file /usr/local/lib/python3.7/distutils/core.py, line 148 in setup>,
                       <FrameSummary file /usr/local/lib/python3.7/distutils/dist.py, line 966 in run_commands>,
                       <FrameSummary file /usr/local/lib/python3.7/distutils/dist.py, line 985 in run_command>,
                       <FrameSummary file /usr/local/lib/python3.7/site-packages/setuptools/command/test.py, line 226 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/site-packages/setuptools/command/test.py, line 248 in run_tests>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/main.py, line 101 in __init__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/main.py, line 271 in runTests>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/runner.py, line 176 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 84 in __call__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 122 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 84 in __call__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 122 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 84 in __call__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 122 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 84 in __call__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/suite.py, line 122 in run>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/case.py, line 663 in __call__>,
                       <FrameSummary file /usr/local/lib/python3.7/unittest/case.py, line 615 in run>,
                       <FrameSummary file /usr/src/uvloop/tests/test_base.py, line 159 in test_call_later_2>,
                       <FrameSummary file /usr/local/lib/python3.7/asyncio/tasks.py, line 552 in ensure_future>],
  'task': <Task pending coro=<_TestBase.test_call_later_2.<locals>.main() running at /usr/src/uvloop/tests/test_base.py:153> created at /usr/local/lib/python3.7/asyncio/tasks.py:552>}]
ERROR
FAIL
test_call_later_negative (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:171: DeprecationWarning: get_coroutine_wrapper is deprecated
  self.loop.run_forever()
/usr/src/uvloop/tests/test_base.py:171: DeprecationWarning: set_coroutine_wrapper is deprecated
  self.loop.run_forever()
ok
test_call_soon (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:55: DeprecationWarning: get_coroutine_wrapper is deprecated
  self.loop.run_forever()
/usr/src/uvloop/tests/test_base.py:55: DeprecationWarning: set_coroutine_wrapper is deprecated
  self.loop.run_forever()
ok
test_call_soon_base_exc (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:66: DeprecationWarning: get_coroutine_wrapper is deprecated
  self.loop.run_forever()
/usr/src/uvloop/tests/test_base.py:66: DeprecationWarning: set_coroutine_wrapper is deprecated
  self.loop.run_forever()
ok
test_calls_debug_reporting (test_base.TestBaseUV) ... /usr/local/lib/python3.7/unittest/case.py:643: RuntimeWarning: coroutine 'sleep' was never awaited
  outcome.errors.clear()
test_check_thread (test_base.TestBaseUV) ... /usr/src/uvloop/tests/test_base.py:247: DeprecationWarning: get_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
/usr/src/uvloop/tests/test_base.py:247: DeprecationWarning: set_coroutine_wrapper is deprecated
  loop.run_until_complete(fut)
Exception in callback <built-in method set_result of _asyncio.Future object at 0x7f015d1e7e48>
handle: <Handle Future.set_result created at /usr/src/uvloop/tests/test_base.py:238>
source_traceback: Object created at (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 885, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/uvloop/tests/test_base.py", line 238, in check_in_thread
    loop.call_soon_threadsafe(fut.set_result, None)
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 49, in uvloop.loop.Handle._run
    callback(*args)
  File "uvloop/loop.pyx", line 1154, in uvloop.loop.Loop.call_soon
    def call_soon(self, callback, *args):
TypeError: call_soon() got an unexpected keyword argument 'context'

@sakurai-youhei
Copy link
Author

Oops, this PR seems to be duplicate work with #138...

@pfreixes
Copy link
Contributor

pfreixes commented May 22, 2018

Hi @sakurai-youhei I would say that #138 solves all of the problems and passes all the tests with py37, but waitting the blessing about how to keep moing on from @1st1.

@sakurai-youhei
Copy link
Author

FYI.

  • 3.6 (excerpt)
root@7e3bc77a12b7:/usr/src/uvloop# python3.6 -VV
Python 3.6.5+ (heads/3.6:ab90ea2, May 22 2018, 11:54:42)
[GCC 7.3.0]
root@7e3bc77a12b7:/usr/src/uvloop# python3.6 -m pip freeze
attrs==18.1.0
Cython==0.27.3
more-itertools==4.1.0
pluggy==0.6.0
py==1.5.3
pytest==3.5.1
six==1.11.0
uvloop==0.9.2.dev0
root@7e3bc77a12b7:/usr/src/uvloop# PYTHON=python3.6 make test
...
----------------------------------------------------------------------
Ran 383 tests in 59.630s

OK (skipped=6)
  • 3.5 (excerpt)
root@cf5d78a0204d:/usr/src/uvloop# python3.5 -VV
Python 3.5.5+
root@cf5d78a0204d:/usr/src/uvloop# python3.5 -m pip freeze
attrs==18.1.0
Cython==0.27.3
more-itertools==4.1.0
pluggy==0.6.0
py==1.5.3
pytest==3.5.1
six==1.11.0
uvloop==0.9.2.dev0
root@cf5d78a0204d:/usr/src/uvloop# PYTHON=python3.5 make test
...
----------------------------------------------------------------------
Ran 383 tests in 61.499s

OK (skipped=17)

@1st1
Copy link
Member

1st1 commented May 23, 2018

Thanks for the PR! I'll close it in favour of #138 which is a bit more generic.

@1st1 1st1 closed this May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants