 <p>In addition to @MartinPieters answer the other way of doing this is to define the <code>find_global</code> method of the <code>cPickle.Unpickler</code> class, or extend the <code>pickle.Unpickler</code> class.</p> <pre><code>def map_path(mod_name, kls_name): if mod_name.startswith('packageA'): # catch all old module names mod = __import__('WrapperPackage.%s'%mod_name, fromlist=[mod_name]) return getattr(mod, kls_name) else: mod = __import__(mod_name) return getattr(mod, kls_name) import cPickle as pickle with open('dump.pickle','r') as fh: unpickler = pickle.Unpickler(fh) unpickler.find_global = map_path obj = unpickler.load() # object will now contain the new class path reference with open('dump-new.pickle','w') as fh: pickle.dump(obj, fh) # ClassA will now have a new path in 'dump-new' </code></pre> <p>A more detailed explanation of the process for both <code>pickle</code> and <code>cPickle</code> can be found <a href="http://nadiana.com/python-pickle-insecure" rel="nofollow">here</a>.</p>