diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1673def..7905229 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,8 +15,9 @@ jobs: macos: runs-on: macos-latest strategy: + fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -34,15 +35,6 @@ jobs: - name: Install built wheel - x86_64 run: | pip install gilknocker --no-index --find-links dist --force-reinstall - - name: Build wheels - universal2 - if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }} - uses: PyO3/maturin-action@v1 - with: - args: -i python --release --universal2 --out dist - - name: Install built wheel - universal2 - if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }} - run: | - pip install gilknocker --no-index --find-links dist --force-reinstall - name: Python UnitTest run: | pip install -r requirements-dev.txt @@ -58,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] target: [x64, x86] steps: - uses: actions/checkout@v2 @@ -97,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] target: [x86_64, i686] steps: - uses: actions/checkout@v2 @@ -131,6 +123,7 @@ jobs: pypy-linux: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python: - pypy-3.7 @@ -169,6 +162,7 @@ jobs: pypy-macos: runs-on: macos-latest strategy: + fail-fast: false matrix: python-version: [ pypy-3.7, pypy-3.8, pypy-3.9 ] steps: @@ -209,6 +203,7 @@ jobs: linux-cross: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python: - '3.7' @@ -216,6 +211,7 @@ jobs: - '3.9' - '3.10' - '3.11' + - '3.12' target: [aarch64, armv7, s390x, ppc64le] include: - python: pypy3.7 @@ -257,7 +253,7 @@ jobs: apt-get install -y --no-install-recommends python3 python3-venv software-properties-common add-apt-repository ppa:deadsnakes/ppa apt-get update - apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv python3.11-venv + apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv python3.11-venv python3.12-venv run: | ls -lrth /artifacts PYTHON=python${{ matrix.python }} @@ -289,4 +285,4 @@ jobs: TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} run: | pip install --upgrade wheel pip setuptools twine - twine upload --skip-existing * \ No newline at end of file + twine upload --skip-existing * diff --git a/Cargo.lock b/Cargo.lock index f32c00d..a1ca4df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,23 +28,29 @@ dependencies = [ "pyo3", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "indoc" -version = "1.0.8" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780" +checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -52,18 +58,18 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "parking_lot" @@ -77,31 +83,30 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-targets", ] [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb848f80438f926a9ebddf0a539ed6065434fd7aae03a89312a9821f81b8501" +version = "0.19.2" +source = "git+https://github.com/PyO3/pyo3.git?rev=90cc69b#90cc69ba73eaad3567bd660db3f531bafaadf583" dependencies = [ "cfg-if", "indoc", @@ -116,9 +121,8 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a42e7f42e917ce6664c832d5eee481ad514c98250c49e0b03b20593e2c7ed0" +version = "0.19.2" +source = "git+https://github.com/PyO3/pyo3.git?rev=90cc69b#90cc69ba73eaad3567bd660db3f531bafaadf583" dependencies = [ "once_cell", "target-lexicon", @@ -126,9 +130,8 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0707f0ab26826fe4ccd59b69106e9df5e12d097457c7b8f9c0fd1d2743eec4d" +version = "0.19.2" +source = "git+https://github.com/PyO3/pyo3.git?rev=90cc69b#90cc69ba73eaad3567bd660db3f531bafaadf583" dependencies = [ "libc", "pyo3-build-config", @@ -136,9 +139,8 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978d18e61465ecd389e1f235ff5a467146dc4e3c3968b90d274fe73a5dd4a438" +version = "0.19.2" +source = "git+https://github.com/PyO3/pyo3.git?rev=90cc69b#90cc69ba73eaad3567bd660db3f531bafaadf583" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -148,10 +150,10 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0e1128f85ce3fca66e435e08aa2089a2689c1c48ce97803e13f63124058462" +version = "0.19.2" +source = "git+https://github.com/PyO3/pyo3.git?rev=90cc69b#90cc69ba73eaad3567bd660db3f531bafaadf583" dependencies = [ + "heck", "proc-macro2", "quote", "syn", @@ -159,39 +161,39 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "syn" -version = "1.0.107" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -200,27 +202,27 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.5" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unindent" -version = "0.1.11" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -233,42 +235,42 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" diff --git a/Cargo.toml b/Cargo.toml index 78f6434..9859d87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,5 +19,5 @@ codegen-units = 1 opt-level = 3 [dependencies] -pyo3 = { version = "0.18.2", features = ["extension-module"] } +pyo3 = { git = "https://github.com/PyO3/pyo3.git", rev="90cc69b", features = ["extension-module"] } parking_lot = "^0.12" diff --git a/pyproject.toml b/pyproject.toml index 5d9b892..4f399d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ homepage = "https://github.com/milesgranger/gilknocker" repository = "https://github.com/milesgranger/gilknocker" [build-system] -requires = ["maturin>=0.14,<0.15"] +requires = ["maturin>=1.3.0,<2.0.0"] build-backend = "maturin" [tool.pytest.ini_options] diff --git a/src/lib.rs b/src/lib.rs index c8816b4..c22b71a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ use parking_lot::{const_rwlock, RwLock}; use pyo3::ffi::{PyEval_InitThreads, PyEval_ThreadsInitialized}; use pyo3::prelude::*; -use pyo3::{AsPyPointer, PyResult}; +use pyo3::PyResult; use std::ops::DerefMut; use std::{ mem::take,