Repository navigation
fix: honor request overrides for attachment downloads - #492
Draft
Kayvan-Zahiri wants to merge 1 commit into
Draft
Kayvan-Zahiri wants to merge 1 commit into
Kayvan-Zahiri wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #491.
Attachment downloads pass the overrides dictionary as
_build_request's positionalrequest_body. As a result,downloadanddownload_bytesignore custom API URLs, API keys, headers, and skip-auth options, and add JSON Content-type to a bodyless GET when overrides are nonempty. Timeout selection works, but timeout errors retain the wrong URL when API URI is overridden.Pass
overridesby keyword. Add14 cases through both public attachment-download methods using the real HTTP client and a mocked requests boundary: default behavior, URL/header/key/auth/timeout overrides, binary and streaming results, and timeout error metadata. On original main,12 fail and2 pass. Update one existing timeout-test expectation that pinned the erroneous JSON header. No API contract or dependency changes.Validation: full unit suite505 passed,3 live-API tests deselected,1 existing TestData collection warning. Changed implementation/new-test Pylint error checks, new-test Black formatting, and git diff --check pass. No live Nylas calls were made. Developed with Codex assistance and verified locally.
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.