potiuk commented on PR #29809:
URL: https://github.com/apache/airflow/pull/29809#issuecomment-1485098906

   > I had the same problem with breeze, but when I installed `mock==5.0.1` in 
the CI image, and I replaced from unittest import mock by import mock, the test 
passed without any problem.
   
   Interesting. We have no non-standard mock installed at all in Airlfow - 
https://github.com/apache/airflow/blob/constraints-main/constraints-3.7.txt  - 
we are using standard mock that comes built-in in Python. Maybe there is a 
different behaviour of the python version you use @amoghrajesh and that's why 
you can't reproduce it ? Or some other mocking library is changing the mock 
behaviour.
   
   Note that in Breeze we are using (automatically - it gest upgraded behind 
the scenes right after it gets released and tests pass) the latest version of 
released Python in given Python line for example currently it is. For example 
for Python 3.7 it is.
   
   ```
   root@ee68a99cdb58:/opt/airflow# python --version
   Python 3.7.16
   root@ee68a99cdb58:/opt/airflow# 
   ```
   
   But maybe you are not using Python 3.7 at all (the tests in PR use the 
lowest supported Python version - which is 3.7 and maybe this is simply 
difference vs. 3.7 and 3.8 that you need to handle differently ? We still 
suport 3.7 till July: 
https://github.com/apache/airflow/blob/main/README.md#support-for-python-and-kubernetes-versions
   
   So maybe the way to reproduce it locally is build your Python venv from 
latest 3.7 and make sure you have no extra "mock" installed (if you have it 
installed in your environment @amoghrajesh ) and then you will be able to 
reproduce.
   
   If that's the case that you can reproduce it this way, then it's the classic 
"works for me" case and precisely what `breeze/ci` of ours is supposed to catch 
before it makes it into `main`. 


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