-
Notifications
You must be signed in to change notification settings - Fork 61
Support Python 3.13 #495
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
Support Python 3.13 #495
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
93b4ca9
upgraded lxml and tested
RenSilvaAU f2d0b00
created compatibility matrix
RenSilvaAU 87235b5
forced compatibility matrix run in feature branch
RenSilvaAU 91e0bc5
updated windows version for longer file names
RenSilvaAU 6315b3f
adjusted virtual enviroment update for different oss
RenSilvaAU 372d582
addressing further compatibility issues
RenSilvaAU 9229d96
simplified tests focusing on python packages only
RenSilvaAU e051f4e
removed package caches
RenSilvaAU 9117d9b
pip ugrade was failing under windows
RenSilvaAU 181dd06
updated code and documents for python compatibility 3.8 to 3.13
RenSilvaAU 9e9e0e4
trigger build test
RenSilvaAU 8ca9375
addressed comments
RenSilvaAU 2e41fbd
updated requirements
RenSilvaAU abe8e50
updated wrapt
RenSilvaAU 16a5a53
update wrapt versions
RenSilvaAU 82a0b48
pinned azdev version
RenSilvaAU 18759ec
test addressing requirements
RenSilvaAU 6b7ba5d
addressing PR comments
RenSilvaAU 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| # Python Compatibility Testing Workflow | ||
| # | ||
| # Tests Python package build compatibility across: | ||
| # - Operating Systems: Ubuntu, macOS, Windows | ||
| # - Python Versions: 3.9, 3.10, 3.11, 3.12, 3.13 | ||
| # | ||
| # Validates that the package can be built and installed correctly | ||
| # on all supported platforms and Python versions. | ||
|
|
||
| name: Python Compatibility Check | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| pull_request: | ||
|
|
||
| env: | ||
| # Change this to invalidate existing cache. | ||
| CACHE_PREFIX: v0 | ||
| PYTHON_PATH: ./ | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| checks: | ||
| name: Python ${{ matrix.python }} - ${{ matrix.os }} - ${{ matrix.task.name }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 30 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| python: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
| task: | ||
| - name: Build | ||
| run: | | ||
| pip list | ||
| pip install twine | ||
| pip install --upgrade setuptools wheel | ||
| pip list | ||
| python setup.py check | ||
| python setup.py bdist_wheel sdist | ||
| twine check ./dist/* | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - name: Install prerequisites | ||
| run: | | ||
| python -m pip install --upgrade pip setuptools wheel | ||
|
|
||
| - name: Set build variables | ||
| shell: bash | ||
| run: | | ||
| echo "PYTHON_VERSION=$(python --version)" >> $GITHUB_ENV | ||
|
|
||
| - name: Test dependency wheels availability - Unix/Linux/macOS | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| python -m venv .venv-deps-test | ||
| . .venv-deps-test/bin/activate | ||
| # Try installing with wheel-only first to catch dependency conflicts early | ||
| pip install --only-binary=:all: -r requirements.txt || { | ||
| echo "Warning: Some dependencies may not have wheels available" | ||
| echo "Attempting installation with source packages allowed..." | ||
| pip install -r requirements.txt | ||
| } | ||
| deactivate | ||
| rm -rf .venv-deps-test | ||
| shell: bash | ||
|
|
||
| - name: Test dependency wheels availability - Windows | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| python -m venv .venv-deps-test | ||
| .venv-deps-test\Scripts\Activate.ps1 | ||
| # Try installing with wheel-only first to catch dependency conflicts early | ||
| pip install --only-binary=:all: -r requirements.txt | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Host "Warning: Some dependencies may not have wheels available" | ||
| Write-Host "Attempting installation with source packages allowed..." | ||
| pip install -r requirements.txt | ||
| } | ||
| deactivate | ||
| Remove-Item -Recurse -Force .venv-deps-test | ||
| shell: pwsh | ||
|
|
||
| - name: Setup virtual environment - Unix/Linux/macOS | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| python -m venv .venv | ||
| . .venv/bin/activate | ||
| pip install -e .[dev] | ||
| shell: bash | ||
|
|
||
| - name: Setup virtual environment - Windows | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| python -m venv .venv | ||
| .venv\Scripts\Activate.ps1 | ||
| pip install -e .[dev] | ||
| shell: pwsh | ||
|
|
||
| - name: Show environment info - Unix/Linux/macOS | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| . .venv/bin/activate | ||
| which python | ||
| python --version | ||
| pip freeze | ||
| # Node.js version info - uncomment if you need to verify Node.js/npm/pnpm versions | ||
| # which node | ||
| # node --version | ||
| # npm --version | ||
| # pnpm --version | ||
| shell: bash | ||
|
|
||
| - name: Show environment info - Windows | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| .venv\Scripts\Activate.ps1 | ||
| Get-Command python | ||
| python --version | ||
| pip freeze | ||
| # Node.js version info - uncomment if you need to verify Node.js/npm/pnpm versions | ||
| # Get-Command node | ||
| # node --version | ||
| # npm --version | ||
| # pnpm --version | ||
| shell: pwsh | ||
|
|
||
| # Web build steps - tests TypeScript/web components compilation and bundling | ||
| # Uncomment if you need to verify that web components work with your Python package changes | ||
| # - name: Build Web | ||
| # run: | | ||
| # pnpm build:typespec | ||
| # pnpm build:web | ||
| # pnpm bundle | ||
| # env: | ||
| # CI: false | ||
|
|
||
| # TypeSpec emitter testing - tests the TypeSpec-to-code generation functionality | ||
| # Uncomment if you need to verify TypeSpec emitter compatibility with your Python changes | ||
| # - name: Test Typespec-aaz Emitter | ||
| # run: | | ||
| # pnpm test-aaz-emitter | ||
|
|
||
| - name: ${{ matrix.task.name }} - Unix/Linux/macOS | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| . .venv/bin/activate | ||
| ${{ matrix.task.run }} | ||
| shell: bash | ||
|
|
||
| - name: ${{ matrix.task.name }} - Windows | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| .venv\Scripts\Activate.ps1 | ||
| ${{ matrix.task.run }} | ||
| shell: pwsh | ||
|
|
||
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
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
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.
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.