Takes some changes from pydevd to fix line numbers being None (#1734)

* Add missing subrepo tools

* Update parent

* git subrepo commit (merge) src/debugpy/_vendored/pydevd

subrepo:
  subdir:   "src/debugpy/_vendored/pydevd"
  merged:   "c81fc701"
upstream:
  origin:   "https://github.com/fabioz/PyDev.Debugger.git"
  branch:   "main"
  commit:   "d0f81de4"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"

* Update sys_monitoring c file

* Try avoiding test errors on shutdown

* Try fixing case where closing early

* Run PRs everywhere
This commit is contained in:
Rich Chiodo 2024-11-14 16:22:19 -08:00 committed by GitHub
parent 3573ca0e2b
commit 73be8fb5df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 6265 additions and 6358 deletions

View file

@ -55,15 +55,19 @@ def cli(pyfile):
def parse(args):
log.debug("Parsing argv: {0!r}", args)
try:
# Run the CLI parser in a subprocess, and capture its output.
output = subprocess.check_output(
[sys.executable, "-u", cli_parser.strpath] + args
)
try:
# Run the CLI parser in a subprocess, and capture its output.
output = subprocess.check_output(
[sys.executable, "-u", cli_parser.strpath] + args
)
# Deserialize the output and return the parsed argv and options.
argv, options = pickle.loads(output)
except subprocess.CalledProcessError as exc:
raise pickle.loads(exc.output)
# Deserialize the output and return the parsed argv and options.
argv, options = pickle.loads(output)
except subprocess.CalledProcessError as exc:
raise pickle.loads(exc.output)
except EOFError:
# We may have just been shutting down. If so, return an empty argv and options.
argv, options = [], {}
log.debug("Adjusted sys.argv: {0!r}", argv)
log.debug("Parsed options: {0!r}", options)