#3207: Core: migrate from Twisted to Asyncio
-----------------------------+----------------------------
 Reporter:  andar            |      Owner:  andar
     Type:  feature-request  |     Status:  new
 Priority:  major            |  Milestone:  needs verified
Component:  Core             |    Version:  develop (git)
 Keywords:                   |
-----------------------------+----------------------------
 We should migrate away from the use of Twisted within Deluge, starting
 with the Core.
 asyncio[0] is available as a standard library with the async/await
 keywords syntax as of Python 3.5. The move to asyncio will help simplify
 and modernize the code-base, and also allow us to remove a major
 dependency.

 There shouldn't be anything Twisted specific that we actually need over
 what is provided within asyncio, so it should be a fairly straight-forward
 conversion.

 A small example of how the code would differ:
 https://asyncio.readthedocs.io/en/latest/twisted.html


 Some thoughts:

 * The async/await keywords were added in Python 3.5 which means we would
 drop support for older versions of Python, I'd even suggest bumping the
 requirement to 3.6 so that we can use format strings. In my opinion,
 support for Python 2 should be dropped in the develop branch and for
 Deluge 2.0 to simplify the code and reduce the maintenance cost.

 * This ticket only addresses moving the Core to asyncio for the time-
 being. I think this would be a first good step with the UIs to follow.
 Some care will need to be made to make sure that the
 DelugeTransferProtocol is available to both core and UI as it currently
 stands and that plugins are also unaffected. I believe I should be able to
 do this in a way that would allow the UIs to continue to use Twisted with
 a migrated Core.

 * We may have to add an additional dev dependency for asynctest[1] as the
 standard library does not have some helpful additions this library
 provides.


 Any objections? Anything I didn't think about that may cause a problem?

 [0] - https://docs.python.org/3/library/asyncio.html

 [1] - https://github.com/Martiusweb/asynctest

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3207>
Deluge <http://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to