arrow_schema is not compatible with list
MEMBER
Thanks for reporting, I'll look into it
2025-05-26T18:29:38Z
https://github.com/huggingface/datasets/issues/7577#issuecomment-2910412207
https://api.github.com/repos/huggingface/datasets/issues/7577
IC_kwDODunzps6teV2v
https://api.github.com/repos/huggingface/datasets/issues/comments/2910412207/reactions
2025-05-26T18:29:38Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2910412207
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Actually it looks like you just forgot parenthesis:

```diff
- f = datasets.Features({'x': list[datasets.Value(dtype='int32')]})
+ f = datasets.Features({'x': list([datasets.Value(dtype='int32')])})
```

or simply using the `[ ]` syntax:

```python
f = datasets.Features({'x':[datasets.Value(dtype='int32')]})
```

I'm closing this issue if you don't mind
2025-05-26T18:32:55Z
https://github.com/huggingface/datasets/issues/7577#issuecomment-2910418458
https://api.github.com/repos/huggingface/datasets/issues/7577
IC_kwDODunzps6teXYa
https://api.github.com/repos/huggingface/datasets/issues/comments/2910418458/reactions
2025-05-26T18:32:55Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2910418458
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
Ah is that what the syntax is? I don't think I was able to find an actual example of it so I assumed it was in the same way that you specify types eg. `list[int]`. This is good to know, thanks.
2025-05-26T18:49:50Z
https://github.com/huggingface/datasets/issues/7577#issuecomment-2910449519
https://api.github.com/repos/huggingface/datasets/issues/7577
IC_kwDODunzps6tee9v
https://api.github.com/repos/huggingface/datasets/issues/comments/2910449519/reactions
2025-05-26T18:49:50Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2910449519
https://avatars.githubusercontent.com/u/164412025?v=4
https://api.github.com/users/jonathanshen-upwork/events{/privacy}
https://api.github.com/users/jonathanshen-upwork/followers
https://api.github.com/users/jonathanshen-upwork/following{/other_user}
https://api.github.com/users/jonathanshen-upwork/gists{/gist_id}
https://github.com/jonathanshen-upwork
jonathanshen-upwork
U_kgDOCcy6eQ
https://api.github.com/users/jonathanshen-upwork/orgs
https://api.github.com/users/jonathanshen-upwork/received_events
https://api.github.com/users/jonathanshen-upwork/repos
https://api.github.com/users/jonathanshen-upwork/starred{/owner}{/repo}
https://api.github.com/users/jonathanshen-upwork/subscriptions
User
https://api.github.com/users/jonathanshen-upwork
public
### Describe the bug

```
import datasets
f = datasets.Features({'x': list[datasets.Value(dtype='int32')]})
f.arrow_schema

Traceback (most recent call last):
  File "datasets/features/features.py", line 1826, in arrow_schema
    return pa.schema(self.type).with_metadata({"huggingface": json.dumps(hf_metadata)})
                     ^^^^^^^^^
  File "datasets/features/features.py", line 1815, in type
    return get_nested_type(self)
           ^^^^^^^^^^^^^^^^^^^^^
  File "datasets/features/features.py", line 1252, in get_nested_type
    return pa.struct(
           ^^^^^^^^^^
  File "pyarrow/types.pxi", line 5406, in pyarrow.lib.struct
  File "pyarrow/types.pxi", line 3890, in pyarrow.lib.field
  File "pyarrow/types.pxi", line 5918, in pyarrow.lib.ensure_type
TypeError: DataType expected, got <class 'list'>
```

The following works
```
f = datasets.Features({'x': datasets.LargeList(datasets.Value(dtype='int32'))})
```

### Expected behavior

according to https://github.com/huggingface/datasets/blob/458f45a22c3cc9aea5f442f6f519333dcfeae9b9/src/datasets/features/features.py#L1765 python list should be a valid type specification for features

### Environment info

- `datasets` version: 3.5.1
- Platform: macOS-15.5-arm64-arm-64bit
- Python version: 3.12.9
- `huggingface_hub` version: 0.30.2
- PyArrow version: 19.0.1
- Pandas version: 2.2.3
- `fsspec` version: 2024.12.0