From c264e3ee206d5e5d1cb2aeff2cb0cd864dce83c8 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 25 Jan 2012 18:58:03 -0500 Subject: Move some code from importlib.__init__ to importlib._bootstrap that does not need to be exposed from C code for bootstrapping reasons. --- Lib/importlib/abc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/importlib/abc.py') diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py index 0d376298c25..c4b7187d60d 100644 --- a/Lib/importlib/abc.py +++ b/Lib/importlib/abc.py @@ -260,7 +260,7 @@ class PyPycLoader(PyLoader): raw_timestamp = data[4:8] if len(raw_timestamp) < 4: raise EOFError("bad timestamp in {}".format(fullname)) - pyc_timestamp = marshal._r_long(raw_timestamp) + pyc_timestamp = _bootstrap._r_long(raw_timestamp) bytecode = data[8:] # Verify that the magic number is valid. if imp.get_magic() != magic: @@ -292,7 +292,7 @@ class PyPycLoader(PyLoader): # Generate bytecode and write it out. if not sys.dont_write_bytecode: data = bytearray(imp.get_magic()) - data.extend(marshal._w_long(source_timestamp)) + data.extend(_bootstrap._w_long(source_timestamp)) data.extend(marshal.dumps(code_object)) self.write_bytecode(fullname, data) return code_object -- cgit v1.2.3