This is an automated email from the ASF dual-hosted git repository.
hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new fb9bd1acf fix(python): gate Unix-only APIs to fix Windows SDK build
(#2695)
fb9bd1acf is described below
commit fb9bd1acf009be39186bb4a95ed136ecaa4ca193
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Fri Feb 6 16:23:38 2026 +0100
fix(python): gate Unix-only APIs to fix Windows SDK build (#2695)
iggy_common used std::os::fd and nix::unistd::dup
unconditionally, breaking compilation on Windows
targets (x86_64-pc-windows-msvc) during Python SDK
release.
---
core/common/Cargo.toml | 4 +++-
core/common/src/sender/mod.rs | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/core/common/Cargo.toml b/core/common/Cargo.toml
index 783a6aa23..89adb6a99 100644
--- a/core/common/Cargo.toml
+++ b/core/common/Cargo.toml
@@ -48,7 +48,6 @@ derive_more = { workspace = true }
err_trail = { workspace = true }
human-repr = { workspace = true }
humantime = { workspace = true }
-nix = { workspace = true }
once_cell = { workspace = true }
rcgen = { workspace = true }
ring = { workspace = true }
@@ -63,5 +62,8 @@ tracing = { workspace = true }
tungstenite = { workspace = true }
twox-hash = { workspace = true }
+[target.'cfg(unix)'.dependencies]
+nix = { workspace = true }
+
[dev-dependencies]
serial_test = { workspace = true }
diff --git a/core/common/src/sender/mod.rs b/core/common/src/sender/mod.rs
index 27c98d890..11c13bc70 100644
--- a/core/common/src/sender/mod.rs
+++ b/core/common/src/sender/mod.rs
@@ -37,8 +37,11 @@ use compio::net::TcpStream;
use compio_quic::{RecvStream, SendStream};
use compio_tls::TlsStream;
use std::future::Future;
+#[cfg(unix)]
use std::os::fd::{AsFd, OwnedFd};
-use tracing::{debug, error};
+use tracing::debug;
+#[cfg(unix)]
+use tracing::error;
macro_rules! forward_async_methods {
(
@@ -117,6 +120,7 @@ impl SenderKind {
Self::WebSocketTls(stream)
}
+ #[cfg(unix)]
pub fn take_and_migrate_tcp(&mut self) -> Option<OwnedFd> {
match self {
SenderKind::Tcp(tcp_sender) => {