Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
lcian
force-pushed
the
lcian/feat/python-automatic-resumable-uploads
branch
from
October 6, 2026 12:41
79e839b to
46d4611
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0af32a3. Configure here.
lcian
marked this pull request as ready for review
October 6, 2026 15:54
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.

Session.putnow automatically uses resumable uploads under the hood for eligible uploads. An upload is eligible if:resumable_threshold_bytes(default 32 MiB), measured before any compressionbytesbuffer or a seekable streamWe could later extend this to streams that need compression but that means we'll need a "staging area" either on disk or in memory to hold the compressed version, so that requires some more thought.
The same mechanism could be used if the stream is non-rewindable to make it rewindable, though I'm not sure that's something we want to do.
Usecasegains the following kwargs, shown with their defaults:Session.putalso gainsresumable_threshold_bytesfor per-request overrides, defaulting to the value set on theUsecase.The reason why I decided to make
resumable_retriesconfigurable is because we already make the urllib3 retry policy configurable, and resumable requests actually honor it, overriding just whole-body retries with our own logic.Introducing such behavior with a non-overridable default doesn't seem like a good option to me.
Closes FS-389