GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — valkey test container by daric93 · Pull Request #1 · daric93/testcontainers-python

Conversation

@daric93

@daric93 daric93 commented Dec 8, 2025

Copy link
Copy Markdown
Owner

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daric93 daric93 self-assigned this Dec 8, 2025
jbrinkman
jbrinkman reviewed Dec 11, 2025
View reviewed changes
Comment thread modules/valkey/testcontainers/valkey/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread modules/valkey/testcontainers/valkey/__init__.py Outdated
"""
return int(super().get_exposed_port(self.port))

@wait_container_is_ready(ValkeyNotReady)

@jbrinkman jbrinkman Dec 11, 2025

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated Decorator Usage

Location: modules/valkey/testcontainers/valkey/__init__.py, line 113

Current Code:

@wait_container_is_ready(ValkeyNotReady)
def _connect(self) -> None:
    """Wait for Valkey to be ready by sending PING command."""
    # ... connection logic

Issue:

The @wait_container_is_ready decorator is deprecated in the codebase. Recent commits show active migration away from this pattern:

  • PR feat: Add ExecWaitStrategy and migrate Postgres from deprecated decorator testcontainers/testcontainers-python#935: Postgres migrated to ExecWaitStrategy
  • PR fix(minio): Use wait strategy instead of deprecated decorator testcontainers/testcontainers-python#899: Minio migrated to wait strategies
  • PR fix(elasticsearch): Use wait strategy instead of deprecated decorator testcontainers/testcontainers-python#915: Elasticsearch migrated to wait strategies

Evidence from Codebase:

# From pytest.ini_options filterwarnings:
"ignore:The @wait_container_is_ready decorator is deprecated.*:DeprecationWarning"

Recommended Fix:

Migrate to modern wait strategy pattern:

from testcontainers.core.wait_strategies import ExecWaitStrategy

class ValkeyContainer(DockerContainer):
    def __init__(self, image: str = "valkey/valkey:latest", port: int = 6379, **kwargs) -> None:
        super().__init__(image, **kwargs)
        self.port = port
        self.password: Optional[str] = None
        self.with_exposed_ports(self.port)
        
    def start(self) -> "ValkeyContainer":
        # Build wait strategy based on password
        if self.password:
            # Use custom wait strategy for authenticated connections
            self.waiting_for(self._create_auth_wait_strategy())
        else:
            # Use exec strategy for simple PING
            self.waiting_for(
                ExecWaitStrategy(["valkey-cli", "ping"])
            )
        super().start()
        return self

Benefits:

  • Aligns with project direction
  • More composable and testable
  • Consistent with other modules
  • Better error messages

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daric93 daric93 Dec 11, 2025

Copy link
Copy Markdown
Owner Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread modules/valkey/example_basic.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

daric93 added 3 commits April 7, 2026 11:59
@daric93
valkey test container
3ec8609
@daric93
address comments
4b73002
@daric93
address code review issues
21ec9f8
Signed-off-by: Daria Korenieva <[email protected]>
@daric93
daric93 force-pushed the valkey_test_container branch from 4c8007b to 21ec9f8 Compare April 7, 2026 19:52
daric93 and others added 6 commits April 7, 2026 15:18
@daric93
fix formatting in valkey module
a0cd2a0
Signed-off-by: Daria Korenieva <[email protected]>
@github-actions @alexanderankin
chore(main): release testcontainers 4.15.0-rc.1 (testcontainers#986)
6ecf347
🤖 I have created a release *beep* *boop*
---


##
[4.15.0-rc.1](testcontainers/testcontainers-python@testcontainers-v4.14.2...testcontainers-v4.15.0-rc.1)
(2026-04-07)


### Features

* **compose:** add structured container inspect information
([testcontainers#897](testcontainers#897))
([58459a1](testcontainers@58459a1))
* **core:** support SSH-based DOCKER_HOST
([testcontainers#993](testcontainers#993))
([d48115d](testcontainers@d48115d))
* **generic:** Reintroducing the generic SQL module
([testcontainers#892](testcontainers#892))
([2ca2321](testcontainers@2ca2321))
* **keycloak:** support for relative path and management relative path
([testcontainers#982](testcontainers#982))
([898faf6](testcontainers@898faf6))
* **mqtt:** MosquittoContainer: Add version 2.1.2
([testcontainers#978](testcontainers#978))
([af382f7](testcontainers@af382f7))


### Bug Fixes

* **azurite:** make visible to type checkers
([testcontainers#927](testcontainers#927))
([baa5668](testcontainers@baa5668))
* **clickhouse:** add `HttpWaitStrategy` instead of deprecated
`wait_container_is_ready`
([testcontainers#962](testcontainers#962))
([8034541](testcontainers@8034541))
* **compose:** return type in get_service_port docstring
([testcontainers#939](testcontainers#939))
([fed65fe](testcontainers@fed65fe))
* **core:** Refactor copy file
([testcontainers#996](testcontainers#996))
([0e0bb24](testcontainers@0e0bb24))
* **core:** wait for ryuk more reliably, improve tests: long_running,
filter logs
([testcontainers#984](testcontainers#984))
([b12ae13](testcontainers@b12ae13))
* **generic:** Migrate ServerContainer from deprecated decorator to
HttpWaitStrategy
([testcontainers#971](testcontainers#971))
([460b0d8](testcontainers@460b0d8))
* **kafka:** Use wait strategy instead of deprecated wait_for_logs
([testcontainers#903](testcontainers#903))
([87332c1](testcontainers@87332c1))
* **postgres:** add py.typed marker to postgres module
([testcontainers#849](testcontainers#849))
([c8a5bbd](testcontainers@c8a5bbd))
* **qdrant:** migrate Qdrant from deprecated decorator.
([testcontainers#963](testcontainers#963))
([407f798](testcontainers@407f798))
* **redis:** Use wait strategy instead of deprecated decorator
([testcontainers#914](testcontainers#914))
([e25713a](testcontainers@e25713a))
* **sftp:** Avoid using wait_for_logs in module.
([testcontainers#995](testcontainers#995))
([83157eb](testcontainers@83157eb))

---
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: David Ankin <[email protected]>
@Tranquility2
Merge branch 'main' into valkey_test_container
4c9f94d
@daric93
address ci failures
8a895cf
Signed-off-by: Daria Korenieva <[email protected]>
@daric93
Merge branch 'valkey_test_container' of github.com:daric93/testcontai…
570c6cf
…ners-python into valkey_test_container
@daric93
update uv.lock for version 4.15.0-rc.1
2108a20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@jbrinkman jbrinkman jbrinkman left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@daric93 daric93

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@daric93 @jbrinkman @Tranquility2
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.