From 8337ffaffda46bbe12901dac5a140408c976b5ab Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 13 Mar 2026 20:32:00 +0000
Subject: [PATCH] Update Rust crate wmi to 0.18.3 (#17602)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [wmi](https://redirect.github.com/ohadravid/wmi-rs) |
workspace.dependencies | minor | `0.16.0` → `0.18.0` |
---
### Release Notes
ohadravid/wmi-rs (wmi)
###
[`v0.18.0`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.18.0)
[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.3...v0.18.0)
#### What's Changed
- Remove `COMLibrary` and let `WMIConnection` initialize COM if needed
by [@ohadravid](https://redirect.github.com/ohadravid) in
[#137](https://redirect.github.com/ohadravid/wmi-rs/pull/137)
You can now call `WMIConnection::new()` and let the crate handle the
initialization internally.
Note: COM will NOT be uninitialized when the connection is dropped
(similar to <=0.17 versions, which didn't uninitialize COM on drop since
[#53](https://redirect.github.com/ohadravid/wmi-rs/issues/53)).
If this is not what you want, then you must initialize COM yourself
**before** creating the connection. See the docs for more.
- Update the crate to Rust 2024 edition
**Full Changelog**:
###
[`v0.17.3`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.3)
[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.2...v0.17.3)
#### What's Changed
- chore(deps): update criterion requirement from 0.5 to 0.6 by
[@dependabot](https://redirect.github.com/dependabot)\[bot] in
[#128](https://redirect.github.com/ohadravid/wmi-rs/pull/128)
- Update CI images by
[@ohadravid](https://redirect.github.com/ohadravid) in
[#135](https://redirect.github.com/ohadravid/wmi-rs/pull/135)
- chore(deps): update windows requirement from 0.61 to 0.62 by
[@dependabot](https://redirect.github.com/dependabot)\[bot] in
[#134](https://redirect.github.com/ohadravid/wmi-rs/pull/134)
**Full Changelog**:
###
[`v0.17.2`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.2)
[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.1...v0.17.2)
#### What's Changed
- feat(remote\_connection): added with\_credentials() by
[@hatch15](https://redirect.github.com/hatch15) in
[#127](https://redirect.github.com/ohadravid/wmi-rs/pull/127)
#### New Contributors
- [@hatch15](https://redirect.github.com/hatch15) made their
first contribution in
[#127](https://redirect.github.com/ohadravid/wmi-rs/pull/127)
**Full Changelog**:
###
[`v0.17.1`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.1)
[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.0...v0.17.1)
#### What's Changed
- Support arrays of IUnknown pointers by
[@samin-cf](https://redirect.github.com/samin-cf) in
[#125](https://redirect.github.com/ohadravid/wmi-rs/pull/125) and
[@ohadravid](https://redirect.github.com/ohadravid) in
[#126](https://redirect.github.com/ohadravid/wmi-rs/pull/126)
**Full Changelog**:
###
[`v0.17.0`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.0)
[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.16.0...v0.17.0)
#### What's Changed
- Added support for Option by
[@vpopescu](https://redirect.github.com/vpopescu) in
[#122](https://redirect.github.com/ohadravid/wmi-rs/pull/122)
#### Breaking Changes
- Fixed conversions from Rust types to WMI types (so, only when used for
method calling or using put\_property), which were incorrect in a few
cases (notably, u32s and u16s were not converted correctly), and added
some missing conversions, in
[#124](https://redirect.github.com/ohadravid/wmi-rs/pull/124)
- `SafeArrayAccessor::new` now accepts a `NonNull` instead of
a reference, in
[#124](https://redirect.github.com/ohadravid/wmi-rs/pull/124)
#### New Contributors
- [@vpopescu](https://redirect.github.com/vpopescu) made their
first contribution in
[#122](https://redirect.github.com/ohadravid/wmi-rs/pull/122)
**Full Changelog**:
---
### Configuration
📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).
---------
Co-authored-by: konstin
Co-authored-by: Zanie Blue
---
Cargo.lock | 4 ++--
Cargo.toml | 2 +-
crates/uv-torch/src/accelerator.rs | 38 +++++++++++++-----------------
3 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index a7209de50..31faa3224 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8052,9 +8052,9 @@ dependencies = [
[[package]]
name = "wmi"
-version = "0.16.0"
+version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d9189bc72f0e4d814d812216ec06636ce3ea5597ff5f1ff9f9f0e5ec781c027"
+checksum = "003e65f4934cf9449b9ce913ad822cd054a5af669d24f93db101fdb02856bb23"
dependencies = [
"futures",
"log",
diff --git a/Cargo.toml b/Cargo.toml
index 613f5eb3d..61fbe4fe5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -296,7 +296,7 @@ windows = { version = "0.61.0", features = [
windows-registry = { version = "0.5.0" }
windows-version = { version = "0.1.6" }
wiremock = { version = "0.6.4" }
-wmi = { version = "0.16.0", default-features = false }
+wmi = { version = "0.18.3", default-features = false }
xz2 = { version = "0.1.7", features = ["static"] }
zeroize = { version = "1.8.1" }
zip = { version = "8.1.0", default-features = false, features = [
diff --git a/crates/uv-torch/src/accelerator.rs b/crates/uv-torch/src/accelerator.rs
index 5ccfd03b7..3f4810374 100644
--- a/crates/uv-torch/src/accelerator.rs
+++ b/crates/uv-torch/src/accelerator.rs
@@ -9,7 +9,7 @@ use uv_static::EnvVars;
#[cfg(windows)]
use serde::Deserialize;
#[cfg(windows)]
-use wmi::{COMLibrary, WMIConnection};
+use wmi::WMIConnection;
#[derive(Debug, thiserror::Error)]
pub enum AcceleratorError {
@@ -208,34 +208,28 @@ impl Accelerator {
name: Option,
}
- match COMLibrary::new() {
- Ok(com_library) => match WMIConnection::new(com_library) {
- Ok(wmi_connection) => match wmi_connection.query::() {
- Ok(gpu_controllers) => {
- for gpu_controller in gpu_controllers {
- if let Some(pnp_device_id) = &gpu_controller.pnp_device_id {
- if pnp_device_id
- .contains(&format!("VEN_{PCI_VENDOR_ID_INTEL:04X}"))
- {
- debug!(
- "Detected Intel GPU from WMI: PNPDeviceID={}, Name={:?}",
- pnp_device_id, gpu_controller.name
- );
- return Ok(Some(Self::Xpu));
- }
+ match WMIConnection::new() {
+ Ok(wmi_connection) => match wmi_connection.query::() {
+ Ok(gpu_controllers) => {
+ for gpu_controller in gpu_controllers {
+ if let Some(pnp_device_id) = &gpu_controller.pnp_device_id {
+ if pnp_device_id.contains(&format!("VEN_{PCI_VENDOR_ID_INTEL:04X}"))
+ {
+ debug!(
+ "Detected Intel GPU from WMI: PNPDeviceID={}, Name={:?}",
+ pnp_device_id, gpu_controller.name
+ );
+ return Ok(Some(Self::Xpu));
}
}
}
- Err(e) => {
- debug!("Failed to query WMI for video controllers: {e}");
- }
- },
+ }
Err(e) => {
- debug!("Failed to create WMI connection: {e}");
+ debug!("Failed to query WMI for video controllers: {e}");
}
},
Err(e) => {
- debug!("Failed to initialize COM library: {e}");
+ debug!("Failed to create WMI connection: {e}");
}
}
}