Author: Brian Kearns <[email protected]>
Branch:
Changeset: r70074:851618b4e09d
Date: 2014-03-18 22:10 -0400
http://bitbucket.org/pypy/pypy/changeset/851618b4e09d/
Log: more unused
diff --git a/pypy/interpreter/buffer.py b/pypy/interpreter/buffer.py
--- a/pypy/interpreter/buffer.py
+++ b/pypy/interpreter/buffer.py
@@ -1,7 +1,6 @@
"""
Buffer protocol support.
"""
-from pypy.interpreter.error import OperationError
from rpython.rlib.objectmodel import import_from_mixin
diff --git a/pypy/module/__pypy__/interp_builders.py
b/pypy/module/__pypy__/interp_builders.py
--- a/pypy/module/__pypy__/interp_builders.py
+++ b/pypy/module/__pypy__/interp_builders.py
@@ -4,7 +4,6 @@
from pypy.interpreter.typedef import TypeDef
from rpython.rlib.rstring import UnicodeBuilder, StringBuilder
from rpython.tool.sourcetools import func_with_new_name
-from rpython.rlib import jit
def create_builder(name, strtype, builder_cls):
diff --git a/pypy/module/_cffi_backend/cbuffer.py
b/pypy/module/_cffi_backend/cbuffer.py
--- a/pypy/module/_cffi_backend/cbuffer.py
+++ b/pypy/module/_cffi_backend/cbuffer.py
@@ -1,4 +1,3 @@
-from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.buffer import RWBuffer
from pypy.interpreter.error import oefmt
from pypy.interpreter.gateway import unwrap_spec, interp2app
diff --git a/pypy/module/_cffi_backend/ctypestruct.py
b/pypy/module/_cffi_backend/ctypestruct.py
--- a/pypy/module/_cffi_backend/ctypestruct.py
+++ b/pypy/module/_cffi_backend/ctypestruct.py
@@ -80,7 +80,6 @@
return (cfield.ctype, cfield.offset)
def _copy_from_same(self, cdata, w_ob):
- space = self.space
if isinstance(w_ob, cdataobj.W_CData):
if w_ob.ctype is self and self.size >= 0:
misc._raw_memcopy(w_ob._cdata, cdata, self.size)
diff --git a/pypy/module/_cffi_backend/handle.py
b/pypy/module/_cffi_backend/handle.py
--- a/pypy/module/_cffi_backend/handle.py
+++ b/pypy/module/_cffi_backend/handle.py
@@ -1,4 +1,3 @@
-import weakref
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import unwrap_spec
from pypy.module._cffi_backend import ctypeobj, ctypeptr, cdataobj
diff --git a/pypy/module/_cffi_backend/misc.py
b/pypy/module/_cffi_backend/misc.py
--- a/pypy/module/_cffi_backend/misc.py
+++ b/pypy/module/_cffi_backend/misc.py
@@ -4,7 +4,7 @@
from rpython.rlib import jit
from rpython.rlib.objectmodel import keepalive_until_here, specialize
-from rpython.rlib.rarithmetic import r_uint, r_ulonglong,
is_signed_integer_type
+from rpython.rlib.rarithmetic import r_uint, r_ulonglong
from rpython.rlib.unroll import unrolling_iterable
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
from rpython.translator.tool.cbuild import ExternalCompilationInfo
diff --git a/pypy/module/_file/__init__.py b/pypy/module/_file/__init__.py
--- a/pypy/module/_file/__init__.py
+++ b/pypy/module/_file/__init__.py
@@ -1,7 +1,6 @@
-
# Package initialisation
from pypy.interpreter.mixedmodule import MixedModule
-import sys
+
class Module(MixedModule):
appleveldefs = {
diff --git a/pypy/module/_minimal_curses/fficurses.py
b/pypy/module/_minimal_curses/fficurses.py
--- a/pypy/module/_minimal_curses/fficurses.py
+++ b/pypy/module/_minimal_curses/fficurses.py
@@ -1,4 +1,3 @@
-
""" The ffi for rpython, need to be imported for side effects
"""
@@ -8,8 +7,6 @@
from rpython.rtyper.extfunc import register_external
from pypy.module._minimal_curses import interp_curses
from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from sys import platform
-import os.path
# We cannot trust ncurses5-config, it's broken in various ways in
# various versions. For example it might not list -ltinfo even though
diff --git a/pypy/module/_pickle_support/maker.py
b/pypy/module/_pickle_support/maker.py
--- a/pypy/module/_pickle_support/maker.py
+++ b/pypy/module/_pickle_support/maker.py
@@ -3,7 +3,6 @@
from pypy.interpreter.pycode import PyCode
from pypy.interpreter.function import Function, Method
from pypy.interpreter.module import Module
-from pypy.interpreter.pyframe import PyFrame
from pypy.interpreter.pytraceback import PyTraceback
from pypy.interpreter.generator import GeneratorIteratorWithDel
from rpython.rlib.objectmodel import instantiate
diff --git a/pypy/module/_pypyjson/interp_decoder.py
b/pypy/module/_pypyjson/interp_decoder.py
--- a/pypy/module/_pypyjson/interp_decoder.py
+++ b/pypy/module/_pypyjson/interp_decoder.py
@@ -1,13 +1,10 @@
import sys
-import math
from rpython.rlib.rstring import StringBuilder
from rpython.rlib.objectmodel import specialize
from rpython.rlib import rfloat, runicode
from rpython.rtyper.lltypesystem import lltype, rffi
from pypy.interpreter.error import OperationError, oefmt
-from pypy.interpreter.gateway import unwrap_spec
from pypy.interpreter import unicodehelper
-from rpython.rtyper.annlowlevel import llstr, hlunicode
OVF_DIGITS = len(str(sys.maxint))
@@ -30,7 +27,7 @@
Internally it's implemented at the level of low-level helpers, to avoid
the extra copy we would need if we take the actual slice first.
-
+
No bound checking is done, use carefully.
"""
from rpython.rtyper.annlowlevel import llstr, hlunicode
@@ -226,7 +223,6 @@
def decode_array(self, i):
w_list = self.space.newlist([])
start = i
- count = 0
i = self.skip_whitespace(start)
if self.ll_chars[i] == ']':
self.pos = i+1
diff --git a/pypy/module/_rawffi/callback.py b/pypy/module/_rawffi/callback.py
--- a/pypy/module/_rawffi/callback.py
+++ b/pypy/module/_rawffi/callback.py
@@ -2,7 +2,7 @@
from pypy.interpreter.gateway import interp2app, unwrap_spec
from pypy.interpreter.typedef import TypeDef, GetSetProperty
from rpython.rtyper.lltypesystem import lltype, rffi
-from pypy.module._rawffi.interp_rawffi import read_ptr, write_ptr
+from pypy.module._rawffi.interp_rawffi import write_ptr
from pypy.module._rawffi.structure import W_Structure
from pypy.module._rawffi.interp_rawffi import (W_DataInstance, letter2tp,
unwrap_value, unpack_argshapes, got_libffi_error)
diff --git a/pypy/module/_rawffi/structure.py b/pypy/module/_rawffi/structure.py
--- a/pypy/module/_rawffi/structure.py
+++ b/pypy/module/_rawffi/structure.py
@@ -15,7 +15,7 @@
from pypy.module._rawffi.interp_rawffi import size_alignment
from pypy.module._rawffi.interp_rawffi import read_ptr, write_ptr
from rpython.rlib import clibffi, rgc
-from rpython.rlib.rarithmetic import intmask, signedtype, widen, r_uint, \
+from rpython.rlib.rarithmetic import intmask, signedtype, r_uint, \
r_ulonglong
from rpython.rtyper.lltypesystem import lltype, rffi
diff --git a/pypy/module/_rawffi/tracker.py b/pypy/module/_rawffi/tracker.py
--- a/pypy/module/_rawffi/tracker.py
+++ b/pypy/module/_rawffi/tracker.py
@@ -1,4 +1,3 @@
-
""" The file that keeps track about freed/kept-alive objects allocated
by _rawffi. Used for debugging ctypes
"""
diff --git a/pypy/module/rctime/interp_time.py
b/pypy/module/rctime/interp_time.py
--- a/pypy/module/rctime/interp_time.py
+++ b/pypy/module/rctime/interp_time.py
@@ -3,7 +3,7 @@
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import unwrap_spec
from rpython.rtyper.lltypesystem import lltype
-from rpython.rlib.rarithmetic import ovfcheck_float_to_int, intmask
+from rpython.rlib.rarithmetic import intmask
from rpython.rlib import rposix
from rpython.translator.tool.cbuild import ExternalCompilationInfo
import os
diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py
--- a/pypy/module/sys/version.py
+++ b/pypy/module/sys/version.py
@@ -2,7 +2,6 @@
Version numbers exposed by PyPy through the 'sys' module.
"""
import os
-import re
from rpython.translator.platform import platform
from pypy.interpreter import gateway
diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -4,12 +4,12 @@
"""
import os
+from rpython.rlib import rposix
+from rpython.rlib.rarithmetic import intmask
+from rpython.rlib.rstring import StringBuilder
from rpython.rtyper.lltypesystem import rffi, lltype
from rpython.rtyper.tool import rffi_platform as platform
from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from rpython.rlib.rarithmetic import r_uint, intmask
-from rpython.rlib import rposix
-from rpython.rlib.rstring import StringBuilder
includes = ['stdio.h', 'sys/types.h']
if os.name == "posix":
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit