Steps to reproduce
- Install dstack with
uv: uv pip install 'dstack[all]==0.19.9'
dstack server raises and error: AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. Did you mean: 'X509_V_FLAG_EXPLICIT_POLICY'?
This is specific only to uv dependency resolution. Installing dstack with pip works fine.
Actual behaviour
This caused by the old pyopenssl being installed:
├── oci v2.152.0 (extra: all)
│ ├── certifi v2025.4.26
│ ├── circuitbreaker v2.1.3
│ ├── cryptography v45.0.2 (*)
│ ├── pyopenssl v22.0.0
│ │ └── cryptography v45.0.2 (*)
│ ├── python-dateutil v2.9.0.post0 (*)
│ └── pytz v2025.2
The underlying cause seems to be that oci puts an upper limit "pyOpenSSL>=17.5.0,<25.0.0" (https://github.com/oracle/oci-python-sdk/blob/fbefeef0d78a10b38976ddc1c0ea067e0508b0e1/pyproject.toml#L32C5-L32C33). The new release cryptography v45.0.2 is not compatible with the latest pyopenssl v24.3.0 supported by oci. So uv falls back to old pyopenssl v22.0.0, which fails with an exception.
Expected behaviour
No response
dstack version
0.19.9 (and master)
Server logs
Traceback (most recent call last):
File "/Users/r4victor/Projects/dstack/venvt/bin/dstack", line 4, in <module>
from dstack._internal.cli.main import main
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/cli/main.py", line 7, in <module>
from dstack._internal.cli.commands.apply import ApplyCommand
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/cli/commands/__init__.py", line 8, in <module>
from dstack._internal.cli.services.completion import ProjectNameCompleter
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/cli/services/completion.py", line 11, in <module>
from dstack.api import Client
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/api/__init__.py", line 23, in <module>
from dstack.api._public import BackendCollection, Client, RepoCollection, RunCollection
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/api/_public/__init__.py", line 3, in <module>
import dstack._internal.core.services.api_client as api_client_service
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/core/services/api_client.py", line 5, in <module>
from dstack.api.server import APIClient
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/api/server/__init__.py", line 16, in <module>
from dstack.api.server._backends import BackendsAPIClient
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/api/server/_backends.py", line 5, in <module>
from dstack._internal.core.backends.models import (
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/core/backends/__init__.py", line 11, in <module>
from dstack._internal.core.backends.configurators import list_available_configurator_classes
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/core/backends/configurators.py", line 10, in <module>
from dstack._internal.core.backends.aws.configurator import AWSConfigurator
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/dstack/_internal/core/backends/aws/configurator.py", line 5, in <module>
from boto3.session import Session
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/boto3/__init__.py", line 17, in <module>
from boto3.session import Session
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/boto3/session.py", line 17, in <module>
import botocore.session
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/session.py", line 26, in <module>
import botocore.client
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/client.py", line 15, in <module>
from botocore import waiter, xform_name
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/waiter.py", line 20, in <module>
from botocore.docs.docstring import WaiterDocstring
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/docs/__init__.py", line 15, in <module>
from botocore.docs.service import ServiceDocumenter
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/docs/service.py", line 14, in <module>
from botocore.docs.client import (
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/docs/client.py", line 18, in <module>
from botocore.docs.example import ResponseExampleDocumenter
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/docs/example.py", line 13, in <module>
from botocore.docs.shape import ShapeDocumenter
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/docs/shape.py", line 19, in <module>
from botocore.utils import is_json_value_header
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/utils.py", line 39, in <module>
import botocore.httpsession
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/botocore/httpsession.py", line 45, in <module>
from urllib3.contrib.pyopenssl import (
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/urllib3/contrib/pyopenssl.py", line 43, in <module>
import OpenSSL.SSL # type: ignore[import-untyped]
^^^^^^^^^^^^^^^^^^
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/OpenSSL/crypto.py", line 1570, in <module>
class X509StoreFlags(object):
File "/Users/r4victor/Projects/dstack/venvt/lib/python3.12/site-packages/OpenSSL/crypto.py", line 1589, in X509StoreFlags
NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. Did you mean: 'X509_V_FLAG_EXPLICIT_POLICY'?
Additional information
No response
Steps to reproduce
uv:uv pip install 'dstack[all]==0.19.9'dstack serverraises and error:AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. Did you mean: 'X509_V_FLAG_EXPLICIT_POLICY'?This is specific only to
uvdependency resolution. Installingdstackwithpipworks fine.Actual behaviour
This caused by the old pyopenssl being installed:
The underlying cause seems to be that oci puts an upper limit "pyOpenSSL>=17.5.0,<25.0.0" (https://github.com/oracle/oci-python-sdk/blob/fbefeef0d78a10b38976ddc1c0ea067e0508b0e1/pyproject.toml#L32C5-L32C33). The new release cryptography v45.0.2 is not compatible with the latest pyopenssl v24.3.0 supported by oci. So
uvfalls back to oldpyopenssl v22.0.0, which fails with an exception.Expected behaviour
No response
dstack version
0.19.9 (and master)
Server logs
Additional information
No response