about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/databases/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/databases/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/databases/default.nix31
1 files changed, 19 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/databases/default.nix b/nixpkgs/pkgs/development/python-modules/databases/default.nix
index 6f5373b56bc8..2facff6c840b 100644
--- a/nixpkgs/pkgs/development/python-modules/databases/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/databases/default.nix
@@ -3,7 +3,8 @@
 , fetchFromGitHub
 , sqlalchemy
 , aiocontextvars
-, isPy27
+, aiopg
+, pythonOlder
 , pytestCheckHook
 , pymysql
 , asyncpg
@@ -13,42 +14,48 @@
 
 buildPythonPackage rec {
   pname = "databases";
-  version = "0.5.0";
-  disabled = isPy27;
+  version = "0.5.3";
+
+  disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "encode";
     repo = pname;
     rev = version;
-    sha256 = "sha256-HNSPLmZTXZL1e5E9VJiXnQuO2WiXLYOveNTlFqdlTG8=";
+    sha256 = "sha256-67ykx7HKGgRvJ+GRVEI/e2+x51kfHHFjh/iI4tY+6aE=";
   };
 
   propagatedBuildInputs = [
-    aiocontextvars
-    sqlalchemy
-  ];
-
-  checkInputs = [
+    aiopg
     aiomysql
     aiosqlite
     asyncpg
     pymysql
+    sqlalchemy
+  ] ++ lib.optionals (pythonOlder "3.7") [
+    aiocontextvars
+  ];
+
+  checkInputs = [
     pytestCheckHook
   ];
 
   disabledTestPaths = [
-    # ModuleNotFoundError: No module named 'aiopg'
-    "tests/test_connection_options.py"
     # circular dependency on starlette
     "tests/test_integration.py"
     # TEST_DATABASE_URLS is not set.
     "tests/test_databases.py"
+    "tests/test_connection_options.py"
+  ];
+
+  pythonImportsCheck = [
+    "databases"
   ];
 
   meta = with lib; {
     description = "Async database support for Python";
     homepage = "https://github.com/encode/databases";
     license = licenses.bsd3;
-    maintainers = [ maintainers.costrouc ];
+    maintainers = with maintainers; [ costrouc ];
   };
 }