duo-labs / py_webauthn

Pythonic WebAuthn 🐍
https://duo-labs.github.io/py_webauthn
BSD 3-Clause "New" or "Revised" License
856 stars 171 forks source link

Deprecation warning with pydantic v2 #169

Closed sevdog closed 1 year ago

sevdog commented 1 year ago

After updating this package and pydantic (v2) there is still a deprecation warning:

PydanticDeprecatedSince20: The __fields_set__ attribute is deprecated, use model_fields_set instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.1.1/migration

This private attribute seems to be accessed only here:

https://github.com/duo-labs/py_webauthn/blob/56acd35480b7fc355499e9458931dc31476ec08f/webauthn/registration/verify_registration_response.py#L201

It should be preferred to access first with the new attribute/method and then with the legacy one.

MasterKale commented 1 year ago

Thank you for the report, @sevdog. The library is currently attempting to support use in projects that may still be using Pydantic v1 so for now the deprecation warnings will be a thing. I'm willing to accept contributions to quiet the warnings down while maintaining v1 support if you're interested in working on that.

MasterKale commented 1 year ago

This should now be resolved as of the newly released webauthn==1.11.0