Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ledger 3.3.2 cannot be built with Python 3.12 support #2332

Open
Rudd-O opened this issue Feb 23, 2024 · 5 comments · May be fixed by #2333
Open

Ledger 3.3.2 cannot be built with Python 3.12 support #2332

Rudd-O opened this issue Feb 23, 2024 · 5 comments · May be fixed by #2333
Assignees
Labels
build Build problems python Related to the Python API

Comments

@Rudd-O
Copy link
Contributor

Rudd-O commented Feb 23, 2024

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.

@afh afh self-assigned this Feb 23, 2024
@afh afh added python Related to the Python API build Build problems labels Feb 23, 2024
@afh
Copy link
Member

afh commented Feb 23, 2024

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.

@Rudd-O
Copy link
Contributor Author

Rudd-O commented Feb 24, 2024

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.

@afh
Copy link
Member

afh commented Feb 24, 2024

@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'

@afh afh linked a pull request Feb 25, 2024 that will close this issue
@afh
Copy link
Member

afh commented Feb 25, 2024

@Rudd-O I've put up #2333 for review, could you check whether the changes in said PR, address the build errors for you?

@afh
Copy link
Member

afh commented Mar 5, 2024

Friendly ping on this, @Rudd-O 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build problems python Related to the Python API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants