Unverified Commit f177b76b authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #263783 from mweinelt/operation-asynctest

Remove more asynctest references on Python 3.11
parents b48c6764 97b2d61d
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -18,9 +18,7 @@
, aiodns
, brotli
, faust-cchardet
, asynctest
, typing-extensions
, idna-ssl
# tests_require
, async-generator
, freezegun
@@ -75,11 +73,6 @@ buildPythonPackage rec {
    aiodns
    brotli
    faust-cchardet
  ] ++ lib.optionals (pythonOlder "3.8") [
    asynctest
    typing-extensions
  ] ++ lib.optionals (pythonOlder "3.7") [
    idna-ssl
  ];

  # NOTE: pytest-xdist cannot be added because it is flaky. See https://github.com/NixOS/nixpkgs/issues/230597 for more info.
+0 −37
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, asynctest
, pythonOlder
}:

buildPythonPackage rec {
  pname = "aionotify";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "rbarrois";
    repo = "aionotify";
    rev = "v${version}";
    sha256 = "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y";
  };

  disabled = pythonOlder "3.5";

  preCheck = ''
    substituteInPlace tests/test_usage.py \
      --replace "asyncio.wait_for(task, timeout, loop=self.loop)" "asyncio.wait_for(task, timeout)"
  '';

  nativeCheckInputs = [
    asynctest
  ];

  meta = with lib; {
    homepage = "https://github.com/rbarrois/aionotify";
    description = "Simple, asyncio-based inotify library for Python";
    license = with lib.licenses; [ bsd2 ];
    platforms = platforms.linux;
    maintainers = with lib.maintainers; [ ];
  };
}
+20 −21
Original line number Diff line number Diff line
{ lib
, aenum
, aiohttp
, asynctest
, buildPythonPackage
, fetchFromGitHub
, httpx
, poetry-core
, pydantic
, pytest-mock
, pytest-asyncio
, pytest-httpx
, pytestCheckHook
, pythonOlder
, requests
, rich
}:

buildPythonPackage rec {
  pname = "intellifire4py";
  version = "2.2.2";
  format = "setuptools";
  version = "3.1.29";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "jeeftor";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-iqlKfpnETLqQwy5sNcK2x/TgmuN2hCfYoHEFK2WWVXI=";
    rev = "refs/tags/v${version}";
    hash = "sha256-isAVq45UnKB8uMg7bhehpxIk5OOLcWx+VNZhJ8dE52Y=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aenum
    aiohttp
    httpx
    pydantic
    requests
  ];

  nativeCheckInputs = [
    asynctest
    pytest-mock
    pytestCheckHook
  ];

  disabledTests = [
    # Test file is missing
    "test_json_files"
    rich
  ];

  pythonImportsCheck = [
    "intellifire4py"
  ];
  nativeCheckInputs = [
    pytest-asyncio
    pytest-httpx
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Module to read Intellifire fireplace status data";
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ buildPythonPackage rec {
    aiohttp
  ];

  doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11

  nativeCheckInputs = [
    asynctest
    pytest-asyncio
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ buildPythonPackage rec {
    aiohttp
  ];

  doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11

  nativeCheckInputs = [
    asynctest
    pytest-asyncio
Loading