|
2 | 2 |
|
3 | 3 | ## Scope extensions
|
4 | 4 |
|
| 5 | +Proposals for scope extensions in a future version of the API standard will follow |
| 6 | +the process documented at: |
| 7 | + |
| 8 | +TODO: link to specific document in https://github.com/data-apis/governance once |
| 9 | +it is available. |
| 10 | + |
| 11 | +In summary, proposed new APIs go through several maturity stages, and will only be |
| 12 | +accepted in a future version of this API standard once they have reached the "Final" |
| 13 | +maturity stage, which means multiple array libraries have compliant implementations |
| 14 | +and real-world experience from use of those implementations is available. |
5 | 15 |
|
6 | 16 |
|
7 | 17 | ## Backwards compatibility
|
8 | 18 |
|
| 19 | +Functions, objects, keywords and specified behaviour are added to this API standard |
| 20 | +only if those are already present in multiple existing array libraries, and if there is |
| 21 | +data that those APIs are used. Therefore it is highly unlikely that future versions |
| 22 | +of this standard will make backwards-incompatible changes. |
9 | 23 |
|
| 24 | +The aim is for future versions to be 100% backwards compatible with older versions. |
| 25 | +Any exceptions must have strong rationales, and be clearly documented in the updated |
| 26 | +API specification. |
10 | 27 |
|
11 |
| -## Versioning |
12 | 28 |
|
| 29 | +## Versioning |
13 | 30 |
|
| 31 | +This API standard uses the following versioning scheme: |
| 32 | + |
| 33 | +- The version is date-based, in the form `yyyy.mm` (e.g., `2020.12`). |
| 34 | +- The version shall not include a standard way to do `alpha`/`beta`/`rc` or |
| 35 | + `.post`/`.dev` type versions. |
| 36 | + _Rationale: that's for Python packages, not for a standard._ |
| 37 | +- The version must be made available at runtime via an attribute |
| 38 | + `__array_api_version__` by a compliant implementation, in `'yyyy.mm'` format |
| 39 | + as a string, in the namespace that implements the API standard. |
| 40 | + _Rationale: dunder version strings are the standard way of doing this._ |
| 41 | + |
| 42 | +No utilities for dealing with version comparisons need to be provided; given |
| 43 | +the format simple string comparisons with Python operators (`=-`, `<`, `>=`, |
| 44 | +etc.) will be enough. |
| 45 | + |
| 46 | +.. note:: |
| 47 | + |
| 48 | + Rationale for the `yyyy.mm` versioning scheme choice: |
| 49 | + the API will be provided as part of a library, which already has a versioning |
| 50 | + scheme (typically PEP 440 compliant and in the form `major.minor.bugfix`), |
| 51 | + and a way to access it via `module.__version__`. The API standard version is |
| 52 | + completely independent from the package version. Given the standardization |
| 53 | + process, it resembles a C/C++ versioning scheme (e.g. `C99`, `C++14`) more |
| 54 | + than Python package versioning. |
| 55 | + |
| 56 | +The frequency of releasing a new version of an API standard will likely be at |
| 57 | +regular intervals and on the order of one year, however no assumption on frequency of new versions appearing must be made. |
0 commit comments