Skip to content

Commit

Permalink
Bump python to 3.9 (#137)
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Gol <[email protected]>
  • Loading branch information
maciej-gol and Maciej Gol authored Jan 19, 2025
1 parent 4769da1 commit abd8bce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
tenants-app:
- django-tenants
celery: ['celery', 'celery<5.5', 'celery<5.4']
Expand Down
22 changes: 0 additions & 22 deletions local-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,3 @@ services:
redis:
image: redis
network_mode: host

app:
image: "python:${PYTHON_VERSION:-3.8}-slim"
depends_on:
- postgres
- redis
environment:
- DATABASE_HOST=postgres
- BROKER_URL=${BROKER_URL:-amqp://guest:guest@rabbitmq:5672/}
- ADDITIONAL_REQUIREMENTS=${ADDITIONAL_REQUIREMENTS}
- TASK_TENANT_CACHE_SECONDS=10

volumes:
- ./tenant_schemas_celery:/app/tenant_schemas_celery
- ./test_app:/app/test_app
- ./requirements.txt:/app/requirements.txt
- ./__app_run_tests:/app/__app_run_tests
- ./setup.py:/app/setup.py
- ./VERSION:/app/VERSION
- ./README.md:/app/README.md

command: ["bash", "-c", "cd /app && ./__app_run_tests"]
2 changes: 1 addition & 1 deletion run-tests
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
export PYTHON_VERSION=${PYTHON_VERSION:-3.8}
export PYTHON_VERSION=${PYTHON_VERSION:-3.9}
export ADDITIONAL_REQUIREMENTS=${ADDITIONAL_REQUIREMENTS:-django-tenants}
export BROKER_URL=${BROKER_URL:-amqp://guest:guest@rabbitmq:5672/}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'celery>=5',
],
packages=find_packages(),
python_requires=">=3.8",
python_requires=">=3.9",
name='tenant-schemas-celery',
license='MIT',
long_description=long_description,
Expand Down
10 changes: 4 additions & 6 deletions tenant_schemas_celery/test_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from tempfile import NamedTemporaryFile
from typing import Any, List, Mapping, Optional, Tuple, TypedDict

from celery import schedules, uuid
Expand Down Expand Up @@ -153,11 +152,10 @@ class TestTenantAwarePersistentScheduler:
"""

@fixture
def scheduler(self, app: CeleryApp) -> TenantAwarePersistentScheduler:
with NamedTemporaryFile() as file:
yield TenantAwarePersistentScheduler(
app, schedule_filename=str(file.name)
)
def scheduler(self, app: CeleryApp, tmp_path: str) -> TenantAwarePersistentScheduler:
yield TenantAwarePersistentScheduler(
app, schedule_filename=str(tmp_path / "schedule")
)

def test_schedule_setup_properly(
self,
Expand Down
2 changes: 1 addition & 1 deletion test-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
image: redis

app:
image: "python:${PYTHON_VERSION:-3.8}-slim"
image: "python:${PYTHON_VERSION:-3.9}-slim"
depends_on:
- postgres
- redis
Expand Down

0 comments on commit abd8bce

Please sign in to comment.