treewide: remove superfluous pythonAtLeast (#481858)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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
|
||||
@@ -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):
|
||||
|
||||
"""
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user