Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Use absolute import
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Mar 20, 2012
1 parent 33836f8 commit f1cf51c
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions sandbox/attributes.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
from types import FunctionType, FrameType, GeneratorType
from sys import version_info
try:
Expand Down
2 changes: 1 addition & 1 deletion sandbox/blacklist_proxy.py
Expand Up @@ -5,7 +5,7 @@
inherit from dict: Python/ceval.c uses PyDict_SetItem() and an inlined version
of PyDict_GetItem().
"""

from __future__ import absolute_import
from .proxy import readOnlyError

def createReadOnlyBuiltins(builtins):
Expand Down
1 change: 1 addition & 0 deletions sandbox/builtins.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
import __builtin__ as BUILTINS_MODULE
from types import FrameType
from sys import _getframe, version_info
Expand Down
1 change: 1 addition & 0 deletions sandbox/code.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
from sandbox import Protection
from _sandbox import disable_code_new, restore_code_new

Expand Down
1 change: 1 addition & 0 deletions sandbox/cpython.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
from sandbox import HAVE_CSANDBOX
if HAVE_CSANDBOX:
from _sandbox import dictionary_of
Expand Down
2 changes: 1 addition & 1 deletion sandbox/proxy.py
@@ -1,7 +1,7 @@
"""
Proxies using a whitelist policy.
"""

from __future__ import absolute_import
from sys import version_info
if version_info < (3, 0):
from types import NoneType, ClassType, InstanceType
Expand Down
1 change: 1 addition & 0 deletions sandbox/recursion.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
import sys

class SetRecursionLimit:
Expand Down
2 changes: 2 additions & 0 deletions sandbox/restorable_dict.py
@@ -1,3 +1,5 @@
from __future__ import absolute_import

class RestorableDict:
def __init__(self, dict):
self.dict = dict
Expand Down
1 change: 1 addition & 0 deletions sandbox/safe_import.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
from .proxy import proxy, readOnlyError

def createSafeModule(real_module, attributes, safe_attributes):
Expand Down
1 change: 1 addition & 0 deletions sandbox/safe_open.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
from os.path import realpath
from .proxy import createReadOnlyObject
from errno import EACCES
Expand Down
1 change: 1 addition & 0 deletions sandbox/stdio.py
@@ -1,3 +1,4 @@
from __future__ import absolute_import
import sys
from sandbox import SandboxError

Expand Down

0 comments on commit f1cf51c

Please sign in to comment.