From f70a538f20c7113ee989c9f4663c7c2b34e62f26 Mon Sep 17 00:00:00 2001 From: Jesse Noller Date: Sun, 18 Jan 2009 19:44:02 +0000 Subject: Issues #10867: remove old cPickle imports from multiprocessing --- Lib/multiprocessing/forking.py | 6 +----- Lib/multiprocessing/managers.py | 6 +----- Misc/NEWS | 3 +++ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Lib/multiprocessing/forking.py b/Lib/multiprocessing/forking.py index e1a64df..3c0f568 100644 --- a/Lib/multiprocessing/forking.py +++ b/Lib/multiprocessing/forking.py @@ -151,14 +151,10 @@ else: import _subprocess import time + from pickle import dump, load, HIGHEST_PROTOCOL from ._multiprocessing import win32, Connection, PipeConnection from .util import Finalize - #try: - # from cPickle import dump, load, HIGHEST_PROTOCOL - #except ImportError: - from pickle import load, HIGHEST_PROTOCOL - def dump(obj, file, protocol=None): ForkingPickler(file, protocol).dump(obj) diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index f895c12..78c1fe7 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -21,16 +21,12 @@ import array import queue from traceback import format_exc +from pickle import PicklingError from multiprocessing import Process, current_process, active_children, Pool, util, connection from multiprocessing.process import AuthenticationString from multiprocessing.forking import exit, Popen, assert_spawning, ForkingPickler from multiprocessing.util import Finalize, info -try: - from cPickle import PicklingError -except ImportError: - from pickle import PicklingError - # # Register some things for pickling # diff --git a/Misc/NEWS b/Misc/NEWS index b1c5d7f..499e542 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -132,6 +132,9 @@ Core and Builtins Library ------- +- Issue #10867: Remove python2.x try: except: imports for old cPickle from + multiprocessing. + - Issue #4959: inspect.formatargspec now works for keyword only arguments without defaults. -- cgit v0.12