Skip to content

Commit c0a6696

Browse files
authored
Merge branch 'master' into docs/memory-management
2 parents c3a28e6 + 15fbf5e commit c0a6696

File tree

12 files changed

+82
-30
lines changed

12 files changed

+82
-30
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
- "*.md"
1313
- "*.mdx"
1414
- "website/**"
15-
- ".github/workflows/**"
1615
pull_request:
1716
types: [opened, synchronize, reopened, edited]
1817
paths-ignore:
@@ -32,7 +31,7 @@ jobs:
3231
- name: Configure Python version
3332
uses: actions/setup-python@v4
3433
with:
35-
python-version: "3.7"
34+
python-version: "3.10"
3635

3736
- name: black
3837
run: |
@@ -59,18 +58,7 @@ jobs:
5958
fail-fast: true
6059
matrix:
6160
os: [ubuntu-latest, windows-latest, macos-latest]
62-
python_version: ["3.12"]
63-
include:
64-
- os: windows-latest
65-
python_version: "3.7"
66-
- os: macos-latest
67-
python_version: "3.8"
68-
- os: ubuntu-latest
69-
python_version: "3.9"
70-
- os: windows-latest
71-
python_version: "3.10"
72-
- os: macos-latest
73-
python_version: "3.11"
61+
python_version: ["3.9", "3.11", "3.12"]
7462

7563
runs-on: ${{ matrix.os }}
7664

@@ -159,7 +147,9 @@ jobs:
159147
- name: "Test assemble CLI"
160148
run: |
161149
python -c "import spacy; config = spacy.util.load_config('ner.cfg'); config['components']['ner'] = {'source': 'ca_core_news_sm'}; config.to_disk('ner_source_sm.cfg')"
162-
PYTHONWARNINGS="error,ignore::DeprecationWarning" python -m spacy assemble ner_source_sm.cfg output_dir
150+
python -m spacy assemble ner_source_sm.cfg output_dir
151+
env:
152+
PYTHONWARNINGS: "error,ignore::DeprecationWarning"
163153
if: matrix.python_version == '3.9'
164154

165155
- name: "Test assemble CLI vectors warning"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ so that more people can benefit from it.
3535

3636
When opening an issue, use a **descriptive title** and include your
3737
**environment** (operating system, Python version, spaCy version). Our
38-
[issue template](https://github.com/explosion/spaCy/issues/new) helps you
38+
[issue templates](https://github.com/explosion/spaCy/issues/new/choose) help you
3939
remember the most important details to include. If you've discovered a bug, you
4040
can also submit a [regression test](#fixing-bugs) straight away. When you're
4141
opening an issue to report the bug, simply refer to your pull request in the

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ spacy-legacy>=3.0.11,<3.1.0
33
spacy-loggers>=1.0.0,<2.0.0
44
cymem>=2.0.2,<2.1.0
55
preshed>=3.0.2,<3.1.0
6-
thinc>=8.2.2,<8.3.0
6+
thinc>=8.3.0,<8.4.0
77
ml_datasets>=0.2.0,<0.3.0
88
murmurhash>=0.28.0,<1.1.0
99
wasabi>=0.9.1,<1.2.0

setup.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ classifiers =
1717
Operating System :: Microsoft :: Windows
1818
Programming Language :: Cython
1919
Programming Language :: Python :: 3
20-
Programming Language :: Python :: 3.7
21-
Programming Language :: Python :: 3.8
2220
Programming Language :: Python :: 3.9
2321
Programming Language :: Python :: 3.10
2422
Programming Language :: Python :: 3.11
@@ -31,7 +29,7 @@ project_urls =
3129
[options]
3230
zip_safe = false
3331
include_package_data = true
34-
python_requires = >=3.7
32+
python_requires = >=3.9
3533
# NOTE: This section is superseded by pyproject.toml and will be removed in
3634
# spaCy v4
3735
setup_requires =
@@ -116,7 +114,7 @@ cuda12x =
116114
cuda-autodetect =
117115
cupy-wheel>=11.0.0,<13.0.0
118116
apple =
119-
thinc-apple-ops>=0.1.0.dev0,<1.0.0
117+
thinc-apple-ops>=1.0.0,<2.0.0
120118
# Language tokenizers with external dependencies
121119
ja =
122120
sudachipy>=0.5.2,!=0.6.1

spacy/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fmt: off
22
__title__ = "spacy"
3-
__version__ = "3.8.0"
3+
__version__ = "3.8.2"
44
__download_url__ = "https://github.com/explosion/spacy-models/releases/download"
55
__compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"

spacy/lang/hr/lemma_lookup_license.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The list of Croatian lemmas was extracted from the reldi-tagger repository (https://github.com/clarinsi/reldi-tagger).
2-
Reldi-tagger is licesned under the Apache 2.0 licence.
2+
Reldi-tagger is licensed under the Apache 2.0 licence.
33

44
@InProceedings{ljubesic16-new,
55
author = {Nikola Ljubešić and Filip Klubička and Željko Agić and Ivo-Pavao Jazbec},
@@ -12,4 +12,4 @@ Reldi-tagger is licesned under the Apache 2.0 licence.
1212
publisher = {European Language Resources Association (ELRA)},
1313
address = {Paris, France},
1414
isbn = {978-2-9517408-9-1}
15-
}
15+
}

spacy/language.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from copy import deepcopy
1010
from dataclasses import dataclass
1111
from itertools import chain, cycle
12-
import numpy
1312
from pathlib import Path
1413
from timeit import default_timer as timer
1514
from typing import (
@@ -31,6 +30,7 @@
3130
overload,
3231
)
3332

33+
import numpy
3434
import srsly
3535
from cymem.cymem import Pool
3636
from thinc.api import Config, CupyOps, Optimizer, get_current_ops
@@ -2143,7 +2143,9 @@ def to_disk(
21432143
serializers["tokenizer"] = lambda p: self.tokenizer.to_disk( # type: ignore[union-attr]
21442144
p, exclude=["vocab"]
21452145
)
2146-
serializers["meta.json"] = lambda p: srsly.write_json(p, _replace_numpy_floats(self.meta))
2146+
serializers["meta.json"] = lambda p: srsly.write_json(
2147+
p, _replace_numpy_floats(self.meta)
2148+
)
21472149
serializers["config.cfg"] = lambda p: self.config.to_disk(p)
21482150
for name, proc in self._components:
21492151
if name in exclude:
@@ -2257,7 +2259,9 @@ def to_bytes(self, *, exclude: Iterable[str] = SimpleFrozenList()) -> bytes:
22572259
serializers: Dict[str, Callable[[], bytes]] = {}
22582260
serializers["vocab"] = lambda: self.vocab.to_bytes(exclude=exclude)
22592261
serializers["tokenizer"] = lambda: self.tokenizer.to_bytes(exclude=["vocab"]) # type: ignore[union-attr]
2260-
serializers["meta.json"] = lambda: srsly.json_dumps(_replace_numpy_floats(self.meta))
2262+
serializers["meta.json"] = lambda: srsly.json_dumps(
2263+
_replace_numpy_floats(self.meta)
2264+
)
22612265
serializers["config.cfg"] = lambda: self.config.to_bytes()
22622266
for name, proc in self._components:
22632267
if name in exclude:
@@ -2309,7 +2313,9 @@ def deserialize_meta(b):
23092313

23102314

23112315
def _replace_numpy_floats(meta_dict: dict) -> dict:
2312-
return convert_recursive(lambda v: isinstance(v, numpy.floating), lambda v: float(v), dict(meta_dict))
2316+
return convert_recursive(
2317+
lambda v: isinstance(v, numpy.floating), lambda v: float(v), dict(meta_dict)
2318+
)
23132319

23142320

23152321
@dataclass

website/docs/api/large-language-models.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ The name of the model to be used has to be passed in via the `name` attribute.
15971597
15981598
| Argument | Description |
15991599
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1600-
| `name` | The name of a mdodel supported by LangChain for this API. ~~str~~ |
1600+
| `name` | The name of a model supported by LangChain for this API. ~~str~~ |
16011601
| `config` | Configuration passed on to the LangChain model. Defaults to `{}`. ~~Dict[Any, Any]~~ |
16021602
| `query` | Function that executes the prompts. If `None`, defaults to `spacy.CallLangChain.v1`. ~~Optional[Callable[["langchain.llms.BaseLLM", Iterable[Any]], Iterable[Any]]]~~ |
16031603

website/docs/usage/rule-based-matching.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ matches = matcher(doc)
720720
721721
# Serve visualization of sentences containing match with displaCy
722722
# set manual=True to make displaCy render straight from a dictionary
723-
# (if you're not running the code within a Jupyer environment, you can
723+
# (if you're not running the code within a Jupyter environment, you can
724724
# use displacy.serve instead)
725725
displacy.render(matched_sents, style="ent", manual=True)
726726
```

0 commit comments

Comments
 (0)