Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r60255:a8477e4eaa94
Date: 2013-01-20 17:50 +0100
http://bitbucket.org/pypy/pypy/changeset/a8477e4eaa94/
Log: Translation fixes.
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1274,7 +1274,7 @@
return buffer.as_str()
def bufferstr0_new_w(self, w_obj):
- from pypy.rlib import rstring
+ from rpython.rlib import rstring
result = self.bufferstr_new_w(w_obj)
if '\x00' in result:
raise OperationError(self.w_TypeError, self.wrap(
diff --git a/pypy/module/_posixsubprocess/interp_subprocess.py
b/pypy/module/_posixsubprocess/interp_subprocess.py
--- a/pypy/module/_posixsubprocess/interp_subprocess.py
+++ b/pypy/module/_posixsubprocess/interp_subprocess.py
@@ -1,15 +1,13 @@
-from pypy.translator.goal import autopath
-from pypy.rpython.lltypesystem import rffi, lltype, llmemory
+from rpython.rtyper.lltypesystem import rffi, lltype, llmemory
from pypy.module.posix.interp_posix import fsencode_w, run_fork_hooks
from pypy.interpreter.gateway import unwrap_spec
from pypy.interpreter.error import (
OperationError, exception_from_errno, wrap_oserror)
-from pypy.translator.tool.cbuild import ExternalCompilationInfo
+from rpython.translator.tool.cbuild import ExternalCompilationInfo
import py
import os
-pypydir = py.path.local(autopath.pypydir)
-thisdir = pypydir.join('module', '_posixsubprocess')
+thisdir = py.path.local(__file__).dirpath()
eci = ExternalCompilationInfo(
separate_module_files=[thisdir.join('_posixsubprocess.c')],
diff --git a/pypy/module/_socket/interp_socket.py
b/pypy/module/_socket/interp_socket.py
--- a/pypy/module/_socket/interp_socket.py
+++ b/pypy/module/_socket/interp_socket.py
@@ -19,6 +19,7 @@
# XXX Hack to seperate rpython and pypy
def addr_as_object(addr, fd, space):
+ from rpython.rlib import _rsocket_rffi as _c
if isinstance(addr, rsocket.INETAddress):
return space.newtuple([space.wrap(addr.get_host()),
space.wrap(addr.get_port())])
@@ -34,7 +35,7 @@
space.wrap(addr.get_hatype()),
space.wrap(addr.get_addr())])
elif rsocket.HAS_AF_UNIX and isinstance(addr, rsocket.UNIXAddress):
- path = self.get_path()
+ path = addr.get_path()
if _c.linux and len(path) > 0 and path[0] == '\x00':
# Linux abstract namespace
return space.wrapbytes(path)
@@ -45,7 +46,6 @@
space.wrap(addr.get_groups())])
# If we don't know the address family, don't raise an
# exception -- return it as a tuple.
- from rpython.rlib import _rsocket_rffi as _c
a = addr.lock()
family = rffi.cast(lltype.Signed, a.c_sa_family)
datalen = addr.addrlen - rsocket.offsetof(_c.sockaddr, 'c_sa_data')
@@ -163,7 +163,7 @@
try:
fd, addr = self.accept()
return space.newtuple([space.wrap(fd),
- addr.as_object(addr, fd, space)])
+ addr_as_object(addr, fd, space)])
except SocketError, e:
raise converted_error(space, e)
diff --git a/pypy/module/array/reconstructor.py
b/pypy/module/array/reconstructor.py
--- a/pypy/module/array/reconstructor.py
+++ b/pypy/module/array/reconstructor.py
@@ -5,9 +5,9 @@
from pypy.interpreter.gateway import unwrap_spec
from pypy.interpreter.error import OperationError
from pypy.interpreter.argument import Arguments
-from pypy.rlib import runicode, rbigint
-from pypy.rlib.rstruct import ieee
-from pypy.rpython.lltypesystem import rffi
+from rpython.rlib import runicode, rbigint
+from rpython.rlib.rstruct import ieee
+from rpython.rtyper.lltypesystem import rffi
from pypy.module.array import interp_array
diff --git a/pypy/tool/pytest/apptest.py b/pypy/tool/pytest/apptest.py
--- a/pypy/tool/pytest/apptest.py
+++ b/pypy/tool/pytest/apptest.py
@@ -11,10 +11,10 @@
from pypy.interpreter.gateway import app2interp_temp
from pypy.interpreter.error import OperationError
from pypy.interpreter.function import Method
-from pypy.tool import runsubprocess
+from rpython.tool import runsubprocess
from pypy.tool.pytest import appsupport
from pypy.tool.pytest.objspace import gettestobjspace
-from pypy.tool.udir import udir
+from rpython.tool.udir import udir
from pypy.conftest import PyPyClassCollector
from inspect import getmro
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit