Commit f1dfd966 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.aiosasl: fix broken tests on Python 3.12

parent 540bf3b6
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -5,13 +5,16 @@
  fetchpatch,
  pyopenssl,
  pytestCheckHook,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "aiosasl";
  version = "0.5.0";
  pyproject = true;

  format = "setuptools";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "horazont";
@@ -28,6 +31,14 @@ buildPythonPackage rec {
    })
  ];

  postPatch = ''
    # https://github.com/horazont/aiosasl/issues/28
    substituteInPlace tests/test_aiosasl.py \
      --replace-fail "assertRaisesRegexp" "assertRaisesRegex"
  '';

  build-system = [ setuptools ];

  nativeCheckInputs = [
    pyopenssl
    pytestCheckHook