From 5197054f96d1d035cda28f730f92fe2596b8ebe1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 15 Apr 2025 10:38:01 +0000 Subject: [PATCH] CodeGen from PR 33581 in Azure/azure-rest-api-specs Merge efc5c09ac76420e669ba217b83c81ce263ad5453 into cb5ef7fc4cb443bd5f6b21d02cbce41051beb6ae --- sdk/edgezones/azure-mgmt-edgezones/README.md | 4 +-- sdk/edgezones/azure-mgmt-edgezones/_meta.json | 4 +-- .../azure/mgmt/edgezones/_model_base.py | 27 +++++++++---------- .../azure/mgmt/edgezones/_patch.py | 9 ++++--- .../azure/mgmt/edgezones/_serialization.py | 26 +++--------------- .../azure/mgmt/edgezones/_version.py | 2 +- .../azure/mgmt/edgezones/aio/_patch.py | 9 ++++--- .../edgezones/aio/operations/_operations.py | 6 +---- .../mgmt/edgezones/aio/operations/_patch.py | 9 ++++--- .../azure/mgmt/edgezones/models/_patch.py | 9 ++++--- .../mgmt/edgezones/operations/_operations.py | 6 +---- .../azure/mgmt/edgezones/operations/_patch.py | 9 ++++--- sdk/edgezones/azure-mgmt-edgezones/setup.py | 3 +-- .../azure-mgmt-edgezones/tsp-location.yaml | 2 +- 14 files changed, 50 insertions(+), 75 deletions(-) diff --git a/sdk/edgezones/azure-mgmt-edgezones/README.md b/sdk/edgezones/azure-mgmt-edgezones/README.md index dc37925b6891..3042681ff70a 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/README.md +++ b/sdk/edgezones/azure-mgmt-edgezones/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Edgezones Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/edgezones/azure-mgmt-edgezones/_meta.json b/sdk/edgezones/azure-mgmt-edgezones/_meta.json index e604bbb8d3a2..9a63b16beaab 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/_meta.json +++ b/sdk/edgezones/azure-mgmt-edgezones/_meta.json @@ -1,6 +1,6 @@ { - "commit": "3db6867b8e524ea6d1bc7a3bbb989fe50dd2f184", + "commit": "6e702986ee542ebd38d0ab2e2f2c00ab48a50b45", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/edgezones/EdgeZones.Management", - "@azure-tools/typespec-python": "0.41.0" + "@azure-tools/typespec-python": "0.42.3" } \ No newline at end of file diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_model_base.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_model_base.py index 3072ee252ed9..49d5c7259389 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_model_base.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_model_base.py @@ -2,8 +2,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=protected-access, broad-except @@ -21,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError @@ -28,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -443,7 +440,7 @@ def clear(self) -> None: """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs. @@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_serialization.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_serialization.py index 7a0232de5ddc..eb86ea23c965 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_serialization.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_serialization.py @@ -1,28 +1,10 @@ # pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_version.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_version.py index bbcd28b4aa67..be71c81bd282 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_version.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b1" diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_operations.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_operations.py index 16e7a16298ae..472d0837a5a2 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_operations.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar import urllib.parse @@ -40,10 +40,6 @@ ) from .._configuration import EdgeZonesMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_operations.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_operations.py index 9e6955730628..2e951429ce90 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_operations.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar import urllib.parse @@ -32,10 +32,6 @@ from .._model_base import _deserialize, _failsafe_deserialize from .._serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/edgezones/azure-mgmt-edgezones/setup.py b/sdk/edgezones/azure-mgmt-edgezones/setup.py index 7e93515ed9c8..0eba169655c1 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/setup.py +++ b/sdk/edgezones/azure-mgmt-edgezones/setup.py @@ -53,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -79,5 +78,5 @@ "azure-common>=1.1", "azure-mgmt-core>=1.3.2", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/edgezones/azure-mgmt-edgezones/tsp-location.yaml b/sdk/edgezones/azure-mgmt-edgezones/tsp-location.yaml index 0af57ca89d07..abb6e685ca94 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/tsp-location.yaml +++ b/sdk/edgezones/azure-mgmt-edgezones/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/edgezones/EdgeZones.Management -commit: 3db6867b8e524ea6d1bc7a3bbb989fe50dd2f184 +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs additionalDirectories: