You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/07/04 13:15:05 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5533: [AIRFLOW-4895] Import Iterable from collections.abc to fix DeprecationWarning in Python 3.7

ashb commented on a change in pull request #5533: [AIRFLOW-4895] Import Iterable from collections.abc to fix DeprecationWarning in Python 3.7
URL: https://github.com/apache/airflow/pull/5533#discussion_r300393613
 
 

 ##########
 File path: airflow/utils/helpers.py
 ##########
 @@ -23,7 +23,12 @@
 
 from datetime import datetime
 from functools import reduce
-from collections import Iterable
+try:
+    # Fix Python > 3.7 deprecation
+    from collections.abc import Iterable
+except ImportError:
+    # Preserve Python < 3.3 compatibility
 
 Review comment:
   The mimimum Python version we support is now 3.5 so I don't think we need this. (unless we also want to backport this to 1.10.x, where we still support py2.7)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services