Repository navigation
|
I'm trying to specify which versions of It looks like psutil maintains fairly strong backwards-compatibility, and an API-breaking-change is very unlikely. Plus, it would be quite disruptive to make a change given how many projects have open bounds like But it would still be good to have a clear policy on this! The contrib guide suggests asking questions in the Google group, but I don't think that's appropriate in this case. |
Replies: 3 comments
|
Hello there. Interesting topic. Yes, backward compatibility is rarely broken (...and python 2.6 is still supported!). The latest biggest API breakage which comes to my mind was in psutil 2.0.0, in 2014 (7 years ago):
That was a massive breakage, sort of comparable to the python 2 -> 3 transition. Back then that was possible because psutil was much less used. Today I'd never do that. =) The only other more recent incompatible change that I could find in the HISTORY was:
...which was introduced in 5.6.0 in 2019: The only potentially incompatible change I can foresee for the immediate future is this one: #1392 (comment). But it's not really a breakage, as the function signature will support both "new" and "old" API usages. If I were to release that now, I'd probably go from 5.8.0 to 5.9.0. More in general: I don't expect to break APIs any time soon. If I were to break something, I'd bump up the major version, e.g. from 5.8.0 (current) I'd go straight to 6.0.0. It must be noted though, that I may still go to 6.0.0 even if I do not break any API, e.g. if I introduce a very important brand new feature (unlikely) or if I accumulate enough 5.9.* versions (more likely). Long story short: psutil backward compatibility is taken seriously and versioning is sort of linear, even though it doesn't follow strict rules (maybe it should?). As for what to put in the doc: I'm not sure... I wouldn't know what to say exactly or how to phrase it. The only thing worth mentioning would probably be the fact that in case of API breakage, the major bit will increase (e.g. 5.8.0 -> 6.0.0). But in my mind that is kind of obvious already (or isn't it?). I'm open to suggestions. |
|
Given how long of a history this library has, and how stable it's been, I wouldn't want to introduce something onerous for you. But if everyone is writing What about some text which just documents what you do today? Something along the lines of the
Does that seem good? I could put exactly that in a PR if it helps. 😄 (Aside: thanks for being so receptive to this discussion! And for all the years of |
|
Documented.
The same page is a migration guide summarising the breaking changes per major release and the code changes needed to upgrade: https://psutil.io/migration/ |
Documented.
docs/migration.rstnow states the policy explicitly:The same page is a migration guide summarising the breaking changes per major release and the code changes needed to upgrade: https://psutil.io/migration/