`TypeError: 'type' object is not subscriptable` in transformers 4.46.0 and python 3.8
Author: harupy
Pull request: no
Labels: name: bug

### System Info

```
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
```

### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
docker run -it python:3.8 bash
pip install transformers
python -c 'from transformers.pipelines import audio_utils'
```

Full traceback:

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/transformers/pipelines/__init__.py", line 50, in <module>
    from .automatic_speech_recognition import AutomaticSpeechRecognitionPipeline
  File "/usr/local/lib/python3.8/site-packages/transformers/pipelines/automatic_speech_recognition.py", line 23, in <module>
    from .audio_utils import ffmpeg_read
  File "/usr/local/lib/python3.8/site-packages/transformers/pipelines/audio_utils.py", line 54, in <module>
    ffmpeg_additional_args: Optional[list[str]] = None,
TypeError: 'type' object is not subscriptable
```

### Expected behavior

No error

Comments:
Looks like `from __future__ import annotations` is missing in `transformers/pipelines/audio_utils.py`:

https://github.com/huggingface/transformers/blob/9643069465ff63191da97ddc459813d129308818/src/transformers/pipelines/audio_utils.py#L1-L5

PR that added the failing line: #32838

The error stems from the fact that the `list[...]` type hint is only supported from Python>=3.9.
See https://stackoverflow.com/questions/75202610/typeerror-type-object-is-not-subscriptable-python

This commit (https://github.com/huggingface/transformers/commit/c2820c94916e34baf4486accae74760972183a2f) includes the fix but it seems it was not included in the release. :thinking: 

(I see that support for Python 3.8 in transformers was dropped in #34314, but this was not included in the release.)

The wheel for transformers 4.46.0 is incorrect though as its `Requires-Python` value is `>=3.8.0`

@amyeroberts Is it possible to yank 4.46.0, fix the error, and release 4.46.1?

> The error stems from the fact that the `list[...]` type hint is only supported from Python>=3.9. See https://stackoverflow.com/questions/75202610/typeerror-type-object-is-not-subscriptable-python
> 
> This commit ([c2820c9](https://github.com/huggingface/transformers/commit/c2820c94916e34baf4486accae74760972183a2f)) includes the fix but it seems it was not included in the release. 🤔
> 
> (I see that support for Python 3.8 in transformers was dropped in #34314, but this was not included in the release.)

Thanks for explanation! I rolled back my transformers and it worked

Also seeing this issue, but it's easily resolved.

Pin `transformers<4.46.0` in your requirements.txt file, even if it's a sub-dependency of other packages.


This really should be yanked, it’s a broken release, incorrectly stating 3.8 support 

cc @ArthurZucker @ydshieh we should release a v4.46.1 with accurate python support and yank v4.46.0 to prevent automatic installations; it seems like it's bricking users installing in python 3.8 right now

Yep, will do this tomorrow thanks all for the report, sorry for the trouble 

Ah what's a bit weird is that I pushed https://github.com/huggingface/transformers/commit/c2820c94916e34baf4486accae74760972183a2f  which is the tag commit

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

I  think this issue can be closed.