potiuk commented on code in PR #38366:
URL: https://github.com/apache/airflow/pull/38366#discussion_r1535533973


##########
airflow/utils/docs.py:
##########
@@ -16,10 +16,12 @@
 # under the License.
 from __future__ import annotations
 
-try:
-    import importlib_metadata
-except ImportError:
-    from importlib import metadata as importlib_metadata  # type: 
ignore[no-redef]
+import sys
+
+if sys.version_info >= (3, 10):
+    from importlib import metadata

Review Comment:
   This is - as I understand, more of a precaution coming from:
   
   https://docs.python.org/3.12/library/importlib.metadata.html 
   
   > Changed in version 3.10: importlib.metadata is no longer provisional.



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

Reply via email to