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

[FeatureRequest] Support for Python 3.12

Open aersam opened this issue 1 year ago • 7 comments

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

aersam avatar Jan 15 '24 12:01 aersam

Hey, are there any updates on this? Any indications of the timelines?

Roman-Ka avatar Aug 22 '24 14:08 Roman-Ka

Python 3.13 was just released into the wild - any work on getting 3.12 into azure functions?

cmcconomyfwig avatar Oct 07 '24 15:10 cmcconomyfwig

I am disgruntled about the lack of support for Python 3.12. Az Function now lags two whole versions behind Python stable. Is Microsoft still in touch with its Azure customers who use Python? Please fix this ASAP!

pykong avatar Oct 08 '24 07:10 pykong

Update was merged a while back (Release 4.30.1), but apparently still in progress: #3796. @gavin-aguiar

rmontroy avatar Oct 09 '24 17:10 rmontroy

Any update @gavin-aguiar ?

pykong avatar Oct 14 '24 12:10 pykong

@rmontroy @pykong. All the code for python 3.12 has been merged. We are just waiting on the release in all regions. Should take a couple of weeks.

gavin-aguiar avatar Oct 15 '24 15:10 gavin-aguiar

@gavin-aguiar That sounds good. Thanks for letting us know!

pykong avatar Oct 17 '24 05:10 pykong

@gavin-aguiar:

All the code for python 3.12 has been merged. We are just waiting on the release in all regions. Should take a couple of weeks.

Hi Gavin.

Is there any further update for when we can use Azure Functions with Python 3.12? Your message of "a couple of weeks" was a month ago.

And if any of the Microsoft Azure Functions product owners are reading this, you teased the release of Py 3.12 in December 2023 but then went silent on specific target dates while delaying many months longer than the equivalent timeframes for the Py 3.11 rollout*. That's not really fair to customers like me who committed to Azure Functions in their stacks but now fear they'll be stranded on non-current versions. It's also mystifying why you'd deprioritise timely Python support when it just makes Azure Functions less attractive for all kinds of AI/ML workloads.

* Python 3.11 was released on Oct 2022, went into public preview on Azure Functions in July 2023 (+9 months), and GA in September 2023 (+11 months). Python 3.12 was released in Oct 2023. Still no public preview or GA 13 months later. If Microsoft had followed the same cadence as for Py3.11, we'd have had the Py3.12 public preview in July 2024 and GA in September 2024.

stevesimmons avatar Nov 16 '24 21:11 stevesimmons

This is some horrible behavior of Azure towards its customers.

pykong avatar Nov 19 '24 06:11 pykong

Hi, so sorry for the delay, and thanks for your patience with this.

~~We are currently targeting early to mid-December for 3.12 support to be released.~~ I'll post another update here once it has been finalized.

We understand that this release has been much slower comparatively speaking, and we are actively working to do better for future Python versions.

EDIT: Our updated target for Python 3.12 support is January.

hallvictoria avatar Nov 20 '24 20:11 hallvictoria

You'd better start working on Python 3.13 as soon as possible so it will be ready by December 2025.

https://github.com/Azure/azure-functions-python-worker/issues/1588

pykong avatar Nov 21 '24 06:11 pykong

Can you please test if the 3.12 runtime works with cryptography v44 (see https://github.com/pyca/cryptography/issues/12064)?

chopeen avatar Nov 29 '24 19:11 chopeen

Hi, so sorry for the delay, and thanks for your patience with this.

~We are currently targeting early to mid-December for 3.12 support to be released.~ I'll post another update here once it has been finalized.

We understand that this release has been much slower comparatively speaking, and we are actively working to do better for future Python versions.

EDIT: Our updated target for Python 3.12 support is January.

We are in January now, almost one year after this Feature Request was opened. Any update on a specific day for support?

I see it live in the artifact registry but still unable to deploy through the Azure portal. It's now not possible to download a Python 3.11 exe off the shelf to install on Windows so it's impossible to develop new Azure Function Apps for Python in the current state.

louij2 avatar Jan 06 '25 09:01 louij2

It's now not possible to download a Python 3.11 exe off the shelf to install on Windows so it's impossible to develop new Azure Function Apps for Python in the current state.

@louij2 You can get an installer here https://www.python.org/downloads/release/python-3119/

Never versions of 3.11 don't have installers as 3.11 is in it's security update only phase, which only ship is source tar balls. If you need newer versions of 3.11, you can use docker containers, or install using https://github.com/pyenv-win/pyenv-win

ChrisLoveringSendient avatar Jan 06 '25 09:01 ChrisLoveringSendient

It's now not possible to download a Python 3.11 exe off the shelf to install on Windows so it's impossible to develop new Azure Function Apps for Python in the current state.

@louij2 You can get an installer here https://www.python.org/downloads/release/python-3119/

Never versions of 3.11 don't have installers as 3.11 is in it's security update only phase, which only ship is source tar balls. If you need newer versions of 3.11, you can use docker containers, or install using https://github.com/pyenv-win/pyenv-win

Once pyenv-win, by default, looks for the official Python FTP, you can't find security update versions for Windows. The only alternatives, as you mentioned, are using Docker containers, WSL, or properly using Linux itself.

jorgeczaiden avatar Jan 19 '25 11:01 jorgeczaiden

Hi Team,

Could you kindly let us know what is the status of this when this would be rolled out. Our company has stopped letting developers to use python 3.11. So local development is pretty difficult without the support for 3.12 and above

akozhikkot avatar Jan 22 '25 14:01 akozhikkot

3.12 support has been released. Flex consumption support is still pending, but we plan to have it out soon.

hallvictoria avatar Jan 31 '25 20:01 hallvictoria

It seems to be in preview. When will it be GA?

Image

tm14719 avatar Feb 03 '25 04:02 tm14719

Maybe MS will surprise us all by jumping straight to full 3.13 support. 😉

BorgPrincess avatar Feb 05 '25 18:02 BorgPrincess

Having support for 3.12 is much appreciated, thank you!

I get Python 3.12.2 on Linux 5.10.102.2-microsoft-standard (Debian GNU/Linux 12 (bookworm) with glibc 2.36)

Is this it or that's only during the preview period?

Python 3.12.9 is out.

polys avatar Feb 09 '25 16:02 polys

Is there any word on when 3.12 will be GA instead of just preview? Trying to do some product planning for my team.

drewpearce avatar Feb 26 '25 12:02 drewpearce

How about the image python:4-python3.12-core-tools? I use the core-tools image to publish the Func App from a CI pipeline. Will it be published before 3.12 is GA?

chopeen avatar Mar 06 '25 17:03 chopeen

@hallvictoria Could someone throw a bit more light in the 3.12 support even in preview? There is a docker image mcr.microsoft.com/azure-functions/python:4-python3.12 It deploys correctly and says Container ... initialized and is ready to serve requests but there are no functions available. I'm unclear what the best path right now is - 3.12 and 44.0.x crypto module or 3.11 with 43.x crypto module that has some security warnings

ErikApption avatar Mar 11 '25 14:03 ErikApption

@polys, the patch version will be updated periodically, depending on the changes and bugfixes added.

@tm14719 / @drewpearce, we are currently targeting GA by end of this month.

@chopeen, the core-tools images will no longer be published. You can reference the Dockerfile directly if needed or use one of the other published 3.12 images.

@ErikApption, our recommendation is to use Python 3.12 and the latest cryptography module. If you're facing more specific issues, please open a separate issue.

hallvictoria avatar Mar 11 '25 15:03 hallvictoria

I have my project deployed to separate Function Apps with 3.11 and 3.12 runtime respectively. When I open SSH session for both and try checking the Python version, this is what I see:

root@311:/# python --version
Python 3.11.10
root@312:~# python --version
python: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory

The functions seem to be working, but the error is still worrisome. What's causing it?


The file libpython3.12.so.1.0 is available, but Python 3.12 is installed to a different location than the standard one used for 3.11, i.e. /opt/python/3.12.2/. Is this why /opt/python/3.12.2/lib/libpython3.12.so.1.0 cannot be located?

Should I add the path to LD_LIBRARY_PATH, i.e. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/python/3.12/lib", to the Function App environment variables?

chopeen avatar Mar 18 '25 15:03 chopeen

@chopeen this error does not impact your function app behavior, and it was fixed in runtime version 4.1037. 4.1037 is still in the process of rolling out, with ETA of finishing by end of this week

hallvictoria avatar Mar 18 '25 17:03 hallvictoria

@hallvictoria Is it safe to move to our function apps to 3.12 now?

sepira avatar Mar 25 '25 04:03 sepira

@sepira 3.12 is fully supported. We are still targeting end of March / early April for GA

hallvictoria avatar Mar 25 '25 15:03 hallvictoria

@hallvictoria 3.12 is ready for Production ?

mithunideas2it avatar Mar 26 '25 12:03 mithunideas2it

@mithunideas2it 3.12 is currently still in preview. It is up to your discretion if you are comfortable migrating now or would prefer to wait until GA.

hallvictoria avatar Mar 26 '25 15:03 hallvictoria