Release Notes

Lahja 0.15.2 (2019-12-04)


  • A couple fixes to TrioEndpoint

    • allow more than one pending incoming connection, and use a class attribute to configure that instead of hard-coding
    • wait for the socket to be bound in _start_serving() so that others don’t try to connect too soon (#170)

Lahja 0.15.1 (2019-12-03)


  • Use a synchronous API to unlink the IPC file when a TrioEndpoint finishes

    It was using trio’s async unlink() method, which would do nothing if the current context is already cancelled (e.g. when the user hits Ctrl-C), which is not what we want. (#165)

Lahja 0.15.0 (2019-11-21)

No significant changes.

Lahja 0.14.6 (2019-11-19)


  • Ensure stream() does not suppress CancelledError (#156)
  • Use the highest available pickle protocol. This yields a notable performance improvement on Python < 3.8 which are still using version 3 of the protocol by default. (#160)


Lahja 0.14.5 (2019-09-10)


  • Ensure stream() does not suppress CancelledError (#156)


  • Fix that ensures asyncio streams are closed when an endpoint shuts down to prevent ResourceWarning warnings. (#157)

Lahja 0.14.4 (2019-09-05)

No significant changes.

Lahja 0.14.3 (2019-08-28)

Improved Documentation

  • Fix broken RTD build by re-adding some info that is important for the latex job. (#155)

Lahja 0.14.2 (2019-08-28)


  • Raise ENDPOINT_CONNECT_TIMEOUT to 30 seconds to be more conservative about app specific expectations on the maximum time it could take for endpoints to become available upon connection attempts. (#154)

Lahja 0.14.1 (2019-08-13)


  • Add a TrioEndpoint as a trio based alternative to the AsyncioEndpoint. It can seamlessly operate with other endpoints both trio or asyncio based. (#126)
  • Convert run mechanism for RemoteEndpoint to be async context manager based. (#131)


  • Use the proper ConnectionAttemptRejected class in a code path that used a generic Exception before. (#128)
  • If for some reason the IPC file is missing during server shutdown, suppress the FileNotFoundError that is raised when we try to remove it. (#144)
  • Ensure cancellation of asyncio tasks is properly handled. (#145)
  • Fixed some syntax issues in the API docs that prevented them from building. Ensured the CI docs build catches these issues in the future. (#147)

Improved Documentation

  • Setup towncrier to generate release notes from fragment files to ensure a higher standard for release notes. (#147)
  • Fix wrong title in docs as well as wrong info in license. (#150)
  • Rearrange the table of contents and move “Testing” under the API section. (#151)
  • Remove visual clutter from API docs Group methods and attributes in API docs (#152)

Deprecations and Removals

  • Remove connect_to_endpoint and connect_to_endpoints_nowait APIs. (#137)


  • Feature: Rename subscription wait APIs and ensure they also work well with local subscriptions


  • Feature: Implement a standard API for endpoints to support non-asyncio based implementations (e.g. Trio)
  • Feature: Improve flexibility of the APIs that allow waiting on subscriptions
  • Bugfix: Get rid of warnings on shutdown
  • Bugfix: Repair broken examples and add a CI job to ensure they don’t break again
  • Performance: Don’t send events to endpoints that aren’t subscribed to the specific event
  • Performance: Reduce number of socket sends by precombinging length prefix
  • Performance: Many small performance improvements in various code paths
  • Performance: Use a faster request id implementation instead of using an uuid


  • Change IPC backend from multiprocessing to asyncio
  • Endpoint.broadcast() is now async
  • Endpoint.broadcast_nowait() now exists, it schedules the message to be broadcast
  • Endpoint.start_serving_nowait() no longer exists
  • Endpoint.connect_to_endpoints_blocking() no longer exists
  • Endpoint.stop() must be called or else some coroutines will be orphaned
  • Endpoint can only be used from one event loop. It will remember the current event loop when an async method is first called, and throw an exception if another of its async methods is called from a different event loop.
  • Messages will be compressed if python-snappy is installed
  • Lahja previously silently dropped some exceptions, they are now propogated up


  • Properly set up logger


  • Turn exception that would be raised in a background task into a warning


  • Performance: Connect endpoints directly without central coordinator (BREAKING CHANGE)


  • Fix issue that can crash Endpoint


  • Fix issue that can crash Endpoint


  • Make request API accept a BroadcastConfig
  • Add benchmarks


  • Implement “internal events”
  • Rename max to num_events
  • Ensure Futures are created on the correct event loop
  • Ensure all consuming APIs handle cancellations well
  • Don’t try to propagate events after shutdown