@@ -91,14 +91,9 @@ Refs: #123
91
91
92
92
### Breaking changes and deprecation
93
93
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.
102
97
103
98
Ensure that during the deprecation period, the old behaviour still works, but raises a
104
99
` 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
111
106
` my_new_function ` would look like:
112
107
113
108
``` python
114
- # v0 .1.0:
109
+ # v1 .1.0:
115
110
def my_old_function (x : int ) -> int :
116
111
return x + x + x + x
117
112
118
- # v0 .2.0:
113
+ # v1 .2.0:
119
114
def my_new_function (x : int ) -> int :
120
115
return x* 4
121
116
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" )
126
118
def my_old_function (x : int ) -> int :
127
119
return my_new_function(x)
128
120
129
- # v0.3 .0:
121
+ # v2.0 .0:
130
122
def my_new_function (x : int ) -> int :
131
123
return x* 4
132
124
```
0 commit comments