Skip to content

Allow three-component third-party versions #5995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ The metadata file describes the stubs package using the
supported:

* `version`: The latest version of the library that the stubs support.
Note that only two most significant version levels are supported
(i.e. only single dot). When the stubs are updated to a newer version
For libraries that reflect API changes in the version number only
the parts indicating the API level should be specified. In the case
of [Semantic Versioning](https://semver.org/) that is the first two
components. When the stubs are updated to a newer version
of the library, the version of the stub should be bumped (note that
previous versions are still available on PyPI). Some legacy stubs are
marked with version `0.1`, indicating that their supported version is
Expand Down
4 changes: 1 addition & 3 deletions tests/check_consistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ def check_metadata():
assert "version" in data, f"Missing version for {distribution}"
version = data["version"]
msg = f"Unsupported Python version {version}"
assert version.count(".") == 1, msg
major, minor = version.split(".")
assert major.isdigit() and minor.isdigit(), msg
assert re.match(r"^\d+\.\d+(\.\d+)?$", version), msg
for key in data:
assert key in metadata_keys, f"Unexpected key {key} for {distribution}"
assert isinstance(data.get("python2", False), bool), f"Invalid python2 value for {distribution}"
Expand Down