An error occurred fetching the project authors.
  1. 17 Nov, 2015 1 commit
  2. 16 Nov, 2015 1 commit
  3. 21 Sep, 2015 1 commit
  4. 04 Aug, 2015 1 commit
  5. 07 Apr, 2015 1 commit
  6. 27 Mar, 2015 1 commit
  7. 04 Feb, 2015 2 commits
    • Victor Stinner's avatar
      asyncio: Only call _check_resolved_address() in debug mode · 2fc23130
      Victor Stinner authored
      * _check_resolved_address() is implemented with getaddrinfo() which is slow
      * If available, use socket.inet_pton() instead of socket.getaddrinfo(), because
        it is much faster
      
      Microbenchmark (timeit) on Fedora 21 (Python 3.4, Linux 3.17, glibc 2.20) to
      validate the IPV4 address "127.0.0.1" or the IPv6 address "::1":
      
      * getaddrinfo() 10.4 usec per loop
      * inet_pton(): 0.285 usec per loop
      
      On glibc older than 2.14, getaddrinfo() always requests the list of all local
      IP addresses to the kernel (using a NETLINK socket). getaddrinfo() has other
      known issues, it's better to avoid it when it is possible.
      2fc23130
    • Victor Stinner's avatar
      asyncio: BaseSelectorEventLoop uses directly the private _debug attribute · aa41b9b2
      Victor Stinner authored
      Just try to be consistent: _debug was already used in some places, and always
      used in BaseProactorEventLoop.
      aa41b9b2
  8. 29 Jan, 2015 3 commits
    • Victor Stinner's avatar
      Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport · 978a9afc
      Victor Stinner authored
      is not explicitly closed. Close also explicitly transports in test_sslproto.
      978a9afc
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 2934262f
      Victor Stinner authored
      * 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
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 47bbea71
      Victor Stinner authored
      * _SelectorTransport constructor: extra parameter is now optional
      * Fix _SelectorDatagramTransport constructor. Only start reading after
        connection_made() has been called.
      * Fix _SelectorSslTransport.close(). Don't call protocol.connection_lost() if
        protocol.connection_made() was not called yet: if the SSL handshake failed or
        is still in progress. The close() method can be called if the creation of the
        connection is cancelled, by a timeout for example.
      47bbea71
  9. 28 Jan, 2015 2 commits
  10. 21 Jan, 2015 1 commit
  11. 14 Jan, 2015 3 commits
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 29ad0111
      Victor Stinner authored
      * 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
    • Victor Stinner's avatar
      Issue #23197: On SSL handshake failure on matching hostname, check if the · b92626df
      Victor Stinner authored
      waiter is cancelled before setting its exception.
      b92626df
    • Victor Stinner's avatar
      Issue #23197, asyncio: On SSL handshake failure, check if the waiter is · 177e9f08
      Victor Stinner authored
      cancelled before setting its exception.
      
      * Add unit tests for this case.
      * Cleanup also sslproto.py
      177e9f08
  12. 13 Jan, 2015 1 commit
    • Victor Stinner's avatar
      Issue #22560: New SSL implementation based on ssl.MemoryBIO · 231b404c
      Victor Stinner authored
      The new SSL implementation is based on the new ssl.MemoryBIO which is only
      available on Python 3.5. On Python 3.4 and older, the legacy SSL implementation
      (using SSL_write, SSL_read, etc.) is used. The proactor event loop only
      supports the new implementation.
      
      The new asyncio.sslproto module adds _SSLPipe, SSLProtocol and
      _SSLProtocolTransport classes. _SSLPipe allows to "wrap" or "unwrap" a socket
      (switch between cleartext and SSL/TLS).
      
      Patch written by Antoine Pitrou. sslproto.py is based on gruvi/ssl.py of the
      gruvi project written by Geert Jansen.
      
      This change adds SSL support to ProactorEventLoop on Python 3.5 and newer!
      
      It becomes also possible to implement STARTTTLS: switch a cleartext socket to
      SSL.
      231b404c
  13. 09 Jan, 2015 2 commits
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 70db9e42
      Victor Stinner authored
      * 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
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 3531d904
      Victor Stinner authored
      * Document why set_result() calls are safe
      * Cleanup gather(). Use public methods instead of hacks to consume the
        exception of a future.
      * sock_connect(): pass directly the fd to _sock_connect_done instead of the
        socket.
      3531d904
  14. 08 Jan, 2015 2 commits
  15. 26 Dec, 2014 1 commit
    • Victor Stinner's avatar
      Issue #22926: In debug mode, call_soon(), call_at() and call_later() methods of · 956de691
      Victor Stinner authored
      asyncio.BaseEventLoop now use the identifier of the current thread to ensure
      that they are called from the thread running the event loop.
      
      Before, the get_event_loop() method was used to check the thread, and no
      exception was raised when the thread had no event loop. Now the methods always
      raise an exception in debug mode when called from the wrong thread. It should
      help to notice misusage of the API.
      956de691
  16. 23 Nov, 2014 1 commit
  17. 20 Nov, 2014 1 commit
  18. 05 Nov, 2014 1 commit
    • Victor Stinner's avatar
      asyncio: Move loop attribute to _FlowControlMixin · 004adb91
      Victor Stinner authored
      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
  19. 15 Oct, 2014 1 commit
  20. 12 Oct, 2014 1 commit
  21. 31 Aug, 2014 1 commit
    • Victor Stinner's avatar
      asyncio, Tulip issue 205: Fix a race condition in BaseSelectorEventLoop.sock_connect() · d5aeccf9
      Victor Stinner authored
      There is a race condition in create_connection() used with wait_for() to have a
      timeout. sock_connect() registers the file descriptor of the socket to be
      notified of write event (if connect() raises BlockingIOError). When
      create_connection() is cancelled with a TimeoutError, sock_connect() coroutine
      gets the exception, but it doesn't unregister the file descriptor for write
      event. create_connection() gets the TimeoutError and closes the socket.
      
      If you call again create_connection(), the new socket will likely gets the same
      file descriptor, which is still registered in the selector. When sock_connect()
      calls add_writer(), it tries to modify the entry instead of creating a new one.
      
      This issue was originally reported in the Trollius project, but the bug comes
      from Tulip in fact (Trollius is based on Tulip):
      https://bitbucket.org/enovance/trollius/issue/15/after-timeouterror-on-wait_for
      
      This change fixes the race condition. It also makes sock_connect() more
      reliable (and portable) is sock.connect() raises an InterruptedError.
      d5aeccf9
  22. 25 Aug, 2014 1 commit
    • Victor Stinner's avatar
      asyncio: sync with Tulip · b261475a
      Victor Stinner authored
      * 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
  23. 29 Jul, 2014 1 commit
  24. 25 Jul, 2014 1 commit
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 65dd69a3
      Victor Stinner authored
      * Tulip issue #196: IocpProactor._poll() clears the reference to the
        overlapped operation when the operation is done. It would be better to clear
        the reference in a new _OverlappedFuture.set_result() method, but it cannot
        be done yet because of a weird bug.
      * BaseSelectorEventLoop._write_to_self() now logs errors in debug mode.
      65dd69a3
  25. 17 Jul, 2014 1 commit
    • Victor Stinner's avatar
      Python issue #21645, Tulip issue 192: Rewrite signal handling · fe5649c7
      Victor Stinner authored
      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
  26. 12 Jul, 2014 1 commit
    • Victor Stinner's avatar
      asyncio: sync with Tulip · e912e652
      Victor Stinner authored
      * 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
  27. 11 Jul, 2014 1 commit
  28. 08 Jul, 2014 1 commit
  29. 07 Jul, 2014 2 commits
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 799a60cc
      Victor Stinner authored
      Backout the "Tulip issue 181: Faster create_connection()" changeset, it was a
      mistake.
      799a60cc
    • Victor Stinner's avatar
      asyncio: sync with Tulip · 1a870c91
      Victor Stinner authored
      - Tulip issue #181: Faster create_connection(). Call directly
        waiter.set_result() in the constructor of _ProactorBasePipeTransport and
        _SelectorSocketTransport, instead of using of delaying the call with
        call_soon().
      - Cleanup iscoroutine()
      1a870c91
  30. 05 Jul, 2014 1 commit
  31. 22 Jun, 2014 1 commit