-
Notifications
You must be signed in to change notification settings - Fork 17
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
Rewrite in Python 3 #73
Comments
cvn-clerkbot, which uses python-twisted for IRC, lost its nick name again and did not self-correct in any way. Alternatives to consider:
Things to consider:
See also EventSource as used by Pywikibot, which has an example of good error handling as part of the loop. |
irc3 doesn't have this, we implemented it manually in wikibugs. I briefly searched the limnoria docs and didn't see anything obvious either (their flood stuff is about users flooding with !commands). I do wonder if this is something that can be handled on the network side, getting some sort of higher flood limit or exemption.
Isn't this a think that should be done by the client, so that colors and whatnot are properly split or truncated? wikibugs has manual truncation logic that selects which projects should be listed when announcing a task, cutting off less important ones.
All 3 libraries support SASL, so this shouldn't ever be an issue.
We never did this for wikibugs, ib3 has mixins for this, appears limnoria does too. SASL should ensure that you're always authenticated when trying to join channels. |
Rewrites are often a terrible idea for large projects, but I think it might be called for here. Firstly, it's a fairly small and simple project. It's only a few hundred lines of code, and the minimal required complexity is fairly low. Basically all we do is:
Apart from that, we have a few basic control commands for restarting and adding/removing entries on the watchlists (documentation), which perform some additional maintenance tasks such as querying the MediaWiki API once for namespace prefixes, a list of known bots and admins, and some interface messages for helping to determine whether something is an "automatic edit summary" with special meanings (blanked page, replaced contents, parse parameters for log events such as blocked/move/protections, etc.). The latter would not be needed anymore if we use EventStreams.
The database is currently Sqlite, and migrating that to support a shared MySQL database (#17) has long been blocked on familiarity with C# libaries and confidence in adding checking in additional DLL dependencies.
We currently have significant problems with the bot simply staying online, such as:
I'm hoping that the Python libraries for IRC are more mature and have this part just solved without requiring any attention. The cvn-clerkbot by comparison, which uses python-twisted, does not appear to have suffered from any connection problems. Although having said that, it doesn't send many messages, and we dont pay close attention to it, so this is something we'll have to see.
More broadly, me personally, I will feel much more motivated to fix bugs and make improvements in a language I actually understand and have good resources (and people) to lean on to help me with anything I don't know. I have absolutely no desire to learn more than the most basic of C# as I simply have no other outlet for applying that knowledge within my current job and the range of other open-source projects I maintain or contribute to. I also hope that by using Python, we'll have more people in our community able to contribute.
The text was updated successfully, but these errors were encountered: