Skip to content

Upgrade marshmallow dependency from 3.x to 4.x in azure-ai-ml package #41715

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions sdk/ml/azure-ai-ml/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

### Bugs Fixed

### Other Changes
- Upgraded `marshmallow` dependency from version 3.x to 4.x (`>=4.0.0,<5.0.0`) for improved performance and compatibility with latest serialization standards.

## 1.27.1 (2025-05-13)

### Bugs Fixed
Expand Down
6 changes: 3 additions & 3 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_schema/core/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from marshmallow import RAISE, fields
from marshmallow.exceptions import ValidationError
from marshmallow.fields import Field, Nested
from marshmallow.utils import FieldInstanceResolutionError, from_iso_datetime, resolve_field_instance
from marshmallow.utils import from_iso_datetime, resolve_field_instance

from ..._utils._arm_id_utils import AMLVersionedArmId, is_ARM_id_for_resource, parse_name_label, parse_name_version
from ..._utils._experimental import _is_warning_cached
Expand Down Expand Up @@ -439,7 +439,7 @@ def __init__(self, union_fields: List[fields.Field], is_strict=False, **kwargs):
self._union_fields = [resolve_field_instance(cls_or_instance) for cls_or_instance in union_fields]
# TODO: make serialization/de-serialization work in the same way as json schema when is_strict is True
self.is_strict = is_strict # S\When True, combine fields with oneOf instead of anyOf at schema generation
except FieldInstanceResolutionError as error:
except ValueError as error:
raise ValueError(
'Elements of "union_fields" must be subclasses or instances of marshmallow.base.FieldABC.'
) from error
Expand Down Expand Up @@ -876,7 +876,7 @@ def __init__(self, experimental_field: fields.Field, **kwargs):
try:
self._experimental_field = resolve_field_instance(experimental_field)
self.required = experimental_field.required
except FieldInstanceResolutionError as error:
except ValueError as error:
raise ValueError(
'"experimental_field" must be subclasses or instances of marshmallow.base.FieldABC.'
) from error
Expand Down
2 changes: 1 addition & 1 deletion sdk/ml/azure-ai-ml/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-e ../../../tools/azure-sdk-tools
../../core/azure-core
../../identity/azure-identity
marshmallow>=3.5,<4.0.0
marshmallow>=4.0.0,<5.0.0
marshmallow-jsonschema==0.10.0
mock
pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion sdk/ml/azure-ai-ml/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"msrest>=0.6.18,<1.0.0",
"azure-core>=1.23.0",
"azure-mgmt-core>=1.3.0",
"marshmallow>=3.5,<4.0.0",
"marshmallow>=4.0.0,<5.0.0",
"jsonschema>=4.0.0,<5.0.0",
"tqdm<5.0.0",
# Used for PR 825138
Expand Down
Loading
Loading