Bug 2223524 - python-Levenshtein is not importable with Python 3.12
Summary: python-Levenshtein is not importable with Python 3.12
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-Levenshtein
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Troy Curtis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2220061 2226075
TreeView+ depends on / blocked
 
Reported: 2023-07-18 06:14 UTC by Elliott Sales de Andrade
Modified: 2023-08-08 10:05 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-08-08 10:05:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github maxbachmann Levenshtein issues 9 0 None closed PyUnicode_AS_UNICODE deprecated 2023-07-18 06:14:56 UTC

Internal Links: 2229354

Description Elliott Sales de Andrade 2023-07-18 06:14:40 UTC
PyUnicode_AS_UNICODE was deprecated in Python 3.3 and removed in Python 3.12. The code still compiles, but the compiled library fails to load due to the missing symbol. This has already been fixed upstream in version 0.19.0.

Reproducible: Always

Steps to Reproduce:
1. mock -r fedora-rawhide-x86_64 --install python-Levenshtein
2. mock -r fedora-rawhide-x86_64 --shell
3. python3 -c 'import Levenshtein'
Actual Results:  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.12/site-packages/Levenshtein/__init__.py", line 1, in <module>
    from Levenshtein import _levenshtein
ImportError: /usr/lib64/python3.12/site-packages/Levenshtein/_levenshtein.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_AS_UNICODE


Expected Results:  
No import error.

Comment 1 Troy Curtis 2023-07-23 01:48:41 UTC
I'll see about getting the upgrade pushed out soon. The package naming got changed around a bit upstream, so I need to update some dependencies to be the right thing before I can push the update.

Comment 2 Elliott Sales de Andrade 2023-07-24 04:30:56 UTC
Please try to enable tests as well, or at least an import check. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_running_tests

Comment 3 Troy Curtis 2023-07-31 10:03:03 UTC
Yep, the upgraded spec does contain tests already so this kind of thing should be more quickly noticed. I'm still having some trouble with the "paperwork" dependency and the new name, but should hopefully get to it this coming weekend.

Comment 4 Troy Curtis 2023-08-06 14:20:34 UTC
Updated and successful build in rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2023-770777bdbb


Note You need to log in before you can comment on or make changes to this bug.