[libcxx-commits] [clang] [libcxx] [lldb] [llvm] [polly] [python] remove Python 3.9 specific typing annotations (PR #156868)
Jannick Kremer via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 4 05:51:07 PDT 2025
https://github.com/DeinAlptraum requested changes to this pull request.
Re: Python bindings (`clang/bindings/python/clang/cindex.py`)
We `from __future__ import annotations` at the start of `cindex.py` which allows using the PEP 585 features (among others).
We have a CI job that runs the libclang-python tests against 3.8 and 3.13, see here: https://github.com/llvm/llvm-project/actions/workflows/libclang-python-tests.yml
I have also tested this locally, and I can successfully run both the cindex tests and the mypy type checker on it with Python 3.8. (removing the future import produces the problems your PR would have resolved)
Besides, I see no reference to the libclang python tests in the build log you've linked.
Sidenote regarding the other files (which I'm not maintainer for, so cannot say much about them): consider doing the same thing there, to similarly import from future, instead of changing all generic collection types.
https://github.com/llvm/llvm-project/pull/156868
More information about the libcxx-commits
mailing list