From 4708a5d3341e295d5d7f06de87e343b435b41016 Mon Sep 17 00:00:00 2001 From: zie619 Date: Mon, 3 Nov 2025 13:02:07 +0200 Subject: [PATCH] fix: Use compatible dependency versions for Python 3.9-3.11 - Revert to stable dependency versions that work across all Python versions - Use Python 3.11 base image instead of 3.12 - Remove specific ca-certificates version to avoid conflicts - Fix compatibility issues causing CI/CD failures This ensures all tests pass across Python 3.9, 3.10, and 3.11 --- Dockerfile | 7 +++---- requirements.txt | 33 +++++++++++++-------------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0638fb32..9009fb6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# Use official Python runtime as base image - latest secure version -FROM python:3.12.7-slim-bookworm AS base +# Use official Python runtime as base image - stable secure version +FROM python:3.11-slim-bookworm AS base # Security: Set up non-root user first RUN groupadd -g 1001 appuser && \ @@ -17,11 +17,10 @@ ENV PYTHONUNBUFFERED=1 \ PYTHONIOENCODING=utf-8 # Install security updates and minimal dependencies -# Use specific versions to avoid CVEs RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ - ca-certificates=20230311 \ + ca-certificates \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache \ diff --git a/requirements.txt b/requirements.txt index b8d8f412..8eaaf836 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,30 +1,23 @@ # N8N Workflows API Dependencies -# Core API Framework - Latest secure versions, Python 3.9-3.12 compatible -fastapi==0.115.2 -uvicorn[standard]==0.31.1 -pydantic==2.9.2 -pydantic-settings==2.6.0 +# Core API Framework - Stable versions compatible with Python 3.9-3.12 +fastapi==0.109.0 +uvicorn[standard]==0.27.0 +pydantic==2.5.3 -# Authentication & Security - Latest secure versions -PyJWT==2.10.0 +# Authentication & Security +PyJWT==2.8.0 passlib[bcrypt]==1.7.4 -python-multipart==0.0.12 -cryptography==43.0.3 +python-multipart==0.0.9 -# HTTP & Networking - Latest secure versions -httpx==0.27.2 -requests==2.32.3 -urllib3==2.2.3 -certifi==2024.8.30 +# HTTP & Networking +httpx==0.26.0 +requests==2.31.0 # Monitoring & Performance -psutil==6.1.0 +psutil==5.9.8 # Email validation -email-validator==2.2.0 +email-validator==2.1.0 # Production server -gunicorn==23.0.0 - -# Additional security hardening -python-dotenv==1.0.1 \ No newline at end of file +gunicorn==21.2.0 \ No newline at end of file