Skip to content

Commit 318b112

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into add_redacted_text
* 'master' of https://github.com/Azure/azure-sdk-for-python: [text analytics] add bing_id property to LinkedEntity class (Azure#13446) fix typing for paging methods (Azure#13410) [text analytics] add domain_filter param (Azure#13451) fix issue Azure#11658 for is_valid_resource_id (Azure#11709) added create_table_if_not_exists method to table service client (Azure#13385) [ServiceBus] Test and failure improvements (Azure#13345) Proper encoding and decoding of source URLs - Fixes special characters in source URL issue (Azure#13275) Switch retry (Azure#13264) [ServiceBus] ServiceBusClient close spawned children (Azure#13077) fixing version issue by not overwriting the version with the semantic… (Azure#13411)
2 parents f77b69f + 9b1b9ec commit 318b112

File tree

62 files changed

+2736
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2736
-332
lines changed

sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
_LOGGER = logging.getLogger(__name__)
3232
_ARMID_RE = re.compile(
33-
"(?i)/subscriptions/(?P<subscription>[^/]*)(/resourceGroups/(?P<resource_group>[^/]*))?"
34-
"(/providers/(?P<namespace>[^/]*)/(?P<type>[^/]*)/(?P<name>[^/]*)(?P<children>.*))?"
33+
"(?i)/subscriptions/(?P<subscription>[^/]+)(/resourceGroups/(?P<resource_group>[^/]+))?"
34+
"(/providers/(?P<namespace>[^/]+)/(?P<type>[^/]*)/(?P<name>[^/]+)(?P<children>.*))?"
3535
)
3636

3737
_CHILDREN_RE = re.compile(
38-
"(?i)(/providers/(?P<child_namespace>[^/]*))?/"
39-
"(?P<child_type>[^/]*)/(?P<child_name>[^/]*)"
38+
"(?i)(/providers/(?P<child_namespace>[^/]+))?/"
39+
"(?P<child_type>[^/]*)/(?P<child_name>[^/]+)"
4040
)
4141

4242
_ARMNAME_RE = re.compile("^[^<>%&:\\?/]{1,260}$")

sdk/core/azure-mgmt-core/tests/test_tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ def test_resource_parse(self):
239239
invalid_ids = [
240240
'/subscriptions/fakesub/resourceGroups/myRg/type1/name1',
241241
'/subscriptions/fakesub/resourceGroups/myRg/providers/Microsoft.Provider/foo',
242-
'/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1'
242+
'/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1',
243+
'/subscriptions/fakesub/resourceGroups/',
244+
'/subscriptions//resourceGroups/'
243245
]
244246
for invalid_id in invalid_ids:
245247
self.assertFalse(is_valid_resource_id(invalid_id))

sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

33
## 4.2.1 (Unreleased)
4+
### Fixed
5+
- Correct typing for paging methods
46

57

68
## 4.2.0 (2020-08-11)

sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
if TYPE_CHECKING:
3333
# pylint:disable=unused-import
34-
from typing import Any, Dict, List, Optional, Iterable
34+
from typing import Any, Dict, Iterable, List, Optional
35+
from azure.core.paging import ItemPaged
3536

3637

3738
class CertificateClient(KeyVaultClientBase):
@@ -530,7 +531,7 @@ def restore_certificate_backup(self, backup, **kwargs):
530531

531532
@distributed_trace
532533
def list_deleted_certificates(self, **kwargs):
533-
# type: (**Any) -> Iterable[DeletedCertificate]
534+
# type: (**Any) -> ItemPaged[DeletedCertificate]
534535
"""Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled.
535536
536537
Requires certificates/get/list permission. Retrieves the certificates in the current vault which
@@ -566,7 +567,7 @@ def list_deleted_certificates(self, **kwargs):
566567

567568
@distributed_trace
568569
def list_properties_of_certificates(self, **kwargs):
569-
# type: (**Any) -> Iterable[CertificateProperties]
570+
# type: (**Any) -> ItemPaged[CertificateProperties]
570571
"""List identifiers and properties of all certificates in the vault.
571572
572573
Requires certificates/list permission.
@@ -598,7 +599,7 @@ def list_properties_of_certificates(self, **kwargs):
598599

599600
@distributed_trace
600601
def list_properties_of_certificate_versions(self, certificate_name, **kwargs):
601-
# type: (str, **Any) -> Iterable[CertificateProperties]
602+
# type: (str, **Any) -> ItemPaged[CertificateProperties]
602603
"""List the identifiers and properties of a certificate's versions.
603604
604605
Requires certificates/list permission.
@@ -989,7 +990,7 @@ def delete_issuer(self, issuer_name, **kwargs):
989990

990991
@distributed_trace
991992
def list_properties_of_issuers(self, **kwargs):
992-
# type: (**Any) -> Iterable[IssuerProperties]
993+
# type: (**Any) -> ItemPaged[IssuerProperties]
993994
"""Lists properties of the certificate issuers for the key vault.
994995
995996
Requires the certificates/manageissuers/getissuers permission.

sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
# ------------------------------------
55
# pylint:disable=too-many-lines,too-many-public-methods
66
import base64
7-
from typing import Any, AsyncIterable, Optional, Iterable, List, Dict, Union
7+
from typing import Any, Optional, Iterable, List, Dict, Union
88
from functools import partial
99

1010
from azure.core.polling import async_poller
1111
from azure.core.tracing.decorator import distributed_trace
1212
from azure.core.tracing.decorator_async import distributed_trace_async
13+
from azure.core.async_paging import AsyncItemPaged
1314

1415
from .. import (
1516
KeyVaultCertificate,
@@ -504,7 +505,7 @@ async def restore_certificate_backup(self, backup: bytes, **kwargs: "Any") -> Ke
504505
return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle)
505506

506507
@distributed_trace
507-
def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCertificate]:
508+
def list_deleted_certificates(self, **kwargs: "Any") -> AsyncItemPaged[DeletedCertificate]:
508509
"""Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled.
509510
510511
Requires certificates/get/list permission. Retrieves the certificates in the current vault which
@@ -536,7 +537,7 @@ def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCer
536537
)
537538

538539
@distributed_trace
539-
def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[CertificateProperties]:
540+
def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncItemPaged[CertificateProperties]:
540541
"""List identifiers and properties of all certificates in the vault.
541542
542543
Requires certificates/list permission.
@@ -568,7 +569,7 @@ def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[Cert
568569
@distributed_trace
569570
def list_properties_of_certificate_versions(
570571
self, certificate_name: str, **kwargs: "Any"
571-
) -> AsyncIterable[CertificateProperties]:
572+
) -> AsyncItemPaged[CertificateProperties]:
572573
"""List the identifiers and properties of a certificate's versions.
573574
574575
Requires certificates/list permission.
@@ -965,7 +966,7 @@ async def delete_issuer(self, issuer_name: str, **kwargs: "Any") -> CertificateI
965966
return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle)
966967

967968
@distributed_trace
968-
def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncIterable[IssuerProperties]:
969+
def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncItemPaged[IssuerProperties]:
969970
"""Lists properties of the certificate issuers for the key vault.
970971
971972
Requires the certificates/manageissuers/getissuers permission.

sdk/keyvault/azure-keyvault-keys/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

33
## 4.2.1 (Unreleased)
4+
### Fixed
5+
- Correct typing for async paging methods
46

57

68
## 4.2.0 (2020-08-11)

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
if TYPE_CHECKING:
1717
# pylint:disable=ungrouped-imports
1818
from datetime import datetime
19-
from typing import Any, AsyncIterable, Optional, List, Union
19+
from azure.core.async_paging import AsyncItemPaged
20+
from typing import Any, Optional, List, Union
2021
from .. import KeyType
2122

2223

@@ -256,7 +257,7 @@ async def get_deleted_key(self, name: str, **kwargs: "Any") -> DeletedKey:
256257
return DeletedKey._from_deleted_key_bundle(bundle)
257258

258259
@distributed_trace
259-
def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]":
260+
def list_deleted_keys(self, **kwargs: "Any") -> "AsyncItemPaged[DeletedKey]":
260261
"""List all deleted keys, including the public part of each. Possible only in a vault with soft-delete enabled.
261262
262263
Requires keys/list permission.
@@ -281,7 +282,7 @@ def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]":
281282
)
282283

283284
@distributed_trace
284-
def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperties]":
285+
def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]":
285286
"""List identifiers and properties of all keys in the vault. Requires keys/list permission.
286287
287288
:returns: An iterator of keys without their cryptographic material or version information
@@ -304,7 +305,7 @@ def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperti
304305
)
305306

306307
@distributed_trace
307-
def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncIterable[KeyProperties]":
308+
def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]":
308309
"""List the identifiers and properties of a key's versions. Requires keys/list permission.
309310
310311
:param str name: The name of the key

sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Release History
22

33
## 4.2.1 (Unreleased)
4-
4+
### Fixed
5+
- Correct typing for async paging methods
56

67
## 4.2.0 (2020-08-11)
78
### Fixed

sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
from typing import Any, AsyncIterable, Optional, Dict
5+
from typing import Any, Optional, Dict
66
from functools import partial
77

88
from azure.core.tracing.decorator import distributed_trace
99
from azure.core.tracing.decorator_async import distributed_trace_async
10+
from azure.core.async_paging import AsyncItemPaged
1011

1112
from .._models import KeyVaultSecret, DeletedSecret, SecretProperties
1213
from .._shared import AsyncKeyVaultClientBase
@@ -165,7 +166,7 @@ async def update_secret_properties(
165166
return SecretProperties._from_secret_bundle(bundle) # pylint: disable=protected-access
166167

167168
@distributed_trace
168-
def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretProperties]:
169+
def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]:
169170
"""List identifiers and attributes of all secrets in the vault. Requires secrets/list permission.
170171
171172
List items don't include secret values. Use :func:`get_secret` to get a secret's value.
@@ -189,7 +190,7 @@ def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretPro
189190
)
190191

191192
@distributed_trace
192-
def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncIterable[SecretProperties]:
193+
def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]:
193194
"""List properties of all versions of a secret, excluding their values. Requires secrets/list permission.
194195
195196
List items don't include secret values. Use :func:`get_secret` to get a secret's value.
@@ -321,7 +322,7 @@ async def get_deleted_secret(self, name: str, **kwargs: "Any") -> DeletedSecret:
321322
return DeletedSecret._from_deleted_secret_bundle(bundle)
322323

323324
@distributed_trace
324-
def list_deleted_secrets(self, **kwargs: "Any") -> AsyncIterable[DeletedSecret]:
325+
def list_deleted_secrets(self, **kwargs: "Any") -> AsyncItemPaged[DeletedSecret]:
325326
"""Lists all deleted secrets. Possible only in vaults with soft-delete enabled.
326327
327328
Requires secrets/list permission.

sdk/servicebus/azure-servicebus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 7.0.0b6 (Unreleased)
44

5+
**Breaking Changes**
6+
7+
* `ServiceBusClient.close()` now closes spawned senders and receivers.
8+
* Attempting to initialize a sender or receiver with a different connection string entity and specified entity (e.g. `queue_name`) will result in an AuthenticationError
59

610
## 7.0.0b5 (2020-08-10)
711

0 commit comments

Comments
 (0)