[Python-Dev] How far to go with user-friendliness

Brett Cannon brett at python.org
Wed Jul 15 00:28:06 CEST 2015


On Tue, Jul 14, 2015 at 3:22 PM Robert Collins <robertc at robertcollins.net>
wrote:

> On 15 July 2015 at 10:05, Ethan Furman <ethan at stoneleaf.us> wrote:
> > On 07/14/2015 02:53 PM, Robert Collins wrote:
> ...
> >>> I don't think unittest can protect its users from such things.
> >>
> >>
> >> It can't, but there is a sliding scale of API usability, and we should
> >> try to be up the good end of that :).
> >
> >
> > I hope you're not suggesting that supporting misspellings, and thereby
> > ruling out the proper use of an otherwise fine variable name, is at the
> good
> > end of that scale?
>
> I'm not supporting the misspelling thing - see my suggestion earlier
> in this thread to move the mock assertions to standalone functions,
> removing the bug in that area *entirely* and eventually removing the
> check for method names starting with assert from mock entirely.
>
> What I am doing is rejecting the argument that because we can't fix
> every mis-use users might make, we therefore should not fix the cases
> where we can fix it.
>
> For clarity, I think we should:
>  - remove the assret check, it is I think spurious.
>  - add a set of functions to the mock module that should be used in
> preference to Mock.assert*
>  - mark the Mock.assert* functions as PendingDeprecation
>  - in 3.6 move the PendingDeprecation to Deprecated
>  - in 3.7 remove the Mock.assert* functions and the check for method
> names beginning with assert entirely.
>

+1 from me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150714/4fdf122e/attachment.html>


More information about the Python-Dev mailing list