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

remove iter_text and iter_lines #20460

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

iscai-msft
Copy link
Contributor

have an issue to add it back eventually #20459

request = HttpRequest("GET", "/basic/string")
# @pytest.mark.asyncio
# async def test_iter_text(client):
# request = HttpRequest("GET", "/basic/string")
Copy link
Member

Choose a reason for hiding this comment

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

Why we comment these out rather than removing them?

Does that mean we plan to add them back in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, planning to add them back in the future. I can delete if people want to remove the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was just feeling attached so didn't want to delete

Copy link
Member

Choose a reason for hiding this comment

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

Then maybe we can just skip the tests w/ some reasons.

It can help us in the future to understand what happened.


async with client.send_request(request, stream=True) as response:
async for line in response.iter_lines():
async for line in response.iter_bytes():
Copy link
Member

Choose a reason for hiding this comment

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

Do you still want to use "line"? It is up to you. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm getting rid of iter_lines so can't use it anymore, switching to iter_bytes instead

Copy link
Member

Choose a reason for hiding this comment

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

What I meant was

async for line in response.iter_bytes():

:)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohh i see, yeah will get rid

Copy link
Member

@xiangyan99 xiangyan99 left a comment

Choose a reason for hiding this comment

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

LGTM

@iscai-msft iscai-msft merged commit 38a1385 into Azure:main Aug 31, 2021
@iscai-msft iscai-msft deleted the remove_iter_text_lines branch August 31, 2021 14:06
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Aug 31, 2021
…into switch_to_protocol

* 'main' of https://github.com/Azure/azure-sdk-for-python:
  release_iseus_status_auto_reply (Azure#20441)
  Clarify LogsQueryClient query parameter description (Azure#20467)
  Sync eng/common directory with azure-sdk-tools for PR 1953 (Azure#20466)
  Skip eng common workflow enforcer for private repos (Azure#20462)
  remove iter_text and iter_lines (Azure#20460)
iscai-msft added a commit that referenced this pull request Aug 31, 2021
…into header_tuples

* 'main' of https://github.com/Azure/azure-sdk-for-python: (21 commits)
  [Key Vault] Add 7.3-preview support for certificates (#20477)
  Use dummy values and correct code rendering in README (#20322)
  Use CredScan-suppressed dummy password in sample (#20468)
  Fix type annotation in azure.storage.blob (#20084)
  Adding static checks (#20457)
  release_iseus_status_auto_reply (#20441)
  Clarify LogsQueryClient query parameter description (#20467)
  Sync eng/common directory with azure-sdk-tools for PR 1953 (#20466)
  Skip eng common workflow enforcer for private repos (#20462)
  remove iter_text and iter_lines (#20460)
  [ServiceBus] Improve test stability and cpu usage (#20352)
  t2-Netapp-update-to-2021-06-01 (#20453)
  [AutoRelease] t2-keyvault-2021-08-26-55443 (#20423)
  Sync eng/common directory with azure-sdk-tools for PR 1943 (#20450)
  New dummy password in README (#20328)
  ensure test principal creation succeeds properly (#20446)
  Update question-answering readme links (#20439)
  Stip empty changelog sections before release (#20437)
  [AutoRelease] t2-healthcareapis-2021-08-26-27542 (#20422)
  [AutoRelease] t2-iothub-2021-08-25-25696 (#20409)
  ...
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Aug 31, 2021
…into update_lro_paging

* 'main' of https://github.com/Azure/azure-sdk-for-python:
  [Core] Follow RFC 3339 datetime formatting for AzureJSONEncoder (Azure#20346)
  [Key Vault] Add 7.3-preview support for certificates (Azure#20477)
  Use dummy values and correct code rendering in README (Azure#20322)
  Use CredScan-suppressed dummy password in sample (Azure#20468)
  Fix type annotation in azure.storage.blob (Azure#20084)
  Adding static checks (Azure#20457)
  release_iseus_status_auto_reply (Azure#20441)
  Clarify LogsQueryClient query parameter description (Azure#20467)
  Sync eng/common directory with azure-sdk-tools for PR 1953 (Azure#20466)
  Skip eng common workflow enforcer for private repos (Azure#20462)
  remove iter_text and iter_lines (Azure#20460)
iscai-msft added a commit that referenced this pull request Sep 29, 2021
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