| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #942 +/- ##
==========================================
- Coverage 78.30% 77.96% -0.34%
==========================================
Files 14 14
Lines 1212 1216 +4
Branches 141 142 +1
==========================================
- Hits 949 948 -1
- Misses 222 227 +5
Partials 41 41 ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
Refactor the deprecated wait_for function to use the new WaitStrategy system internally instead of the @wait_container_is_ready decorator. The decorator emitted a deprecation warning at decoration time (import time), causing warnings even when users never called wait_for. Replace with an internal CallableWaitStrategy that uses WaitStrategy._poll() for retry logic. This follows the intended migration path to the new system. Fixes testcontainers#874
🤖 I have created a release *beep* *boop* --- ## [4.14.1](testcontainers-v4.14.0...testcontainers-v4.14.1) (2026-01-31) ### Bug Fixes * Allow passing in a custom wait strategy string in MySQL, Cassandra, Kafka and Trino ([#953](#953)) ([be4d09e](be4d09e)) * **compose:** expose useful compose options ([#951](#951)) ([183e1aa](183e1aa)) * **core:** bring back dind tests ([7337266](7337266)) * **core:** Use WaitStrategy internally for wait_for function ([#942](#942)) ([e323317](e323317)) * **nats:** add support for jetstream ([#938](#938)) ([49c9af8](49c9af8)) * Support Elasticsearch 9.x ([#881](#881)) ([f690e88](f690e88)), closes [#860](#860) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
fix(core): Use WaitStrategy internally for wait_for function
Summary
Refactor the deprecated wait_for function to use the new WaitStrategy system internally instead of the @wait_container_is_ready decorator.
This fixes the import-time deprecation warning from #874.
See alexanderankin's comment stating core should no longer warn, and jonaslb's reply identifying that wait_for is still decorated with @wait_container_is_ready at module level, so it generates a warning.
Problem
The wait_for function was decorated with @wait_container_is_ready(), which emits a deprecation warning at decoration time (import time), not when the function is called. This caused warnings even when users never used wait_for.
Reproducer
=============================== warnings summary =============================== waiting_utils.py:215: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version... @wait_container_is_ready() 1 passed, 1 warningNote: wait_for is never called - the warning is emitted just by importing the module.