From 6caca57e47ee85f7643a3dcd5faa56d4bbecfb69 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 22 May 2026 22:18:14 +0200 Subject: [PATCH 1/4] python3Packages.qtile: 0.35.0 -> 0.36.0 --- .../python-modules/qtile/default.nix | 18 ++---- .../python-modules/qtile/fix-test-net.patch | 63 ------------------- 2 files changed, 4 insertions(+), 77 deletions(-) delete mode 100644 pkgs/development/python-modules/qtile/fix-test-net.patch diff --git a/pkgs/development/python-modules/qtile/default.nix b/pkgs/development/python-modules/qtile/default.nix index aff452f93978..debd651e5785 100644 --- a/pkgs/development/python-modules/qtile/default.nix +++ b/pkgs/development/python-modules/qtile/default.nix @@ -20,7 +20,6 @@ psutil, pulsectl-asyncio, pygobject3, - pytz, pyxdg, xcffib, extraPackages ? [ ], @@ -70,7 +69,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 +79,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 +102,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 +120,6 @@ buildPythonPackage (finalAttrs: { psutil pulsectl-asyncio pygobject3 - pytz pyxdg xcffib ]; @@ -154,10 +148,10 @@ buildPythonPackage (finalAttrs: { pytestCheckHook pytest-asyncio pytest-httpbin + pytest-rerunfailures pytest-xdist writableTmpDirAsHomeHook anyio - fontconfig gdk-pixbuf gobject-introspection isort @@ -172,10 +166,6 @@ buildPythonPackage (finalAttrs: { ''; 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" diff --git a/pkgs/development/python-modules/qtile/fix-test-net.patch b/pkgs/development/python-modules/qtile/fix-test-net.patch deleted file mode 100644 index 6230f22c665d..000000000000 --- a/pkgs/development/python-modules/qtile/fix-test-net.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 71c70072524ee2fb2f4683861236894e51c50d6e Mon Sep 17 00:00:00 2001 -From: elParaguayo -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): - From e25a46d54dfb7f69e824f7a3be3b0607a63c5873 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 22 May 2026 22:52:01 +0200 Subject: [PATCH 2/4] python3Packages.qtile: add pytest-rerunfailures --- pkgs/development/python-modules/qtile/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/qtile/default.nix b/pkgs/development/python-modules/qtile/default.nix index debd651e5785..cc1c02378a29 100644 --- a/pkgs/development/python-modules/qtile/default.nix +++ b/pkgs/development/python-modules/qtile/default.nix @@ -51,6 +51,7 @@ pytestCheckHook, pytest-asyncio, pytest-httpbin, + pytest-rerunfailures, pytest-xdist, writableTmpDirAsHomeHook, anyio, @@ -161,6 +162,11 @@ buildPythonPackage (finalAttrs: { xvfb ]; + pytestFlags = [ + "--reruns 3" + "--reruns-delay 5" + ]; + preCheck = '' export PATH=$PATH:$out/bin ''; @@ -186,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 = { From 83b8ff5ad36094db6f339a8151cade8f01caaa0d Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 22 May 2026 23:12:25 +0200 Subject: [PATCH 3/4] python3Packages.qtile: add meta.changelog --- pkgs/development/python-modules/qtile/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/qtile/default.nix b/pkgs/development/python-modules/qtile/default.nix index cc1c02378a29..aa4f2776b5a9 100644 --- a/pkgs/development/python-modules/qtile/default.nix +++ b/pkgs/development/python-modules/qtile/default.nix @@ -208,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; [ From f69ebe0945b17888b521aaf8abe6e704c1dac002 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 22 May 2026 23:20:41 +0200 Subject: [PATCH 4/4] python3Packages.qtile-extras: 0.35.0 -> 0.36.0 --- .../python-modules/qtile-extras/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/qtile-extras/default.nix b/pkgs/development/python-modules/qtile-extras/default.nix index 41646062a4c6..af7da608945f 100644 --- a/pkgs/development/python-modules/qtile-extras/default.nix +++ b/pkgs/development/python-modules/qtile-extras/default.nix @@ -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