-
Notifications
You must be signed in to change notification settings - Fork 109
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
Python 3.13 deprecates forward references #1308
Comments
We auto-generate this file with https://github.com/koxudaxi/datamodel-code-generator, so I assume this needs to be raised + fixed upstream? |
Reported upstream as well. Once they fix it we need to regenerate it to fix it here, so we should keep this issue open until then. |
@alicederyn we could also fix it by generating pydantic v2 classes instead of v1, no? |
I can't speak to the implications of that / the maintainers' willingness to do so. @elliotgunton ? |
We'd prefer a migration path so can't go directly to v2. I haven't dug into the details of supporting both - @sambhav tried and said it was too much effort at the time. |
Following issue python/cpython#118418 is no longer recommended to wrap pydantic definitions behind future annotations here https://github.com/argoproj-labs/hera/blob/main/src/hera/events/models/io/argoproj/workflow/v1alpha1.py#L4. This now raises a deprecation warning.
Fixing this, however, will require a slightly more complicated solution, as that forward reference stops circular references between definitions. Furthermore, it seems we're still using the V1 compatibility layer from pydantic that is planned to be removed pydantic/pydantic#5165, so likely a better solution would be to stop pydantic v1 support.
Inside pytest one can side-step for now as:
The text was updated successfully, but these errors were encountered: