ev3dev-lang-python icon indicating copy to clipboard operation
ev3dev-lang-python copied to clipboard

replace asserts with ValueError or TypeError

Open dwalton76 opened this issue 6 years ago • 5 comments

dwalton76 avatar Jan 11 '20 21:01 dwalton76

For #707

dwalton76 avatar Jan 11 '20 21:01 dwalton76

Although this is "more correct", it is a breaking change for anyone catching the existing exceptions - something to consider.

dlech avatar Jan 12 '20 00:01 dlech

On one hand, these are errors that should be considered programmer error (i.e., a caller's bug) rather than a signal, and thus people shouldn't be catching them. On the other hand, it is a breaking change, and we've been having this discussion already with other slight breaking changes which we have not yet released.

I am leaning toward including this, calling the next release v3.0, and making a breaking changes page in the docs for v3. But I'm not yet entirely sure that's what I want to do. Certainly, it breaks the nice "v1.0 is Jessie, v2.0 is Stretch" rule we have so far, but I'm not sure that really matters.

WasabiFan avatar Jan 12 '20 03:01 WasabiFan

There is ev3dev-buster if you want to go crazy with breaking changes :wink:

I would be very cautious about releasing any breaking changes to ev3dev-stretch, no matter how small. My experience has always been that it breaks more than you would think. And there are lots of people using ev3dev-lang-python.

dlech avatar Jan 12 '20 03:01 dlech

I would be game for creating an ev3dev-buster branch and putting this there instead.

dwalton76 avatar Jan 12 '20 13:01 dwalton76