Github user e-dorigatti commented on a diff in the pull request:
https://github.com/apache/spark/pull/21467#discussion_r192502611
--- Diff: python/pyspark/util.py ---
@@ -53,16 +53,11 @@ def _get_argspec(f):
"""
Get argspec of a function. Supports both Python 2 and Python 3.
"""
-
- if hasattr(f, '_argspec'):
- # only used for pandas UDF: they wrap the user function, losing
its signature
- # workers need this signature, so UDF saves it here
- argspec = f._argspec
- elif sys.version_info[0] < 3:
+ # `getargspec` is deprecated since python3.0 (incompatible with
function annotations).
--- End diff --
no, this is the purpose of this PR :) that's how we fixed a bug in [a
previous PR](https://github.com/apache/spark/pull/21383), but we felt it was a
hack so now we are doing it properly
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]