ev3dev / ev3dev-lang-python

Pure python bindings for ev3dev
MIT License
425 stars 144 forks source link

replace asserts with ValueError or TypeError #709

Open dwalton76 opened 4 years ago

dwalton76 commented 4 years ago

For #707

dlech commented 4 years ago

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

WasabiFan commented 4 years ago

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.

dlech commented 4 years ago

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.

dwalton76 commented 4 years ago

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