Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

  • Update GitHub Actions workflow to use Python 3.11, 3.12, 3.13, and 3.14
  • Update pyproject.toml target-version for ruff and black to py314
  • Update Dockerfile to use Python 3.14
  • Update devcontainer.json to use Python 3.14
  • Keep README files to specify Python 3.10+ as minimum (unchanged from original)
  • Fix MockAzureCredential to implement required Protocol methods for Python 3.14
  • Run tests to ensure everything works
  • Run linters to ensure code quality
  • Request code review (no issues found)
  • Run security checks (no vulnerabilities found)

Summary

Successfully added Python 3.14 support while keeping Python 3.10 as the minimum supported version. The changes include:

  1. GitHub Actions: Updated python-check.yaml workflow to test on Python 3.11, 3.12, 3.13, and 3.14
  2. Development Tools: Updated pyproject.toml to target Python 3.14 for ruff and black linters
  3. Dockerfile: Updated to use python:3.14-alpine base image
  4. Dev Container: Updated to use Python 3.14 development container
  5. Documentation: Kept minimum Python version requirement at 3.10+ (unchanged from original)
  6. Test Compatibility: Fixed MockAzureCredential to properly implement AsyncTokenCredential Protocol methods (get_token and close) for Python 3.14 compatibility

All tests pass, linting succeeds, and no security vulnerabilities were found.

Original prompt

Add Python 3.14 support and drop Python 3.9 support. Reference similar PR Azure-Samples/azure-search-openai-demo#2787 for ideas of what might need changing.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add Python 3.14 support and remove Python 3.9 support Add Python 3.14 support, drop Python 3.9-3.10 Oct 28, 2025
Copilot AI requested a review from pamelafox October 28, 2025 18:35
Copilot finished work on behalf of pamelafox October 28, 2025 18:35
@pamelafox
Copy link
Collaborator

@copilot 3.10 should be the minimum version

@pamelafox
Copy link
Collaborator

@copilot Tests are failing, please run pytest

=========================== short test summary info ============================
ERROR tests/test_app.py::test_index - quart.testing.app.LifespanError: Error during startup MockAzureCredential.init() takes exactly one argument (the instance to initialize)
ERROR tests/test_app.py::test_chat_stream_text - quart.testing.app.LifespanError: Error during startup MockAzureCredential() takes no arguments
ERROR tests/test_app.py::test_chat_stream_text_history - quart.testing.app.LifespanError: Error during startup MockAzureCredential() takes no arguments
FAILED tests/test_app.py::test_openai_managedidentity - quart.testing.app.LifespanError: Error during startup MockAzureCredential() takes no arguments
========================= 1 failed, 3 errors in 1.47s ==========================

Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

@copilot 3.10 should be the minimum version

Updated in 60ac1e3 - reverted the README files to keep Python 3.10+ as the minimum version.

Copilot AI changed the title Add Python 3.14 support, drop Python 3.9-3.10 Add Python 3.14 support, drop Python 3.9 Oct 28, 2025
Copilot finished work on behalf of pamelafox October 28, 2025 23:58
Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot Tests are failing, please run pytest

=========================== short test summary info ============================
...

Fixed in 3c26ae4. The issue was that MockAzureCredential didn't implement the required Protocol methods (get_token and close) from AsyncTokenCredential. In Python 3.14, the Protocol class initialization is stricter. I've added proper implementations of both methods to the mock.

Copilot finished work on behalf of pamelafox October 29, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants