This is an archive of the discontinued LLVM Phabricator instance.

[bindings] Remove LLVM python bindings
ClosedPublic

Authored by wanders on May 15 2023, 11:37 PM.

Details

Summary

The LLVM python bindings are defunct.

They have not seen any substantial active development since 2014.

The version number, which is used to find the libLLVM-NN.so library, has
not been updated since LLVM 10.0 (2019) (and even then they were
probably mostly broken)

After fixing the version number to be able to run them at all, a large
number of tests in the test suite fails.

Already in 2017 the removal was discussed:
https://discourse.llvm.org/t/is-anyone-using-still-using-the-python-bindings/46063
https://lists.llvm.org/pipermail/llvm-dev/2017-August/116857.html

There exist external projects providing python bindings for LLVM, e.g:
https://github.com/numba/llvmlite

Diff Detail

Event Timeline

wanders created this revision.May 15 2023, 11:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 11:37 PM
wanders requested review of this revision.May 15 2023, 11:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 11:37 PM
nikic accepted this revision.May 16 2023, 12:32 AM
nikic added a subscriber: nikic.

LGTM. It may be helpful to include a pointer to alternative out-of-tree Python bindings in the patch description -- would https://github.com/numba/llvmlite be what people usually use?

This revision is now accepted and ready to land.May 16 2023, 12:32 AM

LGTM. It may be helpful to include a pointer to alternative out-of-tree Python bindings in the patch description -- would https://github.com/numba/llvmlite be what people usually use?

I havn't followed python bindings very closely for many years now, but I think llvmlite are the main ones. I did consider mentioning them in release notes, but afaicu they only support up to llvm14 at the the moment, so felt a bit awkward to have them in releasenotes for llvm17. But can definitely mention it in commit message.

wanders edited the summary of this revision. (Show Details)May 16 2023, 6:03 AM
daltenty accepted this revision.May 16 2023, 8:03 AM

LGTM, this has actually been broken even longer than LLVM 10 most likely, we just bumped the version number in https://reviews.llvm.org/D69436 to try to get things to work at all, but even then the test were very broken.

wanders updated this revision to Diff 523077.May 17 2023, 9:11 AM
wanders edited the summary of this revision. (Show Details)

Just uploaded new diff as these files were reformatted as part of big python reformatting. To make sure whats in phabricator matches what lands.

This revision was automatically updated to reflect the committed changes.
llvm/bindings/python/llvm/tests/test_disassembler.py