You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a naming convention for new versions of an existing API. Illustrated by an example:
PyFoo_Bar() is a problematic API; it returns a borrowed reference, suppresses arbitrary exceptions, and requires callers to check PyErr_Occurred() to find out if an exception was raised. A PR now exists to replace PyFoo_Bar() with a new and non-problematic API, but unfortunately that PR cannot be merged, because unlike the implementation of the new API, there is no consensus on the naming of the new API; after all, PyFoo_Bar() is the perfect name. How to proceed?
@vstinner has suggested to add a Ref suffix when fixing APIs that return borrowed references1.
I propose to follow the SQLite practise of adding a version specifier2 if an API is replaced.
Footnotes
PyFoo_Bar would become PyFoo_BarRef, since it now returns a strong reference. ↩
We need a naming convention for new versions of an existing API. Illustrated by an example:
PyFoo_Bar()
is a problematic API; it returns a borrowed reference, suppresses arbitrary exceptions, and requires callers to checkPyErr_Occurred()
to find out if an exception was raised. A PR now exists to replacePyFoo_Bar()
with a new and non-problematic API, but unfortunately that PR cannot be merged, because unlike the implementation of the new API, there is no consensus on the naming of the new API; after all,PyFoo_Bar()
is the perfect name. How to proceed?@vstinner has suggested to add a Ref suffix when fixing APIs that return borrowed references1.
I propose to follow the SQLite practise of adding a version specifier2 if an API is replaced.
Footnotes
PyFoo_Bar
would becomePyFoo_BarRef
, since it now returns a strong reference. ↩PyFoo_Bar
would becomePyFoo_Bar_v2
. ↩The text was updated successfully, but these errors were encountered: