Skip to content

Commit 9a97385

Browse files
fix(core): recreate poetry lockfile with latest versions of libraries (#946)
updated python version to 3.10 for simpler lockfile recreated lockfile updated ci for python 3.10 and no more sphinx (readthedocs is broken) since docs are mkdocs (which are not ready)
1 parent c785ecd commit 9a97385

File tree

9 files changed

+3725
-2819
lines changed

9 files changed

+3725
-2819
lines changed

.github/workflows/ci-community.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
python-version: ["3.9", "3.13", "3.14"]
47+
python-version: ["3.10", "3.13", "3.14"]
4848
module: ${{ fromJSON(needs.track-modules.outputs.changed_modules) }}
4949
steps:
5050
- name: Checkout contents

.github/workflows/ci-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.9", "3.13", "3.14"]
17+
python-version: ["3.10", "3.13", "3.14"]
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Set up Python

.github/workflows/ci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
python-version: "3.13"
2020
- name: Install Python dependencies
21-
run: poetry install --no-interaction
21+
run: poetry install --with dev --no-interaction
2222
- name: Execute pre-commit handler
2323
continue-on-error: true
2424
run: |

.github/workflows/docs.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

core/testcontainers/compose/compose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _ignore_properties(cls: type[_IPT], dict_: Any) -> _IPT:
3030
raise TypeError(f"Expected a dataclass type, got {cls}")
3131
class_fields = {f.name for f in fields(cls)}
3232
filtered = {k: v for k, v in dict_.items() if k in class_fields}
33-
return cast("_IPT", cls(**filtered))
33+
return cls(**filtered)
3434

3535

3636
@dataclass

core/testcontainers/core/waiting_utils.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def check_http(container):
161161
)
162162

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

200-
@wrapt.decorator # type: ignore[misc]
201-
def wrapper(wrapped: Callable[..., Any], instance: Any, args: list[Any], kwargs: dict[str, Any]) -> Any:
200+
@wrapt.decorator
201+
def wrapper(wrapped: Callable[..., Any], instance: Any, args: tuple[Any], kwargs: dict[str, Any]) -> Any:
202202
# Use the LegacyWaitStrategy to handle retries with proper timeout
203203
strategy = LegacyWaitStrategy(wrapped, instance, args, kwargs)
204204
# For backwards compatibility, assume the instance is the container
205-
container = instance if hasattr(instance, "get_container_host_ip") else args[0] if args else None
205+
try:
206+
first_arg = args[0]
207+
except IndexError:
208+
first_arg = None
209+
container = instance if hasattr(instance, "get_container_host_ip") else first_arg
206210
if container:
207211
return strategy.wait_until_ready(container)
208212
else:

core/tests/test_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ def test_network_has_labels():
9090
try:
9191
network.create()
9292
network = network._docker.client.networks.get(network_id=network.id)
93-
assert LABEL_SESSION_ID in network.attrs.get("Labels") # type: ignore[attr-defined]
93+
assert LABEL_SESSION_ID in network.attrs.get("Labels")
9494
finally:
9595
network.remove()

poetry.lock

Lines changed: 3649 additions & 2727 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 63 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -82,58 +82,58 @@ packages = [
8282
"Issue Tracker" = "https://github.com/testcontainers/testcontainers-python/issues"
8383

8484
[tool.poetry.dependencies]
85-
python = ">=3.9.2"
85+
python = ">=3.10"
8686
docker = "*" # ">=4.0"
8787
urllib3 = "*" # "<2.0"
8888
wrapt = "*" # "^1.16.0"
8989
typing-extensions = "*"
9090
python-dotenv = "*"
9191

9292
# community modules
93-
python-arango = { version = "^7.8", optional = true }
94-
azure-storage-blob = { version = "^12.19", optional = true }
95-
cassandra-driver = { version = "3.29.1", optional = true }
93+
python-arango = { version = "^8", optional = true }
94+
azure-storage-blob = { version = "^12", optional = true }
95+
cassandra-driver = { version = "^3", optional = true }
9696
#clickhouse-driver = { version = "*", optional = true }
97-
google-cloud-pubsub = { version = ">=2", optional = true }
98-
google-cloud-datastore = { version = ">=2", optional = true }
99-
influxdb = { version = "*", optional = true }
100-
influxdb-client = { version = "*", optional = true }
97+
google-cloud-pubsub = { version = "^2", optional = true }
98+
google-cloud-datastore = { version = "^2", optional = true }
99+
influxdb = { version = "^5", optional = true }
100+
influxdb-client = { version = "^1", optional = true }
101101
kubernetes = { version = "*", optional = true }
102102
pyyaml = { version = ">=6.0.3", optional = true }
103-
python-keycloak = { version = "*", optional = true }
104-
boto3 = { version = "*", optional = true }
105-
minio = { version = "*", optional = true }
106-
nats-py = { version = "*", optional = true }
107-
pymongo = { version = "*", optional = true }
108-
sqlalchemy = { version = "*", optional = true }
109-
pymssql = { version = ">=2.3.9", optional = true, markers = "platform_machine != 'arm64' or python_version >= '3.10'" }
110-
pymysql = { version = "*", extras = ["rsa"], optional = true }
111-
neo4j = { version = "*", optional = true }
112-
openfga-sdk = { version = "*", optional = true, markers = "python_version >= '3.10'" }
113-
opensearch-py = { version = "*", optional = true, markers = "python_version < '4.0'" }
114-
oracledb = { version = ">=3.4.1", optional = true }
115-
pika = { version = "*", optional = true }
116-
redis = { version = "*", optional = true }
117-
selenium = { version = "*", optional = true }
118-
weaviate-client = { version = "^4.5.4", optional = true }
119-
chromadb-client = { version = "^1.0.0", optional = true }
120-
qdrant-client = { version = "*", optional = true }
121-
bcrypt = { version = "*", optional = true }
122-
httpx = { version = "*", optional = true }
123-
azure-cosmos = { version = "*", optional = true }
103+
python-keycloak = { version = "^6", optional = true, markers = "python_version < '4.0'" }
104+
boto3 = { version = "^1", optional = true }
105+
minio = { version = "^7", optional = true }
106+
nats-py = { version = "^2", optional = true }
107+
pymongo = { version = "^4", optional = true }
108+
sqlalchemy = { version = "^2", optional = true }
109+
pymssql = { version = "^2", optional = true }
110+
pymysql = { version = "^1", extras = ["rsa"], optional = true }
111+
neo4j = { version = "^6", optional = true }
112+
openfga-sdk = { version = "*", optional = true }
113+
opensearch-py = { version = "^3", optional = true, markers = "python_version < '4.0'" }
114+
oracledb = { version = "^3", optional = true }
115+
pika = { version = "^1", optional = true }
116+
redis = { version = "^7", optional = true }
117+
selenium = { version = "^4", optional = true }
118+
weaviate-client = { version = "^4", optional = true }
119+
chromadb-client = { version = "^1", optional = true }
120+
qdrant-client = { version = "^1", optional = true }
121+
bcrypt = { version = "^5", optional = true }
122+
azure-cosmos = { version = "^4", optional = true }
124123
cryptography = { version = "*", optional = true }
125124
trino = { version = "*", optional = true }
126125
ibm_db_sa = { version = "*", optional = true, markers = "platform_machine != 'aarch64' and platform_machine != 'arm64'" }
127-
pydantic = { version = ">=2.12.4", optional = true } # upgrade for 3.14 compat (uses pyo3)
128-
rpds-py = { version = ">=0.28.0", optional = true, markers = "python_version >= '3.10'" }
129-
grpcio = { version = ">=1.75.1", optional = true }
130-
markupsafe = { version = ">=3.0.3", optional = true }
131-
ujson = { version = ">=5.11.0", optional = true }
132-
aiohttp = { version = ">=3.13.2", optional = true }
133-
grpcio-tools = { version = ">=1.76.0", optional = true }
134-
msgpack = { version = ">=1.1.2", optional = true }
135-
pandas = { version = ">=2.3.3", optional = true }
136-
httpcore = { version = ">=1.0.8", optional = true } # we could fix this for everyone but this is httpx's responsibility
126+
pydantic = { version = "^2", optional = true } # upgrade for 3.14 compat (uses pyo3)
127+
rpds-py = { version = "*", optional = true }
128+
grpcio = { version = "^1", optional = true }
129+
markupsafe = { version = "^3", optional = true }
130+
ujson = { version = "^5", optional = true }
131+
aiohttp = { version = "^3", optional = true }
132+
grpcio-tools = { version = "^1", optional = true }
133+
msgpack = { version = "^1", optional = true }
134+
pandas = { version = "^2", optional = true }
135+
httpx = { version = "*", optional = true }
136+
httpcore = { version = "^1", optional = true } # we could fix this for everyone but this is httpx's responsibility
137137

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

198198
[tool.poetry.group.dev.dependencies]
199-
mypy = "1.11.2"
200-
pre-commit = "^3.6"
201-
pytest = "8.4.2"
202-
pytest-cov = "4.1.0"
203-
sphinx = "7.2.6"
199+
pytest = "^9"
200+
pytest-asyncio = "^1"
201+
pytest-cov = "^7"
202+
pytest-mock = "^3"
203+
mypy = "^1"
204+
ruff = "*"
205+
pre-commit = "^4"
206+
sphinx = [
207+
{ version = "^8", markers = "python_version < '3.11'" },
208+
{ version = "^9", markers = "python_version >= '3.11'" },
209+
]
204210
twine = "6.2.0"
205-
anyio = "4.3.0"
211+
anyio = "^4"
206212
# for tests only
213+
sqlalchemy = "^2"
207214
psycopg2-binary = "2.9.11"
208-
pg8000 = "1.30.5"
209-
sqlalchemy = "2.0.28"
210-
psycopg = "3.1.18"
211-
cassandra-driver = "3.29.1"
212-
pytest-asyncio = "0.23.5"
213-
kafka-python-ng = "^2.2.0"
214-
hvac = { version = "2.1.0", markers = "python_version < '4.0'" }
215-
pymilvus = "2.6.1"
216-
httpx = "0.28.1"
217-
cryptography = "45.0.7"
218-
paho-mqtt = "2.1.0"
219-
sqlalchemy-cockroachdb = "2.0.2"
220-
paramiko = "^3.4.0"
221-
types-paramiko = "^3.4.0.20240423"
222-
pytest-mock = "^3.14.0"
223-
ruff = "0.11.5"
215+
pg8000 = "1.31.5"
216+
psycopg = "^3"
217+
cassandra-driver = "^3"
218+
kafka-python-ng = "^2"
219+
hvac = { version = "^2", markers = "python_version < '4.0'" }
220+
pymilvus = "^2"
221+
paho-mqtt = "^2"
222+
sqlalchemy-cockroachdb = "^2"
223+
paramiko = "^4"
224+
types-paramiko = "^4"
224225

225226
[[tool.poetry.source]]
226227
name = "PyPI-public"
@@ -322,7 +323,7 @@ keep-runtime-typing = true
322323
strict = true
323324

324325
[tool.mypy]
325-
python_version = "3.9"
326+
python_version = "3.10"
326327
namespace_packages = true
327328
explicit_package_bases = true
328329
pretty = true

0 commit comments

Comments
 (0)