Set version to v3.1.0 (#8452)

* Update test for v3.1

* Set version to v3.1.0
This commit is contained in:
Adriane Boyd 2021-06-21 10:41:40 +02:00 committed by GitHub
parent 9fde258053
commit caba63b74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# fmt: off # fmt: off
__title__ = "spacy" __title__ = "spacy"
__version__ = "3.1.0.dev0" __version__ = "3.1.0"
__download_url__ = "https://github.com/explosion/spacy-models/releases/download" __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
__compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"
__projects__ = "https://github.com/explosion/projects" __projects__ = "https://github.com/explosion/projects"

View File

@ -489,11 +489,8 @@ def test_language_source_and_vectors(nlp2):
nlp.vocab.strings.add(long_string) nlp.vocab.strings.add(long_string)
assert nlp.vocab.vectors.to_bytes() != nlp2.vocab.vectors.to_bytes() assert nlp.vocab.vectors.to_bytes() != nlp2.vocab.vectors.to_bytes()
vectors_bytes = nlp.vocab.vectors.to_bytes() vectors_bytes = nlp.vocab.vectors.to_bytes()
# TODO: convert to pytest.warns for v3.1 with pytest.warns(UserWarning):
logger = logging.getLogger("spacy")
with mock.patch.object(logger, "warning") as mock_warning:
nlp2.add_pipe("textcat", name="textcat2", source=nlp) nlp2.add_pipe("textcat", name="textcat2", source=nlp)
mock_warning.assert_called()
# strings should be added # strings should be added
assert long_string in nlp2.vocab.strings assert long_string in nlp2.vocab.strings
# vectors should remain unmodified # vectors should remain unmodified