Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] remove deprecated usage of pydantic Extra #8896

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import uuid
from typing import TYPE_CHECKING, Any, Dict, TypeVar

from great_expectations.compatibility.pydantic import BaseModel, Extra
from great_expectations.compatibility.pydantic import BaseModel
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.http import create_session
from great_expectations.experimental.metric_repository.data_store import DataStore
Expand All @@ -25,7 +25,7 @@ class PayloadData(BaseModel):
attributes: Dict[str, Any]

class Config:
extra = Extra.forbid
extra = "forbid"


def orjson_dumps(v, *, default):
Expand All @@ -49,7 +49,7 @@ class Payload(BaseModel):
data: PayloadData

class Config:
extra = Extra.forbid
extra = "forbid"
json_dumps = orjson_dumps
json_loads = orjson_loads

Expand Down
3 changes: 1 addition & 2 deletions great_expectations/experimental/metric_repository/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
Union,
)

from great_expectations.compatibility import pydantic
from great_expectations.compatibility.pydantic import BaseModel, Field
from great_expectations.compatibility.typing_extensions import override

Expand All @@ -28,7 +27,7 @@ class MetricRepositoryBaseModel(BaseModel):
"""Base class for all MetricRepository related models."""

class Config:
extra = pydantic.Extra.forbid
extra = "forbid"


class MetricException(MetricRepositoryBaseModel):
Expand Down
Loading