Display model's full base version string in incompatiblity warning (#12857)

This commit is contained in:
Madeesh Kannan 2023-08-02 08:06:41 +02:00 committed by GitHub
parent a0a195688f
commit 222bd3c5b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -894,7 +894,7 @@ def load_meta(path: Union[str, Path]) -> Dict[str, Any]:
if "spacy_version" in meta:
if not is_compatible_version(about.__version__, meta["spacy_version"]):
lower_version = get_model_lower_version(meta["spacy_version"])
lower_version = get_minor_version(lower_version) # type: ignore[arg-type]
lower_version = get_base_version(lower_version) # type: ignore[arg-type]
if lower_version is not None:
lower_version = "v" + lower_version
elif "spacy_git_version" in meta: