Support for Python 3.9 ends on 31 October 2025—upgrade your Functions apps to Python 3.12

Raavisha Sankar (INFOSYS LIMITED) 0 Reputation points Microsoft External Staff
2025-10-17T06:53:09.7566667+00:00

Hi,We received a mail regarding (Support for Python 3.9 ends on 31 October 2025—upgrade your Functions apps to Python 3.12).

So we upgraded the function app to 3.12. But after that the app is not working causing this error( Result: Failure Exception: TypeError: type 'typing.TypeVar' is not an acceptable base type) .

This is been used in the typing_extensions package. So, I upgraded that to 4.15 and redeployed but still facing the same issue.We also restarted the function app multiple times. Can you please guide here?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

1 answer

Sort by: Most helpful
  1. Pravallika KV 165 Reputation points Microsoft External Staff Moderator
    2025-10-20T15:28:09.3633333+00:00

    Hi Raavisha Sankar (INFOSYS LIMITED),

    Thank you for reaching out to Microsoft Q&A.

    1. Update typing_extensions to resolve compatibility issues:

    Try updating the typing_extensions package to version 4.14.0 or later using command pip install typing_extensions --upgrade. I have tried using the same version and it worked.

    requirements.txt:

    
    azure-functions
    
    typing-extensions>=4.14.0
    
    
    1. Delete __pycache__ and .python_packages Files locally and in Azure
    2. Rebuild Virtual Environment

    Rebuild your virtual environment to ensure all dependencies are installed properly.

    Steps:

    1. Delete the existing virtual environment.
    2. Create a new virtual environment.
    3. Reinstall all the required packages and deploy the function again.

    Hope it helps!


    Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.

    User's image

    If you have any other questions, let me know in the "comments" and I would be happy to help you.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.