From b257877d8c77d62e3f49cfd9b32b3fb0e1aa736a Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 20 Sep 2025 12:21:29 -0700 Subject: [PATCH 1/2] python3Packages.debugpy: modernize --- .../development/python-modules/debugpy/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index b337381be485..9b8f9db6314f 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -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"; @@ -141,12 +141,12 @@ buildPythonPackage rec { 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" From 31c0eee693b4809edb6b2a4c520593a66efaded6 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sat, 20 Sep 2025 12:12:17 -0700 Subject: [PATCH 2/2] python3Packages.debugpy: disable tests that fail on Darwin --- pkgs/development/python-modules/debugpy/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index 9b8f9db6314f..d7606c49001b 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -136,6 +136,12 @@ 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;