-
Notifications
You must be signed in to change notification settings - Fork 11
Port the bot to Python 3 #111
Comments
Using a well-maintened library like irc3 should be more future-proof. As most of the plugins are maintained by the bytebot core devs, breaking the compatibility should not be such a drawback. |
Please consider if a messenger lib like libpurple from pidgin would also an option. With a messenger lib, Bytebot could work across different networks like irc, twitter, telegram maybe also hangouts |
@jurkov With libpurple there's a simple problem: Every network uses different kinds of content. This might include message formatting, other content than text, etc. - which might be fine for a simple multi-messenger, but not for a bot. This would make this bot enormously complex, which in turn makes it hard to maintain. With irc3 this wouldn't be the case and we still would be able to add functionality to the bot by simply adding a pipe(a feature the irc3 lib does provide) and then processing everything else externally. |
I've successfully created a demo bot with irc3. The weather, status and station plugins are already ported and run just fine. You can find the code in refactor-irc3. The bot can be run by installing the new packages from I was thinking about removing porting the most used plugins, removing the other plugins, moving the py3 version to master and porting the rest later, leaving one issue open per plugin under the Python3 milestone. Any comments? |
Thank you for your work!
|
I activated ssl_verify = CERT_NONE and added before line 304 in irc3/base.py
|
@mkzero: We should port most of the plugins used before pushing it to master - otherwise the porting process will not be visible properly in commits IMHO. But an issue per plugin will better coordinate who is working on the plugin. We're planning to migrate this in a hackathon, so most of the useful plugins will be ported afterwards. |
For the SSL problem: I submitted a new issue to the irc3 repository and it already got fixed, thus will be released with the upcoming version 0.9.6 For those who can't wait to test with SSL enabled, you can upgrade the package to the github master branch of the irc3 project like this: . env/bin/activate
pip install --upgrade git+https://github.com/gawel/irc3 |
Finished... Hooray ;) |
There are currently two possibilities of making the bot Python 3 compatible - either port the
twisted.words.protocols.irc
module in Twisted's library or use another Library likeirc3
.My proposal would be to use
irc3
, even though it would be considerably more changes in our own code. The architecture of the module fits quite nicely in our own plugin-based style of doing things. It would also allow us to close a few tickets because it has support for things like auto-throttling(see #41), reloading(see #9) and is written for Python 3(see #45).The downside of it would be breaking all compatibility with older versions of the Bytebot and rewriting most of the code to use irc3 and asyncio instead of Twisted's functions for things like scheduling(see the cron functions).
Any comments or ideas on this?
The text was updated successfully, but these errors were encountered: