Skip to content

home-assistant: pin psutil to 7.1.2 for systemmonitor#497895

Open
zeus-x99 wants to merge 1 commit intoNixOS:masterfrom
zeus-x99:zeus/home-assistant-pin-psutil-7.1.2
Open

home-assistant: pin psutil to 7.1.2 for systemmonitor#497895
zeus-x99 wants to merge 1 commit intoNixOS:masterfrom
zeus-x99:zeus/home-assistant-pin-psutil-7.1.2

Conversation

@zeus-x99
Copy link
Contributor

@zeus-x99 zeus-x99 commented Mar 8, 2026

Description

Home Assistant 2026.2.3 still ships systemmonitor with a hard requirement on psutil==7.1.2, and it imports symbols that were removed from psutil 7.2.1.

On nixpkgs unstable, pkgs.home-assistant currently ends up with psutil 7.2.1, which breaks systemmonitor at import time with:

ImportError: cannot import name 'sbattery' from 'psutil._common'

Pin psutil to 7.1.2 inside the Home Assistant Python package set so systemmonitor matches its upstream dependency constraint again.

Resolves #496133.

Testing

  • nix build -L .#home-assistant --no-link
  • Verified the resulting closure contains python3.13-psutil-7.1.2
  • Verified homeassistant.components.systemmonitor.coordinator imports successfully from the built package

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR's base branch is set to master, but this PR causes 1093 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).

@nixpkgs-ci nixpkgs-ci bot requested review from dotlambda, fabaff and mweinelt March 8, 2026 13:25
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Mar 8, 2026
# Pinned because systemmonitor in Home Assistant 2026.2.3 still requires
# psutil 7.1.2 and breaks with psutil 7.2.1 (missing sbattery in
# psutil._common).
psutil = super.psutil.overridePythonAttrs (oldAttrs: rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a package python3Packages.psutil_7_1: #421201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

home-assistant: "systemmonitor" broken, psutil version mismatch

2 participants