1. 02 Şub, 2015 1 kayıt (commit)
  2. 29 Ock, 2015 4 kayıt (commit)
    • Victor Stinner's avatar
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 47cd10d7
      Victor Stinner yazdı
      Issue #23347: send_signal(), kill() and terminate() methods of
      BaseSubprocessTransport now check if the transport was closed and if the
      process exited.
      
      Issue #23347: Refactor creation of subprocess transports. Changes on
      BaseSubprocessTransport:
      
      * Add a wait() method to wait until the child process exit
      * The constructor now accepts an optional waiter parameter. The _post_init()
        coroutine must not be called explicitly anymore. It makes subprocess
        transports closer to other transports, and it gives more freedom if we want
        later to change completly how subprocess transports are created.
      * close() now kills the process instead of kindly terminate it: the child
        process may ignore SIGTERM and continue to run. Call explicitly terminate()
        and wait() if you want to kindly terminate the child process.
      * close() now logs a warning in debug mode if the process is still running and
        needs to be killed
      * _make_subprocess_transport() is now fully asynchronous again: if the creation
        of the transport failed, wait asynchronously for the process eixt. Before the
        wait was synchronous. This change requires close() to *kill*, and not
        terminate, the child process.
      * Remove the _kill_wait() method, replaced with a more agressive close()
        method. It fixes _make_subprocess_transport() on error.
        BaseSubprocessTransport.close() calls the close() method of pipe transports,
        whereas _kill_wait() closed directly pipes of the subprocess.Popen object
        without unregistering file descriptors from the selector (which caused severe
        bugs).
      
      These changes simplifies the code of subprocess.py.
      47cd10d7
    • Victor Stinner's avatar
      Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport · 978a9afc
      Victor Stinner yazdı
      is not explicitly closed. Close also explicitly transports in test_sslproto.
      978a9afc
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 2934262f
      Victor Stinner yazdı
      * Cleanup gather(): use cancelled() method instead of using private Future
        attribute
      * Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading
        when connection_made() has been called.
      * Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the
        transport on error. In debug mode, log errors using call_exception_handler()
      2934262f
  3. 28 Ock, 2015 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: SSL transports now clear their reference to the waiter · f07801bb
      Victor Stinner yazdı
      * Rephrase also the comment explaining why the waiter is not awaken immediatly.
      * SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
        directly, it will be done by Future.set_exception(). The exception is not
        used if the waiter was cancelled or if there is no waiter.
      f07801bb
  4. 15 Ock, 2015 2 kayıt (commit)
  5. 14 Ock, 2015 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 29ad0111
      Victor Stinner yazdı
      * PipeHandle now uses None instead of -1 for a closed handle
      * Sort imports in windows_utils.
      * Fix test_events on Python older than 3.5. Skip SSL tests on the
        ProactorEventLoop if ssl.MemoryIO is missing
      * Fix BaseEventLoop._create_connection_transport(). Close the transport if the
        creation of the transport (if the waiter) gets an exception.
      * _ProactorBasePipeTransport now sets _sock to None when the transport is
        closed.
      * Fix BaseSubprocessTransport.close(). Ignore pipes for which the protocol is
        not set yet (still equal to None).
      * TestLoop.close() now calls the close() method of the parent class
        (BaseEventLoop).
      * Cleanup BaseSelectorEventLoop: create the protocol on a separated line for
        readability and ease debugging.
      * Fix BaseSubprocessTransport._kill_wait(). Set the _returncode attribute, so
        close() doesn't try to terminate the process.
      * Tests: explicitly close event loops and transports
      * UNIX pipe transports: add closed/closing in repr(). Add "closed" or "closing"
        state in the __repr__() method of _UnixReadPipeTransport and
        _UnixWritePipeTransport classes.
      29ad0111
  6. 09 Ock, 2015 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 70db9e42
      Victor Stinner yazdı
      * Tulip issue 184: FlowControlMixin constructor now get the event loop if the
        loop parameter is not set. Add unit tests to ensure that constructor of
        StreamReader and StreamReaderProtocol classes get the event loop.
      * Remove outdated TODO/XXX
      70db9e42
  7. 08 Ock, 2015 1 kayıt (commit)
  8. 11 Ara, 2014 1 kayıt (commit)
  9. 04 Ara, 2014 1 kayıt (commit)
  10. 20 Kas, 2014 1 kayıt (commit)
  11. 14 Kas, 2014 1 kayıt (commit)
  12. 05 Kas, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: Move loop attribute to _FlowControlMixin · 004adb91
      Victor Stinner yazdı
      Move the _loop attribute from the constructor of _SelectorTransport,
      _ProactorBasePipeTransport and _UnixWritePipeTransport classes to the
      constructor of the _FlowControlMixin class.
      
      Add also an assertion to explicit that the parent class must ensure that the
      loop is defined (not None)
      004adb91
  13. 25 Eyl, 2014 1 kayıt (commit)
  14. 25 Agu, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · b261475a
      Victor Stinner yazdı
      * PipeServer.close() now cancels the "accept pipe" future which cancels the
        overlapped operation.
      * Fix _SelectorTransport.__repr__() if the transport was closed
      * Fix debug log in BaseEventLoop.create_connection(): get the socket object
        from the transport because SSL transport closes the old socket and creates a
        new SSL socket object. Remove also the _SelectorSslTransport._rawsock
        attribute: it contained the closed socket (not very useful) and it was not
        used.
      * Issue #22063: socket operations (sock_recv, sock_sendall, sock_connect,
        sock_accept) of the proactor event loop don't raise an exception in debug
        mode if the socket are in blocking mode. Overlapped operations also work on
        blocking sockets.
      * Fix unit tests in debug mode: mock a non-blocking socket for socket
        operations which now raise an exception if the socket is blocking.
      * _fatal_error() method of _UnixReadPipeTransport and _UnixWritePipeTransport
        now log all exceptions in debug mode
      * Don't log expected errors in unit tests
      * Tulip issue 200: _WaitHandleFuture._unregister_wait() now catchs and logs
        exceptions.
      * Tulip issue 200: Log errors in debug mode instead of simply ignoring them.
      b261475a
  15. 29 Tem, 2014 1 kayıt (commit)
  16. 23 Tem, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · c4c46491
      Victor Stinner yazdı
      * Tulip issue 194: Don't use sys.getrefcount() in unit tests
      * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
      c4c46491
  17. 17 Tem, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      Python issue #21645, Tulip issue 192: Rewrite signal handling · fe5649c7
      Victor Stinner yazdı
      Since Python 3.3, the C signal handler writes the signal number into the wakeup
      file descriptor and then schedules the Python call using Py_AddPendingCall().
      
      asyncio uses the wakeup file descriptor to wake up the event loop, and relies
      on Py_AddPendingCall() to schedule the final callback with call_soon().
      
      If the C signal handler is called in a thread different than the thread of the
      event loop, the loop is awaken but Py_AddPendingCall() was not called yet. In
      this case, the event loop has nothing to do and go to sleep again.
      Py_AddPendingCall() is called while the event loop is sleeping again and so the
      final callback is not scheduled immediatly.
      
      This patch changes how asyncio handles signals. Instead of relying on
      Py_AddPendingCall() and the wakeup file descriptor, asyncio now only relies on
      the wakeup file descriptor. asyncio reads signal numbers from the wakeup file
      descriptor to call its signal handler.
      fe5649c7
  18. 14 Tem, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · acdb782a
      Victor Stinner yazdı
      * Tulip issue #184: Log subprocess events in debug mode
      
        - Log stdin, stdout and stderr transports and protocols
        - Log process identifier (pid)
        - Log connection of pipes
        - Log process exit
        - Log Process.communicate() tasks: feed stdin, read stdout and stderr
        - Add __repr__() method to many classes related to subprocesses
      
      
      * Add BaseSubprocessTransport._pid attribute. Store the pid so it is still
        accessible after the process exited. It's more convinient for debug.
      
      * create_connection(): add the socket in the "connected to" debug log
      
      * Clean up some docstrings and comments. Remove unused unimplemented
        _read_from_self().
      acdb782a
  19. 12 Tem, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · e912e652
      Victor Stinner yazdı
      * Tulip issue #183: log socket events in debug mode
      
        - Log most important socket events: socket connected, new client, connection
          reset or closed by peer (EOF), etc.
        - Log time elapsed in DNS resolution (getaddrinfo)
        - Log pause/resume reading
        - Log time of SSL handshake
        - Log SSL handshake errors
        - Add a __repr__() method to many classes
      
      * Fix ProactorEventLoop() in debug mode. ProactorEventLoop._make_self_pipe()
        doesn't call call_soon() directly because it checks for the current loop
        which fails, because the method is called to build the event loop.
      
      * Cleanup _ProactorReadPipeTransport constructor. Not need to set again
        _read_fut attribute to None, it is already done in the base class.
      e912e652
  20. 08 Tem, 2014 1 kayıt (commit)
  21. 05 Tem, 2014 1 kayıt (commit)
  22. 02 Tem, 2014 1 kayıt (commit)
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 2dba23af
      Victor Stinner yazdı
      * _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode,
        not in read mode
      * Examples: close the event loop at exit
      * More reliable CoroWrapper.__del__. If the constructor is interrupted by
        KeyboardInterrupt or the coroutine objet is destroyed lately, some the
        _source_traceback attribute doesn't exist anymore.
      * repr(Task): include also the future the task is waiting for
      2dba23af
  23. 28 Haz, 2014 1 kayıt (commit)
  24. 22 Haz, 2014 1 kayıt (commit)
  25. 05 Haz, 2014 1 kayıt (commit)
  26. 03 Haz, 2014 1 kayıt (commit)
  27. 07 Nis, 2014 1 kayıt (commit)
  28. 20 Şub, 2014 1 kayıt (commit)
  29. 19 Şub, 2014 3 kayıt (commit)
  30. 18 Şub, 2014 3 kayıt (commit)
  31. 20 Şub, 2014 1 kayıt (commit)
  32. 19 Şub, 2014 1 kayıt (commit)