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

cut hard dependency on requests #19930

Merged
merged 4 commits into from
Aug 2, 2021
Merged

Conversation

xiangyan99
Copy link
Member

No description provided.

@ghost ghost added the Azure.Core label Jul 23, 2021
@xiangyan99
Copy link
Member Author

/azp run python - identity - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

])
try:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add comments to all the the try/except blocks here? The logic is a little hard to follow :)

@@ -99,6 +99,8 @@ def _case_insensitive_dict(*args, **kwargs):
# multidict is installed by aiohttp
from multidict import CIMultiDict

if len(kwargs) == 0 and len(args) == 1 and (not args[0]):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's args[0] in this case? Maybe add a small comment as to what this if-statement is addressing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to handle case_insensitive_dict(None). requests.structures.CaseInsensitiveDict returns empty dict while multidict.CIMultiDict raise error.

Here we want to return dict().

@xiangyan99 xiangyan99 requested a review from annatisch July 30, 2021 17:36
@xiangyan99 xiangyan99 marked this pull request as ready for review July 30, 2021 17:53
@xiangyan99 xiangyan99 requested a review from lmazuel as a code owner July 30, 2021 17:53
@xiangyan99 xiangyan99 merged commit 9f110dd into main Aug 2, 2021
@xiangyan99 xiangyan99 deleted the core_cut_requests_hard_dependency branch August 2, 2021 15:41
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Aug 2, 2021
…into add_chardet_dep

* 'main' of https://github.com/Azure/azure-sdk-for-python: (35 commits)
  `azure-applicationinsights` Hyperlinks need sphinx style formatting (Azure#19993)
  update version and changelog (Azure#20034)
  Rename AZURE_POD_IDENTITY_TOKEN_URL -> AZURE_POD_IDENTITY_AUTHORITY_HOST (Azure#19867)
  add sample for raw_response_hook (Azure#19985)
  cut hard dependency on requests (Azure#19930)
  Update ci.yml (Azure#20028)
  Update ci.yml (Azure#20026)
  Update PythonSdkLiveTest.yml (Azure#19999)
  [AutoRelease] t2-recoveryservicessiterecovery-2021-07-28-40357 (Azure#19970)
  [AutoRelease] t2-storagecache-2021-07-29-63871 (Azure#19987)
  Minor changes in docs (Azure#20016)
  Add Logs Batch query results (Azure#20013)
  Rename query (Azure#19952)
  d218371 (Azure#20009)
  Update CHANGELOG.md (Azure#20006)
  [Batch] Data plane SDK v11.0.0 (Azure#19889)
  [AutoRelease] t2-batch-2021-07-30-27488 (Azure#19996)
  add ga id to index (Azure#19995)
  Edit pass on Monitor Query README file (Azure#19979)
  Move stress testing scripts to eng/common (Azure#19994)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants