HyukjinKwon commented on a change in pull request #26835: 
[SPARK-30205][PYSPARK] Import ABCs from collections.abc to remove deprecation 
warnings
URL: https://github.com/apache/spark/pull/26835#discussion_r356389876
 
 

 ##########
 File path: python/pyspark/resultiterable.py
 ##########
 @@ -15,12 +15,16 @@
 # limitations under the License.
 #
 
-import collections
+try:
+    from collections.abc import Iterable
+except ImportError:
+    from collections import Iterable
 
 Review comment:
   I know this way is more preferred but can we do this by version-checking? 
That's consistent in the code base at least.

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


With regards,
Apache Git Services

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

Reply via email to