Skip to content

Enabling support for py3.11 #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
Python310V4:
pythonVersion: '3.10'
workerPath: $(PROD_V4_WORKER_PY)
Python311V4:
pythonVersion: '3.11'
workerPath: $(PROD_V4_WORKER_PY)
steps:
- template: pack/templates/win_env_gen.yml
parameters:
Expand All @@ -55,6 +58,9 @@ jobs:
Python310V4:
pythonVersion: '3.10'
workerPath: $(PROD_V4_WORKER_PY)
Python311V4:
pythonVersion: '3.11'
workerPath: $(PROD_V4_WORKER_PY)
steps:
- template: pack/templates/win_env_gen.yml
parameters:
Expand All @@ -81,6 +87,9 @@ jobs:
Python310V4:
pythonVersion: '3.10'
workerPath: $(PROD_V4_WORKER_PY)
Python311V4:
pythonVersion: '3.11'
workerPath: $(PROD_V4_WORKER_PY)
steps:
- template: pack/templates/nix_env_gen.yml
parameters:
Expand All @@ -104,6 +113,9 @@ jobs:
Python310V4:
pythonVersion: '3.10'
workerPath: $(PROD_V4_WORKER_PY)
Python311V4:
pythonVersion: '3.11'
workerPath: $(PROD_V4_WORKER_PY)
steps:
- template: pack/templates/nix_env_gen.yml
parameters:
Expand Down Expand Up @@ -140,7 +152,7 @@ jobs:
LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g' | cut -d'.' -f-2)
NUSPEC="pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
# Only required for Integration Test. Version number contains date (e.g. 3.1.2.20211028-dev)
WKVERSION="3.$LATEST_TAG-$(BUILD_BUILDID)-TEST"
WKVERSION="4.$LATEST_TAG-$(BUILD_BUILDID)-TEST"
echo "No Matching Release Tag For $BUILD_SOURCEBRANCH"
fi

Expand Down
4 changes: 4 additions & 0 deletions pack/Microsoft.Azure.Functions.V4.PythonWorker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<file src="..\3.10_WINDOWS_X86\**" target="tools\3.10\WINDOWS\X86" />
<file src="..\3.10_LINUX_X64\**" target="tools\3.10\LINUX\X64" />
<file src="..\3.10_OSX_X64\**" target="tools\3.10\OSX\X64" />
<file src="..\3.11_WINDOWS_X64\**" target="tools\3.11\WINDOWS\X64" />
<file src="..\3.11_WINDOWS_X86\**" target="tools\3.11\WINDOWS\X86" />
<file src="..\3.11_LINUX_X64\**" target="tools\3.11\LINUX\X64" />
<file src="..\3.11_OSX_X64\**" target="tools\3.11\OSX\X64" />
<file src="..\python\prodV4\worker.config.json" target="tools" />
<file src="Microsoft.Azure.Functions.PythonWorker.targets" target="build" />
<file src="..\_manifest\manifest.json" target="SBOM\manifest.json" />
Expand Down
2 changes: 1 addition & 1 deletion python/prodV4/worker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"language":"python",
"defaultRuntimeVersion":"3.9",
"supportedOperatingSystems":["LINUX", "OSX", "WINDOWS"],
"supportedRuntimeVersions":["3.7", "3.8", "3.9", "3.10"],
"supportedRuntimeVersions":["3.7", "3.8", "3.9", "3.10", "3.11"],
"supportedArchitectures":["X64", "X86"],
"extensions":[".py"],
"defaultExecutablePath":"python",
Expand Down
2 changes: 1 addition & 1 deletion python/prodV4/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def determine_user_pkg_paths():
pkgs_path = os.path.join(home, PKGS_PATH)
usr_packages_path = []

if minor_version in (7, 8, 9, 10):
if minor_version in (7, 8, 9, 10, 11):
usr_packages_path.append(os.path.join(pkgs_path, PKGS))
else:
raise RuntimeError(f'Unsupported Python version: 3.{minor_version}')
Expand Down