[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a58fa8e9bac by Benjamin Peterson in branch '2.7':
Issue #15881: Fixed atexit hook in multiprocessing.
http://hg.python.org/cpython/rev/0a58fa8e9bac

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
versions:  -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-31 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Philip, if you could backport, that'd be great.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-22 Thread Philip Jenvey

Philip Jenvey added the comment:

Targeting this for 2.7.4. If Alexander doesn't get to it, ping me and I'll do it

--
nosy: +benjamin.peterson, georg.brandl, larry, pjenvey
priority: normal - release blocker

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-20 Thread Tres Seaver

Tres Seaver added the comment:

I can reproduce the bug against the 2.7 tip.

Reviewing the 2.7 patch:

- The 2.7 tip has 'Misc/ACKS' instead of 'Doc/ACKS.txt'.

- In 'Misc/ACKS', the line adding 'Chris McDonough' should add it in alpha 
order.

- The remainder of the patch looks correct, and applies cleanly to the tip of 
the 2.7 branch.

- After applying the patch to the 2.7 tip, I can no longer reproduce the bug.

- After applying the patch, the full test suite ('./python -m test.testall 
-j3') passes all tests.

--
nosy: +tseaver

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2013-01-20 Thread Hynek Schlawack

Changes by Hynek Schlawack h...@ox.cx:


--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b79b4848f44 by Richard Oudkerk in branch 'default':
Issue #15881: Clarify comment in exit function
http://hg.python.org/cpython/rev/2b79b4848f44

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-12 Thread Mitar

Changes by Mitar mmi...@gmail.com:


--
nosy: +mitar

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I see the same error on Windows (when pressing ^C), but on Linux I get

Error in sys.exitfunc:
Traceback (most recent call last):
  File /usr/lib/python2.7/atexit.py, line 28, in _run_exitfuncs
import traceback
  File /usr/lib/python2.7/traceback.py, line 3, in module
import linecache
  File /usr/lib/python2.7/linecache.py, line 9, in module
import os
  File /usr/lib/python2.7/os.py, line 119, in module
sys.modules['os.path'] = path
AttributeError: 'module' object has no attribute 'modules'

This also suggests that module teardown has begun before/while sys.exitfunc is 
running.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I suspect the problem is caused by nose's isolate plugin.

With this enabled, a copy of sys.modules is saved before each test and then 
restored after the test.  This causes garbage collection of newly imported 
modules.  The destructor for the module type causes all globals to be replaced 
by None.

This will break the atexit function registered by multiprocessing since it 
depends on globals.

PS. A simple work-around (which does not require people to upgrade to a 
bugfixed version of Python) is to put

try:
import multiprocessing
except ImportError:
pass

near the beginning of setup.py.  After this change I don't get the error when 
running python setup.py test.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Actually, I am not so sure it is the isolate plugin.  But I do think that 
sys.modules is being manipulated somewhere before shutdown.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Actually it is test.with_project_on_sys_path() in setuptools/commands/test.py 
that does the save/restore of sys.modules.  See

http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-10 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 27d410dd5431 by Alexander Belopolsky in branch '3.2':
Issue #15881: Fixed atexit hook in multiprocessing.
http://hg.python.org/cpython/rev/27d410dd5431

New changeset 08c680918ff8 by Alexander Belopolsky in branch 'default':
Issue #15881: Fixed atexit hook in multiprocessing.
http://hg.python.org/cpython/rev/08c680918ff8

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset db67b848ddc3 by Alexander Belopolsky in branch '3.2':
Issue #15881: Fixed 3.2 backport.
http://hg.python.org/cpython/rev/db67b848ddc3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Applied to 3.2 and 3.3.  Thanks for the patch!

Leaving it open pending 2.7 commit.

--
resolution:  - fixed
stage: commit review - committed/rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b05547e8ff92 by Alexander Belopolsky in branch '3.2':
Issue #15881: Added NEWS entry and proper credit.
http://hg.python.org/cpython/rev/b05547e8ff92

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough

New submission from Chris McDonough:

The symptom is an exact duplicate of the symptom reported in the following 
(closed) issue:

http://bugs.python.org/issue9775

The issue is also related to the following other issues:

http://bugs.python.org/issue4106
http://bugs.python.org/issue9205
http://bugs.python.org/issue9207

To reproduce the symptom driving the patches that will be attached to this 
issue:

  git clone git://github.com/pypa/pip.git
  cd pip
  /any/python setup.py dev
  /any/python setup.py test

You can either wait for the entire test suite to finish or you can press ctrl-C 
at any time (the tests take a long time).  In either case, a traceback like the 
following will be printed to the console.

  Error in atexit._run_exitfuncs:
  Traceback (most recent call last):
File /home/chrism/opt/Python-2.7.3/lib/python2.7/atexit.py, line 24, in 
_run_exitfuncs
func(*targs, **kargs)
File /home/chrism/opt/Python-2.7.3/lib/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 /home/chrism/opt/Python-2.7.3/lib/python2.7/atexit.py, line 24, in 
_run_exitfuncs
  func(*targs, **kargs)
File /home/chrism/opt/Python-2.7.3/lib/python2.7/multiprocessing/util.py, 
line 284, in _exit_function
  info('process shutting down')
  TypeError: 'NoneType' object is not callable

From what I understand in other issues, multiprocessing.util._exit_function 
shouldn't actually be called *after*  the containing module's globals are 
destroyed (it should be called before), but this does indeed happen.

Patches will be attached that anticipate the symptom and prevent a shutdown 
error.  One will be attached for Python 2.7 branch, the other for the Python 
tip.   Each causes functions that are called at shutdown time to keep a 
reference around to other functions and globals used within the function, and 
each does some checks for the insane state and prevents an error from happening 
in this insane state.

--
components: Library (Lib)
messages: 170003
nosy: mcdonc
priority: normal
severity: normal
status: open
title: multiprocessing 'NoneType' object is not callable
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
nosy: +sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough

Chris McDonough added the comment:

Patch for tip.

--
keywords: +patch
Added file: http://bugs.python.org/file27142/shutdown_typeerror-tip.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough

Chris McDonough added the comment:

2.7 branch patch.

--
Added file: http://bugs.python.org/file27143/shutdown_typeerror-27.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
stage:  - patch review
versions:  -Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The patch makes sense.  I'll take another look over the weekend, but it seems 
to be ready to be applied.

--
assignee:  - belopolsky
nosy: +belopolsky
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris Jerdonek

Chris Jerdonek added the comment:

+# NB: we hold on to references to functions in the arglist due to the

This is a nit, but I think adding NB:, Note:, etc. to the beginning of a 
comment is redundant because by being a comment it is already implicit that it 
should be noted.

--
nosy: +cjerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15881
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com