Skip to content

Commit bb893be

Browse files
committed
Handle false-postive pydantic 2.6.0 warning
1 parent 376af7b commit bb893be

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libensemble/specs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
from pathlib import Path
33
from typing import Any, Callable, List, Optional, Tuple, Union
44

5+
import pydantic
56
from pydantic import BaseModel, Field
7+
import warnings
68

79
from libensemble.alloc_funcs.give_sim_work_first import give_sim_work_first
810
from libensemble.resources.platforms import Platform
911

1012
__all__ = ["SimSpecs", "GenSpecs", "AllocSpecs", "ExitCriteria", "LibeSpecs", "_EnsembleSpecs"]
1113

14+
# Deal with false warning https://github.com/pydantic/pydantic/issues/8677
15+
if pydantic.__version__ == "2.6.0":
16+
warnings.filterwarnings("ignore", message="Pydantic serializer warnings:")
17+
1218

1319
"""
1420
Pydantic-version agnostic

0 commit comments

Comments
 (0)