HyukjinKwon commented on a change in pull request #31239:
URL: https://github.com/apache/spark/pull/31239#discussion_r559892716



##########
File path: python/pyspark/worker.py
##########
@@ -501,11 +501,13 @@ def main(infile, outfile):
 
             except (resource.error, OSError, ValueError) as e:
                 # not all systems support resource limits, so warn instead of 
failing
+                lineno = getframeinfo(
+                    currentframe()).lineno + 1 if currentframe() is not None 
else 0

Review comment:
       I checked the regular warnings and matched it with that:
   
   ```
   vi tmp.py
   ```
   
   ```python
   import warnings
   warnings.warn(
       "a",
       UserWarning)
   ```
   
   ```
   python tmp.py
   ```
   
   ```
   /.../tmp.py:2: UserWarning: a
     warnings.warn(
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to