zero323 commented on code in PR #37724: URL: https://github.com/apache/spark/pull/37724#discussion_r963768068
########## python/docs/source/development/contributing.rst: ########## @@ -189,9 +186,6 @@ Annotations should, when possible: * Be compatible with the current stable MyPy release. - -Complex supporting type definitions, should be placed in dedicated ``_typing.pyi`` stubs. See for example `pyspark.sql._typing.pyi <https://github.com/apache/spark/blob/master/python/pyspark/sql/_typing.pyi>`_. Review Comment: `_typing` modules are here to stay as they're fundamental part of our annotations so I don't think we should ignore them in the typing guide. As of mentioning stubs explicitly I don't have strong opinion. We won't be able to switch to plain Python modules before the successor of 3.4 the earliest (we need to drop Python 3.7 to support `Protocol` and `Literal` if I recall correctly) assuming we won't use any new typing features and cyclic dependencies won't cause too much problems for migration. However, it is not necessary to mention that we use specifically use stubs. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
