Skip to content

Commit 04a0a62

Browse files
authored
Merge pull request #37 from data-apis/versioning
Add section on future API standard evolution
2 parents c4ab9fe + 9744731 commit 04a0a62

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

spec/future_API_evolution.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,56 @@
22

33
## Scope extensions
44

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.
515

616

717
## Backwards compatibility
818

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.
923

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.
1027

11-
## Versioning
1228

29+
## Versioning
1330

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

Comments
 (0)