diff --git a/CHANGELOG.md b/CHANGELOG.md index 300e1fac5..b6482770e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## Dev + +### Breaking change +* The Python API now requires Python 3.9, up from Python 3.6. + ## v0.21.0 ### Breaking change @@ -619,7 +624,7 @@ would pass `OMP_NUM_THREADS=4` to the executed ``. is `hq submit`, which is now a shortcut for `hq job submit`. Here is a table of changed commands: | **Previous command** | **New command** | - |----------------------|--------------------| + |----------------------|--------------------| | `hq jobs` | `hq job list` | | `hq job` | `hq job info` | | `hq resubmit` | `hq job resubmit` | @@ -735,7 +740,7 @@ would pass `OMP_NUM_THREADS=4` to the executed ``. * Generic resource management has been added. You can find out more in the [documentation](https://it4innovations.github.io/hyperqueue/stable/jobs/gresources/). - * HyperQueue can now automatically detect how many Nvidia GPUs are present on a worker node. + * HyperQueue can now automatically detect how many Nvidia GPUs are present on a worker node. * You can now submit a task array where each task will receive one element of a JSON array using `hq submit --from-json`. You can find out more in the [documentation](https://it4innovations.github.io/hyperqueue/stable/jobs/arrays/#json-array). @@ -743,10 +748,10 @@ would pass `OMP_NUM_THREADS=4` to the executed ``. ### Changes * There have been a few slight CLI changes: - * `hq worker list` no longer has `--offline` and `--online` flags. It will now display only running - workers by default. If you want to show also offline workers, use the `--all` flag. - * `hq alloc add` no longer has a required `--queue/--partition` option. The PBS queue/Slurm partition - should now be passed as a trailing argument after `--`: `hq alloc add pbs -- -qqprod`. + * `hq worker list` no longer has `--offline` and `--online` flags. It will now display only running + workers by default. If you want to show also offline workers, use the `--all` flag. + * `hq alloc add` no longer has a required `--queue/--partition` option. The PBS queue/Slurm partition + should now be passed as a trailing argument after `--`: `hq alloc add pbs -- -qqprod`. * Server subdirectories generated for each run of the HyperQueue server are now named with a numeric ID instead of a date. * The documentation has been [rewritten](https://it4innovations.github.io/hyperqueue). diff --git a/Cargo.lock b/Cargo.lock index 1bcc98674..9a8bc620e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.10" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf" dependencies = [ "shlex", ] @@ -314,9 +314,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.42" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a7e468e750fa4b6be660e8b5651ad47372e8fb114030b594c2d75d48c5ffd0" +checksum = "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6" dependencies = [ "clap 4.5.27", ] @@ -330,7 +330,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -507,7 +507,7 @@ dependencies = [ "crossterm_winapi", "futures-core", "mio", - "parking_lot 0.12.3", + "parking_lot", "rustix", "signal-hook", "signal-hook-mio", @@ -550,16 +550,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b916ba8ce9e4182696896f015e8a5ae6081b305f74690baa8465e35f5a142ea4" -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "darling" version = "0.14.4" @@ -605,7 +595,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -627,7 +617,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -689,7 +679,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -709,7 +699,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -885,7 +875,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -945,18 +935,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "ghost" -version = "0.1.18" +name = "getrandom" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b697dbd8bfcc35d0ee91698aaa379af096368ba8837d279cc097b276edda45" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", ] [[package]] @@ -1138,13 +1129,9 @@ dependencies = [ [[package]] name = "indoc" -version = "0.3.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" -dependencies = [ - "indoc-impl", - "proc-macro-hack", -] +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "indoc" @@ -1152,28 +1139,16 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -[[package]] -name = "indoc-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", - "unindent", -] - [[package]] name = "insta" -version = "1.42.0" +version = "1.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513e4067e16e69ed1db5ab56048ed65db32d10ba5fc1217f5393f8f17d8b5a5" +checksum = "71c1b125e30d93896b365e156c33dadfffab45ee8400afcbba4752f59de08a86" dependencies = [ "console", "linked-hash-map", "once_cell", + "pin-project", "similar", ] @@ -1187,38 +1162,7 @@ dependencies = [ "indoc 2.0.5", "proc-macro2", "quote", - "syn 2.0.96", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "inventory" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" -dependencies = [ - "ctor", - "ghost", - "inventory-impl", -] - -[[package]] -name = "inventory-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] @@ -1370,6 +1314,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1393,7 +1346,7 @@ checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -1501,13 +1454,13 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orion" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ab5415cf60cd271259e576f2ddee7a5f9fed42659035224c01af766943fad3" +checksum = "dd806049e71da4c4a7880466b37afdc5a4c5b35a398b0d4fd9ff5d278d3b4db9" dependencies = [ "ct-codecs", "fiat-crypto", - "getrandom", + "getrandom 0.3.1", "subtle", "zeroize", ] @@ -1518,17 +1471,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -1536,21 +1478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -1561,34 +1489,35 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.8", + "redox_syscall", "smallvec", "windows-targets", ] [[package]] name = "paste" -version = "0.1.18" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "paste" -version = "1.0.15" +name = "pin-project" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +dependencies = [ + "pin-project-internal", +] [[package]] -name = "paste-impl" -version = "0.1.18" +name = "pin-project-internal" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ - "proc-macro-hack", + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -1648,21 +1577,15 @@ dependencies = [ [[package]] name = "priority-queue" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714c75db297bc88a63783ffc6ab9f830698a6705aa0201416931759ef4c8183d" +checksum = "090ded312ed32a928fb49cb91ab4db6523ae3767225e61fbf6ceaaec3664ed26" dependencies = [ "autocfg", "equivalent", "indexmap", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "1.0.93" @@ -1720,17 +1643,18 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.15.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41d50a7271e08c7c8a54cd24af5d62f73ee3a6f6a314215281ebdec421d5752" +checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" dependencies = [ "anyhow", "cfg-if", - "indoc 0.3.6", + "indoc 1.0.9", "libc", - "parking_lot 0.11.2", - "paste 0.1.18", + "memoffset", + "parking_lot", "pyo3-build-config", + "pyo3-ffi", "pyo3-macros", "serde", "unindent", @@ -1738,12 +1662,11 @@ dependencies = [ [[package]] name = "pyo3-asyncio" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0897c7e36110a32b726b975359b2bbe90c37fcf1266046d3b1c08c616a47a886" +checksum = "d3564762e37035cfc486228e10b0528460fa026d681b5763873c693aa0d5c260" dependencies = [ "futures", - "inventory", "once_cell", "pin-project-lite", "pyo3", @@ -1753,9 +1676,9 @@ dependencies = [ [[package]] name = "pyo3-asyncio-macros" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4daada7260db6d6dbc1f9b50f3e3d21f9eb28c034722c9a61ac05ff56ffd62db" +checksum = "be72d4cd43a27530306bd0d20d3932182fbdd072c6b98d3638bc37efb9d559dd" dependencies = [ "proc-macro2", "quote", @@ -1764,19 +1687,31 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.15.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779239fc40b8e18bc8416d3a37d280ca9b9fb04bda54b98037bb6748595c2410" +checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" dependencies = [ "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" +dependencies = [ + "libc", + "pyo3-build-config", ] [[package]] name = "pyo3-macros" -version = "0.15.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b247e8c664be87998d8628e86f282c25066165f1f8dda66100c48202fdb93a" +checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" dependencies = [ + "proc-macro2", "pyo3-macros-backend", "quote", "syn 1.0.109", @@ -1784,21 +1719,20 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.15.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8c2812c412e00e641d99eeb79dd478317d981d938aa60325dfa7157b607095" +checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" dependencies = [ "proc-macro2", - "pyo3-build-config", "quote", "syn 1.0.109", ] [[package]] name = "pythonize" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445529621b8801c031b9e43f12f543fdf64379584646f132d6dcf2731c814e03" +checksum = "9a0e1bbcd2a3856284bf4f4ef09ccb1157e9467847792754556f153ea3fe6b42" dependencies = [ "pyo3", "serde", @@ -1840,7 +1774,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -1857,7 +1791,7 @@ dependencies = [ "instability", "itertools 0.13.0", "lru", - "paste 1.0.15", + "paste", "strum", "unicode-segmentation", "unicode-truncate", @@ -1884,15 +1818,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.8" @@ -1908,7 +1833,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror 2.0.11", ] @@ -1950,7 +1875,7 @@ checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" dependencies = [ "byteorder", "num-traits", - "paste 1.0.15", + "paste", ] [[package]] @@ -1992,9 +1917,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "same-file" @@ -2056,14 +1981,14 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2215,7 +2140,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2237,9 +2162,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -2284,15 +2209,21 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "tempfile" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -2362,7 +2293,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2373,7 +2304,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2406,7 +2337,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.3", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -2422,7 +2353,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2461,9 +2392,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ "indexmap", "serde", @@ -2491,7 +2422,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2550,9 +2481,9 @@ checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" [[package]] name = "unicode-ident" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-linebreak" @@ -2635,6 +2566,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -2657,7 +2597,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -2679,7 +2619,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2827,13 +2767,22 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.24" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2852,7 +2801,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] diff --git a/crates/pyhq/Cargo.toml b/crates/pyhq/Cargo.toml index d9eceae65..88949d15f 100644 --- a/crates/pyhq/Cargo.toml +++ b/crates/pyhq/Cargo.toml @@ -26,10 +26,10 @@ anyhow = { workspace = true } log = { workspace = true } tempfile = { workspace = true } -pyo3 = { version = "0.15", features = ["extension-module", "abi3", "abi3-py36", "anyhow", "serde"] } -pyo3-asyncio = { version = "0.15", features = ["tokio-runtime", "attributes"] } +pyo3 = { version = "0.18.0", features = ["extension-module", "abi3", "abi3-py39", "anyhow", "serde"] } +pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime", "attributes"] } +pythonize = "0.18.0" dict_derive = "0.6.0" -pythonize = "0.15" termcolor = "1.1" [package.metadata.maturin] diff --git a/crates/pyhq/pyproject.toml b/crates/pyhq/pyproject.toml index 549837cb1..4f3a4ac68 100644 --- a/crates/pyhq/pyproject.toml +++ b/crates/pyhq/pyproject.toml @@ -8,7 +8,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Rust" ] -requires-python = ">=3.6" +requires-python = ">=3.9" description = "HyperQueue Python API" dependencies = [ "cloudpickle>=2.0,<3", diff --git a/crates/pyhq/src/lib.rs b/crates/pyhq/src/lib.rs index 359a04f0b..b6a1cb4a3 100644 --- a/crates/pyhq/src/lib.rs +++ b/crates/pyhq/src/lib.rs @@ -8,14 +8,14 @@ use pyo3::{wrap_pyfunction, Py, PyResult, Python}; use std::path::PathBuf; use tokio::runtime::Builder; -use hyperqueue::transfer::connection::ClientSession; +use ::hyperqueue::transfer::connection::ClientSession; +use ::hyperqueue::HQ_VERSION; use crate::client::job::{forget_job_impl, FailedTaskMap}; use crate::cluster::Cluster; use crate::utils::run_future; use client::job::{get_failed_tasks_impl, submit_job_impl, wait_for_jobs_impl, PyJobDescription}; use client::server::{connect_to_server_impl, stop_server_impl}; -use hyperqueue::HQ_VERSION; mod client; pub mod cluster; diff --git a/crates/pyhq/src/marshal.rs b/crates/pyhq/src/marshal.rs index 29344ea50..b5add63f7 100644 --- a/crates/pyhq/src/marshal.rs +++ b/crates/pyhq/src/marshal.rs @@ -46,7 +46,7 @@ pub struct WrappedDuration(Duration); impl<'a> FromPyObject<'a> for WrappedDuration { fn extract(object: &'a PyAny) -> PyResult { - if let Err(_) | Ok(false) = object.is_instance::() { + if let Err(_) | Ok(false) = object.is_instance_of::() { return Err(anyhow::anyhow!( "Duration must be represented as a float containing the total amount of seconds." )) diff --git a/crates/pyhq/src/utils/error.rs b/crates/pyhq/src/utils/error.rs index 5c1eafb14..9f3681163 100644 --- a/crates/pyhq/src/utils/error.rs +++ b/crates/pyhq/src/utils/error.rs @@ -9,7 +9,7 @@ pub(crate) trait ToPyError { impl ToPyError for HqError { fn to_py(self) -> PyErr { Python::with_gil(|py| { - PyErr::from_instance(PyException::new_err(format!("{self:?}")).instance(py)) + PyErr::from_value(PyException::new_err(format!("{self:?}")).value(py)) }) } } diff --git a/docs/python/index.md b/docs/python/index.md index 06c35a1c7..1017c8557 100644 --- a/docs/python/index.md +++ b/docs/python/index.md @@ -7,7 +7,7 @@ Python API covers all task definition including all options available through Jo You can find the HyperQueue Python API reference [here](apidoc). ## Requirements -To use the Python API, you will need at least Python 3.6 and some dependencies that will be installed +To use the Python API, you will need at least Python 3.9 and some dependencies that will be installed automatically using pip. ## Installation