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 2020/12/06 18:56:24 UTC

[GitHub] [airflow] kaxil edited a comment on issue #12855: Unable to import Airflow plugins

kaxil edited a comment on issue #12855:
URL: https://github.com/apache/airflow/issues/12855#issuecomment-739546519


   Oh looks like that might just be an issue with Python 3.8 where `importlib.metadata` does not have `.module` but if you use Python 3.7 which uses `importlib_metadata` that has `.module`  
   
   https://importlib-metadata.readthedocs.io/en/latest/using.html#entry-points:
   
   ```
   >>> eps = entry_points()
   >>> list(eps)
   ['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setuptools.installation']
   >>> scripts = eps['console_scripts']
   >>> wheel = [ep for ep in scripts if ep.name == 'wheel'][0]
   >>> wheel
   EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts')
   >>> wheel.module
   'wheel.cli'
   >>> wheel.attr
   'main'
   >>> wheel.extras
   []
   >>> main = wheel.load()
   >>> main
   <function main at 0x103528488>
   ```


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