-
Notifications
You must be signed in to change notification settings - Fork 107
feat: support python 3.14 #1766
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e7d9258
support python 3.14
hallvictoria 9cb7b42
tentative
hallvictoria 65c4a79
update nuspec
hallvictoria 83d1313
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
hallvictoria db40181
sync with ADO
hallvictoria f186422
comments
hallvictoria 6187666
rc nix deps
hallvictoria 0596b5d
clean up scripts
hallvictoria 1521cb4
rename artifact
hallvictoria 6c0a152
pyproject miss
hallvictoria be4cb82
extra space
hallvictoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
echo "=== Upgrading pip and installing build dependencies ===" | ||
python -m pip install --upgrade pip setuptools wheel cython | ||
|
||
echo "=== Cloning gRPC repo ===" | ||
rm -rf grpc | ||
git clone --recursive https://github.com/grpc/grpc | ||
|
||
echo "=== Building grpcio wheel from source ===" | ||
cd grpc | ||
git submodule update --init --recursive | ||
export GRPC_PYTHON_BUILD_WITH_CYTHON=1 | ||
|
||
# Build the wheel into dist/ | ||
python -m pip wheel . -w dist | ||
|
||
# Log contents of dist | ||
echo "=== Checking dist directory ===" | ||
if [ -d dist ]; then | ||
ls -lh dist | ||
else | ||
echo "dist/ directory not found!" | ||
fi | ||
|
||
# Log and install grpcio | ||
GRPC_WHEEL=$(ls dist/grpcio-*.whl | head -n 1) | ||
echo "Built grpcio wheel: $(basename "$GRPC_WHEEL")" | ||
echo "=== Install grpcio wheel $(basename "$GRPC_WHEEL") into root ===" | ||
python -m pip install "$GRPC_WHEEL" | ||
|
||
cd .. | ||
|
||
# Change back to project root | ||
cd workers | ||
|
||
echo "=== Install other deps into root ===" | ||
python -m pip install . | ||
python -m pip install grpcio-tools==1.70.0 | ||
|
||
echo "=== Installing grpcio into deps/ ===" | ||
python -m pip install "$GRPC_WHEEL" --target "$BUILD_SOURCESDIRECTORY/deps" | ||
|
||
echo "=== Installing other deps into deps/ ===" | ||
python -m pip install --upgrade pip setuptools wheel cython --target "$BUILD_SOURCESDIRECTORY/deps" | ||
python -m pip install . azure-functions --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist | ||
python -m pip install grpcio-tools==1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" --find-links ../grpc/dist | ||
|
||
echo "=== Install invoke and build protos ===" | ||
python -m pip install invoke | ||
cd tests | ||
python -m invoke -c test_setup build-protos | ||
|
||
echo "=== Copying .artifactignore ===" | ||
cd .. | ||
cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps" | ||
|
||
echo "=== Copying protos ===" | ||
version_minor=$(echo $1 | cut -d '.' -f 2) | ||
if [[ $version_minor -lt 13 ]]; then | ||
cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker" | ||
else | ||
cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker" | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
python -m venv .env | ||
source .env/bin/activate | ||
python -m pip install --upgrade pip | ||
|
||
cd workers | ||
python -m pip install . | ||
python -m pip install grpcio~=1.70.0 | ||
python -m pip install grpcio-tools~=1.70.0 | ||
|
||
python -m pip install . --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" | ||
python -m pip install grpcio~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" | ||
python -m pip install grpcio-tools~=1.70.0 --no-compile --target "$BUILD_SOURCESDIRECTORY/deps" | ||
|
||
python -m pip install invoke | ||
cd tests | ||
python -m invoke -c test_setup build-protos | ||
|
||
cd .. | ||
cp .artifactignore "$BUILD_SOURCESDIRECTORY/deps" | ||
|
||
version_minor=$(echo $1 | cut -d '.' -f 2) | ||
if [[ $version_minor -lt 13 ]]; then | ||
cp -r azure_functions_worker/protos "$BUILD_SOURCESDIRECTORY/deps/azure_functions_worker" | ||
else | ||
cp -r proxy_worker/protos "$BUILD_SOURCESDIRECTORY/deps/proxy_worker" | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
param ( | ||
[string]$pythonVersion | ||
) | ||
$versionParts = $pythonVersion -split '\.' # Splitting by dot | ||
$versionMinor = [int]$versionParts[1] | ||
|
||
Write-Host "=== Upgrading pip and installing build dependencies ===" | ||
python -m pip install --upgrade pip setuptools wheel cython | ||
|
||
Write-Host "=== Cloning gRPC repo ===" | ||
if (Test-Path grpc) { | ||
Remove-Item -Recurse -Force grpc | ||
} | ||
git clone --recursive https://github.com/grpc/grpc | ||
|
||
Write-Host "=== Building grpcio from source ===" | ||
Set-Location grpc | ||
$env:GRPC_PYTHON_BUILD_WITH_CYTHON = "1" | ||
|
||
# Build the wheel into dist/ | ||
python -m pip wheel . -w dist | ||
|
||
# Log contents of dist | ||
Write-Host "=== Checking dist directory ===" | ||
if (Test-Path dist) { | ||
Get-ChildItem dist | ||
} else { | ||
Write-Host "dist/ directory not found!" | ||
} | ||
|
||
# Log and install grpc | ||
$grpcWheel = Get-ChildItem dist\grpcio-*.whl | Select-Object -First 1 | ||
Write-Host "Built grpcio wheel: $($grpcWheel.Name)" | ||
Write-Host "=== Install grpcio wheel $($grpcWheel.Name) into root ===" | ||
$grpcWheel = Get-ChildItem dist\grpcio-*.whl | Select-Object -First 1 | ||
python -m pip install $grpcWheel.FullName | ||
|
||
cd .. | ||
|
||
# Change back to project root | ||
Set-Location workers | ||
|
||
Write-Host "=== Install other deps into root ===" | ||
python -m pip install . | ||
python -m pip install grpcio-tools==1.70.0 | ||
|
||
$depsPath = Join-Path -Path $env:BUILD_SOURCESDIRECTORY -ChildPath "deps" | ||
|
||
# Install both grpc wheels into deps | ||
Write-Host "=== Installing grpcio into deps/ ===" | ||
python -m pip install $grpcWheel.FullName --target $depsPath | ||
|
||
Write-Host "=== Installing other deps into deps/ ===" | ||
python -m pip install --upgrade pip setuptools wheel cython --target $depsPath | ||
python -m pip install . azure-functions --no-compile --target $depsPath --find-links ..\grpc\dist | ||
python -m pip install grpcio-tools==1.70.0 --no-compile --target $depsPath --find-links ..\grpc\dist | ||
|
||
Write-Host "=== Install invoke and build protos ===" | ||
python -m pip install invoke | ||
cd tests | ||
python -m invoke -c test_setup build-protos | ||
|
||
Write-Host "=== Copying .artifactignore ===" | ||
cd .. | ||
Copy-Item -Path ".artifactignore" -Destination $depsPath.ToString() | ||
|
||
Write-Host "=== Copying protos ===" | ||
if ($versionMinor -lt 13) { | ||
$protosPath = Join-Path -Path $depsPath -ChildPath "azure_functions_worker/protos" | ||
Copy-Item -Path "azure_functions_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force | ||
} else { | ||
$protosPath = Join-Path -Path $depsPath -ChildPath "proxy_worker/protos" | ||
Copy-Item -Path "proxy_worker/protos/*" -Destination $protosPath.ToString() -Recurse -Force | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.