From 8157ee78254eeced282a08f6fa43330eae074db5 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 18 Mar 2026 17:03:02 +0200 Subject: [PATCH] Remove OpenSSL dependency The only place where `OpenSSL` is used is via an indirect dependency from `urllib3.contrib.pyopenssl`, which itself is only used when the Python built-in SSL module doesn't support SNI (Server Name Indication). That module itself is only imported via the vendored `requests` init, _iff_ `ssl.HAS_SNI` is `False`, or as an optional import in vendored `requests.help` (which is never imported by code; in the original `requests` library, it's supposed to be run as a command-line module, but it's unlikely `python -m oci._vendor.requests.help` is a real use case). The `urllib3.contrib.pyopenssl` module's docstring says: > This module was relevant before the standard library ``ssl`` > module supported SNI, but now that we've dropped support for > Python 2.7 all relevant Python versions support SNI so > **this module is no longer recommended**. This is related to https://github.com/oracle/oci-python-sdk/pull/802; right now there are upper version pins on `pyOpenSSL`, which prevent downstream users from upgrading to e.g. non-vulnerable versions of that library downstream. Signed-off-by: Aarni Koskela --- pyproject.toml | 3 +-- requirements.txt | 3 +-- setup.py | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 05d81e88b..d11d93630 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,6 @@ dependencies = [ "certifi", "configparser==4.0.2 ; python_version < '3'", "cryptography>=3.2.1,<50.0.0", - "pyOpenSSL>=17.5.0,<27.0.0", "python-dateutil>=2.5.3,<3.0.0", "pytz>=2016.10", "circuitbreaker>=1.3.1,<2.0.0; python_version <= '3.6'", @@ -94,4 +93,4 @@ exclude = [ "src/oci/waas/models/waf_log.py", "src/oci/functions/functions_invoke_client.py" ] -max_line_length = 99 \ No newline at end of file +max_line_length = 99 diff --git a/requirements.txt b/requirements.txt index 9c0ac4bb3..6d648ef2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ cryptography==42.0.8; python_full_version == '3.9.0' or python_full_version == ' cryptography>=3.2.1,<50.0.0; python_full_version != '3.9.0' and python_full_version != '3.9.1' flake8>=3.6.0,<6 mock==2.0.0 -pyOpenSSL>=17.5.0,<27.0.0 pytest==4.6.10; python_version <= '3.9' pytest==7.1.2; python_version >= '3.10' pytest-cov==2.6.1 @@ -32,4 +31,4 @@ PyJWT>=2.12.0; python_version >= '3.9' Jinja2<3.0.0; python_version == '3.6' Jinja2>=3.1.5,<4.0.0; python_version >= '3.7' crc32c==2.5; python_version == '3.6' -crc32c==2.7.1; python_version >= '3.7' \ No newline at end of file +crc32c==2.7.1; python_version >= '3.7' diff --git a/setup.py b/setup.py index aef85adbf..a010f5d34 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,6 @@ def open_relative(*path): "certifi", "configparser==4.0.2 ; python_version < '3'", "cryptography>=3.2.1,<50.0.0", - "pyOpenSSL>=17.5.0,<27.0.0", "python-dateutil>=2.5.3,<3.0.0", "pytz>=2016.10", "circuitbreaker>=1.3.1,<2.0.0; python_version <= '3.6'",