-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charms can import packages not installed in venv
#1077
Comments
This was referenced Jul 13, 2023
An update on this: This behaviour is not going to change in the |
This was referenced Jan 10, 2025
This was referenced Jan 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version:
2.2.0
Steps to reproduce
git clone https://github.com/carlcsaposs-canonical/charm-bug-report.git
cd charm-bug-report/
git checkout origin/venv-boto3
charmcraft pack
juju deploy ./*.charm
on LXDjuju debug-hooks charm-bug-report/0
PYTHONVERBOSE=1 ./dispatch
from urllib3.contrib.pyopenssl import orig_util_SSLContext
Expected behavior
Charms should not be able to import packages from outside
venv
Actual behavior
Charms can import packages from
/usr/lib/python3/dist-packages/
Snippet of output from last command:
Impact
One of mysql-operator's dependencies (
boto3
) normally usesurllib3
's SSLContext, but it will override that withpyOpenSSL
's SSLContext if it's available to import: https://github.com/boto/botocore/blob/fc30d05149c248d5e601bea37be422e97c5ad7ee/botocore/httpsession.py#L40-L50pyOpenSSL
is deprecated for this cryptography usage and we do not want to use it in our charmThe text was updated successfully, but these errors were encountered: