zhengruifeng opened a new pull request, #39844:
URL: https://github.com/apache/spark/pull/39844

   ### What changes were proposed in this pull request?
   Avoid using built-in list, dict in static typing
   
   
   ### Why are the changes needed?
   it's not supported in python 3.8, see https://peps.python.org/pep-0585/
   
   python 3.8
   ```
   >>> from typing import List
   >>> a : List[str] = ["a", "b"]
   >>> a : list[str] = ["a", "b"]
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: 'type' object is not subscriptable
   ```
   
   python 3.9
   ```
   >>> from typing import List
   >>> a : List[str] = ["a", "b"]
   >>> a : list[str] = ["a", "b"]
   
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   no
   
   
   ### How was this patch tested?
   manually check
   


-- 
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]

Reply via email to