From: Serhiy Storchaka Date: Tue, 2 May 2017 18:56:52 +0000 (+0300) Subject: [2.7] bpo-30223: Fix test_xpickle for Python 2.4. (#1395) X-Git-Tag: v2.7.14rc1~190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e158b2316385497c7b6b818d8b45855d7f87f0b;p=python [2.7] bpo-30223: Fix test_xpickle for Python 2.4. (#1395) --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 426839477a..0256bca779 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import unittest import pickle import cPickle @@ -169,7 +167,7 @@ class K(object): # Shouldn't support the recursion itself return K, (self.value,) -import __main__ +__main__ = sys.modules['__main__'] __main__.C = C C.__module__ = "__main__" __main__.D = D