← All tasks
pythonexplosion/spaCy #12034Not a task: already works

TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'

envgap__explosion__spaCy-12034

01 / FAILURE SIGNATURE

As reported upstream

TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
ef9e504eacc806162666c964bd00d152fc15f9e3
Manifest
requirements.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

explosion/spaCy #12034 · read the original issue
After latest pydantic-1.10.3 release, spacy no longer can be imported, raising a TypeError.



The root cause is an incompatibility between pydantic-1.10.3 and your requirement `typing_extensions>=3.7.4,<4.2.0; python_version < "3.8"`.



See issue in pydantic:

- https://github.com/pydantic/pydantic/issues/4885



See fixing PR in pydantic (`typing-extensions>=4.2.0`), which will be incompatible with your requirement `typing_extensions>=3.7.4,<4.2.0; python_version < "3.8"`:

- https://github.com/pydantic/pydantic/pull/4886





<!-- Include a code example or the steps that led to the problem. Please try to be as specific as possible. -->

To reproduce the error:

```shell

pip install spacy

python -c "import spacy"

```



raises:

```

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module>

    from .errors import setup_default_warnings

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module>

    from .compat import Literal

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module>

    from thinc.util import copy_array

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module>

    from .config import registry

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/thinc/config.py", line 2, in <module>

    import confection

  File ".../venvs/venv-py37-spacy/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module>

    from pydantic import BaseModel, create_model, ValidationError, Extra

  File "pydantic/__init__.py", line 2, in init pydantic.__init__

  File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses

    # | None    | Attribute is set to None.               |

  File "pydantic/main.py", line 121, in init pydantic.main

TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'

```



## Your Environment

<!-- Include details of your environment. You can also type `python -m spacy info --markdown` and copy-paste the result here.-->

* Operating System:

* Python Version Used: 3.7.15

* spaCy Version Used: 3.4.4

* Environment Information:

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]