Skip to content

Commit ed561cf

Browse files
Bram Vanroysvlandeg
andauthored
Terminology: deprecated vs obsolete (#7621)
* Terminology: deprecated vs obsolete Typically, deprecated is used for functionality that is bound to become unavailable but that can still be used. Obsolete is used for features that have been removed. In E941, I think what is meant is "obsolete" since loading a model by a shortcut simply does not work anymore (and throws an error). This is different from downloading a model with a shortcut, which is deprecated but still works. In light of this, perhaps all other error codes should be checked as well. * clarify that the link command is removed and not just deprecated Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
1 parent 8d7af5b commit ed561cf

3 files changed

Lines changed: 17 additions & 16 deletions

File tree

spacy/cli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
@app.command("link", no_args_is_help=True, deprecated=True, hidden=True)
3131
def link(*args, **kwargs):
32-
"""As of spaCy v3.0, symlinks like "en" are deprecated. You can load trained
32+
"""As of spaCy v3.0, symlinks like "en" are not supported anymore. You can load trained
3333
pipeline packages using their full names or from a directory path."""
3434
msg.warn(
35-
"As of spaCy v3.0, model symlinks are deprecated. You can load trained "
35+
"As of spaCy v3.0, model symlinks are not supported anymore. You can load trained "
3636
"pipeline packages using their full names or from a directory path."
3737
)

spacy/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ class Errors:
636636
"method, make sure it's overwritten on the subclass.")
637637
E940 = ("Found NaN values in scores.")
638638
E941 = ("Can't find model '{name}'. It looks like you're trying to load a "
639-
"model from a shortcut, which is deprecated as of spaCy v3.0. To "
639+
"model from a shortcut, which is obsolete as of spaCy v3.0. To "
640640
"load the model, use its full name instead:\n\n"
641641
"nlp = spacy.load(\"{full}\")\n\nFor more details on the available "
642642
"models, see the models directory: https://spacy.io/models. If you "

website/docs/usage/v3.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -616,11 +616,11 @@ Note that spaCy v3.0 now requires **Python 3.6+**.
616616
| `spacy profile` | [`spacy debug profile`](/api/cli#debug-profile) |
617617
| `spacy link`, `util.set_data_path`, `util.get_data_path` | not needed, symlinks are deprecated |
618618
619-
The following deprecated methods, attributes and arguments were removed in v3.0.
620-
Most of them have been **deprecated for a while** and many would previously
621-
raise errors. Many of them were also mostly internals. If you've been working
622-
with more recent versions of spaCy v2.x, it's **unlikely** that your code relied
623-
on them.
619+
The following methods, attributes and arguments were removed in v3.0. Most of
620+
them have been **deprecated for a while** and many would previously raise
621+
errors. Many of them were also mostly internals. If you've been working with
622+
more recent versions of spaCy v2.x, it's **unlikely** that your code relied on
623+
them.
624624
625625
| Removed | Replacement |
626626
| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -637,10 +637,10 @@ on them.
637637
638638
### Downloading and loading trained pipelines {#migrating-downloading-models}
639639
640-
Symlinks and shortcuts like `en` are now officially deprecated. There are
641-
[many different trained pipelines](/models) with different capabilities and not
642-
just one "English model". In order to download and load a package, you should
643-
always use its full name – for instance,
640+
Symlinks and shortcuts like `en` have been deprecated for a while, and are now
641+
not supported anymore. There are [many different trained pipelines](/models)
642+
with different capabilities and not just one "English model". In order to
643+
download and load a package, you should always use its full name – for instance,
644644
[`en_core_web_sm`](/models/en#en_core_web_sm).
645645
646646
```diff
@@ -1185,9 +1185,10 @@ package isn't imported.
11851185
In Jupyter notebooks, run [`prefer_gpu`](/api/top-level#spacy.prefer_gpu),
11861186
[`require_gpu`](/api/top-level#spacy.require_gpu) or
11871187
[`require_cpu`](/api/top-level#spacy.require_cpu) in the same cell as
1188-
[`spacy.load`](/api/top-level#spacy.load) to ensure that the model is loaded on the correct device.
1188+
[`spacy.load`](/api/top-level#spacy.load) to ensure that the model is loaded on
1189+
the correct device.
11891190

1190-
Due to a bug related to `contextvars` (see the [bug
1191-
report](https://github.com/ipython/ipython/issues/11565)), the GPU settings may
1192-
not be preserved correctly across cells, resulting in models being loaded on
1191+
Due to a bug related to `contextvars` (see the
1192+
[bug report](https://github.com/ipython/ipython/issues/11565)), the GPU settings
1193+
may not be preserved correctly across cells, resulting in models being loaded on
11931194
the wrong device or only partially on GPU.

0 commit comments

Comments
 (0)