[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Remi Pointel

Remi Pointel added the comment:

It's ok now, thanks:

test_qualname_source (__main__.TestMain) ... skipped 'multiprocessing required 
to test __qualname__ for source files'

--

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Brett Cannon

Brett Cannon added the comment:

OK, went for a more thorough check for the failure by just trying to import and 
catching the ImportError instead of trying to be fancy. The FreeBSD buildbot 
was having the same failure but it seems stuck waiting for some lock, so I 
can't verify the fix at the moment.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e54edaf60d4 by Brett Cannon in branch 'default':
Try to fix issue #19134 again
http://hg.python.org/cpython/rev/2e54edaf60d4

--

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Remi Pointel

Remi Pointel added the comment:

Hi,

sorry to reopen this bug but it seams that your commit was not ok:

test_qualname_source (__main__.TestMain) ... ERROR

==
ERROR: test_qualname_source (__main__.TestMain)
--
Traceback (most recent call last):
  File "Lib/test/test_inspect.py", line 2414, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File "/home/remi/dev/cpython/Lib/importlib/__init__.py", line 95, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1613, in _gcd_import
  File "", line 1594, in _find_and_load
  File "", line 1561, in _find_and_load_unlocked
  File "", line 607, in _check_name_wrapper
  File "", line 1056, in load_module
  File "", line 926, in load_module
  File "", line 274, in _call_with_frames_removed
  File "/home/remi/dev/cpython/Lib/concurrent/futures/__init__.py", line 17, in 

from concurrent.futures.process import ProcessPoolExecutor
  File "/home/remi/dev/cpython/Lib/concurrent/futures/process.py", line 53, in 

from multiprocessing.queues import SimpleQueue, Full
  File "/home/remi/dev/cpython/Lib/multiprocessing/queues.py", line 22, in 

import _multiprocessing
ImportError: No module named '_multiprocessing'

--
Ran 164 tests in 1.285s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib/test/test_inspect.py", line 2456, in 
test_main()
  File "Lib/test/test_inspect.py", line 2452, in test_main
TestBoundArguments, TestGetClosureVars, TestUnwrap, TestMain
  File "/home/remi/dev/cpython/Lib/test/support/__init__.py", line 1696, in 
run_unittest
_run_suite(suite)
  File "/home/remi/dev/cpython/Lib/test/support/__init__.py", line 1671, in 
_run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_inspect.py", line 2414, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File "/home/remi/dev/cpython/Lib/importlib/__init__.py", line 95, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1613, in _gcd_import
  File "", line 1594, in _find_and_load
  File "", line 1561, in _find_and_load_unlocked
  File "", line 607, in _check_name_wrapper
  File "", line 1056, in load_module
  File "", line 926, in load_module
  File "", line 274, in _call_with_frames_removed
  File "/home/remi/dev/cpython/Lib/concurrent/futures/__init__.py", line 17, in 

from concurrent.futures.process import ProcessPoolExecutor
  File "/home/remi/dev/cpython/Lib/concurrent/futures/process.py", line 53, in 

from multiprocessing.queues import SimpleQueue, Full
  File "/home/remi/dev/cpython/Lib/multiprocessing/queues.py", line 22, in 

import _multiprocessing
ImportError: No module named '_multiprocessing'

Remi.

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

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Remi Pointel

Remi Pointel added the comment:

Thanks :)

--

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Brett Cannon

Brett Cannon added the comment:

The import doesn't matter for test.support.multiprocessing as it is conditional 
thanks to the try/except. If that fails then the skipIf will be triggered and 
nothing will be executed. If the import succeeds in test.support then the 
importlib.import_module() call will succeed without issue. The point is that it 
is much more obvious why the test may get skipped from reading the code rather 
than looking at the function name.

--
assignee:  -> brett.cannon
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ba4ca59023 by Brett Cannon in branch 'default':
Issue #19134: Make a test in inspect conditional on multiprocessing
http://hg.python.org/cpython/rev/d7ba4ca59023

--
nosy: +python-dev

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Remi Pointel

Remi Pointel added the comment:

Yes, but it needs an import to use test.support.multiprocessing.

--

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Brett Cannon

Brett Cannon added the comment:

test.support.import_module is typically meant for global imports as 
function-level imports are discouraged in general. I would instead use the 
unittest.skipIf decorator::

  @unittest.skipIf(not test.support.multiprocessing, "multiprocessing 
required") 
  def test_qualname_source(self):
...

--
nosy: +brett.cannon

___
Python tracker 

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-09-30 Thread Remi Pointel

New submission from Remi Pointel:

When I run the regress tests on OpenBSD 5.4-current, the test test_inspect.py 
failed because the module _multiprocessing is not available, instead of 
skipping the test:

FAILED (errors=1)
Traceback (most recent call last):
  File "./Lib/test/test_inspect.py", line 2453, in 
test_main()
  File "./Lib/test/test_inspect.py", line 2449, in test_main
TestBoundArguments, TestGetClosureVars, TestUnwrap, TestMain
  File "/tmp/Python-3.4.0a3/Lib/test/support/__init__.py", line 1696, in 
run_unittest
_run_suite(suite)
  File "/tmp/Python-3.4.0a3/Lib/test/support/__init__.py", line 1671, in 
_run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "./Lib/test/test_inspect.py", line 2411, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File "/tmp/Python-3.4.0a3/Lib/importlib/__init__.py", line 95, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1613, in _gcd_import
  File "", line 1594, in _find_and_load
  File "", line 1561, in _find_and_load_unlocked
  File "", line 607, in _check_name_wrapper
  File "", line 1056, in load_module
  File "", line 926, in load_module
  File "", line 274, in _call_with_frames_removed
  File "/tmp/Python-3.4.0a3/Lib/concurrent/futures/__init__.py", line 17, in 

from concurrent.futures.process import ProcessPoolExecutor
  File "/tmp/Python-3.4.0a3/Lib/concurrent/futures/process.py", line 53, in 

from multiprocessing.queues import SimpleQueue, Full
  File "/tmp/Python-3.4.0a3/Lib/multiprocessing/queues.py", line 22, in 
import _multiprocessing
ImportError: No module named '_multiprocessing'


Diff to skip test_qualname_source if _multiprocessing is not available is 
attached. Is it ok?

Remi.

--
components: Tests
files: Lib_test_test_inspect_py.diff
keywords: patch
messages: 198698
nosy: rpointel
priority: normal
severity: normal
status: open
title: test_inspect.py failed if module _multiprocessing not available
versions: Python 3.4
Added file: http://bugs.python.org/file31921/Lib_test_test_inspect_py.diff

___
Python tracker 

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