ITADN

Support PEP 604 Unions

#1213Closedmartinezlc99 创建于 2026-02-01
M
martinezlc99commented
`scikit-build-core` expects unions to be of type `typing.Union`. This is problematic if a project based on `scikit-build-core` such as [`scikit-build-core-conan`](https://github.com/wu-vincent/scikit-build-core-conan)) uses [PEP 604](https://peps.python.org/pep-0604/) unions which are of type `types.UnionType`. See wu-vincent/scikit-build-core-conan#11 I believe the fix is to simply check for both `typing.Union` or `types.UnionType` whenever checking for a union.
关闭于 2026-02-02 0 条评论