From c23cc3656c3ca0f21de1eb618013868ece05355f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 28 Aug 2009 18:07:28 -0500 Subject: [PATCH] fix location of magic AssertionError --HG-- branch : trunk --- py/__init__.py | 2 +- py/code/code.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py/__init__.py b/py/__init__.py index ad9d6c2a4..a7c63f58a 100644 --- a/py/__init__.py +++ b/py/__init__.py @@ -133,7 +133,7 @@ initpkg(__name__, 'code.getrawcode' : ('./code/code.py', 'getrawcode'), 'code.patch_builtins' : ('./code/code.py', 'patch_builtins'), 'code.unpatch_builtins' : ('./code/code.py', 'unpatch_builtins'), - 'code._AssertionError' : ('./code/assertion.py', 'AssertionError'), + 'code._AssertionError' : ('./code/_assertion.py', 'AssertionError'), # backports and additions of builtins 'builtin.__doc__' : ('./builtin/__init__.py', '__doc__'), diff --git a/py/code/code.py b/py/code/code.py index 2581a978c..7083d7ad9 100644 --- a/py/code/code.py +++ b/py/code/code.py @@ -739,10 +739,10 @@ oldbuiltins = {} def patch_builtins(assertion=True, compile=True): """ put compile and AssertionError builtins to Python's builtins. """ if assertion: - from py.__.code import assertion + from py.__.code import _assertion l = oldbuiltins.setdefault('AssertionError', []) l.append(py.builtin.builtins.AssertionError) - py.builtin.builtins.AssertionError = assertion.AssertionError + py.builtin.builtins.AssertionError = _assertion.AssertionError if compile: l = oldbuiltins.setdefault('compile', []) l.append(py.builtin.builtins.compile)