azure-functions-python-worker icon indicating copy to clipboard operation
azure-functions-python-worker copied to clipboard

Support for Python 3.13

Open pykong opened this issue 1 year ago • 10 comments

Describe the request: A clear and concise description. Well, make Azure Functions compatible with Python 3.13 :)

Also, see #1397

pykong avatar Oct 08 '24 06:10 pykong

please do. we are still waiting for 3.12, so it would be good if this is on your radar as well.

Goldziher avatar Nov 21 '24 13:11 Goldziher

@hallvictoria Now that Python 3.12 support is done (#1397, thank you!), please can you indicate the target date for supporting Python 3.13?

stevesimmons avatar Feb 01 '25 16:02 stevesimmons

@stevesimmons we are currently targeting this March.

hallvictoria avatar Feb 03 '25 16:02 hallvictoria

@stevesimmons we are currently targeting this March.

@hallvictoria : Any update on this?

TJKlein avatar Apr 04 '25 13:04 TJKlein

We've hit some delays, and our updated preview target date is now May - June.

hallvictoria avatar Apr 09 '25 16:04 hallvictoria

@hallvictoria Please, don't take this as criticism because I really do appreciate all the work done on Azure Functions, but could you explain why adding support for new Python versions is so difficult? This doesn't seem to be an issue with .NET, Node.js, etc. It would be really helpful to understand any drawbacks with using Python on Azure Functions, just so we can make better decisions on language choice going forward.

polys avatar Apr 09 '25 17:04 polys

Hi @polys, supporting a new Python version involves updating multiple components of our product, many of which depend on each other. These components have to be released in a specific order, and each follows its own schedule and can take a month+ to fully rollout. Even if our main worker code is ready on time, any delays or urgent fixes in other parts can hold up the overall release.

We completely understand how important it is to have access to the latest language versions, and we apologize for any inconvenience this delay may cause. We do prioritize this work, and our team is actively exploring ways to streamline the process and reduce wait times in the future.

Thanks for your patience and for continuing to share your feedback—it helps us improve.

hallvictoria avatar Apr 14 '25 21:04 hallvictoria

Any news on this one?

guimatheus92 avatar May 14 '25 17:05 guimatheus92

@guimatheus92 we are targeting mid-June for preview.

hallvictoria avatar May 15 '25 14:05 hallvictoria

Hi all, posting a quick update. The changes for supporting Python 3.13 have been completed, and they will be included in the 4.1040 runtime release. That release cycle has hit some delays, and it is now currently expected to reach all regions by mid to late July.

Thanks for your patience, and I'll post more updates here as the release progresses.

hallvictoria avatar Jun 17 '25 14:06 hallvictoria

Hey everyone, here are some updates for what's currently supported for Python 3.13:

Supported App Service Plans:

  • Linux Dedicated
  • Flex Consumption

Creating new 3.13 apps:

  • Available via the Portal

Deployment mechanisms:

Updating existing apps to Python 3.13:

  • Linux Dedicated: Updating the LinuxFxVersion setting
  • FlexConsumption: Changing Python Version via the Configuration tab in the portal

Pending:

  • Linux Consumption plan support
  • Core Tools support
    • Deployment (eg: func azure functionapp publish)
    • Local development (eg: func start)

hallvictoria avatar Jul 01 '25 16:07 hallvictoria

Core Tools version 4.0.7512 now supports Python 3.13. You can develop Python 3.13 functions locally using func start and deploy using func azure functionapp publish.

hallvictoria avatar Jul 09 '25 16:07 hallvictoria

Is the Docker image for Python 3.13 coming soon too? https://mcr.microsoft.com/en-us/artifact/mar/azure-functions/python/about

chopeen avatar Jul 09 '25 16:07 chopeen

@chopeen the python 3.13 docker image should be released by next week.

gavin-aguiar avatar Jul 10 '25 15:07 gavin-aguiar

@chopeen the python 3.13 docker image should be released by next week.

@gavin-aguiar Is it still planned to release this week? I note that https://mcr.microsoft.com/en-us/artifact/mar/azure-functions/python/about was published today but no sign of 3.13...

sparkiegeek-slam avatar Jul 17 '25 15:07 sparkiegeek-slam

We're still checking why that's not being updated. In the meantime, we do have 3.13 specific tags that can be used.

Here are the latest:

hallvictoria avatar Jul 18 '25 19:07 hallvictoria

When I'm provisioning a Function App with Python using the Azure Portal, I see 3.13 (Preview) under versions. When is the preview part expected to become generally available (GA)?

kaldren avatar Jul 21 '25 14:07 kaldren

We're still checking why that's not being updated. In the meantime, we do have 3.13 specific tags that can be used.

Here are the latest:

  • Consumption: 4.1041.200-0-python3.13 (Full Tag List)
  • Premium / Dedicated: 4-python3.13-appservice ([Full Tag List](

Looks like the URL got butchered - here it is raw.

https://mcr.microsoft.com/v2/azure-functions/python/tags/list

sparkiegeek-slam avatar Jul 21 '25 14:07 sparkiegeek-slam

Are there any updates on the Python 3.13 release?

pykong avatar Jul 29 '25 05:07 pykong

I've been trying this on Flex Consumption without much luck :( It looks like the app doesn't have access to its configuration (i.e. environment variables in the Portal)

Here's an example function_app.py that returns all environment variables.

On Python 3.12, it returns my custom environment variables just fine. On Python 3.13 nothing's there.

import json
import os
from platform import python_version

import azure.functions as func

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)


@app.route(route="http_trigger")
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    return func.HttpResponse(
        json.dumps(
            {
                "python": python_version(),
                "environ": {k: v for k, v in sorted(os.environ.items())},
            },
            indent=2,
            ensure_ascii=False,
        ),
        mimetype="application/json",
    )

polys avatar Jul 31 '25 16:07 polys

Just tried to use the new Docker image for Python 3.13 with no luck. At least locally it does not recognize the function and no clear explanations on the logs.

Haven't tried to deploy in our dev env yet.

RodriGoncaDeeployer avatar Jul 31 '25 18:07 RodriGoncaDeeployer

Updates:

  • Consumption support EDIT: Python 3.13 will not be supported on Linux Consumption. It's only supported on Flex Consumption, Premium, and Dedicated plans. So sorry for any confusion over this!
  • Docker image: python:4-python3.13 is available - doc updates to Microsoft Artifact Registry have been merged and will be visible by end of the week / early next week
    • docker pull mcr.microsoft.com/azure-functions/python:4-python3.13
  • Preview status: 3.13 is currently in preview - I'll link a doc here later with more explanation of some of the new features and changes introduced with 3.13
  • GA timeline: ETA is end of September

If you're facing any specific problems, please open up a separate GH issue, and we'll follow up there

hallvictoria avatar Jul 31 '25 18:07 hallvictoria

  • Consumption support EDIT: Python 3.13 will not be supported on Linux Consumption. It's only supported on Flex Consumption, Premium, and Dedicated plans. So sorry for any confusion over this!

As long as maximum instance count cannot be set to 1 (or less than 40), Flex Consumption is not a viable replacement for Linux Consumption for a lot of workloads out there. That affects Python more than any other supported language because Windows Consumption is not an option.

I understand not wanting to keep 'legacy' around forever, but it would be good to understand if and when some of Flex's known issues will be addressed if it's going to be the only option going forward.

Thanks!

polys avatar Aug 13 '25 08:08 polys

Updates:

  • Consumption support EDIT: Python 3.13 will not be supported on Linux Consumption. It's only supported on Flex Consumption, Premium, and Dedicated plans. So sorry for any confusion over this!

  • Docker image: python:4-python3.13 is available - doc updates to Microsoft Artifact Registry have been merged and will be visible by end of the week / early next week

    • docker pull mcr.microsoft.com/azure-functions/python:4-python3.13
  • Preview status: 3.13 is currently in preview - I'll link a doc here later with more explanation of some of the new features and changes introduced with 3.13

  • GA timeline: ETA is end of September

If you're facing any specific problems, please open up a separate GH issue, and we'll follow up there

Hi Victoria,

As we approach the date, is 3.13 GA still on track for end of september?

cmcconomyfwig avatar Sep 02 '25 13:09 cmcconomyfwig

Hi @cmcconomyfwig, we are still targeting end of September / early October for GA.

hallvictoria avatar Sep 02 '25 15:09 hallvictoria

Hi @cmcconomyfwig, we are still targeting end of September / early October for GA.

Hi @hallvictoria -- how are things looking for 3.13?

cmcconomyfwig avatar Oct 14 '25 15:10 cmcconomyfwig

Python 3.13 is GA!

You may still see the preview tag when creating new python 3.13 apps through the portal, but this will be removed soon and can be ignored.

hallvictoria avatar Oct 17 '25 16:10 hallvictoria

I think I found a bug introduced on this release: BUG #1797

RodriGoncaDeeployer avatar Oct 20 '25 19:10 RodriGoncaDeeployer