-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
The addition of new numeric event names for SASL broke heisenbridge, which was using numeric codes. #214
Comments
Apologies for the breakage. It was unintended, but you're right - had we realized there was a dependency on that behavior, we would have released it as a backward-incompatible change and possibly warned in advance. If you think it would be worthwhile, there are a few things we could still do:
It appears heisenbridge has already addressed the issue by handling the events, so I'm slightly inclined to do nothing. I'd very much welcome for someone to add tests or backward compatibility. Let me know what you think. |
As I think about it more, I don't see a good way to write tests to capture expectations about whether events are numeric or named. I could imagine putting some comments in the What would be better is if:
|
In the 20.5.0 release, I've refactored the command handling so that commands now retain both the code and the name (or use the code as the name when only the numeric code is present). This approach should mean that clients like heisenbridge should be able to rely on the numerics for the logic where names are undefined. If this functionality had been present earlier, heisenbridge could have avoided the risk of breakage by using While this can't fix the compatibility issue for heisenbridge going back in time, it does provide a mechanism for libraries to future-proof themselves. |
The release of irc 20.3.0 caused a regression in heisenbridge where SASL authentication no longer works (it hits a timeout in network_room.py#L1477-1502 when waiting for the authentication response).
The cause of this was the new event names added in 331d9f7. heisenbridge was waiting for the numeric events -
await self.conn.expect(["903", "904", "908"])
- and those are no longer being emitted by the irc library, which is now emitting named events instead (saslsuccess
,saslfail
,saslmechs
).I'm not sure if there's anything that can be done in the irc library at this point, but I wanted to bring this issue to your attention. It might be helpful to treat adding new numeric event name mappings as a "breaking" change which results in a new major version of the library, or otherwise document that using numeric events directly is unstable, and that they might change in minor version updates.
The text was updated successfully, but these errors were encountered: