[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Support of pickling nested classes and methods with all protocols was added in 
issue23611.

--
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-09-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide full example that you want to work and test it in 
Python 3.5? I suppose your issue is fixed in 3.5.

--
nosy: +serhiy.storchaka

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-03-01 Thread Davin Potts

Davin Potts added the comment:

The runnable example in the attached file, issue_23513_play.py, suggests a way 
to preserve the inheritance of the Result class in any subclasses of Thing yet 
leaves the definition of Thing.worker as the OP first had it (in the most 
straightforward way).

In creating other processes, the authors of multiprocessing needed a way to 
communicate objects from one process to another and the choice of pickle for 
serialization does require us to adjust our thinking a little but it does not 
mean we have to lose being pythonic.  Independent of whether multiprocessing is 
involved or not, returning a Result object from an instancemethod of another 
class might work without the definition of the Result class being in the 
current namespace, but it feels like a much more comprehensive solution to have 
the Result class available in the current namespace.  The attached proposes 
defining the Result class outside of the Thing class yet then adding it as a 
class attribute of Thing -- this gives both inheritability (which was missing 
in the simple example) and visibility for pickling.  The convenience of a 
function like wrap_worker is just one tool that helps pickle figure out how to 
do its job -- this is part of a larger discussion around pickle and how
  to gracefully deal with non-trivial situations.

The attached is not being proposed as a final solution but does it help with 
your situation in particular?  Do parts of it look useful?

--
Added file: http://bugs.python.org/file38292/issue_23513_play.py

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-02-24 Thread Davin Potts

Changes by Davin Potts pyt...@discontinuity.net:


--
nosy: +davin

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



[issue23513] Add support for classes/object model in multiprocessing/pickle

2015-02-24 Thread Cezary Wagner

Cezary Wagner added the comment:

I am fighting with multiprocessing and still not won - I need to invent new 
Python coding style to use it and can not reduce ugly code/microcoding. It is 
not because it is not possible to do it in Python easier but because it is not 
improved yet.

--

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