Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Dependency: python 3.11 will require min pydantic 1.10 or a workaround #11

Closed
peterschutt opened this issue Aug 29, 2022 · 1 comment
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@peterschutt
Copy link
Contributor

In Python 3.11 inspect.Parameter raises ValueError where a parameter name is a keyword (see python/cpython#92062).

We at least have Schema that triggers this error due to pydantic trying to create the aliases as parameters for the model signature, but there might be more too.

class Schema(BaseModel):
    schema_not: Optional[Union[Reference, "Schema"]] = Field(default=None, alias="not")
    schema_if: Optional[Union[Reference, "Schema"]] = Field(default=None, alias="if")

PR that resolves from the pydantic end is merged and available in the 1.10 pre-releases: pydantic/pydantic#4012.

I suppose we'll need a minimum 1.10 version constraint for pydantic based on the python version >=3.11

@peterschutt peterschutt added bug Something isn't working help wanted Extra attention is needed labels Aug 29, 2022
@Goldziher
Copy link
Contributor

a constraint is going to be fine IMO

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants