Skip to content
Merged
Next Next commit
Made version file internal
  • Loading branch information
annatisch committed Oct 29, 2019
commit 45da05716817a2be5429f7a6d7f20144d1cde2cb
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from ._version import VERSION
from ._retry_utility import ConnectionRetryPolicy
from .container import ContainerProxy
from .cosmos_client import CosmosClient
Expand All @@ -40,7 +41,6 @@
)
from .partition_key import PartitionKey
from .permission import Permission
from .version import VERSION

__all__ = (
"CosmosClient",
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import platform
import re
from .version import VERSION
from ._version import VERSION


def get_user_agent():
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
NAMESPACE_NAME = PACKAGE_NAME.replace("-", ".")

# Version extraction inspired from 'requests'
with open(os.path.join(PACKAGE_FOLDER_PATH, 'version.py'), 'r') as fd:
with open(os.path.join(PACKAGE_FOLDER_PATH, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

Expand Down