diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix index 13c9932a128..6c4afec6352 100644 --- a/pkgs/development/python-modules/astral/default.nix +++ b/pkgs/development/python-modules/astral/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest }: +{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest, freezegun }: buildPythonPackage rec { pname = "astral"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "e41d9967d5c48be421346552f0f4dedad43ff39a83574f5ff2ad32b6627b6fbe"; }; - propagatedBuildInputs = [ pytz requests ]; + propagatedBuildInputs = [ pytz requests freezegun ]; checkInputs = [ pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/asynctest/default.nix b/pkgs/development/python-modules/asynctest/default.nix index d08f4137ba4..d36328d7225 100644 --- a/pkgs/development/python-modules/asynctest/default.nix +++ b/pkgs/development/python-modules/asynctest/default.nix @@ -17,6 +17,9 @@ buildPythonPackage rec { --replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored" ''; + # https://github.com/Martiusweb/asynctest/issues/132 + doCheck = pythonOlder "3.8"; + checkPhase = '' ${python.interpreter} -m unittest test ''; diff --git a/pkgs/development/python-modules/eyed3/default.nix b/pkgs/development/python-modules/eyed3/default.nix index 11aeca8127b..321c26542d1 100644 --- a/pkgs/development/python-modules/eyed3/default.nix +++ b/pkgs/development/python-modules/eyed3/default.nix @@ -1,15 +1,14 @@ { stdenv , buildPythonPackage , fetchPypi -, pythonAtLeast , pythonOlder -, paver , python , isPyPy , six -, pathlib -, python_magic , lib +, filetype +, deprecation +, dataclasses }: buildPythonPackage rec { @@ -22,18 +21,13 @@ buildPythonPackage rec { sha256 = "faf5806197f2093e82c2830d41f2378f07b3a9da07a16fafb14fc6fbdebac50a"; }; - # https://github.com/nicfit/eyeD3/pull/284 - postPatch = lib.optionalString (pythonAtLeast "3.4") '' - sed -ie '/pathlib/d' requirements/requirements.yml - ''; - - buildInputs = [ paver ]; - # requires special test data: # https://github.com/nicfit/eyeD3/blob/103198e265e3279384f35304e8218be6717c2976/Makefile#L97 doCheck = false; - propagatedBuildInputs = [ six python_magic ] ++ lib.optional (pythonOlder "3.4") pathlib; + propagatedBuildInputs = [ + six filetype deprecation + ] ++ lib.optional (pythonOlder "3.7") dataclasses; postInstall = '' for prog in "$out/bin/"*; do @@ -55,5 +49,4 @@ buildPythonPackage rec { and v2.3/v2.4. ''; }; - } diff --git a/pkgs/development/python-modules/hass-nabucasa/default.nix b/pkgs/development/python-modules/hass-nabucasa/default.nix index e13cae33960..2826056abcb 100644 --- a/pkgs/development/python-modules/hass-nabucasa/default.nix +++ b/pkgs/development/python-modules/hass-nabucasa/default.nix @@ -1,28 +1,40 @@ { lib, buildPythonPackage, fetchFromGitHub, fetchpatch , acme, aiohttp, snitun, attrs, pycognito, warrant -, pytest-aiohttp, asynctest, pytest }: +, pytest-aiohttp, asynctest, atomicwrites, pytest, pythonOlder }: buildPythonPackage rec { pname = "hass-nabucasa"; - version = "0.32.2"; + version = "0.34.6"; src = fetchFromGitHub { owner = "nabucasa"; repo = pname; rev = version; - sha256 = "1hfi5q222kgbgrj5yvr4lbhca49hcs6sc2yhxc4pjxqsc12bv1f1"; + sha256 = "1lkqwj58qr0vn7zf5mhrhaz973ahj9wjp4mgzvyja1gcdh6amv34"; }; - # upstreamed in https://github.com/NabuCasa/hass-nabucasa/pull/119 postPatch = '' - sed -i 's/"acme.*/"acme>=0.40.0,<2.0"/' setup.py - cat setup.py + sed -i 's/"acme.*"/"acme"/' setup.py ''; - propagatedBuildInputs = [ acme aiohttp snitun attrs warrant pycognito ]; + patches = [ + # relax pytz dependency + (fetchpatch { + url = "https://github.com/NabuCasa/hass-nabucasa/commit/419e80feddc36c68384c032feda0057515b53eaa.patch"; + sha256 = "14dgwci8615cwcf27hg7b42s7da50xhyjys3yx446q7ipk8zw4x6"; + }) + ]; + + propagatedBuildInputs = [ + acme aiohttp atomicwrites snitun attrs warrant pycognito + ]; checkInputs = [ pytest pytest-aiohttp asynctest ]; + # Asynctest's mocking is broken with python3.8 + # https://github.com/Martiusweb/asynctest/issues/132 + doCheck = pythonOlder "3.8"; + checkPhase = '' pytest tests/ ''; diff --git a/pkgs/development/python-modules/janus/default.nix b/pkgs/development/python-modules/janus/default.nix index 6fe188fbf84..1999a625e4b 100644 --- a/pkgs/development/python-modules/janus/default.nix +++ b/pkgs/development/python-modules/janus/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, pythonOlder }: +{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder, pytest-asyncio }: buildPythonPackage rec { pname = "janus"; @@ -11,7 +11,10 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; - checkInputs = [ pytest ]; + checkInputs = [ pytest-asyncio pytestCheckHook ]; + + # also fails upstream: https://github.com/aio-libs/janus/pull/258 + disabledTests = [ "test_format" ]; meta = with lib; { description = "Mixed sync-async queue"; diff --git a/pkgs/development/python-modules/pycognito/default.nix b/pkgs/development/python-modules/pycognito/default.nix index afc607baa40..8101b76b62c 100644 --- a/pkgs/development/python-modules/pycognito/default.nix +++ b/pkgs/development/python-modules/pycognito/default.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "pycognito"; - version = "0.1.2"; + version = "0.1.3"; src = fetchFromGitHub { owner = "pvizeli"; repo = "pycognito"; rev = version; - sha256 = "01zns522awm5yp5cbk1y7k7px534i5akiivip709i1naph3hvnfk"; + sha256 = "0wy6d274xda7v6dazv10h2vwig2avfyz8mh2lpd1a5k7i06r335r"; }; postPatch = '' diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix index cb3fe1a9f38..1c48cfa6c66 100644 --- a/pkgs/development/python-modules/python-engineio/default.nix +++ b/pkgs/development/python-modules/python-engineio/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "python-engineio"; - version = "3.10.0"; + version = "3.13.0"; src = fetchFromGitHub { owner = "miguelgrinberg"; repo = "python-engineio"; rev = "v${version}"; - sha256 = "1495r55177c38wq88pb28l50dfd4213iyxwq1k5rmsgp66vww09s"; + sha256 = "1fgfrgcvjg3fyza5lhl1l9cfq073xrwwhh3xs178csrjz4s8s378"; }; propagatedBuildInputs = [