Skip to content

Commit 0414a3b

Browse files
committed
Make modulues in core to be private
1 parent 6f9a6b0 commit 0414a3b

File tree

11 files changed

+15
-21
lines changed

11 files changed

+15
-21
lines changed

msgraph/core/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
from .client_factory import HTTPClientFactory
6-
from .constants import SDK_VERSION
7-
from .graph_client import GraphClient
5+
from ._client_factory import HTTPClientFactory
6+
from ._constants import SDK_VERSION
7+
from ._enums import APIVersion, NationalClouds
8+
from ._graph_client import GraphClient
89

910
__version__ = SDK_VERSION

msgraph/core/client_factory.py renamed to msgraph/core/_client_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
from requests import Session
88

9-
from .constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
10-
from .enums import APIVersion, NationalClouds
9+
from ._constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
10+
from ._enums import APIVersion, NationalClouds
1111
from .middleware.abc_token_credential import TokenCredential
1212
from .middleware.authorization import AuthorizationHandler
1313
from .middleware.middleware import BaseMiddleware, MiddlewarePipeline

msgraph/core/constants.py renamed to msgraph/core/_constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@
99
CONNECTION_TIMEOUT = 30
1010
BASE_URL = 'https://graph.microsoft.com/'
1111
SDK_VERSION = '0.1.0'
12-
13-
# Used as the key for AuthMiddlewareOption in MiddlewareControl
14-
AUTH_MIDDLEWARE_OPTIONS = 'AUTH_MIDDLEWARE_OPTIONS'
File renamed without changes.

msgraph/core/graph_client.py renamed to msgraph/core/_graph_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ------------------------------------
55
from requests import Request, Session
66

7-
from .client_factory import HTTPClientFactory
7+
from ._client_factory import HTTPClientFactory
88
from .middleware.request_context import RequestContext
99

1010
supported_options = ['scopes', 'custom_option']

msgraph/core/middleware/authorization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
from ..enums import FeatureUsageFlag
5+
from .._enums import FeatureUsageFlag
66
from .abc_token_credential import TokenCredential
77
from .middleware import BaseMiddleware
88

msgraph/core/middleware/request_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ------------------------------------
55
import uuid
66

7-
from ..enums import FeatureUsageFlag
7+
from .._enums import FeatureUsageFlag
88

99

1010
class RequestContext:

tests/integration/test_graphclient.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import pytest
66
from requests import Session
77

8-
from msgraph.core.enums import APIVersion
9-
from msgraph.core.graph_client import GraphClient
8+
from msgraph.core import APIVersion, GraphClient
109
from msgraph.core.middleware.authorization import AuthorizationHandler
1110

1211

tests/integration/test_http_client_factory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import pytest
66
from requests import Session
77

8-
from msgraph.core.client_factory import HTTPClientFactory
9-
from msgraph.core.enums import APIVersion
8+
from msgraph.core import APIVersion, HTTPClientFactory
109
from msgraph.core.middleware.authorization import AuthorizationHandler
1110

1211

tests/unit/test_client_factory.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
from requests import Session
77
from requests.adapters import HTTPAdapter
88

9-
from msgraph.core.client_factory import HTTPClientFactory
10-
from msgraph.core.constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
11-
from msgraph.core.enums import APIVersion, NationalClouds
9+
from msgraph.core import APIVersion, HTTPClientFactory, NationalClouds
10+
from msgraph.core._constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
1211
from msgraph.core.middleware.authorization import AuthorizationHandler
1312

1413

tests/unit/test_graph_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
from requests import Session
88
from requests.adapters import HTTPAdapter
99

10-
from msgraph.core.constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
11-
from msgraph.core.enums import APIVersion, NationalClouds
12-
from msgraph.core.graph_client import GraphClient
10+
from msgraph.core import APIVersion, GraphClient, NationalClouds
11+
from msgraph.core._constants import CONNECTION_TIMEOUT, REQUEST_TIMEOUT
1312
from msgraph.core.middleware.authorization import AuthorizationHandler
1413

1514

0 commit comments

Comments
 (0)