Skip to content

Commit

Permalink
Remove warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbull committed Jul 10, 2023
1 parent 0b9a1b1 commit 41f6fbd
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions cloudpathlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
from warnings import warn

from .anypath import AnyPath
from .azure.azblobclient import AzureBlobClient
Expand Down Expand Up @@ -31,23 +30,3 @@
"S3Client",
"S3Path",
]


class PydanticVersionWarning(UserWarning):
message = (
"This version of cloudpathlib is only compatible with pydantic>=2.0.0. "
"You can ignore this warning if none of your pydantic models are "
"annotated with cloudpathlib types. cloudpathlib=0.15.1 is the last "
"version that supports pydantic<2.0.0."
)


try:
import pydantic
from packaging.version import parse

if parse(pydantic.__version__) < parse("2.0.0"):
warn(PydanticVersionWarning(PydanticVersionWarning.message))

except ImportError:
pass

0 comments on commit 41f6fbd

Please sign in to comment.