Closed fungi closed 3 years ago
Oh, yep, I clearly only tested this on Python 3.8, importlib.metadata isn't present in stdlib prior to that. Also looking closer at commit 313620f I suspect the real goal there was to get rid of calls to importlib itself, so all I'm doing is reintroducing them elsewhere. I suppose what needs determining is whether the actual library version needs to be returned for CTCP VERSION requests in irc.bot.SingleServerIRCBot.on_ctcp() or if it should just make something up?
I'll push up a revision to see what folks think about returning the Python interpreter version instead.
This broke an Arch Linux irc bot :)
This broke an Arch Linux irc bot :)
Yes, unsurprisingly what prompted me to push this PR up is that it broke an IRC bot I help run (in this case a 100+ channel service heavily relied on by the OpenStack community).
When is the next patch release including this?
Thanks for this, but I do believe the library benefits from advertising its own version, so I'll provide an alternate fix.
Commit 313620f removed irc.client.VERSION and irc.client.VERSION_STRING while they were still used in irc.bot, irc.server and unit testing. Get rid of those remaining instances, and also remove the unit test routine which checked for the presence of these variables since the module is no longer responsible for them. Further clean up an unused reference to importlib_metadata in the setup.cfg.
Fixes #174