diff --git a/pkgs/applications/misc/ulauncher/default.nix b/pkgs/applications/misc/ulauncher/default.nix index 81e273dd39d..f1439dc7d16 100644 --- a/pkgs/applications/misc/ulauncher/default.nix +++ b/pkgs/applications/misc/ulauncher/default.nix @@ -66,7 +66,6 @@ python3Packages.buildPythonApplication rec { mock pytest pytest-mock - pytestpep8 xvfb_run ]; @@ -95,7 +94,7 @@ python3Packages.buildPythonApplication rec { # skip tests in invocation that handle paths that # aren't nix friendly (i think) xvfb-run -s '-screen 0 1024x768x16' \ - pytest -k 'not TestPath and not test_handle_key_press_event' --pep8 tests + pytest -k 'not TestPath and not test_handle_key_press_event' tests runHook postCheck ''; diff --git a/pkgs/development/python-modules/dyn/default.nix b/pkgs/development/python-modules/dyn/default.nix index 6e03a33f29b..cc7a330e97c 100644 --- a/pkgs/development/python-modules/dyn/default.nix +++ b/pkgs/development/python-modules/dyn/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest, pytestcov, mock, pytestpep8 +{ stdenv, buildPythonPackage, fetchPypi, pytest, pytestcov, mock , pytest_xdist, covCore, glibcLocales }: buildPythonPackage rec { @@ -16,7 +16,6 @@ buildPythonPackage rec { pytest pytestcov mock - pytestpep8 pytest_xdist covCore ]; diff --git a/pkgs/development/python-modules/ics/default.nix b/pkgs/development/python-modules/ics/default.nix index 08799a9fb4b..30661c9bc91 100644 --- a/pkgs/development/python-modules/ics/default.nix +++ b/pkgs/development/python-modules/ics/default.nix @@ -1,6 +1,6 @@ { stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder , tatsu, arrow -, pytestCheckHook, pytestpep8, pytest-flakes +, pytestCheckHook, pytest-flakes }: buildPythonPackage rec { @@ -20,9 +20,10 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ --replace "arrow>=0.11,<0.15" "arrow" + substituteInPlace setup.cfg --replace "--pep8" "" ''; - checkInputs = [ pytestCheckHook pytestpep8 pytest-flakes ]; + checkInputs = [ pytestCheckHook pytest-flakes ]; meta = with stdenv.lib; { description = "Pythonic and easy iCalendar library (RFC 5545)"; diff --git a/pkgs/development/python-modules/jsonlines/default.nix b/pkgs/development/python-modules/jsonlines/default.nix index cde440380b4..82ddb3bf23a 100644 --- a/pkgs/development/python-modules/jsonlines/default.nix +++ b/pkgs/development/python-modules/jsonlines/default.nix @@ -1,5 +1,5 @@ { lib, fetchFromGitHub, buildPythonPackage, six -, flake8, pep8-naming, pytest, pytestcov, pytestpep8 }: +, flake8, pep8-naming, pytest, pytestcov }: buildPythonPackage rec { pname = "jsonlines"; @@ -14,7 +14,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ six ]; - checkInputs = [ flake8 pep8-naming pytest pytestcov pytestpep8 ]; + checkInputs = [ flake8 pep8-naming pytest pytestcov ]; checkPhase = '' pytest ''; diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index 8b6301ab59b..f2243a1531f 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, pytest, pytestcov, pytestpep8, pytest_xdist +, pytest, pytestcov, pytest_xdist , six, numpy, scipy, pyyaml, h5py , keras-applications, keras-preprocessing }: @@ -16,7 +16,6 @@ buildPythonPackage rec { checkInputs = [ pytest pytestcov - pytestpep8 pytest_xdist ]; diff --git a/pkgs/development/python-modules/mwclient/default.nix b/pkgs/development/python-modules/mwclient/default.nix index 2744ff9a277..644f01fdb1f 100644 --- a/pkgs/development/python-modules/mwclient/default.nix +++ b/pkgs/development/python-modules/mwclient/default.nix @@ -1,6 +1,6 @@ { stdenv, buildPythonPackage, fetchFromGitHub , requests, requests_oauthlib, six -, pytest, pytestpep8, pytestcache, pytestcov, responses, mock +, pytest, pytestcache, pytestcov, responses, mock }: buildPythonPackage rec { @@ -14,7 +14,7 @@ buildPythonPackage rec { sha256 = "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"; }; - checkInputs = [ pytest pytestpep8 pytestcache pytestcov responses mock ]; + checkInputs = [ pytest pytestcache pytestcov responses mock ]; propagatedBuildInputs = [ requests requests_oauthlib six ]; diff --git a/pkgs/development/python-modules/progressbar2/default.nix b/pkgs/development/python-modules/progressbar2/default.nix index 23ebc935459..789828b7143 100644 --- a/pkgs/development/python-modules/progressbar2/default.nix +++ b/pkgs/development/python-modules/progressbar2/default.nix @@ -6,7 +6,6 @@ , python-utils , sphinx , flake8 -, pytestpep8 , pytest-flakes , pytestcov , pytestcache @@ -26,7 +25,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ python-utils ]; nativeBuildInputs = [ pytestrunner ]; checkInputs = [ - pytest sphinx flake8 pytestpep8 pytest-flakes pytestcov + pytest sphinx flake8 pytest-flakes pytestcov pytestcache freezegun ]; # ignore tests on the nix wrapped setup.py diff --git a/pkgs/development/python-modules/pydocstyle/2.nix b/pkgs/development/python-modules/pydocstyle/2.nix index 21e39b68d12..9ce4ffc0f81 100644 --- a/pkgs/development/python-modules/pydocstyle/2.nix +++ b/pkgs/development/python-modules/pydocstyle/2.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy3k, pythonOlder , snowballstemmer, six, configparser -, pytest, pytestpep8, mock, pathlib }: +, pytest, mock, pathlib }: buildPythonPackage rec { pname = "pydocstyle"; @@ -17,11 +17,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser; - checkInputs = [ pytest pytestpep8 mock ] ++ lib.optional (pythonOlder "3.4") pathlib; + checkInputs = [ pytest mock ] ++ lib.optional (pythonOlder "3.4") pathlib; checkPhase = '' # test_integration.py installs packages via pip - py.test --pep8 --cache-clear -vv src/tests -k "not test_integration" + py.test --cache-clear -vv src/tests -k "not test_integration" ''; meta = with lib; { diff --git a/pkgs/development/python-modules/pydocstyle/default.nix b/pkgs/development/python-modules/pydocstyle/default.nix index cef9e964425..36c61ace856 100644 --- a/pkgs/development/python-modules/pydocstyle/default.nix +++ b/pkgs/development/python-modules/pydocstyle/default.nix @@ -1,7 +1,6 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy3k , mock , pytest -, pytestpep8 , snowballstemmer }: diff --git a/pkgs/development/python-modules/pylti/default.nix b/pkgs/development/python-modules/pylti/default.nix index 752755700b2..a6778a4aa7e 100644 --- a/pkgs/development/python-modules/pylti/default.nix +++ b/pkgs/development/python-modules/pylti/default.nix @@ -14,7 +14,6 @@ , pytestcov , covCore , pytest-flakes -, pytestpep8 , sphinx , mock , chalice @@ -35,7 +34,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ httplib2 oauth oauth2 semantic-version ]; checkInputs = [ flask httpretty oauthlib pyflakes pytest pytestcache pytestcov covCore - pytest-flakes pytestpep8 sphinx mock chalice + pytest-flakes sphinx mock chalice ]; src = fetchPypi { diff --git a/pkgs/development/python-modules/pytest-factoryboy/default.nix b/pkgs/development/python-modules/pytest-factoryboy/default.nix index 44a59730146..48c5020a44f 100644 --- a/pkgs/development/python-modules/pytest-factoryboy/default.nix +++ b/pkgs/development/python-modules/pytest-factoryboy/default.nix @@ -7,7 +7,6 @@ , factory_boy , pytestcache , pytestcov -, pytestpep8 , mock }: @@ -22,6 +21,9 @@ buildPythonPackage rec { sha256 = "0m1snyybq2k51khlydhisq300vzys897vdbsicph628iran950hn"; }; + # TODO: remove in next release, it's removed in master. + postPatch = "substituteInPlace tox.ini --replace '--pep8' ''"; + propagatedBuildInputs = [ factory_boy inflection pytest ]; # The project uses tox, which we can't. So we simply run pytest manually. @@ -30,7 +32,6 @@ buildPythonPackage rec { pytestCheckHook pytestcache pytestcov - pytestpep8 ]; pytestFlagsArray = [ "--ignore=docs" ]; diff --git a/pkgs/development/python-modules/pytest-flakes/default.nix b/pkgs/development/python-modules/pytest-flakes/default.nix index 38156cc0ccf..440cc632185 100644 --- a/pkgs/development/python-modules/pytest-flakes/default.nix +++ b/pkgs/development/python-modules/pytest-flakes/default.nix @@ -1,5 +1,4 @@ { stdenv, buildPythonPackage, fetchPypi, pythonOlder -, pytestpep8 , pytest , pyflakes }: @@ -16,7 +15,7 @@ buildPythonPackage rec { sha256 = "bf070c5485dad82d5b5f5d0eb08d269737e378492d9a68f5223b0a90924c7754"; }; - checkInputs = [ pytestpep8 pytest ]; + checkInputs = [ pytest ]; propagatedBuildInputs = [ pytest pyflakes ]; # no longer passes diff --git a/pkgs/development/python-modules/pytest-pep8/default.nix b/pkgs/development/python-modules/pytest-pep8/default.nix deleted file mode 100644 index 82a900a9d2f..00000000000 --- a/pkgs/development/python-modules/pytest-pep8/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, buildPythonPackage, fetchPypi -, pytest, pytestcache, pep8 }: - -buildPythonPackage rec { - pname = "pytest-pep8"; - version = "1.0.6"; - - src = fetchPypi { - inherit pname version; - sha256 = "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"; - }; - - buildInputs = [ pytest ]; - propagatedBuildInputs = [ pytestcache pep8 ]; - - checkPhase = '' - py.test - ''; - - # Fails - doCheck = false; - - meta = with stdenv.lib; { - license = licenses.mit; - homepage = "https://pypi.python.org/pypi/pytest-pep8"; - description = "pytest plugin to check PEP8 requirements"; - }; -} diff --git a/pkgs/development/python-modules/pytest-quickcheck/default.nix b/pkgs/development/python-modules/pytest-quickcheck/default.nix index 8db28159d9d..7db982ed857 100644 --- a/pkgs/development/python-modules/pytest-quickcheck/default.nix +++ b/pkgs/development/python-modules/pytest-quickcheck/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest, pytest-flakes, pytestpep8, tox }: +{ stdenv, buildPythonPackage, fetchPypi, pytest, pytest-flakes, tox }: buildPythonPackage rec { pname = "pytest-quickcheck"; version = "0.8.6"; @@ -9,7 +9,7 @@ buildPythonPackage rec { }; buildInputs = [ pytest ]; - propagatedBuildInputs = [ pytest-flakes pytestpep8 tox ]; + propagatedBuildInputs = [ pytest-flakes tox ]; meta = with stdenv.lib; { license = licenses.asl20; diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix index 936a1eb2e3e..60160d270b7 100644 --- a/pkgs/development/python-modules/python-utils/default.nix +++ b/pkgs/development/python-modules/python-utils/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, pytestrunner, pytestcov, pytest-flakes, pytestpep8, sphinx, six }: +{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytestrunner, pytestcov, pytest-flakes, sphinx, six }: buildPythonPackage rec { pname = "python-utils"; @@ -12,13 +12,10 @@ buildPythonPackage rec { postPatch = '' rm -r tests/__pycache__ rm tests/*.pyc + substituteInPlace pytest.ini --replace "--pep8" "" ''; - checkInputs = [ pytest pytestrunner pytestcov pytest-flakes pytestpep8 sphinx ]; - - checkPhase = '' - py.test tests - ''; + checkInputs = [ pytestCheckHook pytestrunner pytestcov pytest-flakes sphinx ]; propagatedBuildInputs = [ six ]; diff --git a/pkgs/development/python-modules/requests-unixsocket/default.nix b/pkgs/development/python-modules/requests-unixsocket/default.nix index 5229dd96b75..f98b68c13a0 100644 --- a/pkgs/development/python-modules/requests-unixsocket/default.nix +++ b/pkgs/development/python-modules/requests-unixsocket/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchPypi , pbr, requests -, pytest, pytestpep8, waitress }: +, pytest, waitress }: buildPythonPackage rec { pname = "requests-unixsocket"; @@ -14,7 +14,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pbr ]; propagatedBuildInputs = [ requests ]; - checkInputs = [ pytest pytestpep8 waitress ]; + checkInputs = [ pytest waitress ]; checkPhase = '' rm pytest.ini py.test diff --git a/pkgs/development/python-modules/subliminal/default.nix b/pkgs/development/python-modules/subliminal/default.nix index 25e20a44118..77ddb125a94 100644 --- a/pkgs/development/python-modules/subliminal/default.nix +++ b/pkgs/development/python-modules/subliminal/default.nix @@ -20,7 +20,6 @@ , sympy , vcrpy , pytest -, pytestpep8 , pytest-flakes , pytestcov , pytestrunner @@ -42,7 +41,7 @@ buildPythonPackage rec { ] ++ lib.optional (!isPy3k) futures; checkInputs = [ - sympy vcrpy pytest pytestpep8 pytest-flakes + sympy vcrpy pytest pytest-flakes pytestcov pytestrunner ]; diff --git a/pkgs/development/tools/devpi-server/default.nix b/pkgs/development/tools/devpi-server/default.nix index 53950d08f76..7ddff92402c 100644 --- a/pkgs/development/tools/devpi-server/default.nix +++ b/pkgs/development/tools/devpi-server/default.nix @@ -30,24 +30,30 @@ python3Packages.buildPythonApplication rec { checkInputs = with python3Packages; [ beautifulsoup4 nginx - pytest + pytestCheckHook pytest-flake8 - pytestpep8 webtest ] ++ stdenv.lib.optionals isPy27 [ mock ]; # root_passwd_hash tries to write to store # TestMirrorIndexThings tries to write to /var through ngnix # nginx tests try to write to /var - checkPhase = '' - PATH=$PATH:$out/bin HOME=$TMPDIR pytest \ - ./test_devpi_server --slow -rfsxX \ - --ignore=test_devpi_server/test_nginx_replica.py \ - --ignore=test_devpi_server/test_streaming_nginx.py \ - --ignore=test_devpi_server/test_streaming_replica_nginx.py \ - -k 'not root_passwd_hash_option \ - and not TestMirrorIndexThings' + preCheck = '' + export PATH=$PATH:$out/bin + export HOME=$TMPDIR ''; + pytestFlagsArray = [ + "./test_devpi_server" + "--slow" + "-rfsxX" + "--ignore=test_devpi_server/test_nginx_replica.py" + "--ignore=test_devpi_server/test_streaming_nginx.py" + "--ignore=test_devpi_server/test_streaming_replica_nginx.py" + ]; + disabledTests = [ + "root_passwd_hash_option" + "TestMirrorIndexThings" + ]; meta = with stdenv.lib;{ homepage = "http://doc.devpi.net"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 421aca7033a..eeed74d4cad 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5820,7 +5820,7 @@ in { pytest-pep257 = callPackage ../development/python-modules/pytest-pep257 { }; - pytestpep8 = callPackage ../development/python-modules/pytest-pep8 { }; + pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10 pytest-pylint = callPackage ../development/python-modules/pytest-pylint { };