diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa2aef9f79ad..90a8cf87e4c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,8 +94,8 @@ jobs: body: 'Thank you for your contribution! 🙏\n\nThe pre-commit checks failed, but this is easy to fix. You\'ll need to run:\n\n```bash\nmake pre-commit\n# or\npre-commit run --all-files\n```\n\nThis will automatically fix most formatting issues. Just commit any changes and push again.\n\nSee our [CONTRIBUTING.md](https://github.com/nautechsystems/nautilus_trader/blob/develop/CONTRIBUTING.md) guide for more details.' }) - - name: Fail job if pre-commit fails - if: failure() # Explicitly fail the job if pre-commit failed + - name: Fail job if pre-commit failed + if: failure() run: | echo "Pre-commit checks failed, exiting" exit 1 diff --git a/README.md b/README.md index 6332075e2c07..6515a6c229f1 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ | Platform | Rust | Python | | :----------------- | :------ | :----- | -| `Linux (x86_64)` | 1.83.0+ | 3.11+ | -| `macOS (arm64)` | 1.83.0+ | 3.11+ | -| `Windows (x86_64)` | 1.83.0+ | 3.11+ | +| `Linux (x86_64)` | 1.84.0+ | 3.11+ | +| `macOS (arm64)` | 1.84.0+ | 3.11+ | +| `Windows (x86_64)` | 1.84.0+ | 3.11+ | [![](https://dcbadge.limes.pink/api/server/AUWVs3XaCS)](https://discord.gg/AUWVs3XaCS) diff --git a/nautilus_core/Cargo.toml b/nautilus_core/Cargo.toml index 808a0f3f5d5d..751299855e00 100644 --- a/nautilus_core/Cargo.toml +++ b/nautilus_core/Cargo.toml @@ -23,7 +23,7 @@ members = [ ] [workspace.package] -rust-version = "1.83.0" +rust-version = "1.84.0" version = "0.40.0" edition = "2021" authors = ["Nautech Systems "] @@ -48,7 +48,7 @@ itoa = "1.0.14" once_cell = "1.20.2" log = { version = "0.4.22", features = ["std", "kv_unstable", "serde", "release_max_level_debug"] } parquet = "53.2.0" # Keep in line with datafusion -pyo3 = { version = "0.22.6", features = ["rust_decimal", "indexmap", "smallvec"] } +pyo3 = { version = "0.22.6", features = ["gil-refs", "indexmap", "rust_decimal", "smallvec"] } pyo3-async-runtimes = { version = "0.22.0", features = ["tokio-runtime", "tokio", "attributes"] } rand = "0.8.5" reqwest = { version = "0.12.12", features = ["blocking"] } diff --git a/nautilus_core/model/src/orderbook/book.rs b/nautilus_core/model/src/orderbook/book.rs index 6a76c247fe8e..e254e1e0ec38 100644 --- a/nautilus_core/model/src/orderbook/book.rs +++ b/nautilus_core/model/src/orderbook/book.rs @@ -266,13 +266,13 @@ impl OrderBook { /// Returns true if the book has any bid orders. #[must_use] pub fn has_bid(&self) -> bool { - self.bids.top().map_or(false, |top| !top.orders.is_empty()) + self.bids.top().is_some_and(|top| !top.orders.is_empty()) } /// Returns true if the book has any ask orders. #[must_use] pub fn has_ask(&self) -> bool { - self.asks.top().map_or(false, |top| !top.orders.is_empty()) + self.asks.top().is_some_and(|top| !top.orders.is_empty()) } /// Returns the best bid price if available. diff --git a/nautilus_core/model/src/orders/base.rs b/nautilus_core/model/src/orders/base.rs index 204caad943bb..be6211f00783 100644 --- a/nautilus_core/model/src/orders/base.rs +++ b/nautilus_core/model/src/orders/base.rs @@ -331,9 +331,8 @@ pub trait Order: 'static + Send { } fn is_spawned(&self) -> bool { - self.exec_spawn_id().map_or(false, |exec_spawn_id| { - exec_spawn_id != self.client_order_id() - }) + self.exec_spawn_id() + .is_some_and(|exec_spawn_id| exec_spawn_id != self.client_order_id()) } } diff --git a/nautilus_core/network/Cargo.toml b/nautilus_core/network/Cargo.toml index 9cfe962a0422..0abc55f0a3f9 100644 --- a/nautilus_core/network/Cargo.toml +++ b/nautilus_core/network/Cargo.toml @@ -42,5 +42,6 @@ extension-module = [ "pyo3/extension-module", "nautilus-core/extension-module", ] +gil-refs = [] python = ["pyo3", "pyo3-async-runtimes"] std = [] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7b38006cd0c8..8fd74a957897 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -version = "1.83.0" +version = "1.84.0" channel = "stable"