Skip to content

Commit af2efe3

Browse files
authored
Merge branch 'main' into generic_sql
2 parents 4c7a67f + 5c1504c commit af2efe3

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.13.1"
2+
".": "4.13.2"
33
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## [4.13.2](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.13.1...testcontainers-v4.13.2) (2025-10-07)
4+
5+
6+
### Bug Fixes
7+
8+
* **core:** Fix issues with doctests ([#893](https://github.com/testcontainers/testcontainers-python/issues/893)) ([2e4d80a](https://github.com/testcontainers/testcontainers-python/commit/2e4d80ade5a2048c8bc79d7a2438004b8e0954e4))
9+
* **core:** waiting improvements + remove decorators in core ([#894](https://github.com/testcontainers/testcontainers-python/issues/894)) ([f93f379](https://github.com/testcontainers/testcontainers-python/commit/f93f379380a9de769fe6a1e1168622865cdf613d))
10+
* issue [#889](https://github.com/testcontainers/testcontainers-python/issues/889) by changing the annotated return type of `waiting_for` to `Self`. ([#890](https://github.com/testcontainers/testcontainers-python/issues/890)) ([fe941b1](https://github.com/testcontainers/testcontainers-python/commit/fe941b17bb97aad15dc4844996f166c9308f4476))
11+
* **mongo:** mongo start waiting forever for old mongo versions ([#783](https://github.com/testcontainers/testcontainers-python/issues/783)) ([1388612](https://github.com/testcontainers/testcontainers-python/commit/13886120e9cb72666a40ea3691ea13e584805918))
12+
* **redpanda:** copy the startup script to a path that can be written … ([#867](https://github.com/testcontainers/testcontainers-python/issues/867)) ([e6b976d](https://github.com/testcontainers/testcontainers-python/commit/e6b976de43fc6fe90d7131fd25983f9c6b08429b))
13+
* **trino:** Remove deprecated class and decorator from Trino container ([#895](https://github.com/testcontainers/testcontainers-python/issues/895)) ([bb646e9](https://github.com/testcontainers/testcontainers-python/commit/bb646e903236a1df72bc38dbb47d1dba95527198))
14+
315
## [4.13.1](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.13.0...testcontainers-v4.13.1) (2025-09-24)
416

517

modules/kafka/testcontainers/kafka/_redpanda.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os.path
12
import tarfile
23
import time
34
from io import BytesIO
@@ -21,7 +22,7 @@ class RedpandaContainer(DockerContainer):
2122
... connection = redpanda.get_bootstrap_server()
2223
"""
2324

24-
TC_START_SCRIPT = "/tc-start.sh"
25+
TC_START_SCRIPT = "/var/lib/redpanda/tc-start.sh"
2526

2627
def __init__(
2728
self,
@@ -74,9 +75,10 @@ def start(self, timeout=10) -> "RedpandaContainer":
7475

7576
def create_file(self, content: bytes, path: str) -> None:
7677
with BytesIO() as archive, tarfile.TarFile(fileobj=archive, mode="w") as tar:
77-
tarinfo = tarfile.TarInfo(name=path)
78+
dirname, basename = os.path.split(path)
79+
tarinfo = tarfile.TarInfo(name=basename)
7880
tarinfo.size = len(content)
7981
tarinfo.mtime = time.time()
8082
tar.addfile(tarinfo, BytesIO(content))
8183
archive.seek(0)
82-
self.get_wrapped_container().put_archive("/", archive)
84+
self.get_wrapped_container().put_archive(dirname, archive)

modules/mongodb/testcontainers/mongodb/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# License for the specific language governing permissions and limitations
1212
# under the License.
1313
import os
14+
import re
1415
from typing import Optional
1516

1617
from pymongo import MongoClient
@@ -77,7 +78,12 @@ def get_connection_url(self) -> str:
7778
)
7879

7980
def _connect(self) -> None:
80-
wait_for_logs(self, "Waiting for connections")
81+
regex = re.compile(r"waiting for connections", re.MULTILINE | re.IGNORECASE)
82+
83+
def predicate(text: str) -> bool:
84+
return regex.search(text) is not None
85+
86+
wait_for_logs(self, predicate)
8187

8288
def get_connection_client(self) -> MongoClient:
8389
return MongoClient(self.get_connection_url())

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "testcontainers"
3-
version = "4.13.1" # auto-incremented by release-please
3+
version = "4.13.2" # auto-incremented by release-please
44
description = "Python library for throwaway instances of anything that can run in a Docker container"
55
authors = ["Sergey Pirogov <[email protected]>"]
66
maintainers = [

0 commit comments

Comments
 (0)