Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Twisted #562

Open
NotAFile opened this issue Dec 10, 2019 · 1 comment
Open

Remove Twisted #562

NotAFile opened this issue Dec 10, 2019 · 1 comment
Labels
refactoring This issue is related to piqueserver's code refactoring

Comments

@NotAFile
Copy link
Member

NotAFile commented Dec 10, 2019

This is a general issue collecting all of the places where we use twisted and replacement options for each task:

  • twisted.words.protocols.irc: https://github.com/gawel/irc3 (irc3 is backwards compatible, this looks to be the most popular?)
  • twisted.internet.reactor: we are already using asyncio
  • twisted.internet.protocol, esp LineReceiver: Requires some rewriting.
  • twisted.logger: stdlib logging or, perhaps better, structlog, which is compatible with twisted and stdlib logging
  • twisted.cred+twisted.conch.ssh: asyncssh is the clear winner
  • twisted.conch.manhole: aiomanhole exists, but low activity.
  • twisted.web: we already use aiohttp
  • twisted.threads: ThreadPoolExecutor
  • twisted.internet.stdio: aioconsole or custom solution using threads. We don't really need the full functionality this provides just to accept some shell commands. This should ideally be obsoleted by the ability to run commands via an API anyway.
  • twisted.python.logfile: We'd probably need to write something custom to support log rotation. Or instruct people to use external tools like logrotate or have logs collected by their service manager.

Why get rid of twisted?

Twisted's API design is old and cumbersom. The community has long been in a decline, and many bugs we experience are just not going to get fixed. This is unlikely to get better with the big community move towards libraries like asyncio and trio.

@JohnDowson
Copy link

I'd like to take a stab at logging solution.

@feikname feikname added the refactoring This issue is related to piqueserver's code refactoring label Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring This issue is related to piqueserver's code refactoring
Projects
None yet
Development

No branches or pull requests

3 participants