Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #990 +/- ##
==========================================
+ Coverage 73.24% 73.27% +0.03%
==========================================
Files 25 25
Lines 1798 1815 +17
Branches 241 244 +3
==========================================
+ Hits 1317 1330 +13
- Misses 401 405 +4
Partials 80 80 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
fa1a501 to
59f0fa9
Compare
This was referenced Dec 19, 2025
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.
What do these changes do?
As a follow-up to #983, this PR makes timeout handling consistent across all long-running Docker API operations by adding an explicit
timeoutparameter to methods that previously lacked one and fixing the timeout implementation to properly handle bothtotalandsocket_readtimeouts.The following operations now accept a
timeoutparameter with infinite timeout defaults:DockerContainer.log()- for streaming container logsDockerContainer.attach()- for attaching to container streamsDockerContainer.stats()- for streaming container statisticsDockerImages.build()- for building images (Add timeout support with improved documentation #983)DockerImages.export_image()- for exporting images as tarballsDockerImages.import_image()- for importing image tarballsDockerImages.push()- for pushing image to registry (Add timeout support with improved documentation #983)DockerImages.pull()- for pull image from registry (Add timeout support with improved documentation #983)DockerLogs.run()- for log streaming (Add timeout support with improved documentation #983)DockerContainer.commit()(Add missing consistent client timeout in DockerContainer.commit() #992)Additionally, the timeout handling in
Docker._query()has been fixed to set bothtotalandsock_readconsistently when a float timeout is provided, preventing timeout inconsistencies that could cause operations to fail prematurely.Now all above methods consistently use the new base method
_resolve_long_running_timeout()which selectively overridestotalandsock_readtimeout values while preserving other timeouts such as connection establishment fromself.docker._timeout.Are there changes in behavior for the user?
New functionality:
total=Noneandsock_read=None), which matches the expected behavior for potentially long-running Docker operations.Behavior change:
Deprecation notice:
asyncio.timeout()block or passingaiohttp.ClientTimeoutobjects instead of float values.Related issue number
N/A
Checklist
changesfolder