• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 19381742489

15 Nov 2025 12:52AM UTC coverage: 49.706% (-30.6%) from 80.29%
19381742489

Pull #22890

github

web-flow
Merge d961abf79 into 42e1ebd41
Pull Request #22890: Updated all python subsystem constraints to 3.14

4 of 5 new or added lines in 5 files covered. (80.0%)

14659 existing lines in 485 files now uncovered.

31583 of 63540 relevant lines covered (49.71%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.47
/src/python/pants/backend/python/subsystems/debugpy.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from __future__ import annotations
2✔
5

6
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
2✔
7
from pants.backend.python.target_types import EntryPoint
2✔
8
from pants.core.subsystems.debug_adapter import DebugAdapterSubsystem
2✔
9
from pants.engine.rules import collect_rules
2✔
10
from pants.option.option_types import ArgsListOption
2✔
11

12

13
class DebugPy(PythonToolBase):
2✔
14
    options_scope = "debugpy"
2✔
15
    name = options_scope
2✔
16
    help_short = "An implementation of the Debug Adapter Protocol for Python (https://github.com/microsoft/debugpy)."
2✔
17

18
    default_main = EntryPoint("debugpy")
2✔
19
    default_requirements = ["debugpy>=1.6.5,<1.7"]
2✔
20

21
    register_interpreter_constraints = True
2✔
22

23
    default_lockfile_resource = ("pants.backend.python.subsystems", "debugpy.lock")
2✔
24

25
    args = ArgsListOption(example="--log-to-stderr")
2✔
26

27
    # NB: The debugpy arguments assume that:
28
    #   1. debugpy is being invoked in a venv (likely we're in a VenvPex)
29
    #   2. debugpy is in the same venv as the user code
30
    def get_args(self, debug_adapter: DebugAdapterSubsystem) -> tuple[str, ...]:
2✔
31
        return (
×
32
            "--listen",
33
            f"{debug_adapter.host}:{debug_adapter.port}",
34
            "--wait-for-client",
35
            *self.args,
36
            "-c",
37
            "__import__('runpy').run_path(__import__('os').environ['VIRTUAL_ENV'] + '/pex', run_name='__main__')",
38
        )
39

40

41
def rules():
2✔
UNCOV
42
    return collect_rules()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc