Closed datenreisender closed 2 years ago
Hi @datenreisender, thanks for opening the issue. I have been following the discussions on deanishe/alfred-workflow for a while now, and so far have not been happy with any of the solutions:
Some other options I have considered:
I am currently leaning towards solution 2, as the workflow will just continue to work for all users after an update. Maybe I will find some time today to at least look into it, to get a better feel for the work to be done.
If alfred-workflow is used only for a small part (automatic update) is it possible to have it degrade gracefully?
Like, if there is only python3 then still have the code running that returns the list of devices and if there is python2 then additionally also run the code for automatic updates? Or would implementing that be too hard?
Hm, good idea, that should work I suppose. 👍
All the custom python code is in alfred_bluetooth_workflow.py. I could copy most of it to a python3 script, without the alfred-workflow dependency. The surrounding script filter should be able to decide if the python2 or python3 script must be invoked.
If the migration to a new alfred-workflow fork is too much work, this could be a good temporary solution.
Turns out, the migration is rather straightforward. :) Should be able to publish a macOS 12.3 / python3 compatible version today.
@datenreisender I have just published version 0.12.0
which is now Python 3 compatible (Python 2 support has been dropped). I tested the workflow on MacOS 12.3 and MacOS 12.2.1, without issues.
Can you please test if it works again as expected? You can force the update via blt workflow:update
.
I wasn't able to use blt workflow:update
because Alfred did not offer me any bluetooth actions for that string (because the script filter for blt
failed. But I was able to install the new version manually and now it works again for me (probably because I have also Python 3 installed). Thanks for the quick help!
Glad to hear that it works! 👍 Yes, python3
is a prerequisite now. According to some comments I saw, Apple should prompt the user automatically to install it via Developer Tools, if it is not yet installed. Couldn't test this though.
macOS 12.3 removed Python 2 which breaks the script filter. So, on a normal macOS 12.3 no Bluetooth devices show up in this workflow anymore. :-( And since homebrew also removed support for Python 2 two years ago it is not so simple to install Python 2 any longer.
There are descriptions how to still install Python 2 but of course Python 2 was sunsetted already two years ago, so it is a bit risky to continue to use it.