diff --git a/doc/sphinx/ref/azure.core.pipeline.policies.rst b/doc/sphinx/ref/azure.core.pipeline.policies.rst index c2e8e5552302..83f75dcd996d 100644 --- a/doc/sphinx/ref/azure.core.pipeline.policies.rst +++ b/doc/sphinx/ref/azure.core.pipeline.policies.rst @@ -1,98 +1,6 @@ azure.core.pipeline.policies package ==================================== -Submodules ----------- - -azure.core.pipeline.policies.authentication module --------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.authentication - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.authentication\_async module ---------------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.authentication_async - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.base module ----------------------------------------- - -.. automodule:: azure.core.pipeline.policies.base - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.base\_async module ------------------------------------------------ - -.. automodule:: azure.core.pipeline.policies.base_async - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.custom\_hook module ------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.custom_hook - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.distributed\_tracing module --------------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.distributed_tracing - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.redirect module --------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.redirect - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.redirect\_async module ---------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.redirect_async - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.retry module ------------------------------------------ - -.. automodule:: azure.core.pipeline.policies.retry - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.retry\_async module ------------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.retry_async - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.policies.universal module ---------------------------------------------- - -.. automodule:: azure.core.pipeline.policies.universal - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/ref/azure.core.pipeline.rst b/doc/sphinx/ref/azure.core.pipeline.rst index b4835c953641..6c9563708894 100644 --- a/doc/sphinx/ref/azure.core.pipeline.rst +++ b/doc/sphinx/ref/azure.core.pipeline.rst @@ -9,26 +9,6 @@ Subpackages azure.core.pipeline.policies azure.core.pipeline.transport -Submodules ----------- - -azure.core.pipeline.base module -------------------------------- - -.. automodule:: azure.core.pipeline.base - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.base\_async module --------------------------------------- - -.. automodule:: azure.core.pipeline.base_async - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/ref/azure.core.pipeline.transport.rst b/doc/sphinx/ref/azure.core.pipeline.transport.rst index ad2aa610836b..4a2c5a7f8101 100644 --- a/doc/sphinx/ref/azure.core.pipeline.transport.rst +++ b/doc/sphinx/ref/azure.core.pipeline.transport.rst @@ -1,58 +1,6 @@ azure.core.pipeline.transport package ===================================== -Submodules ----------- - -azure.core.pipeline.transport.aiohttp module --------------------------------------------- - -.. automodule:: azure.core.pipeline.transport.aiohttp - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.transport.base module ------------------------------------------ - -.. automodule:: azure.core.pipeline.transport.base - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.transport.base\_async module ------------------------------------------------- - -.. automodule:: azure.core.pipeline.transport.base_async - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.transport.requests\_asyncio module ------------------------------------------------------- - -.. automodule:: azure.core.pipeline.transport.requests_asyncio - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.transport.requests\_basic module ----------------------------------------------------- - -.. automodule:: azure.core.pipeline.transport.requests_basic - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline.transport.requests\_trio module ---------------------------------------------------- - -.. automodule:: azure.core.pipeline.transport.requests_trio - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/ref/azure.core.polling.rst b/doc/sphinx/ref/azure.core.polling.rst index 8ae3ff9c21fa..e15c3f4623ee 100644 --- a/doc/sphinx/ref/azure.core.polling.rst +++ b/doc/sphinx/ref/azure.core.polling.rst @@ -1,26 +1,6 @@ azure.core.polling package ========================== -Submodules ----------- - -azure.core.polling.async\_poller module ---------------------------------------- - -.. automodule:: azure.core.polling.async_poller - :members: - :undoc-members: - :show-inheritance: - -azure.core.polling.poller module --------------------------------- - -.. automodule:: azure.core.polling.poller - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/ref/azure.core.rst b/doc/sphinx/ref/azure.core.rst index e1bd41af4b25..80d087b61c75 100644 --- a/doc/sphinx/ref/azure.core.rst +++ b/doc/sphinx/ref/azure.core.rst @@ -21,22 +21,6 @@ azure.core.async\_paging module :undoc-members: :show-inheritance: -azure.core.common module ------------------------- - -.. automodule:: azure.core.common - :members: - :undoc-members: - :show-inheritance: - -azure.core.configuration module -------------------------------- - -.. automodule:: azure.core.configuration - :members: - :undoc-members: - :show-inheritance: - azure.core.credentials module ----------------------------- @@ -53,14 +37,6 @@ azure.core.exceptions module :undoc-members: :show-inheritance: -azure.core.match\_conditions module ------------------------------------ - -.. automodule:: azure.core.match_conditions - :members: - :undoc-members: - :show-inheritance: - azure.core.paging module ------------------------ @@ -69,22 +45,6 @@ azure.core.paging module :undoc-members: :show-inheritance: -azure.core.pipeline\_client module ----------------------------------- - -.. automodule:: azure.core.pipeline_client - :members: - :undoc-members: - :show-inheritance: - -azure.core.pipeline\_client\_async module ------------------------------------------ - -.. automodule:: azure.core.pipeline_client_async - :members: - :undoc-members: - :show-inheritance: - azure.core.settings module -------------------------- @@ -93,14 +53,6 @@ azure.core.settings module :undoc-members: :show-inheritance: -azure.core.version module -------------------------- - -.. automodule:: azure.core.version - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/doc/sphinx/ref/azure.core.tracing.rst b/doc/sphinx/ref/azure.core.tracing.rst index 9f3dc0e05876..d784e98ec760 100644 --- a/doc/sphinx/ref/azure.core.tracing.rst +++ b/doc/sphinx/ref/azure.core.tracing.rst @@ -1,18 +1,9 @@ azure.core.tracing package ========================== - Submodules ---------- -azure.core.tracing.abstract\_span module ----------------------------------------- - -.. automodule:: azure.core.tracing.abstract_span - :members: - :undoc-members: - :show-inheritance: - azure.core.tracing.common module -------------------------------- diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index 100580d4ec6d..8ad86d77c16f 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -14,7 +14,8 @@ The Python implementation of the pipeline has some mechanisms specific to Python When constructing an SDK, a developer may consume the pipeline like so: ```python -from azure.core import Configuration, Pipeline +from azure.core.configuration import Configuration +from azure.core.pipeline import Pipeline from azure.core.transport import RequestsTransport, HttpRequest from azure.core.pipeline.policies import ( UserAgentPolicy, diff --git a/sdk/core/azure-core/azure/core/common.py b/sdk/core/azure-core/azure/core/common.py deleted file mode 100644 index e3b990ff98d2..000000000000 --- a/sdk/core/azure-core/azure/core/common.py +++ /dev/null @@ -1,32 +0,0 @@ -# -------------------------------------------------------------------------- -# -# 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. -# -# -------------------------------------------------------------------------- -from typing import Union, Optional -from azure.core.exceptions import ( - ServiceRequestError, - ServiceResponseError -) - -ErrorType = Optional[Union[ServiceRequestError, ServiceResponseError]] diff --git a/sdk/core/azure-core/examples/test_example_async.py b/sdk/core/azure-core/examples/test_example_async.py index 9453b5ba14ff..f61c5f3ac49a 100644 --- a/sdk/core/azure-core/examples/test_example_async.py +++ b/sdk/core/azure-core/examples/test_example_async.py @@ -117,7 +117,8 @@ async def test_example_async_pipeline_client(): url = "https://bing.com" # [START build_async_pipeline_client] - from azure.core import Configuration, AsyncPipelineClient + from azure.core import AsyncPipelineClient + from azure.core.configuration import Configuration from azure.core.pipeline.policies import AsyncRedirectPolicy, UserAgentPolicy from azure.core.pipeline.transport import HttpRequest diff --git a/sdk/core/azure-core/examples/test_example_config.py b/sdk/core/azure-core/examples/test_example_config.py index c06f13761746..e71c99896c6a 100644 --- a/sdk/core/azure-core/examples/test_example_config.py +++ b/sdk/core/azure-core/examples/test_example_config.py @@ -26,7 +26,7 @@ # [START configuration] -from azure.core import Configuration +from azure.core.configuration import Configuration from azure.core.pipeline import Pipeline from azure.core.pipeline.transport import RequestsTransport from azure.core.pipeline.policies import ( diff --git a/sdk/core/azure-core/examples/test_example_sansio.py b/sdk/core/azure-core/examples/test_example_sansio.py index a37ff78b7975..b1e4ac011798 100644 --- a/sdk/core/azure-core/examples/test_example_sansio.py +++ b/sdk/core/azure-core/examples/test_example_sansio.py @@ -27,7 +27,7 @@ import sys from azure.core.configuration import Configuration from azure.core.pipeline.transport import HttpRequest -from azure.core.pipeline_client import PipelineClient +from azure.core import PipelineClient from azure.core.pipeline.policies import RedirectPolicy from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline.policies import SansIOHTTPPolicy diff --git a/sdk/core/azure-core/examples/test_example_sync.py b/sdk/core/azure-core/examples/test_example_sync.py index 240083d1da02..777ebf502d59 100644 --- a/sdk/core/azure-core/examples/test_example_sync.py +++ b/sdk/core/azure-core/examples/test_example_sync.py @@ -26,7 +26,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import Pipeline -from azure.core.pipeline_client import PipelineClient +from azure.core import PipelineClient from azure.core.pipeline.transport import HttpRequest from azure.core.pipeline.policies import ( UserAgentPolicy, @@ -77,7 +77,8 @@ def test_example_pipeline(): def test_example_pipeline_client(): url = "https://bing.com" # [START build_pipeline_client] - from azure.core import Configuration, PipelineClient + from azure.core import PipelineClient + from azure.core.configuration import Configuration from azure.core.pipeline.policies import RedirectPolicy, UserAgentPolicy # example configuration with some policies