Talks - Victor Stinner: Introducing incompatible changes in Python

Introducing incompatible changes in Python: A guide to planning, announcing, and easing the transition, including tools like Pyupgrade and HPY to simplify the process.

Key takeaways
  • It’s essential to plan for and announce incompatible changes in Python, with a reasonable timeline for adoption, and provide tools to ease the transition.
  • The C API should be made easier to implement and maintain, and Pyupgrade is a tool that can help identify code that needs to be updated.
  • To make the transition smoother, provide a compatibility layer, documentation, and examples to help users update their code.
  • The ideal integration involves adding an API that documents changes, provides a concrete solution, and is tested thoroughly.
  • A new project, HPY, is being developed to make the C API easier to use and more efficient.
  • For incompatible changes, it’s crucial to announce the changes early, provide a migration path, and offer tools to help with the transition.
  • The Python development mode can be used to detect issues early, and Pyupgrade can be used to identify code that needs to be updated.
  • Providing a way to opt-in to new features and APIs can make it easier for users to adopt new versions of Python.
  • The C API can be made more user-friendly by adding more documentation and examples.
  • Incompatible changes can be managed by providing a compatibility layer, documentation, and examples to help users update their code.
  • It’s essential to plan for and announce incompatible changes in Python, with a reasonable timeline for adoption, and provide tools to ease the transition.