amoghrajesh commented on PR #35970:
URL: https://github.com/apache/airflow/pull/35970#issuecomment-1833553200

   > > > > @potiuk BTW, i do not see static checks failing in my env or here. 
Are they failing?
   > > > 
   > > > 
   > > > Could be intermittent - I see that recent docker has been failing more 
frequently in CI (likely 24.0.7 version has some stability issue - I still want 
to wait for 24.0.8 that should get out any time soon because 24.0.7 has 
important security fixes 
https://docs.docker.com/engine/release-notes/24.0/#security)
   > > 
   > > 
   > > Yeah looks like it. Sure, thanks for the update
   > 
   > Nope. It's a real issue:
   > 
   > ```
   > - hook id: check-breeze-top-dependencies-limited
   > - exit code: 1
   > 
   > Traceback (most recent call last):
   >   File "dev/breeze/src/airflow_breeze/breeze.py", line 36, in <module>
   >     from airflow_breeze.commands.release_management_commands import 
release_management  # noqa
   >   File 
"/home/runner/actions-runner/_work/airflow/airflow/dev/breeze/src/airflow_breeze/commands/release_management_commands.py",
 line 37, in <module>
   >     from packaging.version import Version
   > ModuleNotFoundError: No module named 'packaging'
   > Breeze should only use limited dependencies when imported (see errors 
above).
   > ```
   > 
   > 
![image](https://private-user-images.githubusercontent.com/595491/286908823-3eee0f76-795c-4fdf-a47c-0986e4ebb04b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDEzNDI3MzEsIm5iZiI6MTcwMTM0MjQzMSwicGF0aCI6Ii81OTU0OTEvMjg2OTA4ODIzLTNlZWUwZjc2LTc5NWMtNGZkZi1hNDdjLTA5ODZlNGViYjA0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBSVdOSllBWDRDU1ZFSDUzQSUyRjIwMjMxMTMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDIzMTEzMFQxMTA3MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMmY4NjNmMzY2ZDgwM2VjMDJjNGExYTU4ZTFiOGNkYjBiMjFlZWEwMDI1ZDIyOTRlMmMxMjE0ZWNlZDQ1Y2UyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.EYissGdDk_MTDF2gERSvJS7geeqqs-771OxmQFc-pGg)
   > 
   > This is the error:
   > 
   > > Breeze should only use limited dependencies when imported (see errors 
above).
   > 
   > You have to make sure that `packaging` is locally imported not at the 
top-level. The problem is that when you do auto-completion, the auto-completion 
script will parse all the commands and `click` decorators. And in order to do 
that, it has to import the command modules. And this happens in a very "plain" 
python environment of python where no dependencies are installed (except rich 
and click) - the autocomplete script runs outside of the `breeze` venv (and 
this is not something we can or should change).
   > 
   > This means that you cannot add 3rd-party imports as top-level imports in 
the command files. This also allows auto-complete to be fast, because it will 
not import unnecessary a lot of packages.
   > 
   > This pre-commit failing checks that.
   
   Sweet explanation. Yes, I remember hitting this earlier in the past.
   
   I am pushing a fix for this.


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to