From 15bd230413ba2da67e0c06e03a8337dc209f5a83 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 19 Apr 2021 10:37:17 +0200 Subject: [PATCH] Set catalogue lower pin to v2.0.3 (#7762) * Set catalogue lower pin to v2.0.2 * Update importlib-metadata pins to match * Require catalogue v2.0.3 Switch to vendored `importlib-metadata` v3.2.0 provided by `catalogue`. --- requirements.txt | 3 +-- setup.cfg | 3 +-- spacy/util.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5be39f59f..86ffa9945 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ ml_datasets>=0.2.0,<0.3.0 murmurhash>=0.28.0,<1.1.0 wasabi>=0.8.1,<1.1.0 srsly>=2.4.1,<3.0.0 -catalogue>=2.0.1,<2.1.0 +catalogue>=2.0.3,<2.1.0 typer>=0.3.0,<0.4.0 pathy>=0.3.5 # Third party dependencies @@ -20,7 +20,6 @@ jinja2 # Official Python utilities setuptools packaging>=20.0 -importlib_metadata>=0.20; python_version < "3.8" typing_extensions>=3.7.4.1,<4.0.0.0; python_version < "3.8" # Development dependencies cython>=0.25 diff --git a/setup.cfg b/setup.cfg index f8672034f..6c65277c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ install_requires = blis>=0.4.0,<0.8.0 wasabi>=0.8.1,<1.1.0 srsly>=2.4.1,<3.0.0 - catalogue>=2.0.1,<2.1.0 + catalogue>=2.0.3,<2.1.0 typer>=0.3.0,<0.4.0 pathy>=0.3.5 # Third-party dependencies @@ -57,7 +57,6 @@ install_requires = # Official Python utilities setuptools packaging>=20.0 - importlib_metadata>=0.20; python_version < "3.8" typing_extensions>=3.7.4,<4.0.0.0; python_version < "3.8" [options.entry_points] diff --git a/spacy/util.py b/spacy/util.py index 9915de935..d8854f68d 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -36,7 +36,7 @@ except ImportError: try: # Python 3.8 import importlib.metadata as importlib_metadata except ImportError: - import importlib_metadata + from catalogue import _importlib_metadata as importlib_metadata # These are functions that were previously (v2.x) available from spacy.util # and have since moved to Thinc. We're importing them here so people's code