Skip to content

Commit

Permalink
Upgrading PyO3 to 0.23 (#543)
Browse files Browse the repository at this point in the history
* Update pyo3 to 0.23 and remove calls to deprecated methods

* Implement IntoPyObject trait

* Migrate IntoPy to IntoPyObject for Device

* Remove into_py calls pt1

* Remove into_py calls pt2

* Remove into_py calls pt3

* Macos-12 is deprecated.

* Clippy.

* Remove codecov.

---------

Co-authored-by: Nicolas Patry <[email protected]>
  • Loading branch information
IvanIsCoding and Narsil authored Jan 2, 2025
1 parent 038dcbb commit 6e9c9b3
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
strategy:
matrix:
platform:
- runner: macos-12
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: cargo llvm-cov --release --lcov --output-path lcov.info

- name: Upload to codecov.io
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
working-directory: ./safetensors
fail_ci_if_error: true
# - name: Upload to codecov.io
# if: matrix.os == 'ubuntu-latest'
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# working-directory: ./safetensors
# fail_ci_if_error: true
2 changes: 1 addition & 1 deletion bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "safetensors_rust"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.22", features = ["abi3", "abi3-py38"] }
pyo3 = { version = "0.23", features = ["abi3", "abi3-py38"] }
memmap2 = "0.9"
serde_json = "1.0"

Expand Down
Loading

0 comments on commit 6e9c9b3

Please sign in to comment.