@@ -91,14 +91,9 @@ Refs: #123
9191
9292### Breaking changes and deprecation
9393
94- Since we are still pre-1.0, [ SemVer] states that any release may contain breaking
95- changes. However, breaking changes should not be made without warning.
96-
97- Any breaking changes must have a deprecation period of at least ** one minor release,
98- or one month (whichever is longer),** before the breaking change is made. If the change
99- is one that may require significant changes to client code, such as removing a function
100- or class entirely, the deprecation period must instead be at least ** two minor releases,
101- or two months (whichever is longer).**
94+ Coreax is stable, so according to [ SemVer] , any breaking changes require incrementing
95+ the major version number. Any change that would otherwise be breaking should instead be
96+ made into a deprecation if possible.
10297
10398Ensure that during the deprecation period, the old behaviour still works, but raises a
10499` DeprecationWarning ` with an appropriate message (which should include which version
@@ -111,22 +106,19 @@ As an example, this is what the deprecation period for renaming `my_old_function
111106` my_new_function ` would look like:
112107
113108``` python
114- # v0 .1.0:
109+ # v1 .1.0:
115110def my_old_function (x : int ) -> int :
116111 return x + x + x + x
117112
118- # v0 .2.0:
113+ # v1 .2.0:
119114def my_new_function (x : int ) -> int :
120115 return x* 4
121116
122- @deprecated (
123- " Renamed to my_new_function."
124- + " Deprecated since v0.2.0; will be removed in v0.3.0."
125- )
117+ @deprecated (" Renamed to my_new_function; will be removed in the next major version" )
126118def my_old_function (x : int ) -> int :
127119 return my_new_function(x)
128120
129- # v0.3 .0:
121+ # v2.0 .0:
130122def my_new_function (x : int ) -> int :
131123 return x* 4
132124```
0 commit comments