Skip to content

Commit

Permalink
Bump psutil to 6.0.0 (home-assistant#121385)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST authored Jul 6, 2024
1 parent d113ea8 commit 98370fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/systemmonitor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/systemmonitor",
"iot_class": "local_push",
"loggers": ["psutil"],
"requirements": ["psutil-home-assistant==0.0.1", "psutil==5.9.8"]
"requirements": ["psutil-home-assistant==0.0.1", "psutil==6.0.0"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ proxmoxer==2.0.1
psutil-home-assistant==0.0.1

# homeassistant.components.systemmonitor
psutil==5.9.8
psutil==6.0.0

# homeassistant.components.pulseaudio_loopback
pulsectl==23.5.2
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ prometheus-client==0.17.1
psutil-home-assistant==0.0.1

# homeassistant.components.systemmonitor
psutil==5.9.8
psutil==6.0.0

# homeassistant.components.androidtv
pure-python-adb[async]==0.3.0.dev0
Expand Down
10 changes: 5 additions & 5 deletions tests/components/systemmonitor/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ def mock_psutil(mock_process: list[MockProcess]) -> Generator:
"cpu0-thermal": [shwtemp("cpu0-thermal", 50.0, 60.0, 70.0)]
}
mock_psutil.disk_partitions.return_value = [
sdiskpart("test", "/", "ext4", "", 1, 1),
sdiskpart("test2", "/media/share", "ext4", "", 1, 1),
sdiskpart("test3", "/incorrect", "", "", 1, 1),
sdiskpart("hosts", "/etc/hosts", "bind", "", 1, 1),
sdiskpart("proc", "/proc/run", "proc", "", 1, 1),
sdiskpart("test", "/", "ext4", ""),
sdiskpart("test2", "/media/share", "ext4", ""),
sdiskpart("test3", "/incorrect", "", ""),
sdiskpart("hosts", "/etc/hosts", "bind", ""),
sdiskpart("proc", "/proc/run", "proc", ""),
]
mock_psutil.boot_time.return_value = 1708786800.0
mock_psutil.NoSuchProcess = NoSuchProcess
Expand Down
12 changes: 5 additions & 7 deletions tests/components/systemmonitor/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,19 @@ async def test_disk_util(
"""Test the disk failures."""

mock_psutil.psutil.disk_partitions.return_value = [
sdiskpart("test", "/", "ext4", "", 1, 1), # Should be ok
sdiskpart("test2", "/media/share", "ext4", "", 1, 1), # Should be ok
sdiskpart("test3", "/incorrect", "", "", 1, 1), # Should be skipped as no type
sdiskpart("test", "/", "ext4", ""), # Should be ok
sdiskpart("test2", "/media/share", "ext4", ""), # Should be ok
sdiskpart("test3", "/incorrect", "", ""), # Should be skipped as no type
sdiskpart(
"proc", "/proc/run", "proc", "", 1, 1
"proc", "/proc/run", "proc", ""
), # Should be skipped as in skipped disk types
sdiskpart(
"test4",
"/tmpfs/", # noqa: S108
"tmpfs",
"",
1,
1,
), # Should be skipped as in skipped disk types
sdiskpart("test5", "E:", "cd", "cdrom", 1, 1), # Should be skipped as cdrom
sdiskpart("test5", "E:", "cd", "cdrom"), # Should be skipped as cdrom
]

mock_config_entry.add_to_hass(hass)
Expand Down

0 comments on commit 98370fd

Please sign in to comment.