Phrogz commented on issue #1309:
URL: https://github.com/apache/hamilton/issues/1309#issuecomment-2895483967

   Here's my best understanding of the setup:
   
   * Hamilton requires `"click>8.0.0"` (only [in 
contrib/setup.py](https://github.com/apache/hamilton/blob/main/contrib/setup.py#L71))
   * Hamilton requires `typer` (no version specified) [in 
ui/backend/setup.py](https://github.com/apache/hamilton/blob/main/ui/backend/setup.py#L13)
 and [pyproject.toml for 
`cli`](https://github.com/apache/hamilton/blob/main/pyproject.toml#L37) extra.
   * `typer v0.15.3` just depends on `"click >= 8.0.0"`…but then they found a 
bug and so
   * `typer v0.15.4` now depends on `"click >= 8.0.0,<8.2"`
   
   Here's what I think happens when installing without `cli` at first:
   
   1. When `uv` comes across the loose requirement for `click` it finds `8.2.0` 
as the latest best version and selects that.
   2. Later on when it comes across the unbounded requirement for `typer`, it 
sees that `0.15.4` is the latest, but that conflicts with the already-selected 
latest version of click. So, it backs off to `0.15.3` and decides to use that 
instead.
   3. `hamilton --help` runs into the bug in typer and/or click.
   
   But when installing with `cli` at first:
   
   1. `uv` comes across the initial unbounded requirement for `typer` and picks 
the latest, `0.15.4`.
   2. When `uv` later runs into the requirement for `click>8.0.0`, the best way 
to satisfy that and the `"click >= 8.0.0,<8.2"` requirement from typer is to 
use click `8.1.8`. 
   
   I _think_ the simplest fix here is to specify `cli = ["typer>=0.15.4"]` in 
the main pyproject.toml. Untested. I believe that will force `uv` to downgrade 
`click` even if it selects `8.2.0` first.


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