[issue31742] Default to emitting FutureWarning for provisional APIs

Nick Coghlan report at bugs.python.org
Tue Oct 10 09:20:44 EDT 2017


Nick Coghlan <ncoghlan at gmail.com> added the comment:

A note regarding *only* using the warnings module to turn things off:

The problem I have with that is that the UX is relatively clumsy, and hence runs into the concern Guido mentions above: "having this warning pop up every time you import a provisional module while developing code feels like harassment of the very users we'd like to try out the provisional APIs."

By contrast, "To rely on this provisional feature without getting a runtime FutureWarning, set this application level feature flag in your __main__ module" feels like exactly the right level of affirmative agreement to me - the equivalent of clicking through a confirmation dialog, or ticking an "I agree" check box on a form.

Libraries registering that agreement on behalf of their users would then always be inappropriate, while whether or not it was appropriate for a framework to do it would depend on the framework and the feature.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31742>
_______________________________________


More information about the Python-bugs-list mailing list