From 23803c32a73a7ff7e671fadfc8c8b4d6e0c4126c Mon Sep 17 00:00:00 2001 From: thenav56 Date: Mon, 16 Nov 2026 15:37:08 +0545 Subject: [PATCH 1/2] feat(wait_for_resources): add --s3 check via head_bucket per S3 storage Co-Authored-By: Claude Opus 5.5 --- README.md | 4 +- pyproject.toml | 4 + .../management/commands/wait_for_resources.py | 81 ++++++- tests/test_wait_for_resources.py | 158 +++++++++++- uv.lock | 225 ++++++++++++++++++ 5 files changed, 469 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b64dd2..7a63ace 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Reusable Django utilities and management commands for Toggle projects. ## Features - Shared management command: `wait_for_resources` - — Wait for database, Redis, Minio (S3) resources to be available before startup + — Wait for database, Redis, Minio, S3 resources to be available before startup - Create Initial Users: `create_initial_users` - Create Users with specified roles and permissions, useful to populate the database with default users during development or testing - Health endpoints: `HealthProbeMiddleware` @@ -61,6 +61,7 @@ python manage.py wait_for_resources --db --cache - `--db`: Wait for database - `--cache`: Wait for the Django cache backend (requires a redis client in your project, e.g. via `django-redis` or `redis`; it is not a banjo-utils runtime dependency) - `--minio`: Wait for Minio (S3 storage) +- `--s3`: Wait for the bucket of every S3-backed storage in `STORAGES` (`storages.backends.s3.S3Storage`, `S3Boto3Storage` or a subclass). Each bucket is checked with `HeadBucket` using that storage's own client, so its endpoint, credentials, region and addressing style apply; the credentials need `s3:ListBucket` on the bucket. Non-S3 storages are skipped; with none configured it prints a warning and does not wait. On Django < 4.2 only the default storage is checked. Requires `django-storages[s3]`; it is not a banjo-utils runtime dependency - `--celery-broker`: Wait for the Celery broker at `CELERY_BROKER_URL` (requires `kombu`, installed with celery; it is not a banjo-utils runtime dependency) - `--timeout`: Set max wait time (seconds) @@ -68,6 +69,7 @@ python manage.py wait_for_resources --db --cache ```bash python manage.py wait_for_resources --db --cache python manage.py wait_for_resources --timeout 300 --minio --celery-broker +python manage.py wait_for_resources --db --s3 python manage.py create_initial_users --users-json=" [ { diff --git a/pyproject.toml b/pyproject.toml index 110b0fc..df9296a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,10 @@ dev = [ # celery) because nothing imports ``django_redis`` and the redis path is # fully mocked -- there is no version-sensitive surface to exercise. "django-redis", + # django-storages[s3] (boto3) is NOT a runtime dependency either: a project + # using S3 storage installs it. It lives here so ``wait_for_resources --s3`` + # tests can build real S3Storage instances (the boto3 client is mocked). + "django-storages[s3]>=1.14.6", ] test = [ "pytest-django", diff --git a/src/banjo_utils/management/commands/wait_for_resources.py b/src/banjo_utils/management/commands/wait_for_resources.py index 39bf726..122e95a 100644 --- a/src/banjo_utils/management/commands/wait_for_resources.py +++ b/src/banjo_utils/management/commands/wait_for_resources.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import signal from typing import Any from urllib.parse import urljoin @@ -5,7 +7,7 @@ import httpx from django.conf import settings from django.core.cache import cache -from django.core.management.base import BaseCommand, CommandParser +from django.core.management.base import BaseCommand, CommandError, CommandParser from django.db import connections from django.db.utils import OperationalError from typing_extensions import override @@ -123,6 +125,76 @@ def wait_for_minio(self) -> None: retry_helper.wait() self.stdout.write(self.style.SUCCESS(f"Minio is available after {retry_helper.total_time()} seconds")) + def get_s3_storages(self, s3_storage_class: type) -> dict[str, Any]: + """Return the configured storages (by alias) that are S3-backed.""" + try: + from django.core.files.storage import storages # noqa: PLC0415 + except ImportError: + # Django < 4.2 has no ``STORAGES``; only the default storage is checked. + from django.core.files.storage import default_storage # noqa: PLC0415 + + candidates: dict[str, Any] = {"default": default_storage} + else: + candidates = {alias: storages[alias] for alias in settings.STORAGES} + return {alias: storage for alias, storage in candidates.items() if isinstance(storage, s3_storage_class)} + + def wait_for_s3(self) -> None: + # ``django-storages`` and ``boto3`` are not banjo-utils runtime + # dependencies; an S3-backed project supplies them. Import them lazily so + # the other checks never require them, and re-raise with a friendly + # message if the ``--s3`` path is used without them. + try: + from botocore.exceptions import BotoCoreError, ClientError # noqa: PLC0415 + + try: + from storages.backends.s3 import S3Storage # noqa: PLC0415 + + s3_storage_class: type = S3Storage + except ImportError: + # django-storages < 1.14 only ships the s3boto3 module. + from storages.backends.s3boto3 import S3Boto3Storage # noqa: PLC0415 + + s3_storage_class = S3Boto3Storage + except ImportError as e: + raise ImportError( + "wait_for_resources --s3 requires 'django-storages[s3]' (django-storages " + "with boto3), which is not a banjo-utils runtime dependency. Install it " + "in your project.", + ) from e + + s3_storages = self.get_s3_storages(s3_storage_class) + if not s3_storages: + self.stdout.write(self.style.WARNING("No S3-backed storage is configured. Skipping wait")) + return + + for alias, storage in s3_storages.items(): + if not storage.bucket_name: + raise CommandError(f"S3 storage '{alias}' has no bucket_name configured.") + + self.stdout.write("Waiting for S3...") + pending = dict(s3_storages) + for alias, storage in pending.items(): + self.stdout.write(f"Waiting for S3 bucket '{storage.bucket_name}' (storage '{alias}')...") + retry_helper = RetryHelper() + while True: + for alias, storage in list(pending.items()): + try: + # The storage's own client carries its endpoint, credentials, + # region and addressing style. + storage.connection.meta.client.head_bucket(Bucket=storage.bucket_name) + del pending[alias] + except (BotoCoreError, ClientError) as e: + self.stdout.write( + self.style.WARNING( + f"S3 bucket '{storage.bucket_name}' (storage '{alias}') not available: {type(e).__name__}: {e}", + ), + ) + if not pending: + break + self.stdout.write(self.style.WARNING(retry_helper.try_again_message("S3 not available"))) + retry_helper.wait() + self.stdout.write(self.style.SUCCESS(f"S3 is available after {retry_helper.total_time()} seconds")) + @override def add_arguments(self, parser: CommandParser) -> None: parser.add_argument( @@ -134,6 +206,11 @@ def add_arguments(self, parser: CommandParser) -> None: parser.add_argument("--db", action="store_true", help="Wait for DB to be available") parser.add_argument("--cache", action="store_true", help="Wait for the Django cache backend to be available") parser.add_argument("--minio", action="store_true", help="Wait for MinIO (S3) storage to be available") + parser.add_argument( + "--s3", + action="store_true", + help="Wait for the bucket of every S3-backed storage in STORAGES to be reachable (HeadBucket)", + ) parser.add_argument( "--celery-broker", action="store_true", @@ -150,6 +227,8 @@ def handle(self, *_: Any, **kwargs: Any) -> None: self.wait_for_db() if kwargs.get("minio"): self.wait_for_minio() + if kwargs.get("s3"): + self.wait_for_s3() if kwargs.get("cache"): self.wait_for_cache() if kwargs.get("celery_broker"): diff --git a/tests/test_wait_for_resources.py b/tests/test_wait_for_resources.py index 079b7fb..ed9adae 100644 --- a/tests/test_wait_for_resources.py +++ b/tests/test_wait_for_resources.py @@ -5,13 +5,19 @@ if typing.TYPE_CHECKING: from django.conf import LazySettings +import sys from io import StringIO from typing import Any -from unittest.mock import MagicMock, patch +from unittest.mock import MagicMock, PropertyMock, patch +import django +import pytest +from botocore.exceptions import ClientError, EndpointConnectionError from django.core.management import call_command +from django.core.management.base import CommandError from django.db.utils import OperationalError from kombu.exceptions import OperationalError as KombuOperationalError +from storages.backends.s3 import S3Storage from banjo_utils.management.commands.wait_for_resources import ( TimeoutException, @@ -127,3 +133,153 @@ def test_multiple_flags(mock_sleep: MagicMock, mock_cache: MagicMock, mock_conne assert "DB is available" in out assert "Cache is available" in out + + +S3_BACKEND = "storages.backends.s3.S3Storage" +FS_BACKEND = "django.core.files.storage.FileSystemStorage" + +requires_django_storages_setting = pytest.mark.skipif( + django.VERSION < (4, 2), + reason="settings.STORAGES requires Django 4.2+", +) + + +def s3_storage(bucket_name: str) -> dict[str, Any]: + return {"BACKEND": S3_BACKEND, "OPTIONS": {"bucket_name": bucket_name}} + + +def storages_setting(**s3_buckets: str) -> dict[str, Any]: + # S3 storages use non-default aliases: on Django 4.2, overriding STORAGES in + # tests also overrides DEFAULT_FILE_STORAGE/STATICFILES_STORAGE, which drops + # the OPTIONS of the "default" and "staticfiles" aliases. + return { + "default": {"BACKEND": FS_BACKEND}, + "staticfiles": {"BACKEND": FS_BACKEND}, + **{alias: s3_storage(bucket) for alias, bucket in s3_buckets.items()}, + } + + +def not_found() -> ClientError: + return ClientError({"Error": {"Code": "404", "Message": "Not Found"}}, "HeadBucket") + + +@pytest.fixture +def s3_client(): + """Mock boto3 client returned by every S3Storage's ``connection.meta.client``.""" + with patch.object(S3Storage, "connection", new_callable=PropertyMock) as mock_connection: + yield mock_connection.return_value.meta.client + + +def head_bucket_calls(client: MagicMock) -> list[str]: + return [call.kwargs["Bucket"] for call in client.head_bucket.call_args_list] + + +@requires_django_storages_setting +@patch("time.sleep", return_value=None) +def test_wait_for_s3_multiple_buckets_success(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = storages_setting(media="media", static="static") + + out, _ = run_command("--s3") + + assert "Waiting for S3 bucket 'media' (storage 'media')" in out + assert "Waiting for S3 bucket 'static' (storage 'static')" in out + assert "S3 is available" in out + assert sorted(head_bucket_calls(s3_client)) == ["media", "static"] + mock_sleep.assert_not_called() + + +@requires_django_storages_setting +@patch("time.sleep", return_value=None) +def test_wait_for_s3_retries_then_succeeds(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = storages_setting(media="media", static="static") + + attempts: dict[str, int] = {} + + def head_bucket(Bucket: str): + attempts[Bucket] = attempts.get(Bucket, 0) + 1 + if Bucket == "static" and attempts[Bucket] == 1: + raise not_found() + + s3_client.head_bucket.side_effect = head_bucket + + out, _ = run_command("--s3") + + assert "S3 bucket 'static' (storage 'static') not available: ClientError" in out + assert "S3 is available" in out + assert attempts == {"media": 1, "static": 2} + assert mock_sleep.call_count == 1 + + +@requires_django_storages_setting +@patch("time.sleep") +def test_wait_for_s3_timeout(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = storages_setting(media="media") + s3_client.head_bucket.side_effect = EndpointConnectionError(endpoint_url="http://minio:9000/media") + + def raise_timeout(_): + raise TimeoutException + + mock_sleep.side_effect = raise_timeout + + out, err = run_command("--s3") + + assert "not available: EndpointConnectionError" in out + assert "S3 is available" not in out + assert "Timed out" in err + + +@requires_django_storages_setting +@patch("time.sleep", return_value=None) +def test_wait_for_s3_no_s3_storages(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = storages_setting() + + out, _ = run_command("--s3") + + assert "No S3-backed storage is configured. Skipping wait" in out + s3_client.head_bucket.assert_not_called() + mock_sleep.assert_not_called() + + +@requires_django_storages_setting +@patch("time.sleep", return_value=None) +def test_wait_for_s3_skips_non_s3_storages(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = { + **storages_setting(media="media"), + "uploads": {"BACKEND": FS_BACKEND}, + "legacy": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"bucket_name": "legacy"}}, + } + + out, _ = run_command("--s3") + + assert "'default'" not in out + assert "'staticfiles'" not in out + assert "'uploads'" not in out + assert "S3 is available" in out + assert sorted(head_bucket_calls(s3_client)) == ["legacy", "media"] + + +@requires_django_storages_setting +def test_wait_for_s3_requires_bucket_name(s3_client: MagicMock, settings: LazySettings): + settings.STORAGES = {**storages_setting(), "media": {"BACKEND": S3_BACKEND}} + + with pytest.raises(CommandError, match="no bucket_name"): + run_command("--s3") + s3_client.head_bucket.assert_not_called() + + +@pytest.mark.skipif(django.VERSION >= (4, 2), reason="Django < 4.2 falls back to DEFAULT_FILE_STORAGE") +@patch("time.sleep", return_value=None) +def test_wait_for_s3_default_file_storage_fallback(mock_sleep: MagicMock, s3_client: MagicMock, settings: LazySettings): + settings.DEFAULT_FILE_STORAGE = S3_BACKEND + settings.AWS_STORAGE_BUCKET_NAME = "media" + + out, _ = run_command("--s3") + + assert "Waiting for S3 bucket 'media' (storage 'default')" in out + assert head_bucket_calls(s3_client) == ["media"] + + +def test_wait_for_s3_requires_django_storages(): + missing = {"storages.backends.s3": None, "storages.backends.s3boto3": None} + with patch.dict(sys.modules, missing), pytest.raises(ImportError, match=r"django-storages\[s3\]"): + run_command("--s3") diff --git a/uv.lock b/uv.lock index 4ef56d1..bbd7e9b 100644 --- a/uv.lock +++ b/uv.lock @@ -134,6 +134,7 @@ dev = [ { name = "colorlog" }, { name = "django-celery-beat" }, { name = "django-redis" }, + { name = "django-storages", extra = ["s3"] }, { name = "django-stubs", version = "5.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "django-stubs", version = "6.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "types-factory-boy" }, @@ -160,6 +161,7 @@ dev = [ { name = "colorlog" }, { name = "django-celery-beat" }, { name = "django-redis" }, + { name = "django-storages", extras = ["s3"], specifier = ">=1.14.6" }, { name = "django-stubs" }, { name = "types-factory-boy", specifier = ">=0.4.1" }, ] @@ -180,6 +182,110 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/87/8bab77b323f16d67be364031220069f79159117dd5e43eeb4be2fef1ac9b/billiard-4.2.4-py3-none-any.whl", hash = "sha256:525b42bdec68d2b983347ac312f892db930858495db601b5836ac24e6477cde5", size = 87070, upload-time = "2025-11-30T13:28:47.016Z" }, ] +[[package]] +name = "boto3" +version = "1.37.38" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.9'", +] +dependencies = [ + { name = "botocore", version = "1.37.38", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, + { name = "jmespath", version = "1.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, + { name = "s3transfer", version = "0.11.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0d/b5/d1c2e8c484cea43891629bbab6ca90ce9ca932586750bc0e786c8f096ccf/boto3-1.37.38.tar.gz", hash = "sha256:88c02910933ab7777597d1ca7c62375f52822e0aa1a8e0c51b2598a547af42b2", size = 111623, upload-time = "2025-04-21T19:27:18.06Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d3/87/8189f22ee798177bc7b40afd13f046442c5f91b699e70a950b42ff447e80/boto3-1.37.38-py3-none-any.whl", hash = "sha256:b6d42803607148804dff82389757827a24ce9271f0583748853934c86310999f", size = 139922, upload-time = "2025-04-21T19:27:16.107Z" }, +] + +[[package]] +name = "boto3" +version = "1.42.97" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.9.*'", +] +dependencies = [ + { name = "botocore", version = "1.42.97", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "jmespath", version = "1.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "s3transfer", version = "0.16.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/7d/5c6fa0bb9fd5caf865b9356411793900304328bcd0bc1eda96a32a1368a6/boto3-1.42.97.tar.gz", hash = "sha256:2833dbeda3670ea610ad48dff7d27cdc829dbbfcdfbc6b750b673948e949b6f0", size = 113217, upload-time = "2026-04-27T20:39:17.646Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/43/84c1888139aa1aaf1dc53f8f914e6ec629e5a571fbafdd42fb2d98ac361f/boto3-1.42.97-py3-none-any.whl", hash = "sha256:966e49f0510af9a64057a902b7df53d4348c447de0d3df4cc855dfd85e058fcd", size = 140556, upload-time = "2026-04-27T20:39:15.509Z" }, +] + +[[package]] +name = "boto3" +version = "1.44.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version >= '3.10' and python_full_version < '3.12'", +] +dependencies = [ + { name = "botocore", version = "1.44.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "jmespath", version = "1.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "s3transfer", version = "0.19.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/58/f3/625dd5a18c17e703f10029e16ccd991802e784b27cc627045f16d60a5d4c/boto3-1.44.3.tar.gz", hash = "sha256:bba566b5cba78db05c5f6c44d219c8f6fb2cd2b923106f767289e4cd0b87b093", size = 112741, upload-time = "2026-11-13T20:16:51.884Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/b5/2807516d854b60f430917590fcfe470bc60c5383cd6b27dc57aa6dc6afea/boto3-1.44.3-py3-none-any.whl", hash = "sha256:8c9c4844c7ce184494b102983696d6cdb09f5307ec7f238ca4ad5849fb14e26b", size = 140155, upload-time = "2026-11-13T20:16:50.577Z" }, +] + +[[package]] +name = "botocore" +version = "1.37.38" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.9'", +] +dependencies = [ + { name = "jmespath", version = "1.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, + { name = "python-dateutil", marker = "python_full_version < '3.9'" }, + { name = "urllib3", version = "1.26.20", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/34/79/4e072e614339727f79afef704e5993b5b4d2667c1671c757cc4deb954744/botocore-1.37.38.tar.gz", hash = "sha256:c3ea386177171f2259b284db6afc971c959ec103fa2115911c4368bea7cbbc5d", size = 13832365, upload-time = "2025-04-21T19:27:05.245Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/1b/93f3504afc7c523dcaa8a8147cfc75421983e30b08d9f93a533929589630/botocore-1.37.38-py3-none-any.whl", hash = "sha256:23b4097780e156a4dcaadfc1ed156ce25cb95b6087d010c4bb7f7f5d9bc9d219", size = 13499391, upload-time = "2025-04-21T19:27:00.869Z" }, +] + +[[package]] +name = "botocore" +version = "1.42.97" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.9.*'", +] +dependencies = [ + { name = "jmespath", version = "1.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "python-dateutil", marker = "python_full_version == '3.9.*'" }, + { name = "urllib3", version = "1.26.20", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c6/95/c37edb602948fad2253ffd1bb3dba5b938645bd1845ee4160350136a0f41/botocore-1.42.97.tar.gz", hash = "sha256:5c0bb00e32d16ff6d278cc8c9e10dc3672d9c1d569031635ac3c908a60de8310", size = 15269348, upload-time = "2026-04-27T20:39:05.625Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/d2/8e025ba1a4e257879af72d06913272311af79673d82fa2581a351b924317/botocore-1.42.97-py3-none-any.whl", hash = "sha256:77d2c8ce1bc592d3fbd7c01c35836f4a5b0cac2ca03ccdf6ffc60faa16b5fadc", size = 14950367, upload-time = "2026-04-27T20:39:01.261Z" }, +] + +[[package]] +name = "botocore" +version = "1.44.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version >= '3.10' and python_full_version < '3.12'", +] +dependencies = [ + { name = "jmespath", version = "1.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "python-dateutil", marker = "python_full_version >= '3.10'" }, + { name = "urllib3", version = "2.8.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/03/e8/130935f123174b900f55fef077c33af43825e5b68fe963bcc1fc3e4634eb/botocore-1.44.3.tar.gz", hash = "sha256:44d86fff55ce2d014bd72183ebc164b21b36598253b8234d4f59e8600e09b8b3", size = 16668982, upload-time = "2026-11-13T20:16:47.549Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/65/e39cc0e0d16cf9efe0afab0edef48b89491b548e2c7d7ddc23bbb2c6422c/botocore-1.44.3-py3-none-any.whl", hash = "sha256:793eac2a7ca167e9376b136cf000e1675e9ffe8d7ec609160cc1ee00b93ace28", size = 16368633, upload-time = "2026-11-13T20:16:43.695Z" }, +] + [[package]] name = "celery" version = "5.5.3" @@ -434,6 +540,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/f1/63caad7c9222c26a62082f4f777de26389233b7574629996098bf6d25a4d/django_redis-5.4.0-py3-none-any.whl", hash = "sha256:ebc88df7da810732e2af9987f7f426c96204bf89319df4c6da6ca9a2942edd5b", size = 31119, upload-time = "2023-10-01T20:21:33.009Z" }, ] +[[package]] +name = "django-storages" +version = "1.14.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "django", version = "4.2.29", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "django", version = "5.2.12", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10' and python_full_version < '3.12'" }, + { name = "django", version = "6.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ff/d6/2e50e378fff0408d558f36c4acffc090f9a641fd6e084af9e54d45307efa/django_storages-1.14.6.tar.gz", hash = "sha256:7a25ce8f4214f69ac9c7ce87e2603887f7ae99326c316bc8d2d75375e09341c9", size = 87587, upload-time = "2025-04-02T02:34:55.103Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/21/3cedee63417bc5553eed0c204be478071c9ab208e5e259e97287590194f1/django_storages-1.14.6-py3-none-any.whl", hash = "sha256:11b7b6200e1cb5ffcd9962bd3673a39c7d6a6109e8096f0e03d46fab3d3aabd9", size = 33095, upload-time = "2025-04-02T02:34:53.291Z" }, +] + +[package.optional-dependencies] +s3 = [ + { name = "boto3", version = "1.37.38", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, + { name = "boto3", version = "1.42.97", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "boto3", version = "1.44.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] + [[package]] name = "django-stubs" version = "5.1.3" @@ -695,6 +822,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] +[[package]] +name = "jmespath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.9'", +] +sdist = { url = "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe", size = 25843, upload-time = "2022-06-17T18:00:12.224Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", size = 20256, upload-time = "2022-06-17T18:00:10.251Z" }, +] + +[[package]] +name = "jmespath" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version >= '3.10' and python_full_version < '3.12'", + "python_full_version == '3.9.*'", +] +sdist = { url = "https://files.pythonhosted.org/packages/d3/59/322338183ecda247fb5d1763a6cbe46eff7222eaeebafd9fa65d4bf5cb11/jmespath-1.1.0.tar.gz", hash = "sha256:472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d", size = 27377, upload-time = "2026-01-22T16:35:26.279Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/2f/967ba146e6d58cf6a652da73885f52fc68001525b4197effc174321d70b4/jmespath-1.1.0-py3-none-any.whl", hash = "sha256:a5663118de4908c91729bea0acadca56526eb2698e83de10cd116ae0f4e97c64", size = 20419, upload-time = "2026-01-22T16:35:24.919Z" }, +] + [[package]] name = "kombu" version = "5.5.4" @@ -1040,6 +1193,52 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f0/28/84e57fce7819e81ec5aa1bd31c42b89607241f4fb1a3ea5b0d2dbeaea26c/redis-7.3.0-py3-none-any.whl", hash = "sha256:9d4fcb002a12a5e3c3fbe005d59c48a2cc231f87fbb2f6b70c2d89bb64fec364", size = 404379, upload-time = "2026-03-06T18:18:14.583Z" }, ] +[[package]] +name = "s3transfer" +version = "0.11.5" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.9'", +] +dependencies = [ + { name = "botocore", version = "1.37.38", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/2b/5c9562795c2eb2b5f63536961754760c25bf0f34af93d36aa28dea2fb303/s3transfer-0.11.5.tar.gz", hash = "sha256:8c8aad92784779ab8688a61aefff3e28e9ebdce43142808eaa3f0b0f402f68b7", size = 149107, upload-time = "2025-04-17T19:23:19.051Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/39/13402e323666d17850eca87e4cd6ecfcf9fd7809cac9efdcce10272fc29d/s3transfer-0.11.5-py3-none-any.whl", hash = "sha256:757af0f2ac150d3c75bc4177a32355c3862a98d20447b69a0161812992fe0bd4", size = 84782, upload-time = "2025-04-17T19:23:17.516Z" }, +] + +[[package]] +name = "s3transfer" +version = "0.16.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.9.*'", +] +dependencies = [ + { name = "botocore", version = "1.42.97", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/46/29/af14f4ef3c11a50435308660e2cc68761c9a7742475e0585cd4396b91777/s3transfer-0.16.1.tar.gz", hash = "sha256:8e424355754b9ccb32467bdc568edf55be82692ef2002d934b1311dbb3b9e524", size = 154801, upload-time = "2026-04-22T20:36:06.475Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/03/19/90d7d4ed51932c022d53f1d02d564b62d10e272692a1f9b76425c1ad2a02/s3transfer-0.16.1-py3-none-any.whl", hash = "sha256:61bcd00ccb83b21a0fe7e91a553fff9729d46c83b4e0106e7c314a733891f7c2", size = 86825, upload-time = "2026-04-22T20:36:04.992Z" }, +] + +[[package]] +name = "s3transfer" +version = "0.19.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version >= '3.10' and python_full_version < '3.12'", +] +dependencies = [ + { name = "botocore", version = "1.44.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/49/c5/0a5ce655109cb96b8dfad36908a4e108d15f5dc2eff8fbc3146c4312e704/s3transfer-0.19.3.tar.gz", hash = "sha256:8326acc3d056d7f7b8a37110c7d2aea41f67e83f6ae79cd3b5fbcca34c726406", size = 166087, upload-time = "2026-10-19T19:19:49.751Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/a4/88f9e10498759121060b8050a1554753dfc04df39bbbcc7aad9ecc8d9440/s3transfer-0.19.3-py3-none-any.whl", hash = "sha256:24eb7535804306355e31c952a90022bf5b2f9d760f9a11062c7493a217c08553", size = 90252, upload-time = "2026-10-19T19:19:48.309Z" }, +] + [[package]] name = "six" version = "1.17.0" @@ -1227,6 +1426,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1d/70/5771c9ecbdb7cc0c3f3bbded7e0fa7911ee8e872ce5b5dc48ce7dce21a11/tzlocal-5.4-py3-none-any.whl", hash = "sha256:024d11221ff83453eae1f608f09b145b9779e1345d08c15404ce8ff7917cf629", size = 28261, upload-time = "2026-06-15T12:06:54.914Z" }, ] +[[package]] +name = "urllib3" +version = "1.26.20" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version == '3.9.*'", + "python_full_version < '3.9'", +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/e8/6ff5e6bc22095cfc59b6ea711b687e2b7ed4bdb373f7eeec370a97d7392f/urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32", size = 307380, upload-time = "2024-08-29T15:43:11.37Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/cf/8435d5a7159e2a9c83a95896ed596f68cf798005fe107cc655b5c5c14704/urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e", size = 144225, upload-time = "2024-08-29T15:43:08.921Z" }, +] + +[[package]] +name = "urllib3" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12'", + "python_full_version >= '3.10' and python_full_version < '3.12'", +] +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, +] + [[package]] name = "vine" version = "5.1.0" From 53c43f6456da701e32d6c33101cd4f65ce9162df Mon Sep 17 00:00:00 2001 From: thenav56 Date: Tue, 17 Nov 2026 17:05:53 +0545 Subject: [PATCH 2/2] ci: install matrix python via setup-uv Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ac842e0..f7510c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,12 +68,6 @@ jobs: steps: - uses: actions/checkout@main - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }}