chalk-ai / pydantic-scim

Apache License 2.0
2 stars 1 forks source link

pydantic 2 compatibility #10

Open azmeuk opened 1 month ago

azmeuk commented 1 month ago

The code raises a few warnings with pydantic 2:

pydanticscim/resource_type.py:8
  /home/eloi/dev/pydantic-scim/pydanticscim/resource_type.py:8: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.0.3/migration/
    extra = Extra.allow
pydanticscim/resource_type.py:21
  /home/eloi/dev/pydantic-scim/pydanticscim/resource_type.py:21: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.0.3/migration/
    extra = Extra.allow
  /home/eloi/.virtualenvs/pydantic-scim-vwax/lib/python3.12/site-packages/pydantic/_internal/_config.py:210: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.0.3/migration/
    warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
azmeuk commented 1 month ago

I forked this repository here to bring pydantic 2 support: https://github.com/yaal-coop/scim2-models

There is also a bit of documentation, and many bugfixes: https://scim2-models.readthedocs.io/