-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: Add support for 3.13 with no GIL #505
Open
blopker
wants to merge
11
commits into
jdrouet:main
Choose a base branch
from
blopker:feature/3.13
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
be5a10f
Add support for 3.13 with no GIL
blopker 5cdd17d
Install maturin via pip for speed, use no gil python for testing
blopker 2b89060
Fix deadsnakes action version
blopker e364681
Add 3.13 to release workflow
blopker aac4f79
Better tests, freeze all classes for better thread safety
blopker 9885878
ci(python): make sure it builds for python 3.10 and 3.13
jdrouet d10d5ba
ci(python): use dadsnakes action and python 3.13 for release action
jdrouet f4be79d
ci(python): only use deadsnakes action for 3.13
jdrouet bc9a6e7
ci(python): try to fix python 3.10 install
jdrouet c0dd110
build(python): set version in pyproject
jdrouet 4abfb63
ci(python): move back maturin install
jdrouet 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 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 |
---|---|---|
|
@@ -5,18 +5,18 @@ on: | |
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/mrml-python-main.yml' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'packages/mrml-core/**' | ||
- 'packages/mrml-python/**' | ||
- ".github/workflows/mrml-python-main.yml" | ||
- "Cargo.lock" | ||
- "Cargo.toml" | ||
- "packages/mrml-core/**" | ||
- "packages/mrml-python/**" | ||
pull_request: | ||
paths: | ||
- '.github/workflows/mrml-python-main.yml' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'packages/mrml-core/**' | ||
- 'packages/mrml-python/**' | ||
- ".github/workflows/mrml-python-main.yml" | ||
- "Cargo.lock" | ||
- "Cargo.toml" | ||
- "packages/mrml-core/**" | ||
- "packages/mrml-python/**" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
|
@@ -26,32 +26,43 @@ jobs: | |
testing: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.13"] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-mrml-python | ||
group: ${{ github.ref }}-mrml-python-${{ matrix.python-version }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
- name: setup python | ||
if: matrix.python-version != '3.13' | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Use deadsnakes until https://github.com/actions/setup-python/issues/771 is closed | ||
- name: setup python | ||
if: matrix.python-version == '3.13' | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: '3.10' | ||
python-version: ${{ matrix.python-version }} | ||
nogil: true | ||
|
||
- name: install cargo toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
- name: install maturin | ||
run: cargo install maturin --locked | ||
|
||
- name: init python venv | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip install --upgrade pip | ||
python3 -m venv env | ||
source env/bin/activate | ||
python3 -m pip install pytest | ||
python3 -m pip install pytest maturin | ||
maturin develop | ||
python3 -m pytest | ||
working-directory: packages/mrml-python |
This file contains 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 |
---|---|---|
|
@@ -37,9 +37,12 @@ jobs: | |
manylinux: "auto" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
# Use deadsnakes until https://github.com/actions/setup-python/issues/771 is closed | ||
- name: setup python | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: "3.10" | ||
python-version: "3.13" | ||
nogil: true" | ||
- name: build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
|
@@ -61,9 +64,12 @@ jobs: | |
target: [x64, x86] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
# Use deadsnakes until https://github.com/actions/setup-python/issues/771 is closed | ||
- name: setup python | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: "3.10" | ||
python-version: "3.13" | ||
nogil: true" | ||
architecture: ${{ matrix.target }} | ||
- name: build wheels | ||
uses: PyO3/maturin-action@v1 | ||
|
@@ -85,9 +91,12 @@ jobs: | |
target: [x86_64, aarch64] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
# Use deadsnakes until https://github.com/actions/setup-python/issues/771 is closed | ||
- name: setup python | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: "3.10" | ||
python-version: "3.13" | ||
nogil: true" | ||
- name: build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing Maturin via pip seems much faster since it's already compiled.