Commit 22a7ffc3 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python3Packages.simple-websocket: cleanup, skip failing test on python>=3.14

parent 8d399366
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -2,23 +2,21 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  pythonOlder,
  setuptools,
  wsproto,
  pythonAtLeast,
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "simple-websocket";
  version = "1.1.0";
  pyproject = true;

  disabled = pythonOlder "3.11";

  src = fetchFromGitHub {
    owner = "miguelgrinberg";
    repo = "simple-websocket";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-dwL6GUyygNGBXqkkTnsHwFFpa1JAaeWc9ycQNRgTN4I=";
  };

@@ -33,13 +31,17 @@ buildPythonPackage rec {
  disabledTests = [
    # Tests require network access
    "SimpleWebSocketClientTestCase"
  ]
  ++ lib.optionals (pythonAtLeast "3.14") [
    # RuntimeError: There is no current event loop in thread 'MainThread'
    "AioSimpleWebSocketServerTestCase"
  ];

  meta = {
    description = "Simple WebSocket server and client for Python";
    homepage = "https://github.com/miguelgrinberg/simple-websocket";
    changelog = "https://github.com/miguelgrinberg/simple-websocket/blob/${version}/CHANGES.md";
    changelog = "https://github.com/miguelgrinberg/simple-websocket/blob/${finalAttrs.src.tag}/CHANGES.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}
})