summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aria2p/default.nix43
-rw-r--r--pkgs/development/python-modules/loguru/default.nix6
-rw-r--r--pkgs/development/python-modules/python-telegram-bot/default.nix5
-rw-r--r--pkgs/development/python-modules/zodb/default.nix9
4 files changed, 58 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/aria2p/default.nix b/pkgs/development/python-modules/aria2p/default.nix
new file mode 100644
index 00000000000..51b523c010a
--- /dev/null
+++ b/pkgs/development/python-modules/aria2p/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
+, aria2, poetry, pytest, pytestcov, pytest_xdist, responses
+, asciimatics, loguru, requests, setuptools, websocket_client
+}:
+
+buildPythonPackage rec {
+  pname = "aria2p";
+  version = "0.7.0";
+  format = "pyproject";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "pawamoy";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1inak3y2win58zbzykfzy6xp00f276sqsz69h2nfsd93mpr74wf6";
+  };
+  
+  nativeBuildInputs = [ poetry ];
+
+  preBuild = ''
+    export HOME=$TMPDIR
+  '';
+
+  checkInputs = [ aria2 responses pytest pytestcov pytest_xdist ];
+
+  # Tests are not all stable/deterministic,
+  # they rely on actually running an aria2c daemon and communicating with it,
+  # race conditions and deadlocks were observed,
+  # thus the corresponding tests are disabled
+  checkPhase = ''
+    pytest -nauto -k "not test_api and not test_cli and not test_interface"
+  '';
+
+  propagatedBuildInputs = [ asciimatics loguru requests setuptools websocket_client ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/pawamoy/aria2p";
+    description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC";
+    license = licenses.isc;
+    maintainers = with maintainers; [ koral ];
+  };
+}
diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix
index ceb9f841a46..c12084f008e 100644
--- a/pkgs/development/python-modules/loguru/default.nix
+++ b/pkgs/development/python-modules/loguru/default.nix
@@ -2,18 +2,18 @@
 
 buildPythonPackage rec {
   pname = "loguru";
-  version = "0.4.0";
+  version = "0.4.1";
   
   disabled = isPy27;
   src = fetchPypi {
     inherit pname version;
-    sha256 = "d5ddf363b7e0e562652f283f74a89bf35601baf16b70f2cd2736a2f8c6638748";
+    sha256 = "a6101fd435ac89ba5205a105a26a6ede9e4ddbb4408a6e167852efca47806d11";
   };
 
   checkInputs = [ pytestCheckHook colorama ];
 
   disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" ];
+    ++ stdenv.lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ];
 
   meta = with stdenv.lib; {
     homepage = https://github.com/Delgan/loguru;
diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix
index 11342237479..9b70d76bfed 100644
--- a/pkgs/development/python-modules/python-telegram-bot/default.nix
+++ b/pkgs/development/python-modules/python-telegram-bot/default.nix
@@ -23,7 +23,8 @@ buildPythonPackage rec {
       --replace "import telegram.vendor.ptb_urllib3.urllib3 as urllib3" "import urllib3 as urllib3" \
       --replace "import telegram.vendor.ptb_urllib3.urllib3.contrib.appengine as appengine" "import urllib3.contrib.appengine as appengine" \
       --replace "from telegram.vendor.ptb_urllib3.urllib3.connection import HTTPConnection" "from urllib3.connection import HTTPConnection" \
-      --replace "from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout" "from urllib3.util.timeout import Timeout"
+      --replace "from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout" "from urllib3.util.timeout import Timeout" \
+      --replace "from telegram.vendor.ptb_urllib3.urllib3.fields import RequestField" "from urllib3.fields import RequestField"
 
     touch LICENSE.dual
   '';
@@ -38,6 +39,6 @@ buildPythonPackage rec {
     description = "This library provides a pure Python interface for the Telegram Bot API.";
     homepage = https://python-telegram-bot.org;
     license = licenses.lgpl3;
-    maintainers = with maintainers; [ veprbl ];
+    maintainers = with maintainers; [ veprbl pingiun ];
   };
 }
diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix
index c7935208536..f15cefaa475 100644
--- a/pkgs/development/python-modules/zodb/default.nix
+++ b/pkgs/development/python-modules/zodb/default.nix
@@ -1,5 +1,6 @@
 { stdenv
 , fetchPypi
+, fetchpatch
 , buildPythonPackage
 , python
 , zope_testrunner
@@ -23,6 +24,14 @@ buildPythonPackage rec {
       sha256 = "20155942fa326e89ad8544225bafd74237af332ce9d7c7105a22318fe8269666";
     };
 
+    patches = [
+      # Compatibility with transaction v3.0
+      (fetchpatch {
+        url = "https://github.com/zopefoundation/ZODB/commit/0adcc6877f690186c97cc5da7e13788946d5e0df.patch";
+        sha256 = "1zmbgm7r36nj5w7icpinp61fm81svh2wk213pzr3l0jxzr9i5qi4";
+      })
+    ];
+
     # remove broken test
     postPatch = ''
       rm -vf src/ZODB/tests/testdocumentation.py