Ticket #3464 defect closed fixed
XmlStreamServerFactory arbitrarily holds on to the result of authenticatorFactory
|Reported by:||glyph||Owned by:|
(diff, github, buildbot, log)
In r24961, XmlStreamServerFactory was introduced.
Rather than simply passing the argument that it wants to pass to its XmlStream, it stuffs the result of authenticatorFactory() into an instance attribute. This causes the lifecycle of its authenticator to be surprising; rather than getting collected when the connection does, it has to wait around for the next connection to be made.
This also causes it to destructively modify the public, documented "args" attribute of XmlStreamFactoryMixin, without saying that it will do so, violating its parent's documented behavior. Users can now pass keyword arguments but not positional arguments by setting these attributes, which seems kind of random.
My suggested resolution would be to remove the usage of XmlStreamFactoryMixin entirely, since it seems to providing less than zero utility in this case.
Technically this isn't a regression, since it's new functionality, so I'm not going to revert right away: but I'd definitely appreciate it if this could be fixed before it's enshrined in a release.