Repository navigation
Preserve per-call options in HTTP listings - #2258
Merged
martindurant merged 4 commits intoOct 14, 2026
Merged
Conversation
Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
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.
Both HTTP implementations merge per-call request options in
_ls_real()but send only filesystem defaults. Their empty-listing trailing-slash retry also drops the options.Use the merged options for each request and preserve caller options on the retry. Constructor defaults remain unchanged. This extends the original synchronous-only fix to the identical async implementation rather than opening a sibling PR.
Four parametrized regressions exercise real aiohttp/Requests sessions and a loopback HTTP server, covering direct listing and trailing-slash retry. They verify received headers, forwarded request options, successful listings, and unchanged defaults on subsequent calls. The async tests use
allow_redirects: public async-backedls()consumestimeoutas its synchronous wrapper's wait deadline, which this patch deliberately does not change. Synchronous tests also check request timeout forwarding.Linux Python 3.12 validation against master
94afb3f6and exact head2094e3976dc8:test_async_other_threaddeprecation warning. Optional S3/FTP/ADL tests skip.This is native aiohttp/Requests loopback correctness evidence, not Pyodide/XHR, external-service or full CI qualification. AI-assisted implementation/tests, independently checked on unchanged source. Related merged #2229 fixes cached listing shape, not request-option propagation.