Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13", "3.14"]
python-version: ["3.10", "3.13", "3.14"]
module: ${{ fromJSON(needs.track-modules.outputs.changed_modules) }}
steps:
- name: Checkout contents
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13", "3.14"]
python-version: ["3.10", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: "3.13"
- name: Install Python dependencies
run: poetry install --no-interaction
run: poetry install --with dev --no-interaction
- name: Execute pre-commit handler
continue-on-error: true
run: |
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/docs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion core/testcontainers/compose/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _ignore_properties(cls: type[_IPT], dict_: Any) -> _IPT:
raise TypeError(f"Expected a dataclass type, got {cls}")
class_fields = {f.name for f in fields(cls)}
filtered = {k: v for k, v in dict_.items() if k in class_fields}
return cast("_IPT", cls(**filtered))
return cls(**filtered)


@dataclass
Expand Down
12 changes: 8 additions & 4 deletions core/testcontainers/core/waiting_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def check_http(container):
)

class LegacyWaitStrategy(WaitStrategy):
def __init__(self, func: Callable[..., Any], instance: Any, args: list[Any], kwargs: dict[str, Any]):
def __init__(self, func: Callable[..., Any], instance: Any, args: tuple[Any], kwargs: dict[str, Any]):
super().__init__()
self.func = func
self.instance = instance
Expand Down Expand Up @@ -197,12 +197,16 @@ def wait_until_ready(self, container: WaitStrategyTarget) -> Any:
logger.debug(f"Connection attempt failed: {e!s}")
time.sleep(self._poll_interval)

@wrapt.decorator # type: ignore[misc]
def wrapper(wrapped: Callable[..., Any], instance: Any, args: list[Any], kwargs: dict[str, Any]) -> Any:
@wrapt.decorator
def wrapper(wrapped: Callable[..., Any], instance: Any, args: tuple[Any], kwargs: dict[str, Any]) -> Any:
# Use the LegacyWaitStrategy to handle retries with proper timeout
strategy = LegacyWaitStrategy(wrapped, instance, args, kwargs)
# For backwards compatibility, assume the instance is the container
container = instance if hasattr(instance, "get_container_host_ip") else args[0] if args else None
try:
first_arg = args[0]
except IndexError:
first_arg = None
container = instance if hasattr(instance, "get_container_host_ip") else first_arg
if container:
return strategy.wait_until_ready(container)
else:
Expand Down
2 changes: 1 addition & 1 deletion core/tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ def test_network_has_labels():
try:
network.create()
network = network._docker.client.networks.get(network_id=network.id)
assert LABEL_SESSION_ID in network.attrs.get("Labels") # type: ignore[attr-defined]
assert LABEL_SESSION_ID in network.attrs.get("Labels")
finally:
network.remove()
6,376 changes: 3,649 additions & 2,727 deletions poetry.lock

Large diffs are not rendered by default.

125 changes: 63 additions & 62 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,58 +82,58 @@ packages = [
"Issue Tracker" = "https://github.com/testcontainers/testcontainers-python/issues"

[tool.poetry.dependencies]
python = ">=3.9.2"
python = ">=3.10"
docker = "*" # ">=4.0"
urllib3 = "*" # "<2.0"
wrapt = "*" # "^1.16.0"
typing-extensions = "*"
python-dotenv = "*"

# community modules
python-arango = { version = "^7.8", optional = true }
azure-storage-blob = { version = "^12.19", optional = true }
cassandra-driver = { version = "3.29.1", optional = true }
python-arango = { version = "^8", optional = true }
azure-storage-blob = { version = "^12", optional = true }
cassandra-driver = { version = "^3", optional = true }
#clickhouse-driver = { version = "*", optional = true }
google-cloud-pubsub = { version = ">=2", optional = true }
google-cloud-datastore = { version = ">=2", optional = true }
influxdb = { version = "*", optional = true }
influxdb-client = { version = "*", optional = true }
google-cloud-pubsub = { version = "^2", optional = true }
google-cloud-datastore = { version = "^2", optional = true }
influxdb = { version = "^5", optional = true }
influxdb-client = { version = "^1", optional = true }
kubernetes = { version = "*", optional = true }
pyyaml = { version = ">=6.0.3", optional = true }
python-keycloak = { version = "*", optional = true }
boto3 = { version = "*", optional = true }
minio = { version = "*", optional = true }
nats-py = { version = "*", optional = true }
pymongo = { version = "*", optional = true }
sqlalchemy = { version = "*", optional = true }
pymssql = { version = ">=2.3.9", optional = true, markers = "platform_machine != 'arm64' or python_version >= '3.10'" }
pymysql = { version = "*", extras = ["rsa"], optional = true }
neo4j = { version = "*", optional = true }
openfga-sdk = { version = "*", optional = true, markers = "python_version >= '3.10'" }
opensearch-py = { version = "*", optional = true, markers = "python_version < '4.0'" }
oracledb = { version = ">=3.4.1", optional = true }
pika = { version = "*", optional = true }
redis = { version = "*", optional = true }
selenium = { version = "*", optional = true }
weaviate-client = { version = "^4.5.4", optional = true }
chromadb-client = { version = "^1.0.0", optional = true }
qdrant-client = { version = "*", optional = true }
bcrypt = { version = "*", optional = true }
httpx = { version = "*", optional = true }
azure-cosmos = { version = "*", optional = true }
python-keycloak = { version = "^6", optional = true, markers = "python_version < '4.0'" }
boto3 = { version = "^1", optional = true }
minio = { version = "^7", optional = true }
nats-py = { version = "^2", optional = true }
pymongo = { version = "^4", optional = true }
sqlalchemy = { version = "^2", optional = true }
pymssql = { version = "^2", optional = true }
pymysql = { version = "^1", extras = ["rsa"], optional = true }
neo4j = { version = "^6", optional = true }
openfga-sdk = { version = "*", optional = true }
opensearch-py = { version = "^3", optional = true, markers = "python_version < '4.0'" }
oracledb = { version = "^3", optional = true }
pika = { version = "^1", optional = true }
redis = { version = "^7", optional = true }
selenium = { version = "^4", optional = true }
weaviate-client = { version = "^4", optional = true }
chromadb-client = { version = "^1", optional = true }
qdrant-client = { version = "^1", optional = true }
bcrypt = { version = "^5", optional = true }
azure-cosmos = { version = "^4", optional = true }
cryptography = { version = "*", optional = true }
trino = { version = "*", optional = true }
ibm_db_sa = { version = "*", optional = true, markers = "platform_machine != 'aarch64' and platform_machine != 'arm64'" }
pydantic = { version = ">=2.12.4", optional = true } # upgrade for 3.14 compat (uses pyo3)
rpds-py = { version = ">=0.28.0", optional = true, markers = "python_version >= '3.10'" }
grpcio = { version = ">=1.75.1", optional = true }
markupsafe = { version = ">=3.0.3", optional = true }
ujson = { version = ">=5.11.0", optional = true }
aiohttp = { version = ">=3.13.2", optional = true }
grpcio-tools = { version = ">=1.76.0", optional = true }
msgpack = { version = ">=1.1.2", optional = true }
pandas = { version = ">=2.3.3", optional = true }
httpcore = { version = ">=1.0.8", optional = true } # we could fix this for everyone but this is httpx's responsibility
pydantic = { version = "^2", optional = true } # upgrade for 3.14 compat (uses pyo3)
rpds-py = { version = "*", optional = true }
grpcio = { version = "^1", optional = true }
markupsafe = { version = "^3", optional = true }
ujson = { version = "^5", optional = true }
aiohttp = { version = "^3", optional = true }
grpcio-tools = { version = "^1", optional = true }
msgpack = { version = "^1", optional = true }
pandas = { version = "^2", optional = true }
httpx = { version = "*", optional = true }
httpcore = { version = "^1", optional = true } # we could fix this for everyone but this is httpx's responsibility

[tool.poetry.group.numpy_old.dependencies]
numpy = { version = ">=2.0", optional = true, markers = "python_version < '3.11'" }
Expand Down Expand Up @@ -196,31 +196,32 @@ chroma = ["chromadb-client"]
trino = ["trino"]

[tool.poetry.group.dev.dependencies]
mypy = "1.11.2"
pre-commit = "^3.6"
pytest = "8.4.2"
pytest-cov = "4.1.0"
sphinx = "7.2.6"
pytest = "^9"
pytest-asyncio = "^1"
pytest-cov = "^7"
pytest-mock = "^3"
mypy = "^1"
ruff = "*"
pre-commit = "^4"
sphinx = [
{ version = "^8", markers = "python_version < '3.11'" },
{ version = "^9", markers = "python_version >= '3.11'" },
]
twine = "6.2.0"
anyio = "4.3.0"
anyio = "^4"
# for tests only
sqlalchemy = "^2"
psycopg2-binary = "2.9.11"
pg8000 = "1.30.5"
sqlalchemy = "2.0.28"
psycopg = "3.1.18"
cassandra-driver = "3.29.1"
pytest-asyncio = "0.23.5"
kafka-python-ng = "^2.2.0"
hvac = { version = "2.1.0", markers = "python_version < '4.0'" }
pymilvus = "2.6.1"
httpx = "0.28.1"
cryptography = "45.0.7"
paho-mqtt = "2.1.0"
sqlalchemy-cockroachdb = "2.0.2"
paramiko = "^3.4.0"
types-paramiko = "^3.4.0.20240423"
pytest-mock = "^3.14.0"
ruff = "0.11.5"
pg8000 = "1.31.5"
psycopg = "^3"
cassandra-driver = "^3"
kafka-python-ng = "^2"
hvac = { version = "^2", markers = "python_version < '4.0'" }
pymilvus = "^2"
paho-mqtt = "^2"
sqlalchemy-cockroachdb = "^2"
paramiko = "^4"
types-paramiko = "^4"

[[tool.poetry.source]]
name = "PyPI-public"
Expand Down Expand Up @@ -322,7 +323,7 @@ keep-runtime-typing = true
strict = true

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
namespace_packages = true
explicit_package_bases = true
pretty = true
Expand Down