Skip to content

Commit e72edb0

Browse files
authored
Merge pull request #93 from LeapBeyond/feature/spacy_version
Update to spacy v3rc3
2 parents 58c57d7 + 78fca35 commit e72edb0

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

requirements/python-extras-spacy

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
# Extra dependancies for spacy detector
33
# wheel is needed for spacy to do its funky model management, not sure why its not a dep of spacy directly
44
wheel
5-
thinc==8.0.0rc2; python_version>='3.6' or python_version<'3.9'
6-
spacy-nightly[transformers]==3.0.0rc2; python_version>='3.6' or python_version<'3.9'
5+
6+
thinc>=8.0.0rc3,<8.1.0; python_version>='3.6' or python_version<'3.9'
7+
spacy-nightly[transformers]==3.0.0rc3; python_version>='3.6' or python_version<'3.9'
8+
9+
# thinc==8.0.0rc2; python_version>='3.6' or python_version<'3.9'
10+
# spacy-nightly[transformers]==3.0.0rc2; python_version>='3.6' or python_version<'3.9'
11+
712
# spacy-nightly[transformers]>=3.0.0rc1; python_version >= '3.6'
813
# spacy-transformers>=1.0.0rc0

scrubadub/detectors/spacy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,12 @@ def check_spacy_version() -> bool:
139139
@staticmethod
140140
def check_spacy_model(model) -> bool:
141141
"""Ensure that the spaCy model is installed."""
142-
spacy_info = spacy.info()
142+
try:
143+
spacy_info = spacy.info()
144+
except TypeError:
145+
# There is a forgotten default argument in spacy.info in version 3rc3, this try except should be removed
146+
# in the future.
147+
spacy_info = spacy.info(exclude=[])
143148
models = list(spacy_info.get('pipelines', spacy_info.get('models', None)).keys())
144149
if models is None:
145150
raise ValueError('Unable to detect spacy models.')

0 commit comments

Comments
 (0)