Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620
azure-core_1.20.0
1.20.0 (2021-11-04)
Features Added
GA send_request onto the azure.core.PipelineClient and azure.core.AsyncPipelineClient. This method takes in
requests and sends them through our pipelines.
GA azure.core.rest. azure.core.rest is our new public simple HTTP library in azure.core that users will use to create requests, and consume responses.
GA errors StreamConsumedError, StreamClosedError, and ResponseNotReadError to azure.core.exceptions. These errors
are thrown if you mishandle streamed responses from the azure.core.rest module
add kwargs to the methods for iter_raw and iter_bytes#21529
no longer raise JSON errors if users pass in file descriptors of JSON to the json kwarg in HttpRequest#21504
Added new error type IncompleteReadError which is raised if peer closes the connection before we have received the complete message body.
Breaking Changes
SansIOHTTPPolicy.on_exception returns None instead of bool.
Bugs Fixed
The Content-Length header in a http response is strictly checked against the actual number of bytes in the body,
rather than silently truncating data in case the underlying tcp connection is closed prematurely.
(thanks to @jochen-ott-by for the contribution) #20412
UnboundLocalError when SansIOHTTPPolicy handles an exception #15222
Add default content type header of text/plain and content length header for users who pass unicode strings to the content kwarg of HttpRequest in 2.7 #21550
azure-core_1.19.1
1.19.1 (2021-11-01)
Bugs Fixed
respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796
Fix "coroutine x.read() was never awaited" warning from ContentDecodePolicy#21318
fix type check for data input to azure.core.rest for python 2.7 users #21341
use charset_normalizer if chardet is not installed to migrate aiohttp 3.8.0 changes.
Other Changes
Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps azure-core from 1.11.0 to 1.20.1.
Release notes
Sourced from azure-core's releases.
... (truncated)
Commits
596e2de
update changelog (#21644)e06b8aa
[rest] add decompression tests and fix multiple body() calls (#21630)dba8912
[rest] store decompressed body in response content for aiohttp with decompres...591845d
Increment package version after release of azure-core (#21594)7c3deba
update release date (#21574)3db48ed
[rest] allow users to pass file descriptors to json without raising (#21504)aeb2735
[rest] GA in docs! (#21545)9d5c864
[rest] fix str check in content kwarg to be six.string_types check for 2.7 (#...60e11ba
raise IncompleteReadError if only receive partial response (#20888)74badfa
[rest] add kwargs to iter_bytes and iter_raw (#21529)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)