Description
Twisted ####### |gitter|_ |rtd|_ |pypi|_ |ci|_ For information on changes in this release, see the `NEWS <https://github.com/twisted/twisted/blob/trunk/NEWS.rst>`_ file. Sponsors -------- Twisted is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and these awesome sponsors. If you'd like to join them, please consider `sponsoring Twisted's <https://docs.twisted.org/en/latest/development/sponsorship.html>`_ development. |thinkst|_ |sftpplus|_ What is this? ------------- Twisted is a Python event-based framework for internet applications. It includes modules for many different purposes, including the following: - ``twisted.web``: HTTP clients and servers, HTML templating, and a WSGI server - ``twisted.conch``: SSHv2 and Telnet clients and servers and terminal emulators - ``twisted.words``: Clients and servers for IRC, XMPP, and other IM protocols - ``twisted.mail``: IMAPv4, POP3, SMTP clients and servers - ``twisted.positioning``: Tools for communicating with NMEA-compatible GPS receivers - ``twisted.names``: DNS client and tools for making your own DNS servers - ``twisted.trial``: A unit testing framework that integrates well with Twisted-based code. Twisted supports all major system event loops -- ``select`` (all platforms), ``poll`` (most POSIX platforms), ``epoll`` (Linux), ``kqueue`` (FreeBSD, macOS), IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets). Third-party reactors can plug into Twisted, and provide support for additional event loops. Installing ---------- To install the latest version of Twisted using pip:: $ pip install twisted Additional instructions for installing this software are in `the installation instructions <https://docs.twisted.org/en/latest/installation.html>`_. Documentation and Support ------------------------- Twisted's documentation is available from the `Twisted Matrix Read The Docs website <https://docs.twisted.org/>`_. This documentation contains how-tos, code examples, and an API reference. Help is also available on the `Twisted mailing list <https://mail.python.org/mailman3/lists/twisted.python.org/>`_. There is also an IRC channel, ``#twisted``, on the `Libera.Chat <https://libera.chat/>`_ network. A web client is available at `web.libera.chat <https://web.libera.chat/>`_. Unit Tests ---------- Twisted has a comprehensive test suite, which can be run by ``tox``:: $ tox -l # to view all test environments $ tox -e nocov # to run all the tests without coverage $ tox -e withcov # to run all the tests with coverage $ tox -e alldeps-withcov-posix # install all dependencies, run tests with coverage on POSIX platform You can test running the test suite under the different reactors with the ``TWISTED_REACTOR`` environment variable:: $ env TWISTED_REACTOR=epoll tox -e alldeps-withcov-posix Some of these tests may fail if you: * don't have the dependencies required for a particular subsystem installed, * have a firewall blocking some ports (or things like Multicast, which Linux NAT has shown itself to do), or * run them as root. Static Code Checkers -------------------- You can ensure that code complies to Twisted `coding standards <https://docs.twisted.org/en/latest/development/coding-standard.html>`_:: $ tox -e lint # run pre-commit to check coding stanards $ tox -e mypy # run MyPy static type checker to check for type errors Or, for speed, use pre-commit directly:: $ pipx run pre-commit run Copyright --------- All of the code in this distribution is Copyright (c) 2001-2025 Twisted Matrix Laboratories. Twisted is made available under the MIT license. The included `LICENSE <https://github.com/twisted/twisted/blob/trunk/LICENSE>`_ file describes this in detail. Warranty -------- THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE USE OF THIS SOFTWARE IS WITH YOU. IN NO EVENT WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY, BE LIABLE TO YOU FOR ANY DAMAGES, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Again, see the included `LICENSE <https://github.com/twisted/twisted/blob/trunk/LICENSE>`_ file for specific legal details. .. |pypi| image:: https://img.shields.io/pypi/v/twisted.svg .. _pypi: https://pypi.python.org/pypi/twisted .. |gitter| image:: https://img.shields.io/gitter/room/twisted/twisted.svg .. _gitter: https://gitter.im/twisted/twisted .. |ci| image:: https://github.com/twisted/twisted/actions/workflows/test.yaml/badge.svg .. _ci: https://github.com/twisted/twisted .. |rtd| image:: https://readthedocs.org/projects/twisted/badge/?version=latest&style=flat .. _rtd: https://docs.twistedmatrix.
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 25.5.0 | Imported from PyPI (25.5.0) | Low | 4/21/2026 |
| twisted-25.5.0 | # Twisted 25.5.0 (2025-06-07) ## Bugfixes - twisted.internet.runner.procmon.ProcessMonitor: startProcess() catches exceptions raised by reactor.spawnProcess() and attempts to restart the failed process. (#12421) ## Deprecations and Removals - twisted.trial.unittest.TestCase.deferSetUp, twisted.trial.unittest.TestCase.deferTestMethod, twisted.trial.unittest.TestCase.deferTearDown, and twisted.trial.unittest.TestCase.deferRunCleanups were removed and converted to priv | Low | 6/7/2025 |
| twisted-25.5.0rc1 | # Twisted 25.5.0rc1 (2025-05-09) ## Bugfixes - twisted.internet.runner.procmon.ProcessMonitor: startProcess() catches exceptions raised by reactor.spawnProcess() and attempts to restart the failed process. (#12421) ## Deprecations and Removals - twisted.trial.unittest.TestCase.deferSetUp, twisted.trial.unittest.TestCase.deferTestMethod, twisted.trial.unittest.TestCase.deferTearDown, and twisted.trial.unittest.TestCase.deferRunCleanups were removed and converted to p | Low | 5/25/2025 |
| twisted-24.11.0 | # Twisted 24.11.0 (2024-12-02) No changes since 24.11.0rc2. In comparison to 24.11.0rc1, this release includes and update to do the PyPI release using the trusted publisher functionality of PyPI. ## Features - Twisted\'s implementations of twisted.internet.interfaces.IReactorMulticast now accept IPv6 literals and allow for IPv6 multicast. (#6597) - TCP throughput when sending data is slightly faster. (#12334) ## Bugfixes - twisted.internet.endpoints.clientFro | Low | 12/2/2024 |
| twisted-24.11.0rc2 | # Twisted 24.11.0rc2 (2024-12-02) In comparison to 24.11.0rc1, this release includes and update to do the PyPI release using the trusted publisher functionality of PyPI. ## Features - Twisted\'s implementations of twisted.internet.interfaces.IReactorMulticast now accept IPv6 literals and allow for IPv6 multicast. (#6597) - TCP throughput when sending data is slightly faster. (#12334) ## Bugfixes - twisted.internet.endpoints.clientFromString can handle \"tls:\" | Low | 12/2/2024 |
| twisted-24.11.0rc1 | # Twisted 24.11.0rc1 (2024-11-22) ## Features - Twisted\'s implementations of twisted.internet.interfaces.IReactorMulticast now accept IPv6 literals and allow for IPv6 multicast. (#6597) - TCP throughput when sending data is slightly faster. (#12334) ## Bugfixes - twisted.internet.endpoints.clientFromString can handle \"tls:\" endpoints with default [bindAddress]{.title-ref}. This was a regression introduced in 24.10.0. (#12350) - HTTP server can handle | Low | 11/22/2024 |
| twisted-24.10.0 | # Twisted 24.10.0 (2024-10-28) ## Features - Python 3.13 is now supported. (#11750) - twisted.internet.defer.succeed() is significantly faster, and awaiting Deferred has also been sped up. (#12225) - twisted.python.failure.Failure creation no longer records the place where it was created. This reduces creation time by 60% at least, thereby speeding up Deferred error handling. (#12230) - twisted.internet.defer.Deferred no longer removes the traceback object fr | Low | 10/28/2024 |
| twisted-24.10.0rc1 | # Twisted 24.10.0rc1 (2024-10-19) ## Features - Python 3.13 is now supported. (#11750) - twisted.internet.defer.succeed() is significantly faster, and awaiting Deferred has also been sped up. (#12225) - twisted.python.failure.Failure creation no longer records the place where it was created. This reduces creation time by 60% at least, thereby speeding up Deferred error handling. (#12230) - twisted.internet.defer.Deferred no longer removes the traceback object | Low | 10/19/2024 |
| twisted-24.7.0 | Twisted 24.7.0 (2024-08-08) =========================== 24.7.0.rc2 fixed an unreleased regression caused by PR 12109. (#12279) No other changes since 24.7.0.rc2 Features -------- - twisted.protocols.ftp now supports the IPv6 extensions defined in RFC 2428. (#9645) - twisted.internet.defer.inlineCallbacks can now yield a coroutine. (#9972) - twisted.python._shellcomp.ZshArgumentsGenerator was updated for Python 3.13. (#12065) - twisted.web.wsgi request environment now contains the | Low | 8/10/2024 |
| twisted-24.7.0rc2 | Twisted 24.7.0rc2 (2024-08-06) ============================== Features -------- - twisted.protocols.ftp now supports the IPv6 extensions defined in RFC 2428. (#9645) - twisted.internet.defer.inlineCallbacks can now yield a coroutine. (#9972) - twisted.python._shellcomp.ZshArgumentsGenerator was updated for Python 3.13. (#12065) - twisted.web.wsgi request environment now contains the peer port number as `REMOTE_PORT`. (#12096) - twisted.internet.defer.Deferred.callback() and twisted.i | Low | 8/6/2024 |
| twisted-24.7.0rc1 | Twisted 24.7.0rc1 (2024-07-29) ============================== Features -------- - twisted.protocols.ftp now supports the IPv6 extensions defined in RFC 2428. (#9645) - twisted.internet.defer.inlineCallbacks can now yield a coroutine. (#9972) - twisted.python._shellcomp.ZshArgumentsGenerator was updated for Python 3.13. (#12065) - twisted.web.wsgi request environment now contains the peer port number as `REMOTE_PORT`. (#12096) - twisted.internet.defer.Deferred.callback() and twisted.i | Low | 7/29/2024 |
| twisted-24.3.0 | Twisted 24.3.0 (2024-03-01) =========================== This release supports PyPy v7.3.14. Bugfixes -------- - twisted.logger.formatEvent now honors dotted method names, not just flat function names, in format strings, as it has long been explicitly documented to do. So, you will now get the expected result from [formatEvent(\"here\'s the result of calling a method at log-format time: {obj.method()}\", obj=\...)]{.title-ref} (\#9347) - twisted.web.http.HTTPCh | Low | 3/1/2024 |
| twisted-24.2.0rc1 | # Twisted 24.2.0.rc1 (2024-02-21) ### Bugfixes - twisted.logger.formatEvent now honors dotted method names, not just flat function names, in format strings, as it has long been explicitly documented to do. So, you will now get the expected result from `formatEvent("here's the result of calling a method at log-format time: {obj.method()}", obj=...)` (#9347) - twisted.web.http.HTTPChannel now ignores the trailer headers provided in the last chunk of a chunked encoded response, rat | Low | 2/21/2024 |
| twisted-23.10.0 | Twisted 23.10.0 (2023-10-31) ============================ No changes since 23.10.0.rc1. Features -------- - twisted.python.filepath.FilePath and related classes (twisted.python.filepath.IFilepath, twisted.python.filepath.AbstractFilePath, twisted.python.zippath.ZipPath, and twisted.python.zippath.ZipArchive) now have type annotations. Additionally, FilePath is now generic, describing its mode, so you can annotate variables as FilePath[str] or FilePath[bytes] depending on the types | Low | 10/31/2023 |
| twisted-23.10.0rc1 | Twisted 23.10.0.rc1 (2023-10-24) ================================ Features -------- - twisted.python.filepath.FilePath and related classes (twisted.python.filepath.IFilepath, twisted.python.filepath.AbstractFilePath, twisted.python.zippath.ZipPath, and twisted.python.zippath.ZipArchive) now have type annotations. Additionally, FilePath is now generic, describing its mode, so you can annotate variables as FilePath[str] or FilePath[bytes] depending on the types that you wish to get back f | Low | 10/24/2023 |
| twisted-23.8.0 | Twisted 23.8.0. (2023-08-28) ============================ This is the last release with support for Python 3.7. No changes since 23.8.0.rc1. Features -------- - reactor.spawnProcess() now uses posix_spawnp when possible, making it much more efficient (#5710) - Twisted now officially supports Python 3.11. (#10343) - twisted.internet.defer.Deferred.fromFuture now has a more precise type annotation. (#11753) - twisted.internet.defer._ConcurrencyPrimitive.__aexit__ now has a more | Low | 8/28/2023 |
| twisted-23.8.0rc1 | Twisted 23.8.0.rc1 (2023-08-17) =============================== This is the last release with support for Python 3.7. Features -------- - `reactor.spawnProcess()` now uses posix_spawnp when possible, making it much more efficient (#5710) - Twisted now officially supports Python 3.11. (#10343) - `twisted.internet.defer.Deferred.fromFuture` now has a more precise type annotation. (#11753) - `twisted.internet.defer._ConcurrencyPrimitive.__aexit__` now has a more precise type annotat | Low | 8/17/2023 |
| twisted-22.10.0 | Twisted 22.10.0 (2022-10-30) ============================ This release contains a security fix for CVE-2022-39348. This is a low-severity security bug. Twisted 22.10.0rc1 release candidate was released on 2022-10-26 and there are no changes between the release candidate and the final release. Features -------- - The ``systemd:`` endpoint parser now supports "named" file descriptors. This is a more reliable mechanism for choosing among several inherited descriptors. (#8147) | Low | 10/31/2022 |
| twisted-22.10.0rc1 | Twisted 22.10.0.rc1 (2022-10-26) ================================ Features -------- - The ``systemd:`` endpoint parser now supports "named" file descriptors. This is a more reliable mechanism for choosing among several inherited descriptors. (#8147) Bugfixes -------- - `test.yaml` workflow permissions restricted. (#11631) Improved Documentation ---------------------- - The ``systemd`` endpoint parser's ``index`` parameter is now documented as leading to non-determinist | Low | 10/26/2022 |
| twisted-22.8.0 | Twisted 22.8.0 (2022-09-06) =========================== Twisted 22.8.0rc1 release candidate was released on 2022-08-28 and there are no changes between the release candidate and the final release. Features -------- - twisted.internet.defer.maybeDeferred will now schedule a coroutine result as asynchronous operation and return a Deferred that fires with the result of the coroutine. (#10327) - Twisted now works with Cryptography versions 37 and above, and as a result, its minimum TL | Low | 9/7/2022 |
| twisted-22.8.0rc1 | Twisted 22.8.0.rc1 (2022-08-28) =============================== Features -------- - twisted.internet.defer.maybeDeferred will now schedule a coroutine result as asynchronous operation and return a Deferred that fires with the result of the coroutine. (#10327) - Twisted now works with Cryptography versions 37 and above, and as a result its minimum TLS protocol version has been upgraded to TLSv1.2. (#10377) Bugfixes -------- - ``twisted.internet.base.DelayedCall.__repr__`` will n | Low | 8/28/2022 |
| twisted-22.4.0 | Twisted 22.4.0 (2022-04-11) =========================== Features -------- - twisted.python.failure.Failure tracebacks now capture module information, improving compatibility with the Raven Sentry client. (#7796) - twisted.python.failure.Failure objects are now compatible with dis.distb, improving compatibility with post-mortem debuggers. (#9599) Bugfixes -------- - twisted.internet.interfaces.IReactorSSL.listenSSL now has correct type annotations. (#10274) - twisted.internet.t | Low | 4/11/2022 |
| twisted-22.4.0rc1 | Twisted 22.4.0.rc1 (2022-04-04) =============================== Features -------- - twisted.python.failure.Failure tracebacks now capture module information, improving compatibility with the Raven Sentry client. (#7796) - twisted.python.failure.Failure objects are now compatible with dis.distb, improving compatibility with post-mortem debuggers. (#9599) Bugfixes -------- - Correct type annotations for IReactorSSL.listenSSL. (#10274) - twisted.internet.test.test_glibbase.GlibRe | Low | 4/4/2022 |
| twisted-22.2.0 | Twisted 22.2.0 (2022-03-01) =========================== Bugfixes -------- - twisted.internet.gireactor.PortableGIReactor.simulate and twisted.internet.gtk2reactor.PortableGtkReactor.simulate no longer raises TypeError when there are no delayed called. This was a regression introduced with the migration to Python 3 in which the builtin `min` function no longer accepts `None` as an argument. (#9660) - twisted.conch.ssh.transport.SSHTransportBase now disconnects the remote peer if the S | Low | 3/3/2022 |
| twisted-22.2.0rc1 | Twisted 22.2.0.rc1 (2022-02-08) =============================== This is the last release with support for Python 3.6. Bugfixes -------- - twisted.internet.gireactor.PortableGIReactor.simulate and twisted.internet.gtk2reactor.PortableGtkReactor.simulate no longer raises TypeError when there are no delayed called. This was a regression introduced with the migration to Python3 in which the builtin `min` function no longer accepts `None` as an argument. (#9660) Improved Documentati | Low | 2/8/2022 |
| twisted-22.1.0 | Twisted 22.1.0 (2022-02-03) =========================== Features -------- - Python 3.10 is now a supported platform (#10224) - Type annotations have been added to the twisted.python.fakepwd module. (#10287) Bugfixes -------- - twisted.internet.defer.inlineCallbacks has an improved type annotation, to avoid typing errors when it is used on a function which returns a non-None result. (#10231) - ``twisted.internet.base.DelayedCall.__repr__`` and ``twisted.internet.task.LoopingCal | Low | 2/7/2022 |
| twisted-22.1.0rc1 | Twisted 22.1.0.rc1 (2022-01-26) =============================== Features -------- - support Python 3.10b4 (#10224) - Type annotations have been added to the twisted.python.fakepwd module. (#10287) - twisted.conch.ssh now supports SSH extension negotiation (RFC 8308). (#10266) Bugfixes -------- - twisted.conch now uses constant-time comparisons for MACs. (#8199) - twisted.conch.ssh.filetransfer.FileTransferServer will now return an ENOENT error status if an SFTP client tries t | Low | 1/26/2022 |
| twisted-21.7.0 | Twisted 21.7.0 (2021-07-26) =========================== Features -------- - Python 3.10b3 is now supported (#10224) - Type hinting was added to twisted.internet.defer, making this is the first release of Twisted where you might reasonably be able to use mypy without your own custom stub files (#10017) Bugfixes -------- - The changes to ``DelayedCall.__repr__`` and ``LoopingCall.__repr__`` from 21.7.0.rc1 were reverted as the wrong assumption that ``__qualname__`` is | Low | 7/28/2021 |
| twisted-21.7.0rc3 | Twisted 21.7.0.rc3 (2021-07-23) =============================== Bugfixes -------- - The changes to ``DelayedCall.__repr__`` and ``LoopingCall.__repr__`` from 21.7.0.rc1 were reverted as the wrong assumption that ``__qualname__`` is available on all the supported Python versions. (#10235) - The automated release process was updated to generate and release wheel files to PyPy (#10236) | Low | 7/23/2021 |
| twisted-21.7.0rc2 | Twisted 21.7.0.rc2 (2021-07-20) =============================== Bugfixes -------- - twisted.internet.defer.inlineCallbacks has an improved type annotation, to avoid typing errors when it is used on a function which returns a non-None result. (#10231) - trial.runner.filenameToModule now sets the correct `module.__name__` and `sys.modules` key (#10230) | Low | 7/20/2021 |
| twisted-21.7.0rc1 | Twisted 21.7.0.rc1 (2021-07-10) =============================== Features -------- - support py3.10a5 (by fixing twisted.trial.unittest.TestCase.flushWarnings) (#10111) Bugfixes -------- - twisted.internet.process can now pause and resume producing in python 3 (#9933) - When installing Twisted it now requires a minimum Python 3.5.4 version to match the version used with automated testing. This is the minimum Python version that we know that Twisted works with. (#10098) - twiste | Low | 7/10/2021 |
| twisted-21.2.0 | Ticket numbers in this file can be looked up by visiting http://twistedmatrix.com/trac/ticket/<number> .. towncrier release notes start Twisted 21.2.0 (2021-02-28) =========================== Features -------- - The enableSessions argument to twisted.internet.ssl.CertificateOptions now actually enables/disables OpenSSL's session cache. Also, due to session-related bugs, it defaults to False. (#9583) - twisted.internet.defer.inlineCallbacks and ensureDeferred will now assoc | Low | 2/28/2021 |
| twisted-21.2.0rc1 | Twisted 21.2.0.rc1 (2021-02-14) =============================== Features -------- - The enableSessions argument to twisted.internet.ssl.CertificateOptions now actually enables/disables OpenSSL's session cache. Also, due to session-related bugs, it defaults to False. (#9583) - twisted.internet.defer.inlineCallbacks and ensureDeferred will now associate a contextvars.Context with the coroutines they run, meaning that ContextVar objects will maintain their value within the same coro | Low | 2/15/2021 |
| twisted-21.2.0.dev0 | Release twisted-21.2.0.dev0 | Low | 2/1/2021 |
| twisted-20.11.0.dev5 | Release twisted-20.11.0.dev5 | Low | 10/19/2020 |
| twisted-20.11.0.dev4 | Release twisted-20.11.0.dev4 | Low | 10/19/2020 |
| twisted-20.11.0.dev3 | Release twisted-20.11.0.dev3 | Low | 10/19/2020 |
| twisted-20.11.0.dev2 | Release twisted-20.11.0.dev2 | Low | 10/4/2020 |
| twisted-20.11.0.dev1 | Release twisted-20.11.0.dev1 | Low | 10/4/2020 |
| twisted-20.11.0.dev0 | This is a test release | Low | 10/4/2020 |
