On Thu, 21 Apr 2022 at 02:45, malmiteria <martin.milon@ensc.fr> wrote:
> 4) Lib refactoring are breaking changes
> A Lib author refactoring his code by extracting a class as a parent class of multiple of the class provided is introducing a breaking change.
<snip> 
> After refactoring, the MRO is now N1, N2, GP. Which do behave differently, in general.

Sure -- but there's nothing special or difficult here -- refactoring can create breaking changes. I believe it was part of Hettinger's thesis in "Super Considered Super" that the use of super() is part of the API of a class hierarchy. Indeed, the MRO of a class hierarchy is part of the API. If you change the MRO, it is a potentially breaking change, just as if a method is added or removed, or renamed, or ... 

Nothing to see here -- this is all deliberate, and useful.

-CHB

--
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython