python cryptography upgrade
I needed a more up to date version of cryptography than the one installed in a-shell (3.4.8). I did pip install --upgrade cryptography which installed 42.0.8 (cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl)
But importing it fails since it tries to dlopen some modules - I guess cryptography upgrades need to be built into a-shell?
from cryptography.exceptions import InvalidTag, InvalidSignature, InvalidKey
File "/var/mobile/Containers/Data/Application/AA0C3C03-0398-47DC-872D-D3010AF622BF/Library/lib/python3.11/site-packages/cryptography/exceptions.py", line 9, in <module>
from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: dlopen(/private/var/containers/Bundle/Application/E1ED0679-433D-4384-8027-5DB8DA992CD1/a-Shell.app/Frameworks/python3_ios-cryptography.hazmat.bindings._rust.framework/python3_ios-cryptography.hazmat.bindings._rust, 0x0002)
: tried: '/private/var/containers/Bundle/Application/E1ED0679-433D-4384-8027-5DB8DA992CD1/a-Shell.app/Frameworks/python3_ios-cryptography.hazmat.bindings._rust.framework/python3_ios-crypto
The AppStore rules says that the App cannot install binaries, and dynamic libraries are binaries.
On top of that, there are also technical restrictions: dynamic libraries can only be opened by dlopen if they are both signed with the developer certificate and placed in a specific directory that can only be written by Apple, when the app is installed.
So a-Shell (and all the other Python apps) can only install pure Python packages. cryptography has many dynamic libraries, so it cannot be installed or updated by the user. You'll have to remove your version of cryptography in order to access the one that is installed with the app.