[issue5228] multiprocessing not compatible with functools.partial

2011-04-03 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

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



[issue5228] multiprocessing not compatible with functools.partial

2011-03-10 Thread uptimebox

uptimebox m...@uptimebox.ru added the comment:

The bug still exists in 2.6.6

Process PoolWorker-2:
Traceback (most recent call last):
Process PoolWorker-1:
Traceback (most recent call last):
  File /usr/lib/python2.6/multiprocessing/process.py, line 232, in _bootstrap
  File /usr/lib/python2.6/multiprocessing/process.py, line 232, in _bootstrap
self.run()
self.run()
  File /usr/lib/python2.6/multiprocessing/process.py, line 88, in run
  File /usr/lib/python2.6/multiprocessing/process.py, line 88, in run
self._target(*self._args, **self._kwargs)
self._target(*self._args, **self._kwargs)
  File /usr/lib/python2.6/multiprocessing/pool.py, line 57, in worker
  File /usr/lib/python2.6/multiprocessing/pool.py, line 57, in worker
task = get()
task = get()
  File /usr/lib/python2.6/multiprocessing/queues.py, line 352, in get
  File /usr/lib/python2.6/multiprocessing/queues.py, line 352, in get
return recv()
return recv()
TypeError: type 'partial' takes at least one argument
TypeError: type 'partial' takes at least one argument

--
nosy: +uptimebox

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



[issue5228] multiprocessing not compatible with functools.partial

2011-03-10 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

The bug was fixed in 2.7, and not backported to 2.6.
2.6 is now in security-fix-only mode, if possible you should upgrade to 2.7.

--
nosy: +amaury.forgeotdarc

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



[issue5228] multiprocessing not compatible with functools.partial

2011-03-10 Thread uptimebox

uptimebox m...@uptimebox.ru added the comment:

Unfortunately, upgrading to 2.7 is not an option for me, since my application 
works on Debian stable which only includes 2.6. For now I'm settled with the 
following workaround: http://paste.pocoo.org/show/351774/

--

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



[issue5228] multiprocessing not compatible with functools.partial

2010-03-08 Thread joseph.h.garvin

joseph.h.garvin joseph.h.gar...@gmail.com added the comment:

I think this bug still exists in Python 2.6.4, and I haven't tested 2.6.5, but 
since 2.6.4 was released 6 months after this bug was closed I assume it's still 
an issue. Running ndbecker's test program as is produces the following output 
on Solaris 10:

Process PoolWorker-1:
Process PoolWorker-2:
Traceback (most recent call last):
Traceback (most recent call last):
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 232, in _bootstrap
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 232, in _bootstrap
Process PoolWorker-3:
Traceback (most recent call last):
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 232, in _bootstrap
self.run()
self.run()
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 88, in run
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 88, in run
self._target(*self._args, **self._kwargs)
self._target(*self._args, **self._kwargs)
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/pool.py, 
line 57, in worker
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/pool.py, 
line 57, in worker
self.run()
task = get()
task = get()
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/queues.py, 
line 352, in get
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/process.py, 
line 88, in run
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/queues.py, 
line 352, in get
self._target(*self._args, **self._kwargs)
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/pool.py, 
line 57, in worker
return recv()
return recv()
TypeError: type 'partial' takes at least one argument
TypeError: type 'partial' takes at least one argument
task = get()
  File /opt/app/g++lib6/python-2.6/lib/python2.6/multiprocessing/queues.py, 
line 352, in get
return recv()
TypeError: type 'partial' takes at least one argument

--
nosy: +joseph.h.garvin
versions: +Python 2.6 -Python 2.5

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



[issue5228] multiprocessing not compatible with functools.partial

2009-03-31 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

I agree that this is a nice feature, however it requires adding a 
getstate/setstate within the functools C code. 

I would need a patch which does this, and adds tests to the 
functools/pickle test suite for this. Also, the feature will only be 
accepted for py3k (3.1) currently. Features such as this will not be 
backported to the 2.x branch

--

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



[issue5228] multiprocessing not compatible with functools.partial

2009-03-31 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

Jack offered to take a peek

--
assignee: jnoller - jackdied
nosy: +jackdied

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



[issue5228] multiprocessing not compatible with functools.partial

2009-03-31 Thread Jack Diederich

Jack Diederich jackd...@gmail.com added the comment:

Fixed rev 70931.  Happy pickling!

--
resolution:  - fixed
status: open - closed

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



[issue5228] multiprocessing not compatible with functools.partial

2009-03-29 Thread Jesse Noller

Changes by Jesse Noller jnol...@gmail.com:


--
priority:  - low

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



[issue5228] multiprocessing not compatible with functools.partial

2009-02-12 Thread ndbecker

New submission from ndbecker ndbeck...@gmail.com:

from multiprocessing import Pool

def power (x, pwr=2):
return x**pwr

import functools
run_test = functools.partial (power, pwr=3)

if __name__ == __main__:

pool = Pool()
cases = [3,4,5]
results = pool.map (run_test, cases)

TypeError: type 'partial' takes at least one argument
Traceback (most recent call last):
  File /usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5-
self.run()
  File /usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5-
self._target(*self._args, **self._kwargs)
  File /usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5-
task = get()
  File /usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5-
return recv()
TypeError: type 'partial' takes at least one argument

--
components: Library (Lib)
messages: 81766
nosy: jnoller, ndbecker
severity: normal
status: open
title: multiprocessing not compatible with functools.partial
type: behavior
versions: Python 2.5

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



[issue5228] multiprocessing not compatible with functools.partial

2009-02-12 Thread Jesse Noller

Changes by Jesse Noller jnol...@gmail.com:


--
assignee:  - jnoller
nosy: +christian.heimes

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



[issue5228] multiprocessing not compatible with functools.partial

2009-02-12 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

See this mail thread:
http://mail.python.org/pipermail/python-dev/2009-February/086034.html

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



[issue5228] multiprocessing not compatible with functools.partial

2009-02-12 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Rather than implement a multiprocessing-specific fix, it would certainly
be better to make functools.partial picklable, as pointed out in the ML
thread Jesse linked to.

--
nosy: +pitrou

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



[issue5228] multiprocessing not compatible with functools.partial

2009-02-12 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

 Antoine Pitrou pit...@free.fr added the comment:

 Rather than implement a multiprocessing-specific fix, it would certainly
 be better to make functools.partial picklable, as pointed out in the ML
 thread Jesse linked to.


I would tend to agree

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