You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the shim's been installed, but the system library is missing, then check_system_sitepackages currently raises Exception.
Since check_system_sitepackages() will only be called as a result of import selinux it would make more sense for this to raise an ImportError rather than the more generic Exception.
This can currently cause problems with things like a Python 3.9 virtual environment on RHEL8 where only the 3.6 bindings are shipped. If something pulls selinux into the venv as a dependency suddenly the usual practice of using except ImportError to catch the missing bindings won't work.
The text was updated successfully, but these errors were encountered:
If the shim's been installed, but the system library is missing, then
check_system_sitepackages
currently raisesException
.Since
check_system_sitepackages()
will only be called as a result ofimport selinux
it would make more sense for this to raise anImportError
rather than the more genericException
.This can currently cause problems with things like a Python 3.9 virtual environment on RHEL8 where only the 3.6 bindings are shipped. If something pulls
selinux
into the venv as a dependency suddenly the usual practice of usingexcept ImportError
to catch the missing bindings won't work.The text was updated successfully, but these errors were encountered: