* [ISSUE] Ulauncher broken after python 3.12 upgrade
@ 2023-10-10 5:47 dom0
2023-10-10 8:56 ` icp1994
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dom0 @ 2023-10-10 5:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]
New issue by dom0 on void-packages repository
https://github.com/void-linux/void-packages/issues/46545
Description:
### Is this a new report?
Yes
### System Info
Void 6.5.6_1 x86_64
### Package(s) Affected
ulauncher-5.15.4_1, python3-Levenshtein-0.12.0_9
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
_No response_
### Expected behaviour
ulauncher command should open application popup
### Actual behaviour
Command fails with python undefined symbol error due to **PyUnicode_AS_UNICODE** remotion on python 3.12
Affected package is python3-Levenshtein
`
Traceback (most recent call last):
File "/usr/bin/ulauncher", line 27, in <module>
from ulauncher.main import main
File "/usr/lib/python3.12/site-packages/ulauncher/main.py", line 25, in <module>
from ulauncher.ui.windows.UlauncherWindow import UlauncherWindow
File "/usr/lib/python3.12/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 23, in <module>
from ulauncher.search.Search import Search
File "/usr/lib/python3.12/site-packages/ulauncher/search/Search.py", line 3, in <module>
from ulauncher.api.server.ExtensionSearchMode import ExtensionSearchMode
File "/usr/lib/python3.12/site-packages/ulauncher/api/server/ExtensionSearchMode.py", line 3, in <module>
from ulauncher.api.server.DeferredResultRenderer import DeferredResultRenderer
File "/usr/lib/python3.12/site-packages/ulauncher/api/server/DeferredResultRenderer.py", line 11, in <module>
from ulauncher.api.shared.item.ResultItem import ResultItem
File "/usr/lib/python3.12/site-packages/ulauncher/api/shared/item/ResultItem.py", line 5, in <module>
from ulauncher.utils.text_highlighter import highlight_text
File "/usr/lib/python3.12/site-packages/ulauncher/utils/text_highlighter.py", line 1, in <module>
from ulauncher.utils.fuzzy_search import get_matching_indexes
File "/usr/lib/python3.12/site-packages/ulauncher/utils/fuzzy_search.py", line 4, in <module>
from Levenshtein import distance
File "/usr/lib/python3.12/site-packages/Levenshtein/__init__.py", line 1, in <module>
from Levenshtein import _levenshtein
ImportError: /usr/lib/python3.12/site-packages/Levenshtein/_levenshtein.so: undefined symbol: PyUnicode_AS_UNICODE
`
### Steps to reproduce
1. Open terminal
2. execute command ulauncher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ulauncher broken after python 3.12 upgrade
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
@ 2023-10-10 8:56 ` icp1994
2023-10-11 12:01 ` ahesford
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: icp1994 @ 2023-10-10 8:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
New comment by icp1994 on void-packages repository
https://github.com/void-linux/void-packages/issues/46545#issuecomment-1754756405
Comment:
Probably because the the Levenshtein package is so old. Also looks like that version doesn't even support Cython3. But updating it requires a new build backend package, scikit-buid.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ulauncher broken after python 3.12 upgrade
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
2023-10-10 8:56 ` icp1994
@ 2023-10-11 12:01 ` ahesford
2023-10-11 12:01 ` ahesford
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2023-10-11 12:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/issues/46545#issuecomment-1757540425
Comment:
Unfortunately, `python3-Levenshtein` is kind of a mess. Updating fully is kind of ugly because it depends a new RapidFuzz package, and both of those depend on scikit-build, which 1) I suspect would require some hacking to work with our cross-compilation setup; and 2) the authors of scikit-build already seem to be deprecating it in favor of another variant. I considered patching the version we have to work around the Levenshtein problem, but that is a non-trivial patch that requires some thought about Python object lifetimes in C extensions. Because I don't actually use this software, I don't know anything about Levenshtein and am not sure what the right approach is there. Finally, I considered updating to a newer (but still outdated) Levenshtein, which uses Cython without CMake and scikit-build. The newer version probably avoids our issues, but still depends on RapidFuzz and may or may not require scikit-build anyway. I haven't looked very closely at this option.
For now, a workaround seems to be shadoing the Levenshtein package in a virtual environment:
```sh
python3 -m venv --system-site-packages ${HOME}/ulauncher.venv
${HOME}/ulauncher.venv/bin/pip install -U Levenshtein
```
Whenever you want to run `ulauncher`, run it as
```sh
${HOME}/ulauncher.venv/bin/python3 /usr/bin/ulauncher
```
instead. This will at least bring up the program for me, but I can't test it any more thoroughly. You can, of course, put the venv anywhere you like.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ulauncher broken after python 3.12 upgrade
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
2023-10-10 8:56 ` icp1994
2023-10-11 12:01 ` ahesford
@ 2023-10-11 12:01 ` ahesford
2023-10-11 16:14 ` dom0
2023-11-23 4:44 ` [ISSUE] [CLOSED] " abenson
4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2023-10-11 12:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/issues/46545#issuecomment-1757540425
Comment:
Unfortunately, `python3-Levenshtein` is kind of a mess. Updating fully is ugly because it depends a new RapidFuzz package, and both of those depend on scikit-build, which 1) I suspect would require some hacking to work with our cross-compilation setup; and 2) the authors of scikit-build already seem to be deprecating it in favor of another variant. I considered patching the version we have to work around the Levenshtein problem, but that is a non-trivial patch that requires some thought about Python object lifetimes in C extensions. Because I don't actually use this software, I don't know anything about Levenshtein and am not sure what the right approach is there. Finally, I considered updating to a newer (but still outdated) Levenshtein, which uses Cython without CMake and scikit-build. The newer version probably avoids our issues, but still depends on RapidFuzz and may or may not require scikit-build anyway. I haven't looked very closely at this option.
For now, a workaround seems to be shadoing the Levenshtein package in a virtual environment:
```sh
python3 -m venv --system-site-packages ${HOME}/ulauncher.venv
${HOME}/ulauncher.venv/bin/pip install -U Levenshtein
```
Whenever you want to run `ulauncher`, run it as
```sh
${HOME}/ulauncher.venv/bin/python3 /usr/bin/ulauncher
```
instead. This will at least bring up the program for me, but I can't test it any more thoroughly. You can, of course, put the venv anywhere you like.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ulauncher broken after python 3.12 upgrade
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
` (2 preceding siblings ...)
2023-10-11 12:01 ` ahesford
@ 2023-10-11 16:14 ` dom0
2023-11-23 4:44 ` [ISSUE] [CLOSED] " abenson
4 siblings, 0 replies; 6+ messages in thread
From: dom0 @ 2023-10-11 16:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2034 bytes --]
New comment by dom0 on void-packages repository
https://github.com/void-linux/void-packages/issues/46545#issuecomment-1758042016
Comment:
> Unfortunately, `python3-Levenshtein` is kind of a mess. Updating fully is ugly because it depends a new RapidFuzz package, and both of those depend on scikit-build, which 1) I suspect would require some hacking to work with our cross-compilation setup; and 2) the authors of scikit-build already seem to be deprecating it in favor of another variant. I considered patching the version we have to work around the Levenshtein problem, but that is a non-trivial patch that requires some thought about Python object lifetimes in C extensions. Because I don't actually use this software, I don't know anything about Levenshtein and am not sure what the right approach is there. Finally, I considered updating to a newer (but still outdated) Levenshtein, which uses Cython without CMake and scikit-build. The newer version probably avoids our issues, but still depends on RapidFuzz and may or may not require scikit-build anyway. I haven't looked very closely at this option.
>
> For now, a workaround seems to be shadoing the Levenshtein package in a virtual environment:
>
> ```shell
> python3 -m venv --system-site-packages ${HOME}/ulauncher.venv
> ${HOME}/ulauncher.venv/bin/pip install -U Levenshtein
> ```
>
> Whenever you want to run `ulauncher`, run it as
>
> ```shell
> ${HOME}/ulauncher.venv/bin/python3 /usr/bin/ulauncher
> ```
>
> instead. This will at least bring up the program for me, but I can't test it any more thoroughly. You can, of course, put the venv anywhere you like.
Thanks for the feedback and help. I tried the same workarounds before opening issue and in the end I opted to switch to wofi. "It's a Python Thing :)"
For those who are looking for an alternative, below are the wofi options that I am using to have similar behavior (not feature complete) to ulauncher:
`wofi -n -i --show drun --allow-images --allow-markup --matching=fuzzy`
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ISSUE] [CLOSED] Ulauncher broken after python 3.12 upgrade
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
` (3 preceding siblings ...)
2023-10-11 16:14 ` dom0
@ 2023-11-23 4:44 ` abenson
4 siblings, 0 replies; 6+ messages in thread
From: abenson @ 2023-11-23 4:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]
Closed issue by dom0 on void-packages repository
https://github.com/void-linux/void-packages/issues/46545
Description:
### Is this a new report?
Yes
### System Info
Void 6.5.6_1 x86_64
### Package(s) Affected
ulauncher-5.15.4_1, python3-Levenshtein-0.12.0_9
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
_No response_
### Expected behaviour
ulauncher command should open application popup
### Actual behaviour
Command fails with python undefined symbol error due to **PyUnicode_AS_UNICODE** remotion on python 3.12
Affected package is python3-Levenshtein
```py
Traceback (most recent call last):
File "/usr/bin/ulauncher", line 27, in <module>
from ulauncher.main import main
File "/usr/lib/python3.12/site-packages/ulauncher/main.py", line 25, in <module>
from ulauncher.ui.windows.UlauncherWindow import UlauncherWindow
File "/usr/lib/python3.12/site-packages/ulauncher/ui/windows/UlauncherWindow.py", line 23, in <module>
from ulauncher.search.Search import Search
File "/usr/lib/python3.12/site-packages/ulauncher/search/Search.py", line 3, in <module>
from ulauncher.api.server.ExtensionSearchMode import ExtensionSearchMode
File "/usr/lib/python3.12/site-packages/ulauncher/api/server/ExtensionSearchMode.py", line 3, in <module>
from ulauncher.api.server.DeferredResultRenderer import DeferredResultRenderer
File "/usr/lib/python3.12/site-packages/ulauncher/api/server/DeferredResultRenderer.py", line 11, in <module>
from ulauncher.api.shared.item.ResultItem import ResultItem
File "/usr/lib/python3.12/site-packages/ulauncher/api/shared/item/ResultItem.py", line 5, in <module>
from ulauncher.utils.text_highlighter import highlight_text
File "/usr/lib/python3.12/site-packages/ulauncher/utils/text_highlighter.py", line 1, in <module>
from ulauncher.utils.fuzzy_search import get_matching_indexes
File "/usr/lib/python3.12/site-packages/ulauncher/utils/fuzzy_search.py", line 4, in <module>
from Levenshtein import distance
File "/usr/lib/python3.12/site-packages/Levenshtein/__init__.py", line 1, in <module>
from Levenshtein import _levenshtein
ImportError: /usr/lib/python3.12/site-packages/Levenshtein/_levenshtein.so: undefined symbol: PyUnicode_AS_UNICODE
```
### Steps to reproduce
1. Open terminal
2. execute command ulauncher
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-23 4:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 5:47 [ISSUE] Ulauncher broken after python 3.12 upgrade dom0
2023-10-10 8:56 ` icp1994
2023-10-11 12:01 ` ahesford
2023-10-11 12:01 ` ahesford
2023-10-11 16:14 ` dom0
2023-11-23 4:44 ` [ISSUE] [CLOSED] " abenson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).