Skip to content

Commit acec0de

Browse files
committed
chore: bump function runtime to Python 3.13 for azure-functions v2
azure-functions v2 (merged from renovate/azure-functions-2.x) requires Python >=3.13. Bump the Flex Consumption runtime to 3.13 (rg_funcapp.bicep), the project floor to >=3.13, ruff target to py313, and the CI matrix to 3.13, and relock. The 3.11 core-tools image still deploys the 3.13 app: with --build remote the build runs on Azure at the target runtime, so the image's local Python is irrelevant (no 3.12/3.13 core-tools image is published). Verified end-to-end: no-shared-keys + signing deploy succeeds, app runs 3.13, KV reference resolves.
1 parent 04f27b1 commit acec0de

6 files changed

Lines changed: 111 additions & 359 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.11"]
11+
python-version: ["3.13"]
1212
steps:
1313
- uses: actions/checkout@v7
1414
- name: Set up Python ${{ matrix.python-version }}

poetry.lock

Lines changed: 99 additions & 353 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT"
77
version = "1.0.0"
88
readme = "README.md"
99
authors = [{name = "Max Dymond", email = "max.dymond@alianza.com"}]
10-
requires-python = '>=3.9.2,<4.0.0'
10+
requires-python = '>=3.13,<4.0.0'
1111
dependencies = [
1212
'azure-functions (>=2.2.0,<2.3.0)',
1313
'azure-identity (>=1.19.0,<2.0.0)',

rg_funcapp.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var python_container_name = 'python'
3939
var storage_connection_string = 'DefaultEndpointsProtocol=https;AccountName=${storageAccount.name};EndpointSuffix=${environment().suffixes.storage};AccountKey=${storageAccount.listKeys().keys[0].value}'
4040

4141
// The version of Python to run with
42-
var python_version = '3.11'
42+
var python_version = '3.13'
4343

4444
// The name of the hosting plan, application insights, and function app
4545
var functionAppName = appName

ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ exclude = [
1010
line-length = 88
1111
indent-width = 4
1212

13-
# Assume Python 3.9
14-
target-version = "py39"
13+
# Assume Python 3.13
14+
target-version = "py313"
1515

1616
[lint]
1717
extend-select = [

src/apt_package_function/func_app.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ def deploy(self) -> None:
169169
if self.subscription:
170170
func_cmd += f" --subscription {self.subscription}"
171171

172-
# Publish the application using the core-tools tooling
172+
# Publish the application using the core-tools tooling.
173+
#
174+
# The image's Python version need not match the app runtime: with
175+
# '--build remote' the build runs on Azure (Oryx) at the target
176+
# runtime, and this image only packages and uploads. 3.11 is the newest
177+
# published core-tools image (no 3.12/3.13 exists), and it deploys
178+
# 3.13 apps fine.
173179
cmd = [
174180
"docker",
175181
"run",

0 commit comments

Comments
 (0)