[Python] Adopt new features and bugfixes from Cython 3.1
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
https://github.com/apache/arrow/pull/47396 will bump minimum required Cython version to 3.1 and as a follow-up we should evaluate and adopt newly available features and bugfixes in PyArrow's Cython codebase. See https://cython.readthedocs.io/en/latest/src/changes.html#beta-1-2025-04-03
Some are already mentioned in the issue https://github.com/apache/arrow/issues/47370:
- The cython command has a new option `--cache` to cache generated files. ([#6091](https://github.com/cython/cython/issues/6091))
- `std::span` declarations were added to libcpp. ([#6539](https://github.com/cython/cython/issues/6539))
- `std::string_view` declarations were added to libcpp. ([#6651](https://github.com/cython/cython/issues/6651))
### Component(s)
Python
Contributor guide
Assessment
This issue has not been assessed yet.