As hard as we try to write good code, there will always be cases in which we wish we had designed a different function signature, chosen another attribute name, ... But you can't change it anymore because it's public API - or can you?
This talk is for everybody who writes code that is used by others. As soon as somebody else uses your code, you've deliberately or not created an API. Even with the greatest care, there will always be things you wish to change later on. But since other people's code relies on your API, mistakes cannot be undone easily. Luckily, Python is quite flexible - allowing for various changes while keeping backward compatibility. But even when a breaking change is required there are ways to achieve this with the least possible pain for authors and users.
Suitable transition strategies depend on the reach of your code. Therefore, we'll look at various real-world examples from core python over public open source libraries to company-internal code. These examples will give you practical patterns you can apply in your code. Additionally, we'll see how code can be written in the first place so that later changes are easier.
basic
Abstract as a tweet:How to change your API without annoying your users (too much).
Domains:APIs
Domain Expertise:none