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

   > Did you mean I should modify Hamilton itself to have that version spec?
   
   Yes. That's what I thought initially - that it's a bit strange to specify it 
this way.  
   
   But I did a bit more research, and while unusual some packages also did it 
this way - and the `!=`" would not solve the problem because uv tries to find 
solutions for **all** python versions. And there might be legitimate reasons 
why packages use either >= or != for python versions/
   
   However I think it would be simpler to add "3.10.0" to 
excluded-python-versions for the provider. Possibly we need to slightly update 
the generation of requires:
   
   ```
       for p in provider_details.excluded_python_versions:
           python_requires += f", !={p}.*"
   ```
   and here:
   
   ```
       # Most providers require the same python versions, but some may have 
exclusions
       for excluded_python_version in provider_details.excluded_python_versions:
           requires_python_version += f",!={excluded_python_version}.*"
   ```
   
   We would likely have to get rid of the '.*` when excluded python version 
contains patchlevel, but that would solve the problem entirely. 
   
   Yes it's not the same as "min-python-version", but I think '>=3.10.1` is 
generally bad idea - and a bit of a hack because you really cannot do it for 
3.11.0 for example if you support 3.10. So I would find it much better if 
hamilton provider does not do the same hack but simply specifies
   
   ```
   requires-python = ">=3.10,!=3.10.0"
   ```
   
   I believe - looking how uv does the lock generation - that would simply 
remove apache-airflow-providers-hamilton from the 3.10.0 python "variant" - 
without failing the resolution, it would be semantically equivalent - and it 
also allows for flexibility of having:
   
   ```
   requires-python = ">=3.10,!=3.11.0"
   ```
   
   Which min-python-version does not provide.


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