From: Zac Medico Date: Sat, 4 Jun 2011 00:01:13 +0000 (-0700) Subject: Move pickle import out of base portage module. X-Git-Tag: v2.2.0_alpha38~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f95d917258f4bf9d56f20588b6dab5f5d1e0cc40;p=portage.git Move pickle import out of base portage module. --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 9732a74b1..1b96dab58 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -17,10 +17,6 @@ try: errno.ESTALE = -1 import re import types - try: - import cPickle as pickle - except ImportError: - import pickle try: from subprocess import getstatusoutput as subprocess_getstatusoutput diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 138553a16..28e9428d9 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -28,12 +28,12 @@ import traceback import portage portage.proxy.lazyimport.lazyimport(globals(), + 'pickle', 'portage.dep:Atom', 'portage.util.listdir:_ignorecvs_dirs' ) from portage import StringIO from portage import os -from portage import pickle from portage import subprocess_getstatusoutput from portage import _encodings from portage import _os_merge diff --git a/pym/portage/util/mtimedb.py b/pym/portage/util/mtimedb.py index 175bd8f46..571fe5a30 100644 --- a/pym/portage/util/mtimedb.py +++ b/pym/portage/util/mtimedb.py @@ -4,9 +4,13 @@ __all__ = ['MtimeDB'] import copy +try: + import cPickle as pickle +except ImportError: + import pickle import portage -from portage import pickle, _unicode_encode +from portage import _unicode_encode from portage.data import portage_gid, uid from portage.localization import _ from portage.util import apply_secpass_permissions, atomic_ofstream, writemsg