python3Packages.debugpy: disable tests that hang in Darwin (#444746)

This commit is contained in:
Pavol Rusnak
2025-09-22 19:29:40 +00:00
committed by GitHub
@@ -2,12 +2,12 @@
lib,
stdenv,
buildPythonPackage,
pythonOlder,
pythonAtLeast,
fetchFromGitHub,
replaceVars,
gdb,
lldb,
setuptools,
pytestCheckHook,
pytest-xdist,
pytest-timeout,
@@ -26,9 +26,7 @@
buildPythonPackage rec {
pname = "debugpy";
version = "1.8.17";
format = "setuptools";
disabled = pythonOlder "3.8";
pyproject = true;
src = fetchFromGitHub {
owner = "microsoft";
@@ -91,6 +89,8 @@ buildPythonPackage rec {
}
)'';
build-system = [ setuptools ];
# Disable tests for unmaintained versions of python
doCheck = pythonAtLeast "3.11";
@@ -136,17 +136,23 @@ buildPythonPackage rec {
"test_systemexit"
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# ConnectionResetError: [Errno 54] Connection reset by peer
"tests/debugpy/test_breakpoints.py::test_error_in_condition[program-attach_connect(cli)-]"
"tests/debugpy/test_breakpoints.py::test_error_in_condition[program-attach_connect(cli)-NameError]"
];
# Fixes hanging tests on Darwin
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "debugpy" ];
meta = with lib; {
meta = {
description = "Implementation of the Debug Adapter Protocol for Python";
homepage = "https://github.com/microsoft/debugpy";
changelog = "https://github.com/microsoft/debugpy/releases/tag/${src.tag}";
license = licenses.mit;
maintainers = with maintainers; [ kira-bruneau ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kira-bruneau ];
platforms = [
"x86_64-linux"
"i686-linux"