From 6bb76f59ec0bcd9e4fe8336d57659238db35428a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:33:44 -0800 Subject: [PATCH 01/13] python3Packages.aspell-python: remove superfluous pythonAtLeast --- pkgs/development/python-modules/aspell-python/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aspell-python/default.nix b/pkgs/development/python-modules/aspell-python/default.nix index 7bf0bd859bb6..87784477ccbd 100644 --- a/pkgs/development/python-modules/aspell-python/default.nix +++ b/pkgs/development/python-modules/aspell-python/default.nix @@ -6,7 +6,6 @@ fetchPypi, isPy27, pytestCheckHook, - pythonAtLeast, setuptools, }: @@ -37,7 +36,7 @@ buildPythonPackage rec { enabledTestPaths = [ "test/unittests.py" ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ + disabledTests = [ # https://github.com/WojciechMula/aspell-python/issues/22 "test_add" "test_get" From 914c1131da2d8dd7df53f880f4ae1b511524835d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:34:39 -0800 Subject: [PATCH 02/13] python3Packages.xkcdpass: remove superfluous pythonAtLeast --- pkgs/development/python-modules/xkcdpass/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xkcdpass/default.nix b/pkgs/development/python-modules/xkcdpass/default.nix index 540cc0ebad58..95b2442a3f3c 100644 --- a/pkgs/development/python-modules/xkcdpass/default.nix +++ b/pkgs/development/python-modules/xkcdpass/default.nix @@ -4,7 +4,6 @@ fetchPypi, installShellFiles, pytestCheckHook, - pythonAtLeast, setuptools, }: @@ -26,7 +25,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "xkcdpass" ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ + disabledTests = [ # https://github.com/redacted/XKCD-password-generator/issues/138 "test_entropy_printout_valid_input" ]; From 3677e88db0ed9803a9dfd6b3ad36398367948316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:35:19 -0800 Subject: [PATCH 03/13] python3Packages.marshmallow-dataclass: remove superfluous pythonAtLeast --- .../python-modules/marshmallow-dataclass/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/marshmallow-dataclass/default.nix b/pkgs/development/python-modules/marshmallow-dataclass/default.nix index 8a725de16474..1638fb33e17a 100644 --- a/pkgs/development/python-modules/marshmallow-dataclass/default.nix +++ b/pkgs/development/python-modules/marshmallow-dataclass/default.nix @@ -4,7 +4,6 @@ fetchFromGitHub, marshmallow, pytestCheckHook, - pythonAtLeast, setuptools, typeguard, typing-inspect, @@ -39,7 +38,7 @@ buildPythonPackage rec { "-Wignore::DeprecationWarning" ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ + disabledTests = [ # TypeError: UserId is not a dataclass and cannot be turned into one. "test_newtype" ]; From e35b33037bead91909fe7ea253e152614a3d4df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:36:06 -0800 Subject: [PATCH 04/13] python3Packages.sgmllib3k: remove superfluous pythonAtLeast --- pkgs/development/python-modules/sgmllib3k/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sgmllib3k/default.nix b/pkgs/development/python-modules/sgmllib3k/default.nix index 9fa707ea0efc..3d488ca98eb0 100644 --- a/pkgs/development/python-modules/sgmllib3k/default.nix +++ b/pkgs/development/python-modules/sgmllib3k/default.nix @@ -4,7 +4,6 @@ fetchPypi, isPy27, pytestCheckHook, - pythonAtLeast, }: buildPythonPackage rec { @@ -21,7 +20,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ "test_declaration_junk_chars" ]; + disabledTests = [ "test_declaration_junk_chars" ]; doCheck = false; From 7310a22de59f823c0722755850d4bc3336ebc651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:37:26 -0800 Subject: [PATCH 05/13] python3Packages.csvw: remove superfluous pythonAtLeast --- pkgs/development/python-modules/csvw/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/csvw/default.nix b/pkgs/development/python-modules/csvw/default.nix index c5ce235b251e..8bccfd9f3d85 100644 --- a/pkgs/development/python-modules/csvw/default.nix +++ b/pkgs/development/python-modules/csvw/default.nix @@ -2,7 +2,6 @@ lib, buildPythonPackage, fetchFromGitHub, - pythonAtLeast, attrs, isodate, python-dateutil, @@ -43,8 +42,6 @@ buildPythonPackage rec { # this test is flaky on darwin because it depends on the resolution of filesystem mtimes # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257 "test_write_file_exists" - ] - ++ lib.optionals (pythonAtLeast "3.10") [ # https://github.com/cldf/csvw/issues/58 "test_roundtrip_escapechar" "test_escapequote_escapecharquotechar_final" From 855d20d185fe67864e1a97895bbc44358abf780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:38:04 -0800 Subject: [PATCH 06/13] python3Packages.persim: remove superfluous pythonAtLeast --- pkgs/development/python-modules/persim/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/persim/default.nix b/pkgs/development/python-modules/persim/default.nix index ec3669359be4..9c8dbff7ac49 100644 --- a/pkgs/development/python-modules/persim/default.nix +++ b/pkgs/development/python-modules/persim/default.nix @@ -10,7 +10,6 @@ scikit-learn, scipy, pytestCheckHook, - pythonAtLeast, }: buildPythonPackage rec { @@ -44,7 +43,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "persim" ]; - disabledTests = lib.optionals (pythonAtLeast "3.10") [ + disabledTests = [ # AttributeError: module 'collections' has no attribute 'Iterable' "test_empyt_diagram_list" "test_empty_diagram_list" From 5c827c6dbbf6cb1ee765357579f86f9ee3deec11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:39:43 -0800 Subject: [PATCH 07/13] python3Packages.flake8-future-import: remove outdated patches --- .../flake8-future-import/default.nix | 16 +++------------- .../fix-annotations-version-10.patch | 13 ------------- .../flake8-future-import/skip-test.patch | 13 ------------- 3 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 pkgs/development/python-modules/flake8-future-import/fix-annotations-version-10.patch delete mode 100644 pkgs/development/python-modules/flake8-future-import/skip-test.patch diff --git a/pkgs/development/python-modules/flake8-future-import/default.nix b/pkgs/development/python-modules/flake8-future-import/default.nix index 2fd7b83b7ccb..c41bb467c632 100644 --- a/pkgs/development/python-modules/flake8-future-import/default.nix +++ b/pkgs/development/python-modules/flake8-future-import/default.nix @@ -2,10 +2,6 @@ lib, buildPythonPackage, fetchFromGitHub, - isPy27, - isPy38, - isPy39, - pythonAtLeast, setuptools, flake8, six, @@ -25,15 +21,9 @@ buildPythonPackage rec { hash = "sha256-2EcCOx3+PCk9LYpQjHCFNpQVI2Pdi+lWL8R6bNadFe0="; }; - patches = - lib.optionals (pythonAtLeast "3.10") [ ./fix-annotations-version-11.patch ] - ++ lib.optionals (isPy38 || isPy39) [ ./fix-annotations-version-10.patch ] - ++ lib.optionals isPy27 [ - # Upstream disables this test case naturally on python 3, but it also fails - # inside NixPkgs for python 2. Since it's going to be deleted, we just skip it - # on py2 as well. - ./skip-test.patch - ]; + patches = [ + ./fix-annotations-version-11.patch + ]; postPatch = '' substituteInPlace "test_flake8_future_import.py" \ diff --git a/pkgs/development/python-modules/flake8-future-import/fix-annotations-version-10.patch b/pkgs/development/python-modules/flake8-future-import/fix-annotations-version-10.patch deleted file mode 100644 index 2e3062c8ac43..000000000000 --- a/pkgs/development/python-modules/flake8-future-import/fix-annotations-version-10.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/flake8_future_import.py b/flake8_future_import.py -index 92c3fda..27a1a66 100755 ---- a/flake8_future_import.py -+++ b/flake8_future_import.py -@@ -76,7 +76,7 @@ UNICODE_LITERALS = Feature(4, 'unicode_literals', (2, 6, 0), (3, 0, 0)) - GENERATOR_STOP = Feature(5, 'generator_stop', (3, 5, 0), (3, 7, 0)) - NESTED_SCOPES = Feature(6, 'nested_scopes', (2, 1, 0), (2, 2, 0)) - GENERATORS = Feature(7, 'generators', (2, 2, 0), (2, 3, 0)) --ANNOTATIONS = Feature(8, 'annotations', (3, 7, 0), (4, 0, 0)) -+ANNOTATIONS = Feature(8, 'annotations', (3, 7, 0), (3, 10, 0)) - - - # Order important as it defines the error code diff --git a/pkgs/development/python-modules/flake8-future-import/skip-test.patch b/pkgs/development/python-modules/flake8-future-import/skip-test.patch deleted file mode 100644 index 300358f9158b..000000000000 --- a/pkgs/development/python-modules/flake8-future-import/skip-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/test_flake8_future_import.py b/test_flake8_future_import.py -index 84fde59..345f23f 100644 ---- a/test_flake8_future_import.py -+++ b/test_flake8_future_import.py -@@ -230,7 +230,7 @@ class TestBadSyntax(TestCaseBase): - """Test using various bad syntax examples from Python's library.""" - - --@unittest.skipIf(sys.version_info[:2] >= (3, 7), 'flake8 supports up to 3.6') -+@unittest.skip("Has issue with installed path for flake8 in python2") - class Flake8TestCase(TestCaseBase): - - """ From 776f2d99e6a39564877d90ce408d90200a245b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:46:49 -0800 Subject: [PATCH 08/13] python3Packages.scikit-hep-testdata: remove superfluous pythonAtLeast --- .../python-modules/scikit-hep-testdata/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/scikit-hep-testdata/default.nix b/pkgs/development/python-modules/scikit-hep-testdata/default.nix index f3ec89b963ca..af270a36233d 100644 --- a/pkgs/development/python-modules/scikit-hep-testdata/default.nix +++ b/pkgs/development/python-modules/scikit-hep-testdata/default.nix @@ -9,8 +9,6 @@ # dependencies pyyaml, requests, - pythonAtLeast, - importlib-resources, }: buildPythonPackage rec { @@ -30,8 +28,7 @@ buildPythonPackage rec { dependencies = [ pyyaml requests - ] - ++ lib.optionals (!pythonAtLeast "3.9") [ importlib-resources ]; + ]; SKHEP_DATA = 1; # install the actual root files From dcd131e13a9e70c223b05cc185c458d397d01d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:47:35 -0800 Subject: [PATCH 09/13] python3Packages.urlpy: remove superfluous pythonAtLeast --- pkgs/development/python-modules/urlpy/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/urlpy/default.nix b/pkgs/development/python-modules/urlpy/default.nix index 7e1fc83509aa..db8bd94e8879 100644 --- a/pkgs/development/python-modules/urlpy/default.nix +++ b/pkgs/development/python-modules/urlpy/default.nix @@ -4,7 +4,6 @@ buildPythonPackage, publicsuffix2, pytestCheckHook, - pythonAtLeast, }: buildPythonPackage rec { pname = "urlpy"; @@ -24,7 +23,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = lib.optionals (pythonAtLeast "3.9") [ + disabledTests = [ # Fails with "AssertionError: assert 'unknown' == ''" "test_unknown_protocol" ]; From 649d514ac26d0e2d64cc9701d50fa6ba83d09e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:48:13 -0800 Subject: [PATCH 10/13] python3Packages.httplib2: remove superfluous pythonAtLeast --- pkgs/development/python-modules/httplib2/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/python-modules/httplib2/default.nix b/pkgs/development/python-modules/httplib2/default.nix index ef7141fbc59d..780fff3ba1a9 100644 --- a/pkgs/development/python-modules/httplib2/default.nix +++ b/pkgs/development/python-modules/httplib2/default.nix @@ -11,7 +11,6 @@ pytest-randomly, pytest-timeout, pytestCheckHook, - pythonAtLeast, six, }: @@ -42,9 +41,6 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - # Don't run tests for older Pythons - doCheck = pythonAtLeast "3.9"; - disabledTests = [ # ValueError: Unable to load PEM file. # https://github.com/httplib2/httplib2/issues/192#issuecomment-993165140 From bb3cb9b61967a305fb68593509928634e770f064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:49:17 -0800 Subject: [PATCH 11/13] python3Packages.crashtest: remove superfluous pythonAtLeast --- pkgs/development/python-modules/crashtest/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/crashtest/default.nix b/pkgs/development/python-modules/crashtest/default.nix index 2ecd4adb0975..a2552279172e 100644 --- a/pkgs/development/python-modules/crashtest/default.nix +++ b/pkgs/development/python-modules/crashtest/default.nix @@ -2,14 +2,12 @@ lib, buildPythonPackage, fetchPypi, - pythonAtLeast, }: buildPythonPackage rec { pname = "crashtest"; version = "0.4.1"; format = "setuptools"; - disabled = !(pythonAtLeast "3.6"); src = fetchPypi { inherit pname version; From a377f9593da6c706e8abb23dc1724084bfd66cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:49:59 -0800 Subject: [PATCH 12/13] python3Packages.edward: remove superfluous pythonAtLeast --- pkgs/development/python-modules/edward/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/python-modules/edward/default.nix b/pkgs/development/python-modules/edward/default.nix index 5ca81b8cca4b..2041bc1ce1da 100644 --- a/pkgs/development/python-modules/edward/default.nix +++ b/pkgs/development/python-modules/edward/default.nix @@ -2,8 +2,6 @@ lib, buildPythonPackage, fetchPypi, - isPy27, - pythonAtLeast, keras, numpy, scipy, @@ -16,8 +14,6 @@ buildPythonPackage rec { version = "1.3.5"; format = "setuptools"; - disabled = !(isPy27 || pythonAtLeast "3.4"); - src = fetchPypi { inherit pname version; sha256 = "3818b39e77c26fc1a37767a74fdd5e7d02877d75ed901ead2f40bd03baaa109f"; From dfd04aefaa326d79d6fcdf9df0c9fb736f63a599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Jan 2026 22:51:25 -0800 Subject: [PATCH 13/13] python3Packages.pypass: remove superfluous pythonAtLeast --- pkgs/development/python-modules/pypass/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pypass/default.nix b/pkgs/development/python-modules/pypass/default.nix index ad8e17fc8bee..4e952df17c52 100644 --- a/pkgs/development/python-modules/pypass/default.nix +++ b/pkgs/development/python-modules/pypass/default.nix @@ -10,7 +10,6 @@ gnupg, pbr, pexpect, - pythonAtLeast, pytestCheckHook, setuptools, replaceVars, @@ -41,8 +40,7 @@ buildPythonPackage rec { }) ]; - # Remove enum34 requirement if Python >= 3.4 - pythonRemoveDeps = lib.optionals (pythonAtLeast "3.4") [ + pythonRemoveDeps = [ "enum34" ];