Skip to content

Commit 6b8fffb

Browse files
authored
Bump testcontainers>=4.15.0 (#4137)
* Community modules were moved to the `testcontainers.community` subpackage since 4.15.0. Old imports emit warnings: > testcontainers.postgres is deprecated, use > testcontainers.community.postgres instead * Deprecated `wait_container_is_ready` decorator is not used by the postgres module since 4.14.0, making the warning filter redundant
1 parent 56621ac commit 6b8fffb

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ filterwarnings = [
146146
# Fail on any use of a pydantic v1 shim (`.dict()`, `parse_obj_as`, class-based `Config`, ...)
147147
# so they cannot creep back after the v2 migration.
148148
"error::pydantic.PydanticDeprecatedSince20",
149-
# testcontainers modules use deprecated decorators – nothing we can do:
150-
# https://github.com/testcontainers/testcontainers-python/issues/874
151-
"ignore:^The @wait_container_is_ready decorator:DeprecationWarning",
152149
]
153150

154151
[tool.tox]
@@ -195,7 +192,7 @@ test = [
195192
"freezegun>=1.5.1",
196193
"httpbin>=0.10.2", # indirect to make compatible with Werkzeug 3
197194
"openai>=1.68.2",
198-
"testcontainers>=4.9.2",
195+
"testcontainers>=4.15.0",
199196
]
200197
docs = [
201198
"dstack[server]",

src/dstack/_internal/server/testing/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest_asyncio
33
from sqlalchemy import StaticPool
44
from sqlalchemy.ext.asyncio import create_async_engine
5-
from testcontainers.postgres import PostgresContainer
5+
from testcontainers.community.postgres import PostgresContainer
66

77
from dstack._internal.server import settings
88
from dstack._internal.server.db import Database, override_db

src/tests/_internal/server/test_migrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from alembic.util.exc import CommandError
77
from sqlalchemy import create_engine
88
from sqlalchemy.ext.asyncio import create_async_engine
9-
from testcontainers.postgres import PostgresContainer
9+
from testcontainers.community.postgres import PostgresContainer
1010

1111

1212
def test_sqlite_migrations(monkeypatch: pytest.MonkeyPatch):

0 commit comments

Comments
 (0)