Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using nose.collector with setuptools breaks multiprocessing #629

Open
patrys opened this issue Feb 18, 2013 · 3 comments
Open

Using nose.collector with setuptools breaks multiprocessing #629

patrys opened this issue Feb 18, 2013 · 3 comments

Comments

@patrys
Copy link

patrys commented Feb 18, 2013

I use Python 2.7 and can trigger the problem with the following setup script in an empty directory:

#!/usr/bin/env python
from setuptools import setup

setup(
    name='whatever',
    version='dev',
    packages=[],
    tests_require=[
        'nose==1.2.1'],
    test_suite='nose.collector')

The test runner then raises an error at exit time:

$ python setup.py test
running test
running egg_info
writing whatever.egg-info/PKG-INFO
writing top-level names to whatever.egg-info/top_level.txt
writing dependency_links to whatever.egg-info/dependency_links.txt
reading manifest file 'whatever.egg-info/SOURCES.txt'
writing manifest file 'whatever.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib64/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib64/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
@frewsxcv
Copy link

frewsxcv commented Sep 5, 2013

I'm running into this issue too with Python 2.6 + nose 1.3.0. A quick fix is to insert import multiprocessing in your setup.py, but this really should be fixed.

@frewsxcv
Copy link

frewsxcv commented Sep 5, 2013

Actually, it looks like this is a CPython issue. It's already been fixed in the 2.7.4, but didn't apparently make it in the 2.6 release set. @patrys, can you reproduce this issue with 2.7.4 or 2.7.5? If not, we should close this issue

@patrys
Copy link
Author

patrys commented Sep 5, 2013

I can confirm that it works with 2.7.5.

blaix added a commit to yola/yolapy that referenced this issue Nov 5, 2015
Small problem with this:

When I run `python setup.py test`, all the tests pass, but I'm seeing
the exit error described here:
nose-devs/nose#629 - I'm on python 2.7.10

When I run `python setup.py nosetests`, everything works fine.
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

No branches or pull requests

2 participants