[pypy-svn] r51681 - pypy/dist/pypy/annotation

mwh at codespeak.net mwh at codespeak.net
Wed Feb 20 12:19:07 CET 2008


Author: mwh
Date: Wed Feb 20 12:19:06 2008
New Revision: 51681

Modified:
   pypy/dist/pypy/annotation/annrpython.py
   pypy/dist/pypy/annotation/binaryop.py
   pypy/dist/pypy/annotation/bookkeeper.py
   pypy/dist/pypy/annotation/builtin.py
   pypy/dist/pypy/annotation/model.py
   pypy/dist/pypy/annotation/policy.py
   pypy/dist/pypy/annotation/signature.py
   pypy/dist/pypy/annotation/specialize.py
   pypy/dist/pypy/annotation/unaryop.py
Log:
clean up some unused imports

Modified: pypy/dist/pypy/annotation/annrpython.py
==============================================================================
--- pypy/dist/pypy/annotation/annrpython.py	(original)
+++ pypy/dist/pypy/annotation/annrpython.py	Wed Feb 20 12:19:06 2008
@@ -1,10 +1,10 @@
 from __future__ import generators
 
-from types import ClassType, FunctionType
+from types import FunctionType
 from pypy.tool.ansi_print import ansi_log, raise_nicer_exception
 from pypy.annotation import model as annmodel
 from pypy.tool.pairtype import pair
-from pypy.annotation.bookkeeper import Bookkeeper, getbookkeeper
+from pypy.annotation.bookkeeper import Bookkeeper
 from pypy.annotation import signature
 from pypy.objspace.flow.model import Variable, Constant
 from pypy.objspace.flow.model import FunctionGraph
@@ -26,7 +26,7 @@
         import pypy.rpython.ootypesystem.bltregistry # has side effects
         import pypy.rpython.extfuncregistry # has side effects
         import pypy.rlib.nonconst # has side effects
-        
+
         if translator is None:
             # interface for tests
             from pypy.translator.translator import TranslationContext

Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py	(original)
+++ pypy/dist/pypy/annotation/binaryop.py	Wed Feb 20 12:19:06 2008
@@ -18,14 +18,11 @@
 from pypy.annotation.model import isdegenerated, TLS
 from pypy.annotation.model import read_can_only_throw
 from pypy.annotation.model import add_knowntypedata, merge_knowntypedata
-from pypy.annotation.model import lltype_to_annotation
 from pypy.annotation.model import SomeGenericCallable
 from pypy.annotation.model import SomeExternalInstance, SomeUnicodeString
 from pypy.annotation.bookkeeper import getbookkeeper
 from pypy.objspace.flow.model import Variable, Constant
-from pypy.annotation.listdef import ListDef
 from pypy.rlib import rarithmetic
-from pypy.rpython import extregistry
 
 # convenience only!
 def immutablevalue(x):

Modified: pypy/dist/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/annotation/bookkeeper.py	(original)
+++ pypy/dist/pypy/annotation/bookkeeper.py	Wed Feb 20 12:19:06 2008
@@ -8,17 +8,17 @@
 from pypy.objspace.flow.model import Constant
 from pypy.annotation.model import SomeString, SomeChar, SomeFloat, \
      SomePtr, unionof, SomeInstance, SomeDict, SomeBuiltin, SomePBC, \
-     SomeInteger, SomeExternalObject, SomeOOInstance, TLS, SomeAddress, \
+     SomeInteger, SomeOOInstance, TLS, SomeAddress, \
      SomeUnicodeCodePoint, SomeOOStaticMeth, s_None, s_ImpossibleValue, \
      SomeLLADTMeth, SomeBool, SomeTuple, SomeOOClass, SomeImpossibleValue, \
      SomeUnicodeString, SomeList, SomeObject, HarmlesslyBlocked, \
      SomeWeakRef, lltype_to_annotation
-from pypy.annotation.classdef import ClassDef, InstanceSource
-from pypy.annotation.listdef import ListDef, MOST_GENERAL_LISTDEF
-from pypy.annotation.dictdef import DictDef, MOST_GENERAL_DICTDEF
+from pypy.annotation.classdef import InstanceSource
+from pypy.annotation.listdef import ListDef
+from pypy.annotation.dictdef import DictDef
 from pypy.annotation import description
 from pypy.annotation.signature import annotationoftype
-from pypy.interpreter.argument import Arguments, ArgErr
+from pypy.interpreter.argument import Arguments
 from pypy.rlib.objectmodel import r_dict, Symbolic
 from pypy.tool.algo.unionfind import UnionFind
 from pypy.rpython.lltypesystem import lltype, llmemory

Modified: pypy/dist/pypy/annotation/builtin.py
==============================================================================
--- pypy/dist/pypy/annotation/builtin.py	(original)
+++ pypy/dist/pypy/annotation/builtin.py	Wed Feb 20 12:19:06 2008
@@ -8,7 +8,6 @@
 from pypy.annotation.model import SomeUnicodeCodePoint, SomeAddress
 from pypy.annotation.model import SomeFloat, unionof, SomeUnicodeString
 from pypy.annotation.model import SomePBC, SomeInstance, SomeDict
-from pypy.annotation.model import SomeExternalObject
 from pypy.annotation.model import SomeWeakRef
 from pypy.annotation.model import annotation_to_lltype, lltype_to_annotation, ll_to_annotation
 from pypy.annotation.model import add_knowntypedata
@@ -360,7 +359,7 @@
     return SomeObject()
 
 # collect all functions
-import __builtin__, exceptions
+import __builtin__
 BUILTIN_ANALYZERS = {}
 for name, value in globals().items():
     if name.startswith('builtin_'):

Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py	(original)
+++ pypy/dist/pypy/annotation/model.py	Wed Feb 20 12:19:06 2008
@@ -33,11 +33,9 @@
 from pypy.tool import descriptor
 from pypy.tool.pairtype import pair, extendabletype
 from pypy.tool.tls import tlsobject
-from pypy.rlib.rarithmetic import r_uint, r_longlong, r_ulonglong, base_int
+from pypy.rlib.rarithmetic import r_uint, r_ulonglong, base_int
 from pypy.rlib.rarithmetic import r_singlefloat
 import inspect, weakref
-from sys import maxint
-from pypy.annotation.description import FunctionDesc
 
 DEBUG = True    # set to False to disable recording of debugging information
 TLS = tlsobject()

Modified: pypy/dist/pypy/annotation/policy.py
==============================================================================
--- pypy/dist/pypy/annotation/policy.py	(original)
+++ pypy/dist/pypy/annotation/policy.py	Wed Feb 20 12:19:06 2008
@@ -4,10 +4,8 @@
 from pypy.annotation.specialize import memo
 # for some reason, model must be imported first,
 # or we create a cycle.
-from pypy.annotation import model as annmodel
 from pypy.annotation.bookkeeper import getbookkeeper
 from pypy.annotation.signature import Sig
-import types
 
 
 class BasicAnnotatorPolicy(object):

Modified: pypy/dist/pypy/annotation/signature.py
==============================================================================
--- pypy/dist/pypy/annotation/signature.py	(original)
+++ pypy/dist/pypy/annotation/signature.py	Wed Feb 20 12:19:06 2008
@@ -1,10 +1,9 @@
 
 import types
 from pypy.annotation.model import SomeBool, SomeInteger, SomeString,\
-     SomeFloat, SomeList, SomeDict, s_None, SomeExternalObject,\
+     SomeFloat, SomeList, SomeDict, s_None, \
      SomeObject, SomeInstance, SomeTuple, lltype_to_annotation,\
      unionof, SomeUnicodeString
-from pypy.annotation.classdef import ClassDef, InstanceSource
 from pypy.annotation.listdef import ListDef, MOST_GENERAL_LISTDEF
 from pypy.annotation.dictdef import DictDef, MOST_GENERAL_DICTDEF
 
@@ -38,7 +37,6 @@
 
 def _compute_annotation(t, bookkeeper=None):
     from pypy.rpython.lltypesystem import lltype
-    from pypy.annotation.bookkeeper import getbookkeeper
     from pypy.rpython import extregistry
     if isinstance(t, SomeObject):
         return t
@@ -65,7 +63,6 @@
         return annotationoftype(t, bookkeeper)
 
 def annotationoftype(t, bookkeeper=False):
-    from pypy.annotation.builtin import BUILTIN_ANALYZERS
     from pypy.rpython import extregistry
 
     """The most precise SomeValue instance that contains all

Modified: pypy/dist/pypy/annotation/specialize.py
==============================================================================
--- pypy/dist/pypy/annotation/specialize.py	(original)
+++ pypy/dist/pypy/annotation/specialize.py	Wed Feb 20 12:19:06 2008
@@ -1,5 +1,4 @@
 # specialization support
-import types
 import py
 from pypy.tool.uid import uid
 from pypy.tool.sourcetools import func_with_new_name

Modified: pypy/dist/pypy/annotation/unaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/unaryop.py	(original)
+++ pypy/dist/pypy/annotation/unaryop.py	Wed Feb 20 12:19:06 2008
@@ -4,7 +4,7 @@
 
 from pypy.annotation.model import \
      SomeObject, SomeInteger, SomeBool, SomeString, SomeChar, SomeList, \
-     SomeDict, SomeUnicodeCodePoint, SomeTuple, SomeImpossibleValue, \
+     SomeDict, SomeTuple, SomeImpossibleValue, \
      SomeInstance, SomeBuiltin, SomeFloat, SomeIterator, SomePBC, \
      SomeExternalObject, SomeTypedAddressAccess, SomeAddress, \
      s_ImpossibleValue, s_Bool, s_None, \
@@ -14,7 +14,6 @@
 from pypy.annotation import builtin
 from pypy.annotation.binaryop import _clone ## XXX where to put this?
 from pypy.rpython import extregistry
-from pypy.annotation.signature import annotation
 
 # convenience only!
 def immutablevalue(x):



More information about the Pypy-commit mailing list