python3Packages.qtile{,-extras}: 0.35.0 -> 0.36.0 (#523156)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
}:
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "qtile-extras";
|
||||
version = "0.35.0";
|
||||
version = "0.36.0";
|
||||
# nixpkgs-update: no auto update
|
||||
# should be updated alongside with `qtile`
|
||||
pyproject = true;
|
||||
@@ -32,7 +32,7 @@ buildPythonPackage (finalAttrs: {
|
||||
owner = "elParaguayo";
|
||||
repo = "qtile-extras";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-xZ1pxe1EUnnjqz+46R4R9DWKi7M2j1pgvY4uy1dBak8=";
|
||||
hash = "sha256-H2A5Y+ukTkUqjQB5eQVuOMYpf7T8RgQlNlQ25wlWwr8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools-scm ];
|
||||
@@ -72,8 +72,6 @@ buildPythonPackage (finalAttrs: {
|
||||
# AttributeError: 'NoneType' object has no attribute 'theta'
|
||||
"test_image_size_horizontal"
|
||||
"test_image_size_vertical"
|
||||
# flaky, timing sensitive
|
||||
"test_visualiser"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
@@ -84,6 +82,11 @@ buildPythonPackage (finalAttrs: {
|
||||
"test/widget/test_strava.py"
|
||||
];
|
||||
|
||||
pytestFlags = [
|
||||
"--reruns 3"
|
||||
"--reruns-delay 5"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
psutil,
|
||||
pulsectl-asyncio,
|
||||
pygobject3,
|
||||
pytz,
|
||||
pyxdg,
|
||||
xcffib,
|
||||
extraPackages ? [ ],
|
||||
@@ -52,6 +51,7 @@
|
||||
pytestCheckHook,
|
||||
pytest-asyncio,
|
||||
pytest-httpbin,
|
||||
pytest-rerunfailures,
|
||||
pytest-xdist,
|
||||
writableTmpDirAsHomeHook,
|
||||
anyio,
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "qtile";
|
||||
version = "0.35.0";
|
||||
version = "0.36.0";
|
||||
# nixpkgs-update: no auto update
|
||||
# should be updated alongside with `qtile-extras`
|
||||
|
||||
@@ -80,14 +80,9 @@ buildPythonPackage (finalAttrs: {
|
||||
owner = "qtile";
|
||||
repo = "qtile";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-5XHzlS/Knw/VmVtnM7wToJ/F12GAa2lwdWuXBJHXnZM=";
|
||||
hash = "sha256-yFh9h3djV52zdZjPYwOWaMzN9ZNhFdZYyxFJreoJBCk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/qtile/qtile/pull/5889
|
||||
./fix-test-net.patch
|
||||
];
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
@@ -108,6 +103,7 @@ buildPythonPackage (finalAttrs: {
|
||||
|
||||
pypaBuildFlags = [
|
||||
"--config-setting=backend=wayland"
|
||||
"--config-setting=FONTCONFIG=${lib.getLib fontconfig}/lib/libfontconfig.so"
|
||||
"--config-setting=GOBJECT=${lib.getLib glib}/lib/libgobject-2.0.so"
|
||||
"--config-setting=PANGO=${lib.getLib pango}/lib/libpango-1.0.so"
|
||||
"--config-setting=PANGOCAIRO=${lib.getLib pango}/lib/libpangocairo-1.0.so"
|
||||
@@ -125,7 +121,6 @@ buildPythonPackage (finalAttrs: {
|
||||
psutil
|
||||
pulsectl-asyncio
|
||||
pygobject3
|
||||
pytz
|
||||
pyxdg
|
||||
xcffib
|
||||
];
|
||||
@@ -154,10 +149,10 @@ buildPythonPackage (finalAttrs: {
|
||||
pytestCheckHook
|
||||
pytest-asyncio
|
||||
pytest-httpbin
|
||||
pytest-rerunfailures
|
||||
pytest-xdist
|
||||
writableTmpDirAsHomeHook
|
||||
anyio
|
||||
fontconfig
|
||||
gdk-pixbuf
|
||||
gobject-introspection
|
||||
isort
|
||||
@@ -167,15 +162,16 @@ buildPythonPackage (finalAttrs: {
|
||||
xvfb
|
||||
];
|
||||
|
||||
pytestFlags = [
|
||||
"--reruns 3"
|
||||
"--reruns-delay 5"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# ModuleNotFoundError: No module named 'libqtile'
|
||||
# known issue upstream: https://github.com/qtile/qtile/issues/5883
|
||||
"test_identify_output"
|
||||
|
||||
# caused by dbus-fast trying to read '/var/lib/dbus/machine-id'
|
||||
"test_defaults"
|
||||
"test_device_actions"
|
||||
@@ -196,12 +192,6 @@ buildPythonPackage (finalAttrs: {
|
||||
|
||||
# Probably won't work in the Nix sandbox due to `xcffib.ConnectionException`
|
||||
"test_urgent_hook_fire"
|
||||
|
||||
# flaky: race between force_update() executor task and widget.info() read
|
||||
"test_threadpolltext_force_update"
|
||||
|
||||
# flaky: race between repl server bind and client connect
|
||||
"test_repl_server_executes_code"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
@@ -218,6 +208,7 @@ buildPythonPackage (finalAttrs: {
|
||||
homepage = "http://www.qtile.org/";
|
||||
license = lib.licenses.mit;
|
||||
description = "Small, flexible, scriptable tiling window manager written in Python";
|
||||
changelog = "https://github.com/qtile/qtile/blob/v${finalAttrs.version}/CHANGELOG";
|
||||
mainProgram = "qtile";
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
From 71c70072524ee2fb2f4683861236894e51c50d6e Mon Sep 17 00:00:00 2001
|
||||
From: elParaguayo <elparaguayocode@gmail.com>
|
||||
Date: Tue, 24 Mar 2026 20:38:18 +0000
|
||||
Subject: [PATCH] Fix test_net.py
|
||||
|
||||
The test uses a fake psutil module to get net statistics. However,
|
||||
values are increased between tests and so will fail if tests are run in
|
||||
a different order. We fix this by resetting stats between tests.
|
||||
---
|
||||
test/widgets/test_net.py | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/widgets/test_net.py b/test/widgets/test_net.py
|
||||
index dcb0966c50..ea6a849a3a 100644
|
||||
--- a/test/widgets/test_net.py
|
||||
+++ b/test/widgets/test_net.py
|
||||
@@ -34,6 +34,8 @@ def __init__(self, up, down):
|
||||
@pytest.fixture
|
||||
def patch_net(fake_qtile, monkeypatch, fake_window):
|
||||
def build_widget(**kwargs):
|
||||
+ MockPsutil.up = 0
|
||||
+ MockPsutil.down = 0
|
||||
monkeypatch.setitem(sys.modules, "psutil", MockPsutil("psutil"))
|
||||
from libqtile.widget import net
|
||||
|
||||
@@ -62,15 +64,15 @@ def test_net_defaults(patch_net):
|
||||
def test_net_single_interface(patch_net):
|
||||
"""Display single named interface"""
|
||||
net2 = patch_net(interface="wlp58s0")
|
||||
- assert net2.poll() == "wlp58s0: U 40.0kB 160.0kB D 1.2MB 4.8MB T 1.24MB 4.96MB"
|
||||
+ assert net2.poll() == "wlp58s0: U 40.0kB 80.0kB D 1.2MB 2.4MB T 1.24MB 2.48MB"
|
||||
|
||||
|
||||
def test_net_list_interface(patch_net):
|
||||
"""Display multiple named interfaces"""
|
||||
net2 = patch_net(interface=["wlp58s0", "lo"])
|
||||
assert net2.poll() == (
|
||||
- "wlp58s0: U 40.0kB 240.0kB D 1.2MB 7.2MB T 1.24MB 7.44MB lo: U 40.0kB "
|
||||
- "240.0kB D 1.2MB 7.2MB T 1.24MB 7.44MB"
|
||||
+ "wlp58s0: U 40.0kB 80.0kB D 1.2MB 2.4MB T 1.24MB 2.48MB "
|
||||
+ "lo: U 40.0kB 80.0kB D 1.2MB 2.4MB T 1.24MB 2.48MB"
|
||||
)
|
||||
|
||||
|
||||
@@ -83,7 +85,7 @@ def test_net_invalid_interface(patch_net):
|
||||
def test_net_use_bits(patch_net):
|
||||
"""Display all interfaces in bits rather than bytes"""
|
||||
net4 = patch_net(use_bits=True)
|
||||
- assert net4.poll() == "all: U 320.0kb 2.56Mb D 9.6Mb 76.8Mb T 9.92Mb 79.36Mb"
|
||||
+ assert net4.poll() == "all: U 320.0kb 640.0kb D 9.6Mb 19.2Mb T 9.92Mb 19.84Mb"
|
||||
|
||||
|
||||
def test_net_convert_zero_b(patch_net):
|
||||
@@ -95,7 +97,7 @@ def test_net_convert_zero_b(patch_net):
|
||||
def test_net_use_prefix(patch_net):
|
||||
"""Tests `prefix` configurable option"""
|
||||
net6 = patch_net(prefix="M")
|
||||
- assert net6.poll() == "all: U 0.04MB 440.0kB D 1.2MB 13.2MB T 1.24MB 13.64MB"
|
||||
+ assert net6.poll() == "all: U 0.04MB 80.0kB D 1.2MB 2.4MB T 1.24MB 2.48MB"
|
||||
|
||||
|
||||
def test_net_missing_interface(patch_net):
|
||||
|
||||
Reference in New Issue
Block a user