From 6b9410b795cd77b9d4c195dead5dcb5423f18bcc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:19:43 +0000 Subject: [PATCH 1/6] Initial plan From a6226f01005f1d50d843ace1c55c4e930956d985 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:32:17 +0000 Subject: [PATCH 2/6] Try uvicorn[standard]==0.30.3 to avoid Flask dependency conflicts Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- src/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requirements.txt b/src/requirements.txt index f3d5b9e..c577682 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,3 +1,3 @@ fastapi==0.111.0 -uvicorn[standard]==0.29.0 +uvicorn[standard]==0.30.3 gunicorn==22.0.0 From a581af9c2f4f5f96ba53a45a6a0b030263cf92aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:34:11 +0000 Subject: [PATCH 3/6] Use explicit uvicorn dependencies instead of [standard] extra to avoid Flask conflicts Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- src/requirements.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/requirements.txt b/src/requirements.txt index c577682..5d587f3 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,3 +1,9 @@ fastapi==0.111.0 -uvicorn[standard]==0.30.3 +uvicorn==0.30.6 +uvloop>=0.17.0 +httptools>=0.5.0 +python-dotenv>=0.19.0 +pyyaml>=5.1 +watchfiles>=0.13 +websockets>=10.4 gunicorn==22.0.0 From f9b76d90f12a17ac4c85937bd3681ee837351439 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:37:22 +0000 Subject: [PATCH 4/6] Use more relaxed version constraints for uvicorn dependencies Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- src/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/requirements.txt b/src/requirements.txt index 5d587f3..de085de 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,9 +1,9 @@ fastapi==0.111.0 uvicorn==0.30.6 -uvloop>=0.17.0 -httptools>=0.5.0 -python-dotenv>=0.19.0 +uvloop>=0.15.0 +httptools>=0.4.0 +python-dotenv>=0.13.0 pyyaml>=5.1 watchfiles>=0.13 -websockets>=10.4 +websockets>=10.0 gunicorn==22.0.0 From 9c587ece233fe94516b171d1a739647d5b7c92cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:39:28 +0000 Subject: [PATCH 5/6] Simplify to minimal uvicorn upgrade without [standard] extra to avoid Flask conflicts Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- src/requirements.txt | 6 ---- test_requirements.py | 78 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 test_requirements.py diff --git a/src/requirements.txt b/src/requirements.txt index de085de..b65fc59 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,9 +1,3 @@ fastapi==0.111.0 uvicorn==0.30.6 -uvloop>=0.15.0 -httptools>=0.4.0 -python-dotenv>=0.13.0 -pyyaml>=5.1 -watchfiles>=0.13 -websockets>=10.0 gunicorn==22.0.0 diff --git a/test_requirements.py b/test_requirements.py new file mode 100644 index 0000000..944b006 --- /dev/null +++ b/test_requirements.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +""" +Test script to validate uvicorn upgrade requirements. +Run this script to verify the dependency installation works. +""" + +import subprocess +import sys +import tempfile +import os + +def test_requirements_installation(): + """Test if the updated requirements can be installed successfully.""" + print("Testing uvicorn upgrade requirements installation...") + + # Create a temporary virtual environment + with tempfile.TemporaryDirectory() as temp_dir: + venv_path = os.path.join(temp_dir, "test_venv") + + try: + # Create virtual environment + print("Creating test virtual environment...") + subprocess.run([sys.executable, "-m", "venv", venv_path], check=True) + + # Get pip path + if os.name == "nt": # Windows + pip_path = os.path.join(venv_path, "Scripts", "pip") + python_path = os.path.join(venv_path, "Scripts", "python") + else: # Unix/Linux/Mac + pip_path = os.path.join(venv_path, "bin", "pip") + python_path = os.path.join(venv_path, "bin", "python") + + # Upgrade pip + print("Upgrading pip...") + subprocess.run([python_path, "-m", "pip", "install", "--upgrade", "pip"], + check=True, capture_output=True) + + # Install requirements + print("Installing requirements...") + subprocess.run([pip_path, "install", "-r", "src/requirements.txt"], + check=True, capture_output=True) + + # Test import + print("Testing imports...") + result = subprocess.run([ + python_path, "-c", + "import fastapi; import uvicorn; import gunicorn; print('✓ All imports successful')" + ], capture_output=True, text=True) + + if result.returncode == 0: + print("✓ Requirements installation test PASSED") + print(result.stdout) + return True + else: + print("✗ Import test failed:") + print(result.stderr) + return False + + except subprocess.CalledProcessError as e: + print(f"✗ Installation failed: {e}") + return False + except Exception as e: + print(f"✗ Unexpected error: {e}") + return False + +if __name__ == "__main__": + print("=" * 50) + print("Uvicorn Upgrade Requirements Test") + print("=" * 50) + + success = test_requirements_installation() + + if success: + print("\n✓ SUCCESS: Requirements can be installed without conflicts!") + sys.exit(0) + else: + print("\n✗ FAILURE: Requirements installation failed!") + sys.exit(1) \ No newline at end of file From e1af25b84b918e7db59ec27459997da5093f5090 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:40:16 +0000 Subject: [PATCH 6/6] Remove temporary test file --- test_requirements.py | 78 -------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 test_requirements.py diff --git a/test_requirements.py b/test_requirements.py deleted file mode 100644 index 944b006..0000000 --- a/test_requirements.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python3 -""" -Test script to validate uvicorn upgrade requirements. -Run this script to verify the dependency installation works. -""" - -import subprocess -import sys -import tempfile -import os - -def test_requirements_installation(): - """Test if the updated requirements can be installed successfully.""" - print("Testing uvicorn upgrade requirements installation...") - - # Create a temporary virtual environment - with tempfile.TemporaryDirectory() as temp_dir: - venv_path = os.path.join(temp_dir, "test_venv") - - try: - # Create virtual environment - print("Creating test virtual environment...") - subprocess.run([sys.executable, "-m", "venv", venv_path], check=True) - - # Get pip path - if os.name == "nt": # Windows - pip_path = os.path.join(venv_path, "Scripts", "pip") - python_path = os.path.join(venv_path, "Scripts", "python") - else: # Unix/Linux/Mac - pip_path = os.path.join(venv_path, "bin", "pip") - python_path = os.path.join(venv_path, "bin", "python") - - # Upgrade pip - print("Upgrading pip...") - subprocess.run([python_path, "-m", "pip", "install", "--upgrade", "pip"], - check=True, capture_output=True) - - # Install requirements - print("Installing requirements...") - subprocess.run([pip_path, "install", "-r", "src/requirements.txt"], - check=True, capture_output=True) - - # Test import - print("Testing imports...") - result = subprocess.run([ - python_path, "-c", - "import fastapi; import uvicorn; import gunicorn; print('✓ All imports successful')" - ], capture_output=True, text=True) - - if result.returncode == 0: - print("✓ Requirements installation test PASSED") - print(result.stdout) - return True - else: - print("✗ Import test failed:") - print(result.stderr) - return False - - except subprocess.CalledProcessError as e: - print(f"✗ Installation failed: {e}") - return False - except Exception as e: - print(f"✗ Unexpected error: {e}") - return False - -if __name__ == "__main__": - print("=" * 50) - print("Uvicorn Upgrade Requirements Test") - print("=" * 50) - - success = test_requirements_installation() - - if success: - print("\n✓ SUCCESS: Requirements can be installed without conflicts!") - sys.exit(0) - else: - print("\n✗ FAILURE: Requirements installation failed!") - sys.exit(1) \ No newline at end of file