Skip to content
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "py-pure-client"
version = "1.94.0"
version = "1.94.1"
description = "Everpure Python clients for FlashArray, FlashBlade, and Pure1 APIs"
authors = [
{ name = "Everpure", email = "openconnect@everpuredata.com" }
Expand Down
2 changes: 1 addition & 1 deletion pypureclient/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__name__ = 'py-pure-client'
__version__ = '1.94.0'
__version__ = '1.94.1'
__default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__)
3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_38/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_39/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_40/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_41/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_42/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_43/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_44/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_45/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_46/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_47/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_48/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_49/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_50/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_51/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_52/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_53/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_54/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_55/models/__init__.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pypureclient/flasharray/FA_2_56/models/__init__.py

Large diffs are not rendered by default.

45 changes: 22 additions & 23 deletions pypureclient/flasharray/FA_2_57/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from pypureclient.flasharray._common.models.test_result_with_resource_with_id_post_response_v_2_50 import TestResultWithResourceWithIdPostResponse
from pypureclient.flasharray._common.models.volume_batch_post_v_2_50 import VolumeBatchPost
from pypureclient.flasharray._common.models.volume_get_response_v_2_55 import VolumeGetResponse
from pypureclient.flasharray._common.models.volume_patch_v_2_57 import VolumePatch
from pypureclient.flasharray._common.models.volume_patch_v_2_55 import VolumePatch
from pypureclient.flasharray._common.models.volume_post_v_2_55 import VolumePost
from pypureclient.flasharray._common.models.volume_qos_get_response_v_2_50 import VolumeQosGetResponse
from pypureclient.flasharray._common.models.volume_response_v_2_55 import VolumeResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,48 @@ class ContainerQosBandwidthLimitPatch(BaseModel):
class Config:
validate_assignment = True

@classmethod
def validate(cls, value):
"""Backwards compatibility: accept a raw value and wrap it as actual_instance.

Pydantic calls this hook whenever ContainerQosBandwidthLimitPatch is used as a field type
on another model (and again on assignment, via Config.validate_assignment).
Older client code assigned the raw oneOf member value instead of the
wrapper, e.g.:

model.field = "raw-string-value" # raw primitive member
model.field = MemberModel(name="x") # raw member model instance

instead of the strict form:

model.field = ContainerQosBandwidthLimitPatch("raw-string-value")

This hook coerces all of those into a ContainerQosBandwidthLimitPatch so the
`actual_instance` oneOf validator still runs against the wrapped value.
"""
# Already a ContainerQosBandwidthLimitPatch: pass through untouched.
if isinstance(value, cls):
return value
# A different oneOf wrapper holding a compatible payload — a sibling
# wrapper class, or the same wrapper from another API-version module.
# Stock pydantic v1 accepts these via its `cls(**dict(value))` fallback,
# so clients released without this hook allow them; unwrap and re-wrap
# to preserve that (the payload still runs the oneOf validator).
# NOTE: this is only safe while coerce targets have primitive-only
# oneOf members; a member that is itself a wrapper model would be
# incorrectly unwrapped here.
if isinstance(value, BaseModel) and hasattr(value, "actual_instance"):
return cls(value.actual_instance)
# A serialized wrapper dict (wrapper.dict() -> {"actual_instance": ...}):
# rebuild the wrapper from its fields. Any other dict falls through to
# cls(value) and fails the oneOf validation loudly — stock pydantic
# would instead build a wrapper with actual_instance=None and silently
# serialize the field as null.
if isinstance(value, dict) and "actual_instance" in value:
return cls(**value)
# Anything else is a raw member value (str, int, member model instance, ...):
# wrap it so the oneOf validator can match it against the allowed schemas.
return cls(value)


def __init__(self, *args, **kwargs) -> None:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,48 @@ class ContainerQosCeilingsBandwidthLimitPatch(BaseModel):
class Config:
validate_assignment = True

@classmethod
def validate(cls, value):
"""Backwards compatibility: accept a raw value and wrap it as actual_instance.

Pydantic calls this hook whenever ContainerQosCeilingsBandwidthLimitPatch is used as a field type
on another model (and again on assignment, via Config.validate_assignment).
Older client code assigned the raw oneOf member value instead of the
wrapper, e.g.:

model.field = "raw-string-value" # raw primitive member
model.field = MemberModel(name="x") # raw member model instance

instead of the strict form:

model.field = ContainerQosCeilingsBandwidthLimitPatch("raw-string-value")

This hook coerces all of those into a ContainerQosCeilingsBandwidthLimitPatch so the
`actual_instance` oneOf validator still runs against the wrapped value.
"""
# Already a ContainerQosCeilingsBandwidthLimitPatch: pass through untouched.
if isinstance(value, cls):
return value
# A different oneOf wrapper holding a compatible payload — a sibling
# wrapper class, or the same wrapper from another API-version module.
# Stock pydantic v1 accepts these via its `cls(**dict(value))` fallback,
# so clients released without this hook allow them; unwrap and re-wrap
# to preserve that (the payload still runs the oneOf validator).
# NOTE: this is only safe while coerce targets have primitive-only
# oneOf members; a member that is itself a wrapper model would be
# incorrectly unwrapped here.
if isinstance(value, BaseModel) and hasattr(value, "actual_instance"):
return cls(value.actual_instance)
# A serialized wrapper dict (wrapper.dict() -> {"actual_instance": ...}):
# rebuild the wrapper from its fields. Any other dict falls through to
# cls(value) and fails the oneOf validation loudly — stock pydantic
# would instead build a wrapper with actual_instance=None and silently
# serialize the field as null.
if isinstance(value, dict) and "actual_instance" in value:
return cls(**value)
# Anything else is a raw member value (str, int, member model instance, ...):
# wrap it so the oneOf validator can match it against the allowed schemas.
return cls(value)


def __init__(self, *args, **kwargs) -> None:
Expand Down

This file was deleted.

Loading