This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients Jimbofbx, asksol, dragonfyre13, dsvensson, gsson, jnoller, jodal, pitrou, sbt
Date 2012-04-07.17:26:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333819565.61.0.292996682609.issue4892@psf.upfronthosting.co.za>
In-reply-to
Content
ForkingPickler is only used when creating a child process.  The multiprocessing.reduction module is only really intended for sending stuff to *pre-existing* processes.

As things stand, after importing multiprocessing.reduction you can do something like

  buf = io.BytesIO()
  pickler = ForkingPickler(buf)
  pickler.dump(conn)
  data = buf.getvalue()
  writer.send_bytes(data)

But that is rather less simple and obvious than just doing

  writer.send(conn)

which was possible in pyprocessing.

Originally just importing the module magically registered the reduce functions with copyreg.  Since this was undesirable, the reduction functions were instead registered with ForkingPickler.  But this fix rather missed the point of the module.
History
Date User Action Args
2012-04-07 17:26:05sbtsetrecipients: + sbt, pitrou, jnoller, gsson, dsvensson, asksol, jodal, Jimbofbx, dragonfyre13
2012-04-07 17:26:05sbtsetmessageid: <1333819565.61.0.292996682609.issue4892@psf.upfronthosting.co.za>
2012-04-07 17:26:05sbtlinkissue4892 messages
2012-04-07 17:26:04sbtcreate