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
7 changes: 5 additions & 2 deletions eng/tox/import_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
# keyvault has dependency issue when loading private module _BearerTokenCredentialPolicyBase from azure.core.pipeline.policies
# azure.core.tracing.opencensus and azure.eventhub.checkpointstoreblob.aio are skipped due to a known issue in loading azure.core.tracing.opencensus
excluded_packages = [
"azure.core.tracing.opencensus",
"azure.core.tracing.opencensus",
"azure.eventhub.checkpointstoreblob.aio",
"azure.keyvault.certificates", # Github issue 7879
"azure.keyvault.keys", # Github issue 7879
"azure.keyvault.secrets", # Github issue 7879
"azure.appconfiguration", # Github issue 7879. revisit and close after azure-core POST b4 is released.
"azure.storage.blob", # Github issue 7879.
"azure.storage.file", # Github issue 7879.
"azure.storage.queue", # Github issue 7879.
"azure",
"azure-mgmt"]

Expand Down Expand Up @@ -58,4 +61,4 @@ def should_run_import_all(package_name):
logging.info("Verified module dependency, no issues found")
else:
pass
logging.error("Package {} is excluded from dependency check".format(package_name))
logging.error("Package {} is excluded from dependency check".format(package_name))
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
ContentDecodePolicy,
BearerTokenCredentialPolicy,
ProxyPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)

from .constants import STORAGE_OAUTH_SCOPE, SERVICE_HOST_BASE, DEFAULT_SOCKET_TIMEOUT
Expand Down Expand Up @@ -187,7 +188,8 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
StorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs)
]
return config, Pipeline(config.transport, policies=policies)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
ContentDecodePolicy,
AsyncBearerTokenCredentialPolicy,
AsyncRedirectPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)
from azure.core.pipeline.transport import AsyncHttpTransport

Expand Down Expand Up @@ -91,7 +92,8 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
AsyncStorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs),
]
return config, AsyncPipeline(config.transport, policies=policies)

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-blob/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
'tests.common'
]),
install_requires=[
"azure-core<2.0.0,>=1.0.0b4",
"azure-core<2.0.0,>=1.0.0b5",
"msrest>=0.6.10",
"cryptography>=2.1.4"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
ContentDecodePolicy,
BearerTokenCredentialPolicy,
ProxyPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)

from .constants import STORAGE_OAUTH_SCOPE, SERVICE_HOST_BASE, DEFAULT_SOCKET_TIMEOUT
Expand Down Expand Up @@ -187,7 +188,8 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
StorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs)
]
return config, Pipeline(config.transport, policies=policies)

Expand Down Expand Up @@ -224,7 +226,6 @@ def _batch_send(
except StorageErrorException as error:
process_storage_error(error)


class TransportWrapper(HttpTransport):
"""Wrapper class that ensures that an inner client created
by a `get_client` method does not close the outer transport for the parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
ContentDecodePolicy,
AsyncBearerTokenCredentialPolicy,
AsyncRedirectPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)

from azure.core.pipeline.transport import AsyncHttpTransport

from .constants import STORAGE_OAUTH_SCOPE, DEFAULT_SOCKET_TIMEOUT
from .authentication import SharedKeyCredentialPolicy
from .base_client import create_configuration
Expand All @@ -28,14 +29,16 @@
StorageRequestHook,
StorageHosts,
StorageHeadersPolicy,
QueueMessagePolicy)
QueueMessagePolicy
)
from .policies_async import AsyncStorageResponseHook

from .._generated.models import StorageErrorException
from .response_handlers import process_storage_error

if TYPE_CHECKING:
from azure.core.pipeline import Pipeline
from azure.core.pipeline.transport import HttpRequest
from azure.core.configuration import Configuration
_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -89,12 +92,14 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
AsyncStorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs),
]
return config, AsyncPipeline(config.transport, policies=policies)

async def _batch_send(
self, *reqs # type: HttpRequest
self, *reqs: 'HttpRequest',
**kwargs
):
"""Given a series of request, do a Storage batch call.
"""
Expand All @@ -114,7 +119,7 @@ async def _batch_send(
)

pipeline_response = await self._pipeline.run(
request,
request, **kwargs
)
response = pipeline_response.http_response

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'tests.common'
]),
install_requires=[
"azure-core<2.0.0,>=1.0.0b4",
"azure-core<2.0.0,>=1.0.0b5",
"msrest>=0.6.10",
"cryptography>=2.1.4"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
ContentDecodePolicy,
BearerTokenCredentialPolicy,
ProxyPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)

from .constants import STORAGE_OAUTH_SCOPE, SERVICE_HOST_BASE, DEFAULT_SOCKET_TIMEOUT
Expand Down Expand Up @@ -187,7 +188,8 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
StorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs)
]
return config, Pipeline(config.transport, policies=policies)

Expand Down Expand Up @@ -224,7 +226,6 @@ def _batch_send(
except StorageErrorException as error:
process_storage_error(error)


class TransportWrapper(HttpTransport):
"""Wrapper class that ensures that an inner client created
by a `get_client` method does not close the outer transport for the parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
ContentDecodePolicy,
AsyncBearerTokenCredentialPolicy,
AsyncRedirectPolicy,
DistributedTracingPolicy
DistributedTracingPolicy,
HttpLoggingPolicy,
)

from azure.core.pipeline.transport import AsyncHttpTransport

from .constants import STORAGE_OAUTH_SCOPE, DEFAULT_SOCKET_TIMEOUT
from .authentication import SharedKeyCredentialPolicy
from .base_client import create_configuration
Expand All @@ -28,14 +29,16 @@
StorageRequestHook,
StorageHosts,
StorageHeadersPolicy,
QueueMessagePolicy)
QueueMessagePolicy
)
from .policies_async import AsyncStorageResponseHook

from .._generated.models import StorageErrorException
from .response_handlers import process_storage_error

if TYPE_CHECKING:
from azure.core.pipeline import Pipeline
from azure.core.pipeline.transport import HttpRequest
from azure.core.configuration import Configuration
_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -89,12 +92,14 @@ def _create_pipeline(self, credential, **kwargs):
config.retry_policy,
config.logging_policy,
AsyncStorageResponseHook(**kwargs),
DistributedTracingPolicy(),
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs),
]
return config, AsyncPipeline(config.transport, policies=policies)

async def _batch_send(
self, *reqs # type: HttpRequest
self, *reqs: 'HttpRequest',
**kwargs
):
"""Given a series of request, do a Storage batch call.
"""
Expand All @@ -114,7 +119,7 @@ async def _batch_send(
)

pipeline_response = await self._pipeline.run(
request,
request, **kwargs
)
response = pipeline_response.http_response

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-queue/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'tests.common'
]),
install_requires=[
"azure-core<2.0.0,>=1.0.0b4",
"azure-core<2.0.0,>=1.0.0b5",
"msrest>=0.6.10",
"cryptography>=2.1.4"
],
Expand Down
9 changes: 4 additions & 5 deletions shared_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ azure-cognitiveservices-language-nspkg
azure-cognitiveservices-search-nspkg
azure-cognitiveservices-vision-nspkg
azure-common~=1.1
azure-core<2.0.0,>=1.0.0b4
azure-core<2.0.0,>=1.0.0b5
azure-cosmosdb-table~=1.0
azure-datalake-store~=0.0.18
azure-eventhub<6.0.0,>=5.0.0b3
Expand Down Expand Up @@ -103,9 +103,6 @@ aiohttp>=3.0
aiodns>=2.0
python-dateutil>=2.8.0
six>=1.6
#override azure-storage-blob azure-core<2.0.0,>=1.0.0b4
#override azure-storage-queue azure-core<2.0.0,>=1.0.0b4
#override azure-storage-file azure-core<2.0.0,>=1.0.0b4
#override azure-eventhub azure-core<2.0.0,>=1.0.0b4
#override azure-storage-blob msrest>=0.6.10
#override azure-storage-queue msrest>=0.6.10
Expand All @@ -122,4 +119,6 @@ opencensus-ext-azure>=0.3.1
#override azure-eventhub-checkpointstoreblob-aio aiohttp<4.0,>=3.0
#override azure-eventhub uamqp<2.0,>=1.2.3
#override azure-appconfiguration azure-core<2.0.0,>=1.0.0b4
#override azure-appconfiguration msrest>=0.6.10
#override azure-appconfiguration msrest>=0.6.10
#override azure-cosmos azure-core<2.0.0,>=1.0.0b4
#override azure-core-tracing-opencensus azure-core<2.0.0,>=1.0.0b4