[pypy-commit] pypy unicode-utf8: remove extraneous imports

mattip pypy.commits at gmail.com
Wed Jan 2 17:18:33 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: unicode-utf8
Changeset: r95573:8a03baee721c
Date: 2019-01-02 23:42 +0200
http://bitbucket.org/pypy/pypy/changeset/8a03baee721c/

Log:	remove extraneous imports

diff --git a/pypy/module/_codecs/interp_codecs.py b/pypy/module/_codecs/interp_codecs.py
--- a/pypy/module/_codecs/interp_codecs.py
+++ b/pypy/module/_codecs/interp_codecs.py
@@ -215,8 +215,6 @@
                     "don't know how to handle %T in error callback", w_exc)
 
 def xmlcharrefreplace_errors(space, w_exc):
-    from pypy.interpreter import unicodehelper
-
     check_exception(space, w_exc)
     if space.isinstance_w(w_exc, space.w_UnicodeEncodeError):
         w_obj = space.getattr(w_exc, space.newtext('object'))
@@ -244,8 +242,6 @@
                     "don't know how to handle %T in error callback", w_exc)
 
 def backslashreplace_errors(space, w_exc):
-    from pypy.interpreter import unicodehelper
-
     check_exception(space, w_exc)
     if space.isinstance_w(w_exc, space.w_UnicodeEncodeError):
         w_obj = space.getattr(w_exc, space.newtext('object'))
@@ -393,8 +389,6 @@
     func = _find_implementation(rname)
     @unwrap_spec(errors='text_or_none')
     def wrap_encoder(space, w_arg, errors="strict"):
-        from pypy.interpreter import unicodehelper
-
         w_arg = space.convert_arg_to_w_unicode(w_arg)
         if errors is None:
             errors = 'strict'
@@ -412,8 +406,6 @@
     @unwrap_spec(string='bufferstr', errors='text_or_none',
                  w_final=WrappedDefault(False))
     def wrap_decoder(space, string, errors="strict", w_final=None):
-        from pypy.interpreter import unicodehelper
-
         if errors is None:
             errors = 'strict'
         final = space.is_true(w_final)
diff --git a/pypy/objspace/std/newformat.py b/pypy/objspace/std/newformat.py
--- a/pypy/objspace/std/newformat.py
+++ b/pypy/objspace/std/newformat.py
@@ -10,8 +10,6 @@
 from rpython.rlib.rfloat import formatd
 from rpython.rlib.rarithmetic import r_uint, intmask
 from pypy.interpreter.signature import Signature
-from pypy.interpreter import unicodehelper
-
 
 @specialize.argtype(1)
 @jit.look_inside_iff(lambda space, s, start, end:


More information about the pypy-commit mailing list