Commits

Amaury Forgeot d'Arc  committed 9f64095

remove _socket.makefile: it's now implemented in socket.py.

  • Participants
  • Parent commits 21c7061
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/_socket/interp_socket.py

         except SocketError, e:
             raise converted_error(space, e)
 
-    @unwrap_spec(w_mode = WrappedDefault("r"),
-                 w_buffsize = WrappedDefault(-1))
-    def makefile_w(self, space, w_mode=None, w_buffsize=None):
-        """makefile([mode[, buffersize]]) -> file object
-
-        Return a regular file object corresponding to the socket.
-        The mode and buffersize arguments are as for the built-in open() function.
-        """
-        return app_makefile(space, self, w_mode, w_buffsize)
-
     @unwrap_spec(buffersize='nonnegint', flags=int)
     def recv_w(self, space, buffersize, flags=0):
         """recv(buffersize[, flags]) -> data
             return
         self.close_w(space)
 
-app_makefile = gateway.applevel(r'''
-def makefile(self, mode="r", buffersize=-1):
-    """makefile([mode[, buffersize]]) -> file object
-
-    Return a regular file object corresponding to the socket.
-    The mode and buffersize arguments are as for the built-in open() function.
-    """
-    import os
-    newfd = os.dup(self.fileno())
-    return os.fdopen(newfd, mode, buffersize)
-''', filename =__file__).interphook('makefile')
 
 # ____________________________________________________________
 # Error handling
 
 socketmethodnames = """
 _accept bind close connect connect_ex dup fileno detach
-getpeername getsockname getsockopt gettimeout listen makefile
+getpeername getsockname getsockopt gettimeout listen
 recv recvfrom send sendall sendto setblocking
 setsockopt settimeout shutdown _reuse _drop recv_into recvfrom_into
 """.split()
 getsockopt(level, optname[, buflen]) -- get socket options
 gettimeout() -- return timeout or None
 listen(n) -- start listening for incoming connections
-makefile([mode, [bufsize]]) -- return a file object for the socket [*]
 recv(buflen[, flags]) -- receive data
 recvfrom(buflen[, flags]) -- receive data and sender's address
 sendall(data[, flags]) -- send all data