Would this affect Prefect? It uses type annotation...
# ask-community
m
Would this affect Prefect? It uses type annotations at runtime, right? https://github.com/samuelcolvin/pydantic/issues/2678
👀 2
z
Yeah I read through that issue last night 😕 good news is that we don't use type annotations very much so it would affect a small range of features and we could almost certainly hack our implementations to support any changes made in the python mainstream. 3.10 is also quite some ways away so I wouldn't worry about it for now.
👍 1
n
I ran into this where I was using Pydantic classes. I could get it to work in 3.7 but not 3.8. I read through a bunch of threads and found that the problem was defining my Pydantic classes in the scope of main instead of in module scope. Not sure I fully understand this and don't think I was doing exactly what is shown in the minimal example on April 16th in this thread. https://github.com/samuelcolvin/pydantic/issues/2678 Anyhow I just moved all my tasks out of the file with my
__main__
in it and no the Pydantic classes can be cloud pickled.