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


##########
tests/plugins/test_plugins_manager.py:
##########
@@ -76,6 +58,21 @@ def clean_plugins():
     get_listener_manager().clear()
 
 
[email protected]
+def mock_metadata_distribution(mocker):
+    @contextlib.contextmanager
+    def wrapper(*args, **kwargs):
+        if sys.version_info < (3, 12):
+            patch_fq = "importlib_metadata.distributions"

Review Comment:
   To explain this-one: 
   
   From: https://docs.python.org/3/library/importlib.metadata.html#entry-points
   
   > Compatibility Note
   
   > The “selectable” entry points were introduced in importlib_metadata 3.6 
and Python 3.10. Prior to those changes, entry_points accepted no parameters 
and always returned a dictionary of entry points, keyed by group. With 
importlib_metadata 5.0 and Python 3.12, entry_points always returns an 
EntryPoints object. See 
[backports.entry_points_selectable](https://pypi.org/project/backports.entry-points-selectable)
 for compatibility options.
   
   



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