potiuk commented on pull request #12636:
URL: https://github.com/apache/airflow/pull/12636#issuecomment-734846939


   OK. I figured out EXACTLY what the problem with eager upgrade strategy was 
and wy we had conflicting requirements at the end of it.
   
   PIP first figures out the requirements for airflow itself and after that it 
adds extra.
   
   So when it first tries to get the requirements to be installed it installs 
them for the (`install_requires` in setup.cfg). And whatever is installed 
there, will not be downgraded even if a lower version is required by one of the 
extras. 
   
   This happened with `requests` - airflow "install_requires" figures that the 
best version to install is 2.25.0. But when snowlake and other deps have < 
2.24.0 - requests will not be downgraded to 2.23.0, even if this produces 
version conflict. 
   
   That's why "eager" upgrade strategy upgraded requests to 2.25.0 -> because 
"install_requires" deps told it to do so. 
   
   The solution to all such conflicting requirements is simply to limit them in 
"install_requires" section :D. Then --upgrade-staregy eager strategy just works 
as expected.
   
   
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to