PEP 739: add version specification to schema_version (#4112)
This commit is contained in:
parent
5c7b771511
commit
2a18b29751
|
@ -74,7 +74,7 @@ below, which is rendered in an human-readable format here.
|
|||
* - ``$schema``
|
||||
- https://json-schema.org/draft/2020-12/schema
|
||||
* - ``$id``
|
||||
- https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.schema.json
|
||||
- https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.0.schema.json
|
||||
* - Title
|
||||
- Static description file for the build details of Python
|
||||
installations
|
||||
|
@ -90,13 +90,28 @@ below, which is rendered in an human-readable format here.
|
|||
:widths: 25 75
|
||||
|
||||
* - Type
|
||||
- ``string`` (constant — ``1``)
|
||||
- ``string`` (constant — ``1.0``)
|
||||
* - Description
|
||||
- Schema version.
|
||||
|
||||
This is a constant value and MUST be ``1``, when using the
|
||||
schema described here. Future iterations of this schema MUST
|
||||
update this value.
|
||||
This is a string following the format ``<MAJOR>.<MINOR>``, where
|
||||
``<MAJOR>`` and ``<MINOR>`` are unpaded numbers and represent
|
||||
the **major** and **minor** components of the version. Versions
|
||||
may be arithmetic compared by intrepreting the version string as
|
||||
a decimal number.
|
||||
|
||||
For this specification version, this value is constant and MUST
|
||||
be ``1.0``.
|
||||
|
||||
Future versions of this schema MUST use a higher version number.
|
||||
Future versions of this schema MUST NOT use the same **major**
|
||||
version component as other schema version unless its
|
||||
specification is deemed backwards-compatible with them — it
|
||||
can't change, or extend, any parts of the current specification
|
||||
in such a way as the semantics of the interpreted data differ,
|
||||
or that data valid under the new specification is invalid under
|
||||
the older specification, with the exception of additional
|
||||
properties (errors caused by ``additionalProperties``).
|
||||
* - Required
|
||||
- **True**
|
||||
|
||||
|
@ -698,7 +713,7 @@ Example
|
|||
JSON Schema
|
||||
===========
|
||||
|
||||
.. literalinclude:: pep-0739/python-build-info-v1.schema.json
|
||||
.. literalinclude:: pep-0739/python-build-info-v1.0.schema.json
|
||||
:language: json
|
||||
:linenos:
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"schema_version": "1",
|
||||
"schema_version": "1.0",
|
||||
"base_prefix": "/usr",
|
||||
"platform": "linux-x86_64",
|
||||
"language": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.schema.json",
|
||||
"$id": "https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.0.schema.json",
|
||||
"type": "object",
|
||||
"title": "Static description file for the build details of Python installations",
|
||||
"required": [
|
||||
|
@ -13,8 +13,8 @@
|
|||
"properties": {
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"description": "Schema version.\n\nThis is a constant value and MUST be ``1``, when using the schema described here. Future iterations of this schema MUST update this value.",
|
||||
"const": "1"
|
||||
"description": "Schema version.\n\nThis is a string following the format ``<MAJOR>.<MINOR>``, where ``<MAJOR>`` and ``<MINOR>`` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and MUST be ``1.0``.\n\nFuture versions of this schema MUST use a higher version number. Future versions of this schema MUST NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).",
|
||||
"const": "1.0"
|
||||
},
|
||||
"base_prefix": {
|
||||
"type": "string",
|
Loading…
Reference in New Issue