Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4c4b078
make consistent_hash_ring private
bryevdv Jul 11, 2019
038db50
make default_retry_policy private
bryevdv Jul 11, 2019
51d4466
make endpoint_discovery_retry_policy private
bryevdv Jul 11, 2019
b1719fe
make hash_partition_resolver private
bryevdv Jul 11, 2019
46e7fed
make location_cache private
bryevdv Jul 11, 2019
bff6cc9
make murmur_hash private
bryevdv Jul 11, 2019
0e100af
make range private
bryevdv Jul 11, 2019
3d2e65c
make range_partition_resolver private
bryevdv Jul 11, 2019
3e43f69
make vector_session_token private
bryevdv Jul 16, 2019
60ad7fb
make resource_throttle_retry_policy private
bryevdv Jul 16, 2019
68fd7a9
make retry_utility private
bryevdv Jul 16, 2019
8e9274c
make utils private
bryevdv Jul 16, 2019
6dad678
make routing private
bryevdv Jul 17, 2019
6b1a641
make execution_context private
bryevdv Jul 18, 2019
ce36df2
make cosmos_client_connection private
bryevdv Jul 18, 2019
2063355
make retry_options private
bryevdv Jul 18, 2019
8e84029
make query_iterable private
bryevdv Jul 18, 2019
eedb532
make constants private
bryevdv Jul 19, 2019
56c074a
make synchronized_request private
bryevdv Jul 19, 2019
109e496
make session_retry_policy private
bryevdv Jul 19, 2019
c94dc6d
make partition private
bryevdv Jul 19, 2019
4502740
make global_endpoint_manager private
bryevdv Jul 19, 2019
0a60acf
make runtime_constants private
bryevdv Jul 19, 2019
4fb54ac
make session private
bryevdv Jul 19, 2019
2a41dfc
make request_object private
bryevdv Jul 19, 2019
444d5d5
make base private
bryevdv Jul 23, 2019
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
Prev Previous commit
make base private
  • Loading branch information
bryevdv committed Jul 23, 2019
commit 444d5d595a41fe8176bc1dd77c157cd8697c3be8
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import six
from typing import cast
from . import base
from . import _base as base
from . import documents
from . import _constants as constants
from . import http_constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from collections import deque
from .. import _retry_utility
from .. import http_constants
from .. import base
from .. import _base

class _QueryExecutionContextBase(object):
"""
Expand Down Expand Up @@ -208,8 +208,8 @@ def __init__(self, client, options, database_link, query, partition_key):
raise ValueError("_collection_links_length is not greater than 0.")

# Creating the QueryFeed for the first collection
path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs')
collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index])
path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs')
collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index])

self._current_collection_index += 1

Expand Down Expand Up @@ -241,8 +241,8 @@ def _fetch_next_block(self):
# creating separate feed queries for each collection and fetching the items
while not fetched_items:
if self._collection_links and self._current_collection_index < self._collection_links_length:
path = base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs')
collection_id = base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index])
path = _base.GetPathFromLink(self._collection_links[self._current_collection_index], 'docs')
collection_id = _base.GetResourceIdOrFullNameFromLink(self._collection_links[self._current_collection_index])

self._continuation = None
self._has_started = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import six
import numbers
from collections import deque
from azure.cosmos import base
from azure.cosmos import _base
from azure.cosmos._execution_context.base_execution_context import _DefaultQueryExecutionContext
from six.moves import xrange

Expand All @@ -51,8 +51,8 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d
self._cur_item = None
# initiate execution context

path = base.GetPathFromLink(collection_link, 'docs')
collection_id = base.GetResourceIdOrFullNameFromLink(collection_link)
path = _base.GetPathFromLink(collection_link, 'docs')
collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link)
def fetch_fn(options):
return self._client.QueryFeed(path,
collection_id,
Expand Down
1 change: 0 additions & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import collections
import time

from . import base
from . import documents
from . import http_constants

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""Internal class for partition key range cache implementation in the Azure Cosmos database service.
"""

from .. import base
from .. import _base
from .collection_routing_map import CollectionRoutingMap
from . import routing_range
from .routing_range import PartitionKeyRange
Expand Down Expand Up @@ -59,7 +59,7 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges):
'''
cl = self._documentClient

collection_id = base.GetResourceIdOrFullNameFromLink(collection_link)
collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link)

collection_routing_map = self._collection_routing_map_by_item.get(collection_id)
if collection_routing_map is None:
Expand Down
10 changes: 5 additions & 5 deletions sdk/cosmos/azure-cosmos/azure/cosmos/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import sys, traceback
import threading

from . import base
from . import _base
from . import http_constants
from ._vector_session_token import VectorSessionToken
from .errors import HTTPFailure
Expand All @@ -51,17 +51,17 @@ def get_session_token(self, resource_path):
"""

with self.session_lock:
is_name_based = base.IsNameBased(resource_path)
is_name_based = _base.IsNameBased(resource_path)
collection_rid = ''
session_token = ''

try:
if is_name_based:
# get the collection name
collection_name = base.GetItemContainerLink(resource_path)
collection_name = _base.GetItemContainerLink(resource_path)
collection_rid = self.collection_name_to_rid[collection_name]
else:
collection_rid = base.GetItemContainerLink(resource_path)
collection_rid = _base.GetItemContainerLink(resource_path)

if collection_rid in self.rid_to_session_token:
token_dict = self.rid_to_session_token[collection_rid]
Expand Down Expand Up @@ -112,7 +112,7 @@ def set_session_token(self, response_result, response_headers):
response_result_id = response_result[response_result_id_key]
else:
return
collection_rid, collection_name = base.GetItemContainerInfo(self_link, alt_content_path, response_result_id)
collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, response_result_id)

except ValueError:
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"""

from . import errors
from . import base
from .http_constants import StatusCodes

class VectorSessionToken(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import json
import azure.cosmos.errors as errors
from azure.cosmos.http_constants import StatusCodes
import azure.cosmos.base as base

class ConflictWorker(object):
def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name):
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/test/base_unit_tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import pytest
import azure.cosmos.base as base
import azure.cosmos._base as base

pytestmark = pytest.mark.cosmosEmulator

Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/test/crud_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes
import azure.cosmos._murmur_hash as _murmur_hash
import test_config
import azure.cosmos.base as base
import azure.cosmos._base as base
import azure.cosmos.cosmos_client as cosmos_client
from azure.cosmos.diagnostics import RecordDiagnostics
from azure.cosmos.partition_key import PartitionKey
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/test/orderby_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from azure.cosmos.partition_key import PartitionKey
import azure.cosmos.cosmos_client as cosmos_client
from azure.cosmos import _query_iterable as query_iterable
import azure.cosmos.base as base
import azure.cosmos._base as base
from six.moves import xrange
import test_config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from six.moves import xrange
import azure.cosmos.cosmos_client as cosmos_client
from azure.cosmos._execution_context import base_execution_context as base_execution_context
import azure.cosmos.base as base
import azure.cosmos._base as base
import test_config
from azure.cosmos.partition_key import PartitionKey

Expand Down