diff --git a/covalent/executor/qbase.py b/covalent/executor/qbase.py index ca04a1c53..9613f7835 100644 --- a/covalent/executor/qbase.py +++ b/covalent/executor/qbase.py @@ -25,7 +25,7 @@ import orjson import pennylane as qml from mpire import WorkerPool -from pydantic import BaseModel, Extra, Field, root_validator # pylint: disable=no-name-in-module +from pydantic import BaseModel, Field, root_validator # pylint: disable=no-name-in-module from .._shared_files.qinfo import QElectronInfo, QNodeSpecs @@ -110,7 +110,7 @@ def override_shots(self) -> Union[int, None]: return self.shots class Config: - extra = Extra.allow + extra = "allow" @root_validator(pre=True) def set_name(cls, values): @@ -138,7 +138,7 @@ def run_circuit(self, qscript, device, result_obj: "QCResult") -> "QCResult": return result_obj def dict(self, *args, **kwargs): - dict_ = super().dict(*args, **kwargs) + dict_ = super().model_dump(*args, **kwargs) # Ensure shots is a hashable value. shots = dict_.get("shots") diff --git a/requirements-client.txt b/requirements-client.txt index 2ad354644..9f7e806aa 100644 --- a/requirements-client.txt +++ b/requirements-client.txt @@ -1,6 +1,6 @@ aiofiles>=0.8.0 aiohttp>=3.8.1 -cloudpickle>=2.0.0 +cloudpickle>=2.0.0,<3 dask[distributed]>=2022.6.0 filelock>=3.12.2 furl>=2.1.3 diff --git a/requirements.txt b/requirements.txt index 0e098d5ae..1a3cf5f3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ aiofiles>=0.8.0 aiohttp>=3.8.1 alembic>=1.8.0 click>=8.1.3 -cloudpickle>=2.0.0 +cloudpickle>=2.0.0,<3 dask[distributed]>=2022.6.0 fastapi>=0.93.0 filelock>=3.12.2