This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, dominic108, eric.smith, martin.panter, r.david.murray
Date 2017-04-02.05:44:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491111847.33.0.913700721302.issue29947@psf.upfronthosting.co.za>
In-reply-to
Content
By “factory instance”, I presume you just mean a function (or class or method) that returns an appropriate object when called. (I think these are normally called “factory functions”. Instances are objects, the things that class constructors and factories return.)

What is being proposed? The best idea that I understand is hinted in <https://bugs.python.org/issue29947#msg290976>. That is, to document and allow any function (not just a class or factory) to be passed as (or instead of) the RequestHandlerClass parameter.

This is a significant change to the documentation and API, but I would support it, and I think it should already be supported by the implementation.

The question of renaming the RequestHandlerClass parameter is a harder decision IMO. I think it would be easier to make the documentation clear that it is a misnomer and does not have to be a class. But in the long term, renaming the parameter seems nicer.

If it was “renamed”, we would first have to add a competing parameter, keep the old parameter around, consider adding deprecation warnings in 2020 when Python 2 is dead, document both parameters, decide if anything should happen when both parameters are passed, etc. Much trickier, but possible. This renaming process is similar to “base64.encodestring” vs “encodebytes”, but more involved. I can’t think of an example where a function or constructor parameter was renamed like this.
History
Date User Action Args
2017-04-02 05:44:07martin.pantersetrecipients: + martin.panter, eric.smith, r.david.murray, docs@python, dominic108
2017-04-02 05:44:07martin.pantersetmessageid: <1491111847.33.0.913700721302.issue29947@psf.upfronthosting.co.za>
2017-04-02 05:44:07martin.panterlinkissue29947 messages
2017-04-02 05:44:06martin.pantercreate