[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

> NameError: name 'asyncio' is not defined

Oops :-( I also fixed this one, sorry.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 493845d905c5 by Victor Stinner in branch '3.5':
Close #25367: Fix test_coroutines()
https://hg.python.org/cpython/rev/493845d905c5

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

==
ERROR: test_asyncio_1 (test.test_coroutines.CoroAsyncIOCompatTest)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_coroutines.py", line 1351, in test_asyncio_1
loop = asyncio.new_event_loop()
NameError: name 'asyncio' is not defined

--

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread STINNER Victor

STINNER Victor added the comment:

I fixed the issue based on Guido's patch and Serhiy's suggestion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8737b841fcf by Victor Stinner in branch '3.5':
Close #25367: Fix test_coroutines with no thread support
https://hg.python.org/cpython/rev/d8737b841fcf

New changeset d8002372e5df by Victor Stinner in branch 'default':
Merge 3.5 (test_coroutines, issue #25367)
https://hg.python.org/cpython/rev/d8002372e5df

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Can one of you produce a proper patch? Then the other can review. Serhiy can 
commit it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You also can use special helper: test.support.import_module().

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-10 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

It works.
A more standard way would be 'self.skipTest(...)' instead of 'raise 
unittest.SkipTest(...)'.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Can you test with this patch?

--
keywords: +patch
Added file: http://bugs.python.org/file40744/coro-skip.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25367] test_coroutines fails with --without-threads

2015-10-10 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

test.test_coroutines.CoroAsyncIOCompatTest.test_asyncio_1() fails with 
--without-threads, because it imports asyncio module, which is known to not 
work with --without-threads.
This test should be skipped when import of asyncio fails.

==
ERROR: test_asyncio_1 (test.test_coroutines.CoroAsyncIOCompatTest)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_coroutines.py", line 1325, in test_asyncio_1
import asyncio
  File "/tmp/cpython/Lib/asyncio/__init__.py", line 21, in 
from .base_events import *
  File "/tmp/cpython/Lib/asyncio/base_events.py", line 18, in 
import concurrent.futures
  File "/tmp/cpython/Lib/concurrent/futures/__init__.py", line 8, in 
from concurrent.futures._base import (FIRST_COMPLETED,
  File "/tmp/cpython/Lib/concurrent/futures/_base.py", line 8, in 
import threading
  File "/tmp/cpython/Lib/threading.py", line 4, in 
import _thread
ImportError: No module named '_thread'

--

--
components: Tests
messages: 252735
nosy: Arfrever, giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
priority: normal
severity: normal
status: open
title: test_coroutines fails with --without-threads
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com