From a8d4131257c04c1cc65729452dabb97b656f3e22 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 3 May 2021 13:48:03 -0400 Subject: [PATCH 1/3] python3Packages.lark-parser: 0.11.2 -> 0.11.3 --- .../python-modules/lark-parser/default.nix | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/lark-parser/default.nix b/pkgs/development/python-modules/lark-parser/default.nix index d8996a153e64..9f787563e5a4 100644 --- a/pkgs/development/python-modules/lark-parser/default.nix +++ b/pkgs/development/python-modules/lark-parser/default.nix @@ -1,35 +1,38 @@ { lib , buildPythonPackage , fetchFromGitHub +, python , regex - # Test inputs -, pytestCheckHook }: buildPythonPackage rec { pname = "lark-parser"; - version = "0.11.2"; + version = "0.11.3"; src = fetchFromGitHub { owner = "lark-parser"; repo = "lark"; rev = version; - sha256 = "1v1piaxpz4780km2z5i6sr9ygi9wpn09yyh999b3f4y0dcz20pbd"; + sha256 = "1ggvlzpdzlrxl46fgi8cfq2rzlwn21shpdkm4pknnhfjlsinv913"; }; + # Optional import, but fixes some re known bugs & allows advanced regex features propagatedBuildInputs = [ regex ]; - checkInputs = [ pytestCheckHook ]; - disabledTestPaths = [ - "tests/test_nearley" # requires Js2Py package (not in nixpkgs) - ]; - disabledTests = [ - "test_override_rule" # has issue with file access paths - ]; + checkPhase = '' + runHook preCheck + + # Official way to run the tests. Runs unittest internally. + # pytest produces issues with some test resource paths (relies on __main__) + ${python.interpreter} -m tests + + runHook postCheck + ''; meta = with lib; { description = "A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface"; - homepage = "https://github.com/lark-parser/lark"; + homepage = "https://lark-parser.readthedocs.io/"; + changelog = "https://github.com/lark-parser/lark/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fridh drewrisinger ]; }; From 7c6b8698e3db8f3c2d1e455de8b32b0e0f0c5373 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 3 May 2021 15:10:36 -0400 Subject: [PATCH 2/3] python3Packages.gremlinpython: unbreak Also organize the imports & remove unnecessary pytestrunner. --- .../python-modules/gremlinpython/default.nix | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/gremlinpython/default.nix b/pkgs/development/python-modules/gremlinpython/default.nix index 59da8f173d97..573f5a68ce67 100644 --- a/pkgs/development/python-modules/gremlinpython/default.nix +++ b/pkgs/development/python-modules/gremlinpython/default.nix @@ -1,6 +1,15 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, pytestCheckHook, pyhamcrest, pytestrunner -, six, isodate, tornado, aenum, radish-bdd, mock +{ lib +, buildPythonPackage +, fetchFromGitHub +, aenum +, importlib-metadata +, isodate +, six +, tornado +, pytestCheckHook +, mock +, pyhamcrest +, radish-bdd }: buildPythonPackage rec { @@ -22,13 +31,28 @@ buildPythonPackage rec { --replace 'PyHamcrest>=1.9.0,<2.0.0' 'PyHamcrest' \ --replace 'radish-bdd==0.8.6' 'radish-bdd' \ --replace 'mock>=3.0.5,<4.0.0' 'mock' \ - --replace 'pytest>=4.6.4,<5.0.0' 'pytest' + --replace 'pytest>=4.6.4,<5.0.0' 'pytest' \ + --replace 'importlib-metadata<3.0.0' 'importlib-metadata' \ + --replace 'pytest-runner==5.2' ' ' ''; - nativeBuildInputs = [ pytestrunner ]; # simply to placate requirements - propagatedBuildInputs = [ six isodate tornado aenum ]; + # setup-requires requirements + nativeBuildInputs = [ + importlib-metadata + ]; + propagatedBuildInputs = [ + aenum + isodate + six + tornado + ]; - checkInputs = [ pytestCheckHook pyhamcrest radish-bdd mock ]; + checkInputs = [ + pytestCheckHook + mock + pyhamcrest + radish-bdd + ]; # disable custom pytest report generation preCheck = '' @@ -36,12 +60,14 @@ buildPythonPackage rec { ''; # many tests expect a running tinkerpop server + disabledTestPaths = [ + "tests/driver/test_client.py" + "tests/driver/test_driver_remote_connection.py" + "tests/driver/test_driver_remote_connection_threaded.py" + "tests/process/test_dsl.py" + "tests/structure/io/test_functionalityio.py" + ]; pytestFlagsArray = [ - "--ignore=tests/driver/test_client.py" - "--ignore=tests/driver/test_driver_remote_connection.py" - "--ignore=tests/driver/test_driver_remote_connection_threaded.py" - "--ignore=tests/process/test_dsl.py" - "--ignore=tests/structure/io/test_functionalityio.py" # disabledTests doesn't quite allow us to be precise enough for this "-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'" ]; From bf8c530542d1aed0e59887888476c4c79234e734 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 3 May 2021 15:11:27 -0400 Subject: [PATCH 3/3] python3Packages.cassandra-driver: 3.24.0 -> 3.25.0 Remove unused python argument. --- .../python-modules/cassandra-driver/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix index 16479302221b..e5b1a4c4fb0f 100644 --- a/pkgs/development/python-modules/cassandra-driver/default.nix +++ b/pkgs/development/python-modules/cassandra-driver/default.nix @@ -1,4 +1,8 @@ -{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, pythonOlder +{ stdenv +, lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder , cython , eventlet , futures ? null @@ -21,14 +25,14 @@ buildPythonPackage rec { pname = "cassandra-driver"; - version = "3.24.0"; + version = "3.25.0"; # pypi tarball doesn't include tests src = fetchFromGitHub { owner = "datastax"; repo = "python-driver"; rev = version; - sha256 = "1rr69hly5q810xpn8rkzxwzlq55wxxp7kwki9vfri3gh674d2wip"; + sha256 = "1dn7iiavsrhh6i9hcyw0mk8j95r5ym0gbrvdca998hx2rnz5ark6"; }; nativeBuildInputs = [ cython ]; @@ -66,8 +70,10 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/unit" + ]; + disabledTestPaths = [ # requires puresasl - "--ignore=tests/unit/advanced/test_auth.py" + "tests/unit/advanced/test_auth.py" ]; disabledTests = [ # doesn't seem to be intended to be run directly