Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cosmos] disable api version check for new pylint requirements #24008

Merged
merged 87 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
61ba8d1
initial commit
simorenoh Aug 13, 2021
15dcceb
Client Constructor (#20310)
annatisch Aug 20, 2021
bda95c3
read database
simorenoh Aug 27, 2021
c9648ab
Update simon_testfile.py
simorenoh Aug 27, 2021
80540dc
with coroutine
simorenoh Aug 30, 2021
1285438
Update simon_testfile.py
simorenoh Aug 30, 2021
992b0cd
small changes
simorenoh Aug 31, 2021
47cb688
async with returns no exceptions
simorenoh Aug 31, 2021
f3fa79f
Merge pull request #1 from Azure/simonmoreno/async
simorenoh Aug 31, 2021
0c49739
async read container
simorenoh Sep 1, 2021
47f4af5
async item read
simorenoh Sep 2, 2021
c97c946
cleaning up
simorenoh Sep 3, 2021
fcd95db
create item/ database methods
simorenoh Sep 13, 2021
36c5b90
item delete working
simorenoh Sep 13, 2021
44db2a2
docs replace functionality
simorenoh Sep 16, 2021
ec5b6ed
upsert functionality
simorenoh Sep 17, 2021
d63d052
Merge pull request #2 from simorenoh/item-read
simorenoh Oct 8, 2021
5d74c8f
missing query methods
simorenoh Oct 11, 2021
89fc2f7
CRUD for udf, sproc, triggers
simorenoh Oct 12, 2021
fdaa880
Merge branch 'Azure:main' into async-client
simorenoh Oct 12, 2021
3f9baf2
Merge branch 'Azure:main' into async-client
simorenoh Oct 12, 2021
d6650bc
Merge branch 'Azure:main' into query-functionality
simorenoh Oct 12, 2021
043dfe0
initial query logic + container methods
simorenoh Oct 13, 2021
befdb41
Merge branch 'async-client' into query-functionality
simorenoh Oct 13, 2021
8cffbe2
Merge pull request #3 from simorenoh/query-functionality
simorenoh Oct 13, 2021
72de7c8
missing some execution logic and tests
simorenoh Oct 21, 2021
5b805b8
oops
simorenoh Oct 21, 2021
8d8d0c4
fully working queries
simorenoh Oct 22, 2021
b597ca8
small fix to query_items()
simorenoh Oct 22, 2021
18319df
Update _cosmos_client_connection_async.py
simorenoh Oct 22, 2021
162c44d
Update _cosmos_client_connection.py
simorenoh Oct 22, 2021
ebbac51
documentation update
simorenoh Oct 22, 2021
43f78e6
Merge branch 'Azure:main' into main
simorenoh Oct 22, 2021
470aa5b
updated MIT dates and get_user_client() description
simorenoh Oct 22, 2021
74da690
Update CHANGELOG.md
simorenoh Oct 22, 2021
7104d63
Merge branch 'Azure:main' into main
simorenoh Oct 25, 2021
20718c7
Delete simon_testfile.py
simorenoh Oct 25, 2021
d825eaa
Merge pull request #4 from simorenoh/async-client
simorenoh Oct 25, 2021
e3c27a5
leftover retry utility
simorenoh Oct 25, 2021
3b778ad
Update README.md
simorenoh Oct 25, 2021
c6e352e
docs and removed six package
simorenoh Oct 28, 2021
8971a25
Merge remote-tracking branch 'upstream/main'
simorenoh Oct 28, 2021
52736ac
changes based on comments
simorenoh Nov 4, 2021
ad98039
small change in type hints
simorenoh Nov 4, 2021
f76c595
updated readme
simorenoh Nov 9, 2021
3f02a65
fixes based on conversations
simorenoh Nov 10, 2021
e719869
added missing type comments
simorenoh Nov 11, 2021
d03ee05
Merge branch 'Azure:main' into main
simorenoh Nov 11, 2021
02c52ee
update changelog for ci pipeline
simorenoh Nov 23, 2021
2cb4551
added typehints, moved params into keywords, added decorators, made _…
simorenoh Nov 29, 2021
cf20d35
changes based on sync with central sdk
simorenoh Dec 2, 2021
f456817
remove is_system_key from scripts (only used in execute_sproc)
simorenoh Dec 3, 2021
ea9bd16
Revert "remove is_system_key from scripts (only used in execute_sproc)"
simorenoh Dec 3, 2021
709d2eb
async script proxy using composition
simorenoh Dec 3, 2021
3277dd8
pylint
simorenoh Dec 3, 2021
a57cb4d
capitalized constants
simorenoh Dec 6, 2021
014578b
Apply suggestions from code review
simorenoh Dec 6, 2021
0d79695
closing python code snippet
simorenoh Dec 6, 2021
fdabea1
last doc updates
simorenoh Dec 7, 2021
016d0dd
Update sdk/cosmos/azure-cosmos/CHANGELOG.md
tjprescott Dec 7, 2021
8228aa9
version update
simorenoh Dec 7, 2021
7ae1cd0
Merge branch 'Azure:main' into main
simorenoh Dec 13, 2021
7e8e953
cosmos updates for release
simorenoh Dec 13, 2021
99997e9
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
simorenoh Jan 12, 2022
f446308
Merge branch 'Azure-main'
simorenoh Jan 12, 2022
bc466d8
Merge branch 'Azure-main'
simorenoh Jan 12, 2022
bca2da7
Merge branch 'Azure:main' into main
simorenoh Jan 13, 2022
437895f
fix connection string comma
simorenoh Jan 18, 2022
dd4b4a4
Update CHANGELOG.md
simorenoh Jan 18, 2022
79e0b28
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
simorenoh Jan 25, 2022
399f8bc
Merge branch 'Azure:main' into main
simorenoh Jan 25, 2022
a3bd2e8
fixing extra await keyword in sample
simorenoh Feb 25, 2022
dbf1532
Update CHANGELOG.md
simorenoh Feb 25, 2022
c275953
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
simorenoh Mar 10, 2022
140b042
Update CHANGELOG.md
simorenoh Mar 10, 2022
426a616
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
simorenoh Apr 5, 2022
7c551dc
Merge branch 'Azure:main' into main
simorenoh Apr 6, 2022
0678376
Merge branch 'Azure:main' into main
simorenoh Apr 6, 2022
baaea39
pythonified code, added versions info and new pylint disable for api_…
simorenoh Apr 14, 2022
0f93895
Update CHANGELOG.md
simorenoh Apr 18, 2022
d9d1b55
Merge branch 'main' into cosmos-disable-api-version-check
simorenoh Apr 18, 2022
1ebba83
disable option moved to work
simorenoh Apr 20, 2022
65d23c8
moved again
simorenoh Apr 20, 2022
82afa1a
Merge branch 'main' into cosmos-disable-api-version-check
simorenoh Apr 20, 2022
c1465f3
removing changelog entry since change is pipeline-related
simorenoh Apr 21, 2022
23d481c
removed old versions
simorenoh Apr 26, 2022
1a8e678
reverted renaming
simorenoh Apr 26, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(

self.default_headers = {
http_constants.HttpHeaders.CacheControl: "no-cache",
http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion,
http_constants.HttpHeaders.Version: http_constants.Versions.current_version,
# For single partition query with aggregate functions we would try to accumulate the results on the SDK.
# We need to set continuation as not expected.
http_constants.HttpHeaders.IsContinuationExpected: False,
Expand Down Expand Up @@ -2465,7 +2465,7 @@ def _GetQueryPlanThroughGateway(self, query, resource_link, **kwargs):
"contentType": runtime_constants.MediaTypes.Json,
"isQueryPlanRequest": True,
"supportedQueryFeatures": supported_query_features,
"queryVersion": http_constants.Versions.QueryVersion
"queryVersion": http_constants.Versions.query_version
}

resource_link = base.TrimBeginningAndEndingSlashes(resource_link)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(

self.default_headers = {
http_constants.HttpHeaders.CacheControl: "no-cache",
http_constants.HttpHeaders.Version: http_constants.Versions.CurrentVersion,
http_constants.HttpHeaders.Version: http_constants.Versions.current_version,
# For single partition query with aggregate functions we would try to accumulate the results on the SDK.
# We need to set continuation as not expected.
http_constants.HttpHeaders.IsContinuationExpected: False,
Expand Down Expand Up @@ -2505,7 +2505,7 @@ async def _GetQueryPlanThroughGateway(self, query, resource_link, **kwargs):
"contentType": runtime_constants.MediaTypes.Json,
"isQueryPlanRequest": True,
"supportedQueryFeatures": supported_query_features,
"queryVersion": http_constants.Versions.QueryVersion
"queryVersion": http_constants.Versions.query_version
}

resource_link = base.TrimBeginningAndEndingSlashes(resource_link)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CosmosClient(object):
"""

def __init__(self, url, credential, consistency_level=None, **kwargs):
# type: (str, Any, Optional[str], Any) -> None
# type: (str, Any, Optional[str], Any) -> None # pylint: disable=client-accepts-api-version-keyword
simorenoh marked this conversation as resolved.
Show resolved Hide resolved
"""Instantiate a new CosmosClient."""
auth = _build_auth(credential)
connection_policy = _build_connection_policy(kwargs)
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class CosmosClient(object):
"""

def __init__(self, url, credential, consistency_level=None, **kwargs):
# type: (str, Any, Optional[str], Any) -> None
# type: (str, Any, Optional[str], Any) -> None # pylint: disable=client-accepts-api-version-keyword
"""Instantiate a new CosmosClient."""
auth = _build_auth(credential)
connection_policy = _build_connection_policy(kwargs)
Expand Down
27 changes: 24 additions & 3 deletions sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,30 @@ class CookieHeaders(object):
class Versions(object):
simorenoh marked this conversation as resolved.
Show resolved Hide resolved
"""Constants of versions.
"""
CurrentVersion = "2018-12-31"
SDKName = "azure-cosmos"
QueryVersion = "1.0"
current_version = "2018-12-31"
SDK_name = "azure-cosmos"
query_version = "1.0"
api_versions = [
simorenoh marked this conversation as resolved.
Show resolved Hide resolved
"2014-08-21",
"2015-04-08",
"2015-06-03",
"2015-08-06",
"2015-12-16",
"2016-05-30",
"2016-07-11",
"2016-11-14",
"2017-01-19",
"2017-02-22",
"2017-05-03",
"2017-11-15", # multi-region strong
"2018-06-18", # multi-master and partition migration
"2018-08-31", # throughput-split
"2018-09-17", # IndexV2/ updated policy (composite and additional spatial indexes)
"2018-12-31", # non-partitioned collection deprecation and migration of existing collections
"2019-10-14", # Merge support in SDK
simorenoh marked this conversation as resolved.
Show resolved Hide resolved
"2020-07-15", # Sub-partitioned collections
"2020-11-05", # Materialized views
]


class Delimiters(object):
Expand Down