Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade typing-extensions to fix conflict with spacy and pydantic #2033

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

meatballhat
Copy link
Contributor

that results in seemingly unrelated errors like:

  File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/spacy/schemas.py", line 250, in <module>
    class TokenPattern(BaseModel):
  File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 661, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/root/.pyenv/versions/3.8.16/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

Closes PLAT-443

…tic`

that results in seemingly unrelated errors like:

```python
  File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/spacy/schemas.py", line 250, in <module>
    class TokenPattern(BaseModel):
  File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 661, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/root/.pyenv/versions/3.8.16/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class
```

Closes PLAT-443
@meatballhat meatballhat requested a review from a team October 29, 2024 19:12
@meatballhat meatballhat enabled auto-merge (squash) October 29, 2024 19:26
@meatballhat meatballhat merged commit a5759db into main Oct 29, 2024
19 checks passed
@meatballhat meatballhat deleted the downgrade-typing-extensions branch October 29, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants