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] filter RemovedInMarshmallow4 warnings #6602

Merged
merged 10 commits into from Dec 19, 2022
8 changes: 7 additions & 1 deletion great_expectations/data_context/types/base.py
Expand Up @@ -7,6 +7,7 @@
import json
import logging
import uuid
import warnings
from typing import TYPE_CHECKING, Any, Dict, List, MutableMapping, Optional, Set, Union
from uuid import UUID

Expand All @@ -21,6 +22,7 @@
validates_schema,
)
from marshmallow.validate import OneOf
from marshmallow.warnings import RemovedInMarshmallow4Warning
from ruamel.yaml import YAML
from ruamel.yaml.comments import CommentedMap
from ruamel.yaml.compat import StringIO
Expand Down Expand Up @@ -59,6 +61,10 @@
)


# NOTE 121822: (kilo59) likely won't moving to marshmallow v4 so we don't care about this
warnings.simplefilter(action="ignore", category=RemovedInMarshmallow4Warning)


def object_to_yaml_str(obj):
output_str: str
with StringIO() as string_stream:
Expand Down Expand Up @@ -976,7 +982,7 @@ class Meta:
module_name = fields.String(
required=False,
allow_none=True,
load_default="great_expectations.execution_engine",
missing="great_expectations.execution_engine",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we forgot to revert this use of missing as part of #6271

)
connection_string = fields.String(required=False, allow_none=True)
credentials = fields.Raw(required=False, allow_none=True)
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Expand Up @@ -189,6 +189,8 @@ filterwarnings = [
"ignore:Using or importing the ABCs:DeprecationWarning:moto.cloudformation.parsing",
# This deprecation warning comes from getsentry/responses, a mocking utility for requests. It is a dependency in moto.
"ignore:stream argument is deprecated. Use stream parameter in request directly:DeprecationWarning",
# We likely won't be updating to `marhsmallow` 4, these errors should be filtered out
"error::marshmallow.warnings.RemovedInMarshmallow4Warning"
Comment on lines +192 to +193
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will cause the tests to error if this warning is encountered.

]
junit_family="xunit2"
markers = [
Expand Down