Repository: huggingface/transformers
Pull request: Depend on `typer` instead of `typer-slim`

Hi 👋  Typer maintainer here.

# What does this PR do?

We used to offer `typer-slim` as a more light-weight package, which didn't depend on `rich` and `shellingham`. Unfortuntately, the way it was set up meant that we ran into issues with package managers (e.g. https://github.com/fastapi/typer/issues/1503). We ran a user survey and eventually decided to drop support for `typer-slim` altogether (since [0.22.0](https://github.com/fastapi/typer/releases/tag/0.22.0)). Going forward, it's better to just use `typer` as dependency.

What this means for this repo:
- `shellingham` already was an explicit requirement of `huggingface_hub` so was being pulled in anyway.
- `rich` will now be installed by default (about 12MB). This means that any Typer app will automatically set `rich_markup_mode` to `"rich"` by default (it was `None` when Rich wasn't installed). This can be overwritten when creating a `Typer()` app by setting `rich_markup_mode` to `None`. Alternatively, since Typer 0.22.0 there is a new env var `TYPER_USE_RICH` that you can set to `False` to disable Rich entirely everywhere and always. I'm not super sure what the best solution is for this repo, I did see that `rich` is already included in the `_deps` of `setup.py` though.

A similar [PR](https://github.com/huggingface/huggingface_hub/pull/3797) to `huggingface-hub` has already been merged.

Let me know if there's any concerns/questions!


## Before submitting
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section?
- [x] No related Github issue
- [x] I don't think there are documentation changes needed
- [x] I don't think new tests are needed?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker @Cyrilvallez
- vision models: @yonigozlan @molbap
- audio models: @eustlb @ebezzam @vasqu
- multimodal models: @zucchini-nlp
- graph models: @clefourrier

Library:

- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- continuous batching: @remi-or @ArthurZucker @McPatate
- pipelines: @Rocketknight1
- tokenizers: @ArthurZucker and @itazap
- trainer: @SunMarc
- attention: @vasqu @ArthurZucker @CyrilVallez
- model loading (from pretrained, etc): @CyrilVallez
- distributed: @3outeille @ArthurZucker
- CIs: @ydshieh

Integrations:

- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization: @SunMarc @MekkCyber
- kernels: @MekkCyber @drbh
- peft: @BenjaminBossan @githubnemo

Devices/Backends:

- AMD ROCm: @ivarflakstad
- Intel XPU: @IlyasMoutawwakil
- Ascend NPU: @ivarflakstad 

Documentation: @stevhliu

Research projects are not maintained and should be taken as is.

 -->


Changed files:
filename: setup.py
patch: @@ -150,7 +150,7 @@
     "torchvision",
     "pyctcdecode>=0.4.0",
     "tqdm>=4.27",
-    "typer-slim",
+    "typer",
     "unidic>=1.0.2",
     "unidic_lite>=1.0.7",
     "urllib3<2.0.0",
@@ -268,7 +268,7 @@ def deps_list(*pkgs):
     deps["pyyaml"],  # used for the model cards metadata
     deps["regex"],  # for OpenAI GPT
     deps["tokenizers"],
-    deps["typer-slim"],  # CLI utilities. In practice, already a dependency of huggingface_hub but we use it as well
+    deps["typer"],  # CLI utilities. In practice, already a dependency of huggingface_hub but we use it as well
     deps["safetensors"],
     deps["tqdm"],  # progress bars in model download and training scripts
 ]

filename: src/transformers/dependency_versions_table.py
patch: @@ -79,7 +79,7 @@
     "torchvision": "torchvision",
     "pyctcdecode": "pyctcdecode>=0.4.0",
     "tqdm": "tqdm>=4.27",
-    "typer-slim": "typer-slim",
+    "typer": "typer",
     "unidic": "unidic>=1.0.2",
     "unidic_lite": "unidic_lite>=1.0.7",
     "urllib3": "urllib3<2.0.0",