You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyPy: a long chain of nested model classes ends the process when Citry builds its validator copy #854
On PyPy, a chain of 150 to 200 Pydantic model classes nested inside each other (A has a field of type B, B of type C, and so on) ends the process while Citry builds its copy of the validator the first time an event uses the class. On CPython the chain works.
The model classes come from the app's own code, so only the app author can trigger it.
The test test_the_copy_of_a_chain_of_nested_models_is_built_on_a_thread_with_a_small_stack is skipped on PyPy for this reason (#851).
Possible fixes: build the copy without recursing once per class, refuse a chain deeper than PyPy can build with a clear error, or document the limit in "Differences on PyPy" in docs_site/content/about/compatibility.md. Related: #708.
Activity