ledger
ledger copied to clipboard
Ledger 3.3.2 cannot be built with Python 3.12 support
Python deprecated a long time ago the PyUnicode_AS_UNICODE macro and PyUNICODE type, per https://peps.python.org/pep-0624/ . With Python 3.12, these have been finally removed.
As a result, building on Fedora 39 with Python support is not possible anymore, because Fedora comes with Python 3.12.
I'm not sure what needs to be fixed, but it looks like a simple fix of changing a few macros. Thanks in advance for looking into it.
Thanks for raising this, @Rudd-O. I know I addressed deprecated Python APIs some time ago, but seems I missed a few spots. I'll look into it.
Thank you so much for your prompt attention to the issue! I believe when this is fixed, Ledger's Python support will soon be enabled back in Fedora.
@Rudd-O, while I dig deeper into the issue, could you provide more details, e.g. failing ledger build log or examples of code you consider problematic?
I'm able to compile ledger with Python 3.12.1, yet when doing an import ledger
I get the following error message:
ImportError: dlopen(/Users/afh/Developer/ledger/ledger.so, 0x0002): symbol not found in flat namespace '__PyUnicode_Ready'
@Rudd-O I've put up #2333 for review, could you check whether the changes in said PR, address the build errors for you?
Friendly ping on this, @Rudd-O 🙂