kojiromike commented on pull request #953:
URL: https://github.com/apache/avro/pull/953#issuecomment-720499069


   To be honest, I am a little stuck. It seems to me there are places where the 
types in avro-python aren't mathematically sound and can't be correctly 
described using type hints. (In particular, the subclassing of types of Schema 
don't always graph right.) In the long run, I think a breaking refactor will be 
required to make those type-able.
   
   But I guess we can ignore those for now. The bigger issue is that mypy 
[doesn't support recursive types](python/mypy#731), which I think severely 
limits the usefulness of type hinting in Avro. Avro schema is obviously suited 
to a recursive description of what it can serialize.
   
   I've played with a bunch of approaches, including an arbitrary 
recursion-depth limit (which Python has anyway for stack recursion), but it's a 
bit depressing, so I took a step away from this for a while.
   
   Mypy continues to improve, so I hope that with future improvements this will 
become increasingly useful.
   
   In the mean time, I will see about fixing it up and merging it for partial 
advances in type hinting from avro-python.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to