Skip to content

Commit 9b6d782

Browse files
treewide: remove superfluous pythonAtLeast (NixOS#481858)
2 parents db72823 + dfd04ae commit 9b6d782

15 files changed

Lines changed: 11 additions & 71 deletions

File tree

pkgs/development/python-modules/aspell-python/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
fetchPypi,
77
isPy27,
88
pytestCheckHook,
9-
pythonAtLeast,
109
setuptools,
1110
}:
1211

@@ -37,7 +36,7 @@ buildPythonPackage rec {
3736

3837
enabledTestPaths = [ "test/unittests.py" ];
3938

40-
disabledTests = lib.optionals (pythonAtLeast "3.10") [
39+
disabledTests = [
4140
# https://github.com/WojciechMula/aspell-python/issues/22
4241
"test_add"
4342
"test_get"

pkgs/development/python-modules/crashtest/default.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
lib,
33
buildPythonPackage,
44
fetchPypi,
5-
pythonAtLeast,
65
}:
76

87
buildPythonPackage rec {
98
pname = "crashtest";
109
version = "0.4.1";
1110
format = "setuptools";
12-
disabled = !(pythonAtLeast "3.6");
1311

1412
src = fetchPypi {
1513
inherit pname version;

pkgs/development/python-modules/csvw/default.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5-
pythonAtLeast,
65
attrs,
76
isodate,
87
python-dateutil,
@@ -43,8 +42,6 @@ buildPythonPackage rec {
4342
# this test is flaky on darwin because it depends on the resolution of filesystem mtimes
4443
# https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
4544
"test_write_file_exists"
46-
]
47-
++ lib.optionals (pythonAtLeast "3.10") [
4845
# https://github.com/cldf/csvw/issues/58
4946
"test_roundtrip_escapechar"
5047
"test_escapequote_escapecharquotechar_final"

pkgs/development/python-modules/edward/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
lib,
33
buildPythonPackage,
44
fetchPypi,
5-
isPy27,
6-
pythonAtLeast,
75
keras,
86
numpy,
97
scipy,
@@ -16,8 +14,6 @@ buildPythonPackage rec {
1614
version = "1.3.5";
1715
format = "setuptools";
1816

19-
disabled = !(isPy27 || pythonAtLeast "3.4");
20-
2117
src = fetchPypi {
2218
inherit pname version;
2319
sha256 = "3818b39e77c26fc1a37767a74fdd5e7d02877d75ed901ead2f40bd03baaa109f";

pkgs/development/python-modules/flake8-future-import/default.nix

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5-
isPy27,
6-
isPy38,
7-
isPy39,
8-
pythonAtLeast,
95
setuptools,
106
flake8,
117
six,
@@ -25,15 +21,9 @@ buildPythonPackage rec {
2521
hash = "sha256-2EcCOx3+PCk9LYpQjHCFNpQVI2Pdi+lWL8R6bNadFe0=";
2622
};
2723

28-
patches =
29-
lib.optionals (pythonAtLeast "3.10") [ ./fix-annotations-version-11.patch ]
30-
++ lib.optionals (isPy38 || isPy39) [ ./fix-annotations-version-10.patch ]
31-
++ lib.optionals isPy27 [
32-
# Upstream disables this test case naturally on python 3, but it also fails
33-
# inside NixPkgs for python 2. Since it's going to be deleted, we just skip it
34-
# on py2 as well.
35-
./skip-test.patch
36-
];
24+
patches = [
25+
./fix-annotations-version-11.patch
26+
];
3727

3828
postPatch = ''
3929
substituteInPlace "test_flake8_future_import.py" \

pkgs/development/python-modules/flake8-future-import/fix-annotations-version-10.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkgs/development/python-modules/flake8-future-import/skip-test.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkgs/development/python-modules/httplib2/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
pytest-randomly,
1212
pytest-timeout,
1313
pytestCheckHook,
14-
pythonAtLeast,
1514
six,
1615
}:
1716

@@ -42,9 +41,6 @@ buildPythonPackage rec {
4241

4342
__darwinAllowLocalNetworking = true;
4443

45-
# Don't run tests for older Pythons
46-
doCheck = pythonAtLeast "3.9";
47-
4844
disabledTests = [
4945
# ValueError: Unable to load PEM file.
5046
# https://github.com/httplib2/httplib2/issues/192#issuecomment-993165140

pkgs/development/python-modules/marshmallow-dataclass/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
fetchFromGitHub,
55
marshmallow,
66
pytestCheckHook,
7-
pythonAtLeast,
87
setuptools,
98
typeguard,
109
typing-inspect,
@@ -39,7 +38,7 @@ buildPythonPackage rec {
3938
"-Wignore::DeprecationWarning"
4039
];
4140

42-
disabledTests = lib.optionals (pythonAtLeast "3.10") [
41+
disabledTests = [
4342
# TypeError: UserId is not a dataclass and cannot be turned into one.
4443
"test_newtype"
4544
];

pkgs/development/python-modules/persim/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
scikit-learn,
1111
scipy,
1212
pytestCheckHook,
13-
pythonAtLeast,
1413
}:
1514

1615
buildPythonPackage rec {
@@ -44,7 +43,7 @@ buildPythonPackage rec {
4443

4544
pythonImportsCheck = [ "persim" ];
4645

47-
disabledTests = lib.optionals (pythonAtLeast "3.10") [
46+
disabledTests = [
4847
# AttributeError: module 'collections' has no attribute 'Iterable'
4948
"test_empyt_diagram_list"
5049
"test_empty_diagram_list"

0 commit comments

Comments
 (0)