Author: Philip Jenvey <[email protected]>
Branch: py3k-refactor-str-types
Changeset: r68913:2c5e0c0b4e71
Date: 2014-01-24 11:52 -0800
http://bitbucket.org/pypy/pypy/changeset/2c5e0c0b4e71/

Log:    fix imports

diff --git a/pypy/module/__builtin__/operation.py 
b/pypy/module/__builtin__/operation.py
--- a/pypy/module/__builtin__/operation.py
+++ b/pypy/module/__builtin__/operation.py
@@ -19,7 +19,7 @@
     object, but escape the non-ASCII characters in the string returned by
     repr() using \\x, \\u or \\U escapes.  This generates a string similar
     to that returned by repr() in Python 2."""
-    from pypy.objspace.std.unicodetype import ascii_from_object
+    from pypy.objspace.std.unicodeobject import ascii_from_object
     return ascii_from_object(space, w_obj)
 
 @unwrap_spec(code=int)
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
@@ -849,7 +849,7 @@
 
 @unwrap_spec(data="bufferstr", errors='str_or_None')
 def escape_encode(space, data, errors='strict'):
-    from pypy.objspace.std.stringobject import string_escape_encode
+    from pypy.objspace.std.bytesobject import string_escape_encode
     result = string_escape_encode(data, False)
     return space.newtuple([space.wrapbytes(result), space.wrap(len(data))])
 
diff --git a/pypy/module/_rawffi/interp_rawffi.py 
b/pypy/module/_rawffi/interp_rawffi.py
--- a/pypy/module/_rawffi/interp_rawffi.py
+++ b/pypy/module/_rawffi/interp_rawffi.py
@@ -2,7 +2,7 @@
 from pypy.interpreter.error import OperationError, wrap_oserror, 
operationerrfmt
 from pypy.interpreter.gateway import interp2app, unwrap_spec
 from pypy.interpreter.typedef import TypeDef, GetSetProperty
-from pypy.objspace.std.stringtype import getbytevalue
+from pypy.objspace.std.bytesobject import getbytevalue
 
 from rpython.rlib.clibffi import *
 from rpython.rlib.objectmodel import we_are_translated
diff --git a/pypy/module/cpyext/unicodeobject.py 
b/pypy/module/cpyext/unicodeobject.py
--- a/pypy/module/cpyext/unicodeobject.py
+++ b/pypy/module/cpyext/unicodeobject.py
@@ -230,7 +230,8 @@
     if not ref_unicode.c_utf8buffer:
         # Copy unicode buffer
         w_unicode = from_ref(space, ref)
-        w_encoded = unicodetype.encode_object(space, w_unicode, "utf-8", 
"strict")
+        w_encoded = unicodeobject.encode_object(space, w_unicode, "utf-8",
+                                                "strict")
         s = space.bytes_w(w_encoded)
         ref_unicode.c_utf8buffer = rffi.str2charp(s)
     return ref_unicode.c_utf8buffer
diff --git a/pypy/module/imp/interp_imp.py b/pypy/module/imp/interp_imp.py
--- a/pypy/module/imp/interp_imp.py
+++ b/pypy/module/imp/interp_imp.py
@@ -5,7 +5,7 @@
 from pypy.interpreter.module import Module
 from pypy.interpreter.gateway import unwrap_spec
 from pypy.interpreter.pyparser import pyparse
-from pypy.objspace.std import unicodetype
+from pypy.objspace.std import unicodeobject
 from pypy.module._io.interp_iobase import W_IOBase
 from pypy.module._io import interp_io
 from pypy.interpreter.streamutil import wrap_streamerror
@@ -81,7 +81,7 @@
             stream.flush()
             encoding = pyparse._check_for_encoding(top)
             if encoding is None:
-                encoding = unicodetype.getdefaultencoding(space)
+                encoding = unicodeobject.getdefaultencoding(space)
         #
         # in python2, both CPython and PyPy pass the filename to
         # open(). However, CPython 3 just passes the fd, so the returned file
diff --git a/pypy/objspace/std/formatting.py b/pypy/objspace/std/formatting.py
--- a/pypy/objspace/std/formatting.py
+++ b/pypy/objspace/std/formatting.py
@@ -2,8 +2,6 @@
 String formatting routines.
 """
 from pypy.interpreter.error import OperationError
-from pypy.objspace.std.unicodetype import (
-    unicode_from_object, ascii_from_object)
 from rpython.rlib import jit
 from rpython.rlib.rarithmetic import ovfcheck
 from rpython.rlib.rfloat import formatd, DTSF_ALT, isnan, isinf
@@ -445,6 +443,7 @@
             self.std_wp(self.space.unicode_w(self.space.repr(w_value)))
 
         def fmt_a(self, w_value):
+            from pypy.objspace.std.unicodeobject import ascii_from_object
             w_value = ascii_from_object(self.space, w_value)
             self.std_wp(self.space.unicode_w(w_value))
 
diff --git a/pypy/objspace/std/longtype.py b/pypy/objspace/std/longtype.py
--- a/pypy/objspace/std/longtype.py
+++ b/pypy/objspace/std/longtype.py
@@ -134,7 +134,7 @@
 
 @unwrap_spec(byteorder=str, signed=bool)
 def descr_from_bytes(space, w_cls, w_obj, byteorder, signed=False):
-    from pypy.objspace.std.stringtype import makebytesdata_w
+    from pypy.objspace.std.bytesobject import makebytesdata_w
     bytes = ''.join(makebytesdata_w(space, w_obj))
     try:
         bigint = rbigint.frombytes(bytes, byteorder=byteorder, signed=signed)
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
@@ -7,7 +7,6 @@
 from rpython.rlib.objectmodel import specialize
 from rpython.rlib.rfloat import copysign, formatd
 from rpython.tool import sourcetools
-from pypy.objspace.std.unicodetype import ascii_from_object
 
 
 @specialize.argtype(1)
@@ -316,6 +315,7 @@
                     return space.call_function(space.w_unicode, w_obj)
                 return space.str(w_obj)
             elif conv == "a":
+                from pypy.objspace.std.unicodeobject import ascii_from_object
                 return ascii_from_object(space, w_obj)
             else:
                 raise OperationError(self.space.w_ValueError,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to