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" 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; 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" 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"; 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): - - """ 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 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" ]; 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" 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" ]; 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 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; 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" ]; 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" ];